(Ada) New function ada_is_access_to_unconstrained_array
[external/binutils.git] / gdb / ChangeLog
1 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2
3         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
4         (ada_check_typedef): Use it.
5
6 2018-09-10  Xavier Roirand  <roirand@adacore.com>
7
8         * ada-varobj.c (ada_varobj_describe_struct_child)
9         (ada_varobj_describe_child): Handle union case like struct one.
10
11 2018-09-10  Tom Tromey  <tom@tromey.com>
12
13         PR python/18380:
14         * python/python.c (_initialize_python): Make example in "python"
15         help work in Python 3.
16
17 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
18
19         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
20         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
21         $(EXEEXT) to the script, as it is not a program.
22
23 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
24
25         * python/py-prettyprint.c (pretty_print_one_value): Return
26         gdbpy_ref<>.
27         (print_string_repr): Adjust.
28         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
29         * python/python-internal.h (apply_varobj_pretty_printer): Return
30         gdbpy_ref<>.
31         * varobj.c (varobj_value_get_print_value): Adjust.
32
33 2018-09-08  Tom Tromey  <tom@tromey.com>
34
35         PR python/16047:
36         * python/py-prettyprint.c (pretty_print_one_value): Check for
37         to_string method.
38
39 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
40
41         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
42         replace_operator_with_call.
43
44 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
45
46         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
47
48 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
49
50         * ada-typeprint.c (print_range): Print the bounds using TYPE
51         rather than its TYPE_TARGET_TYPE.
52
53 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
54
55         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
56         call to ada_to_fixed_value_create.
57
58 2018-09-08  Jerome Guitton  <guitton@adacore.com>
59
60         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
61
62 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
63
64         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
65         by calls to error.
66
67 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
68
69         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
70         Move update of loop variable "fi".
71
72 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
73
74         * ada-lang.c (value_assign_to_component): In the case of
75         big-endian targets, extract the bits of the given VAL
76         using an src_offset of zero if container is not a scalar.
77
78 2018-09-06  Simon Ser  <contact@emersion.fr>
79
80         PR gdb/23105
81         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
82         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
83         * fbsd-tdep.c (fbsd_make_note_desc): New.
84         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
85         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
86         * target.h (enum target_object) Add FreeBSD-specific
87         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
88
89 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
90
91         * compile/compile-c.h (generate_c_for_variable_locations):
92         Change reference to pointer.
93         * compile/compile-c-support.c (compile_program) <compute>:
94         Likewise.
95         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
96         (generate_c_for_for_one_variable): Likewise
97         (generate_c_for_variable_locations): Likewise
98         * compile/compile-c-types.c (compile_c_instance::convert_type):
99         Likewise
100         * compile/compile-cplus-symbols.c (convert_one_symbol):
101         std::move the scope passed to enter_scope.
102         * compile/compile-cplus-types.c
103         (compile_cplus_instance::enter_scope): Make parameter
104         rvalue-reference.
105         (compile_cplus_instance::new_scope): Change reference to
106         pointer.
107         (compile_cplus_instance::convert_type): Likewise
108         (compile_cplus_convert_typedef): std::move the scope passed to
109         enter_scope.
110         (compile_cplus_convert_struct_or_union): Likewise.
111         (compile_cplus_convert_enum): Likewise.
112         (compile_cplus_convert_namespace): Likewise.
113         * compile/compile-cplus.h (compile_cplus_instance)
114         <enter_scope>: Make parameter rvalue-reference.
115         * compile/compile-internal.h (compile_instance)
116         <get_cached_type>: Likewise
117         * compile/compile-loc2c.c (push): Likewise
118         (pushf): Likewise
119         (unary): Likewise
120         (binary): Likewise
121         (print_label): Likewise
122         (pushf_register_address): Likewise
123         (pushf_register): Likewise
124         (do_compile_dwarf_expr_to_c): Likewise
125         (compile_dwarf_expr_to_c): Likewise
126         (compile_dwarf_bounds_to_c): Likewise
127         * compile/compile.c (compile_instance::get_cached_type):
128         Likewise
129         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
130         (compile_dwarf_bounds_to_c): Likewise
131         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
132         (dwarf2_compile_property_to_c): Likewise
133         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
134         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
135         Likewise
136
137 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
138
139         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
140         * tui/tui-data.c (init_content_element): Don't initialize it.
141
142 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
143
144         * tui/tui-data.h (struct tui_win_info)
145         <detail::opaque>: Remove.
146         * tui/tui-data.c (init_win_info): Remove assignment.
147
148 2018-09-05  Tom Tromey  <tom@tromey.com>
149
150         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
151         -Wformat-nonliteral.
152         * target-float.c (host_float_ops<T>::to_string)
153         (host_float_ops<T>::from_string): Use
154         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
155         * configure: Rebuild.
156
157 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
158
159         * printcmd.c (printf_c_string): Use
160         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
161         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
162
163 2018-09-05  Tom Tromey  <tom@tromey.com>
164
165         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
166
167 2018-09-05  Tom de Vries  <tdevries@suse.de>
168
169         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
170         with resolve_abstract_p == true.
171         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
172         defaulting to false. Propagate resolve_abstract_p to
173         dwarf2_fetch_die_loc_sect_off.
174         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
175         parameter, defaulting to false.
176         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
177         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
178         parameter.
179         * dwarf2read.h (struct die_info): Forward-declare.
180         (die_info_ptr): New typedef.
181         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
182
183 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
184
185         GDB 8.2 released.
186
187 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
188             Pedro Alves  <palves@redhat.com>
189
190         * gnulib/Makefile.in (aclocal_m4_deps): Move to
191         "aclocal-m4-deps.mk".  Include file here.
192         $(srcdir)/aclocal.m4: Add "configure.ac".
193         * gnulib/aclocal-m4-deps.mk: New file.
194         * gnulib/update-gnulib.sh: Automatically update
195         "aclocal-m4-deps.mk".
196
197 2018-09-04  Tom Tromey  <tom@tromey.com>
198
199         * configure: Rebuild.
200         * configure.ac: Remove multi-ice code.
201
202 2018-09-04  Tom Tromey  <tom@tromey.com>
203
204         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
205         (ada-exp.o): Update.
206
207 2018-09-04  Tom Tromey  <tom@tromey.com>
208
209         * Makefile.in (printcmd.o, target-float.o): Remove.
210         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
211
212 2018-09-04  Tom Tromey  <tom@tromey.com>
213
214         * gnulib/Makefile.in: Remove obsolete comment.
215         * Makefile.in: Remove obsolete comment.
216
217 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
218
219         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
220         line with '+'.
221
222 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
223
224         * riscv-tdep.c: Add 'prologue-value.h' include.
225         (struct riscv_unwind_cache): New struct.
226         (riscv_debug_unwinder): New global.
227         (riscv_scan_prologue): Update arguments, capture register details
228         from prologue scan.
229         (riscv_skip_prologue): Reformat arguments line, move end of
230         prologue calculation into riscv_scan_prologue.
231         (riscv_frame_cache): Update return type, create
232         riscv_unwind_cache, scan the prologue, and fill in remaining cache
233         details.
234         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
235         (riscv_frame_prev_register): Use the trad_frame within the
236         riscv_unwind_cache.
237         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
238         flag.
239
240 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
241
242         * trad-frame.h (trad_frame_set_realreg): Declare.
243         (trad_frame_set_addr): Declare.
244         * trad-frame.c (trad_frame_set_realreg): Define new function.
245         (trad_frame_set_addr): Define new function.
246         (trad_frame_set_reg_realreg): Use new function.
247         (trad_frame_set_reg_addr): Use new function.
248
249 2018-09-01  Keith Seitz  <keiths@redhat.com>
250
251         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
252         pulongest instead of "%lld".
253         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
254         ATTRIBUTE_UNUSED.
255
256 2018-08-31  Tom Tromey  <tom@tromey.com>
257
258         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
259         variant part type.
260
261 2018-08-31  Pedro Alves  <palves@redhat.com>
262
263         * gdbarch.h: Regenerate.
264
265 2018-08-31  Pedro Alves  <palves@redhat.com>
266
267         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
268         * target.h (Hardware watchpoint interfaces): Describe
269         continuable/steppable/non-steppable watchpoints.
270         * gdbarch.h, gdbarch.c: Regenerate.
271
272 2018-08-31  Pedro Alves  <palves@redhat.com>
273
274         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
275         Delete.
276         * s390-linux-nat.c
277         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
278         * target.h (target_ops::have_continuable_watchpoint): Delete.
279         (target_have_continuable_watchpoint): Delete.
280         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
281         * target-delegates.c: Regenerate.
282
283 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
284
285         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
286         the files present in "gnulib/import/m4/".
287
288 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
289
290         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
291         c.sw, c.swsp, and c.sdsp.
292
293 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
294
295         * riscv-tdep.c (struct riscv_inferior_data): Delete.
296         (riscv_read_misa_reg): Don't cache value read into inferior data.
297         (riscv_new_inferior_data): Delete.
298         (riscv_inferior_data_cleanup): Delete.
299         (riscv_inferior_data): Delete.
300         (riscv_invalidate_inferior_data): Delete.
301         (_initialize_riscv_tdep): Remove initialisation of inferior data.
302
303 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
304
305         * compile/compile-cplus-types.c
306         (compile_cplus_instance::leave_scope): Take the address of scope
307         object.
308         (compile_cplus_instance::convert_qualified_base): Compare quals
309         to 0.
310
311 2018-08-30  Keith Seitz  <keiths@redhat.com>
312
313         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
314         Use "%s" and host_address_to_string instead of "%p" in printf.
315
316 2018-08-29  Keith Seitz  <keiths@redhat.com>
317
318         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
319         and compile-cplus-types.c.
320         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
321         * c-lang.c (cplus_language_defn): Set C++ compile functions.
322         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
323         Declare.
324         * compile/compile-c-support.c: Include compile-cplus.h.
325         (load_libcompile): Templatize.
326         (get_compile_context): "New" function.
327         (c_get_compile_context): Use get_compile_context.
328         (cplus_get_compile_context): New function.
329         (cplus_push_user_expression, cplus_pop_user_expression)
330         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
331         (cplus_compute_program): Define new structs/functions.
332         * compile/compile-cplus-symmbols.c: New file.
333         * compile/compile-cplus-types.c: New file.
334         * compile/compile-cplus.h: New file.
335         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
336         Declare.
337         * compile/compile-object-load.c (get_out_value_type): Use
338         strncmp_iw when comparing symbol names.
339         (compile_object_load): Add mst_bss and mst_data.
340         * compile/compile.c (_initialize_compile): Remove
341         -Wno-implicit-function-declaration from `compile_args'.
342         * compile/gcc-cp-plugin.h: New file.
343         * NEWS: Mention C++ compile support and new debug options.
344
345 2018-08-29  Keith Seitz  <keiths@redhat.com>
346
347         * linespec.c (collect_info::add_symbol): Make virtual.
348         (struct symbol_searcher_collect_info): New struct.
349         (symbol_searcher::find_all_symbols): New method.
350         * symtab.h (class symbol_searcher): New class.
351
352 2018-08-29  Keith Seitz  <keiths@redhat.com>
353
354         * linespec.c (struct linespec) <function_symbols, label_symbols>:
355         Change to vector of block_symbol.  Update all users.
356         (struct collect_info) <symbols>: Likewise.
357         (collect_info::add_symbol): Take block_symbol as argument.
358         Update all callers.
359         (decode_compound_collector) <m_symbols>: Change type to vector
360         of block_symbol.  Update all users.
361         (decode_compound_collector::operator ()): Change parameter type
362         to block_symbol.
363         (find_method, find_function_symbols, find_linespec_symbols)
364         (find_label_symbols_in_block, find_label_symbols): Change symbol
365         vectors to block_symbol vectors.
366         * symtab.h (symbol_found_callback_ftype): Change parameter type to
367         block_symbol.
368
369 2018-08-29  Keith Seitz  <keiths@redhat.com>
370
371         * linespec.c (symbolp): Remove typedef and VEC definitions.
372         (bound_minimal_symbol_d): Likewise.
373
374 2018-08-29  Keith Seitz  <keiths@redhat.com>
375
376         * linespec.c (decode_compound_collector::decode_compound_collector):
377         Remove initialization for `m_symtabs'.
378         (decode_compound_collector::release_symbols): Change return type
379         to std::vector.  Update all callers.
380         (class decode_compound_collector) <m_symbols>: Change type to
381         std::vector.
382         (lookup_prefix_sym): Change return type to std::vector.  Update all
383         callers.
384         (compare_symbols): Remove.
385         (std_compare_symbols): Rename to `compare_symbols'.
386         (find_method): Change `sym_classes' parameter to std::vector.
387         Update all callers.  Use std::sort to sort sym_classes.
388         (find_linespec_symbols): Remove cleanup.
389
390 2018-08-29  Keith Seitz  <keiths@redhat.com>
391
392         * linespec.c (struct linespec) <minimal_symbols>: Change type to
393         std::vector.  Update all users.
394         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
395         (struct collect_info) <minimal_symbols>: Likewise.
396         (compare_msymbols): Return bool.  Change parameters to const
397         bound_minimal_symbol references.
398         (find_method, find_function_symbols, find_linespec_symbols): Change
399         `minsyms' parameter to std::vector.  Update all callers.
400
401 2018-08-29  Keith Seitz  <keiths@redhat.com>
402
403         * linespec.c (struct linespec) <label_symbols>: Change type to
404         std::vector.  Update all users.
405         (find_label_symbols_in_block): Change `result' parameter to
406         std::vector.  Update all callers.
407         (find_label_symbols): Return std::vector.  Update all callers.
408
409 2018-08-29  Keith Seitz  <keiths@redhat.com>
410
411         * linespec.c (struct linespec) <function_symbols>: Change type to
412         std::vector.  Update all users.
413         (struct collect_info) <function_symbols>: Likewise.
414         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
415         (std_compare_symbols): New function.
416         (find_method, find_function_symbols, find_linespec_symbols)
417         (find_label_symbols_in_block): Change `symbols' parameter to
418         std::vector.  Update all callers.
419         (find_label_symbols): Likewise for `function_symbols' and
420         `label_funcs_ret'.
421
422 2018-08-29  Keith Seitz  <keiths@redhat.com>
423
424         * linespec.c (symtab_vector_up): Define.
425         (struct linespec) <file_symtabs>: Change type to std::vector *.
426         Update all uses.
427         (struct collect_info) <file_symtabs>: Likewise.
428         (collect_symtabs_from_filename): Return symtab_vector_up.
429         Update all callers.
430         (decode_objc): Remove cleanup.
431         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
432         (symtab_collector::release_symtabs): Return symtab_vector_up.
433         Update all callers.
434         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
435         Update all users.
436         (collect_symtabs_from_filename, symtabs_from_filename): Return
437         symtab_vector_up.  Update all callers.
438
439 2018-08-29  Tom Tromey  <tom@tromey.com>
440
441         * csky-tdep.c (csky_analyze_prologue): Use
442         core_addr_to_string_nz.
443
444 2018-08-29  Tom Tromey  <tom@tromey.com>
445
446         * windows-nat.c (struct xlate_exception) <them>: Change type to
447         DWORD.
448         (xlate): Fix formatting.  Remove last entry.
449         (struct xlate_exception, xlate): Comment out.
450         (windows_nat_target::resume): Use ranged for.
451
452 2018-08-29  Jim Wilson  <jimw@sifive.com>
453
454         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
455         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
456         of NT_PRFPREG.
457         (riscv_linux_nat_target::store_registers): Likewise.
458
459 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
460
461         PR gdb/23555
462         PR gdb/23558
463         * gnulib/aclocal.m4: Regenerate.
464         * gnulib/config.in: Regenerate.
465         * gnulib/configure: Regenerate.
466         * gnulib/import/Makefile.am: Update.
467         * gnulib/import/Makefile.in: Update.
468         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
469         * gnulib/import/_Noreturn.h: ... this.
470         * gnulib/import/alloca.in.h: Update.
471         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
472         * gnulib/import/arg-nonnull.h: ... this.
473         * gnulib/import/assure.h: Update.
474         * gnulib/import/at-func.c: Update.
475         * gnulib/import/basename-lgpl.c: Update.
476         * gnulib/import/extra/snippet/c++defs.h: Rename to...
477         * gnulib/import/c++defs.h: ... this.
478         * gnulib/import/canonicalize-lgpl.c: Update.
479         * gnulib/import/cdefs.h: Update.
480         * gnulib/import/chdir-long.c: Update.
481         * gnulib/import/chdir-long.h: Update.
482         * gnulib/import/cloexec.c: Update.
483         * gnulib/import/cloexec.h: Update.
484         * gnulib/import/close.c: Update.
485         * gnulib/import/closedir.c: Update.
486         * gnulib/import/config.charset: Update.
487         * gnulib/import/dirent-private.h: Update.
488         * gnulib/import/dirent.in.h: Update.
489         * gnulib/import/dirfd.c: Update.
490         * gnulib/import/dirname-lgpl.c: Update.
491         * gnulib/import/dirname.h: Update.
492         * gnulib/import/dosname.h: Update.
493         * gnulib/import/dup-safer-flag.c: Update.
494         * gnulib/import/dup-safer.c: Update.
495         * gnulib/import/dup.c: Update.
496         * gnulib/import/dup2.c: Update.
497         * gnulib/import/errno.in.h: Update.
498         * gnulib/import/error.c: Update.
499         * gnulib/import/error.h: Update.
500         * gnulib/import/exitfail.c: Update.
501         * gnulib/import/exitfail.h: Update.
502         * gnulib/import/extra/update-copyright: Update.
503         * gnulib/import/fchdir.c: Update.
504         * gnulib/import/fcntl.c: Update.
505         * gnulib/import/fcntl.in.h: Update.
506         * gnulib/import/fd-hook.c: Update.
507         * gnulib/import/fd-hook.h: Update.
508         * gnulib/import/fd-safer-flag.c: Update.
509         * gnulib/import/fd-safer.c: Update.
510         * gnulib/import/fdopendir.c: Update.
511         * gnulib/import/filename.h: Update.
512         * gnulib/import/filenamecat-lgpl.c: Update.
513         * gnulib/import/filenamecat.h: Update.
514         * gnulib/import/flexmember.h: Update.
515         * gnulib/import/float+.h: Update.
516         * gnulib/import/float.c: Update.
517         * gnulib/import/float.in.h: Update.
518         * gnulib/import/fnmatch.c: Update.
519         * gnulib/import/fnmatch.in.h: Update.
520         * gnulib/import/fnmatch_loop.c: Update.
521         * gnulib/import/fpucw.h: Update.
522         * gnulib/import/frexp.c: Update.
523         * gnulib/import/frexpl.c: Update.
524         * gnulib/import/fstat.c: Update.
525         * gnulib/import/fstatat.c: Update.
526         * gnulib/import/getcwd-lgpl.c: Update.
527         * gnulib/import/getcwd.c: Update.
528         * gnulib/import/getdtablesize.c: Update.
529         * gnulib/import/getlogin_r.c: Update.
530         * gnulib/import/getprogname.c: Update.
531         * gnulib/import/getprogname.h: Update.
532         * gnulib/import/gettext.h: Update.
533         * gnulib/import/gettimeofday.c: Update.
534         * gnulib/import/glob-libc.h: Update.
535         * gnulib/import/glob.c: Update.
536         * gnulib/import/glob.in.h: Update.
537         * gnulib/import/glob_internal.h: Update.
538         * gnulib/import/glob_pattern_p.c: Update.
539         * gnulib/import/globfree.c: Update.
540         * gnulib/import/hard-locale.c: Update.
541         * gnulib/import/hard-locale.h: Update.
542         * gnulib/import/intprops.h: Update.
543         * gnulib/import/inttypes.in.h: Update.
544         * gnulib/import/isnan.c: Update.
545         * gnulib/import/isnand-nolibm.h: Update.
546         * gnulib/import/isnand.c: Update.
547         * gnulib/import/isnanl-nolibm.h: Update.
548         * gnulib/import/isnanl.c: Update.
549         * gnulib/import/itold.c: Update.
550         * gnulib/import/libc-config.h: Update.
551         * gnulib/import/limits.in.h: Update.
552         * gnulib/import/localcharset.c: Update.
553         * gnulib/import/localcharset.h: Update.
554         * gnulib/import/localtime-buffer.c: Update.
555         * gnulib/import/localtime-buffer.h: Update.
556         * gnulib/import/lstat.c: Update.
557         * gnulib/import/m4/00gnulib.m4: Update.
558         * gnulib/import/m4/__inline.m4: Update.
559         * gnulib/import/m4/absolute-header.m4: Update.
560         * gnulib/import/m4/alloca.m4: Update.
561         * gnulib/import/m4/builtin-expect.m4: Update.
562         * gnulib/import/m4/canonicalize.m4: Update.
563         * gnulib/import/m4/chdir-long.m4: Update.
564         * gnulib/import/m4/close.m4: Update.
565         * gnulib/import/m4/closedir.m4: Update.
566         * gnulib/import/m4/configmake.m4: Update.
567         * gnulib/import/m4/d-ino.m4: Update.
568         * gnulib/import/m4/d-type.m4: Update.
569         * gnulib/import/m4/dirent_h.m4: Update.
570         * gnulib/import/m4/dirfd.m4: Update.
571         * gnulib/import/m4/dirname.m4: Update.
572         * gnulib/import/m4/double-slash-root.m4: Update.
573         * gnulib/import/m4/dup.m4: Update.
574         * gnulib/import/m4/dup2.m4: Update.
575         * gnulib/import/m4/eealloc.m4: Update.
576         * gnulib/import/m4/environ.m4: Update.
577         * gnulib/import/m4/errno_h.m4: Update.
578         * gnulib/import/m4/error.m4: Update.
579         * gnulib/import/m4/exponentd.m4: Update.
580         * gnulib/import/m4/exponentl.m4: Update.
581         * gnulib/import/m4/extensions.m4: Update.
582         * gnulib/import/m4/extern-inline.m4: Update.
583         * gnulib/import/m4/fchdir.m4: Update.
584         * gnulib/import/m4/fcntl-o.m4: Update.
585         * gnulib/import/m4/fcntl.m4: Update.
586         * gnulib/import/m4/fcntl_h.m4: Update.
587         * gnulib/import/m4/fdopendir.m4: Update.
588         * gnulib/import/m4/filenamecat.m4: Update.
589         * gnulib/import/m4/flexmember.m4: Update.
590         * gnulib/import/m4/float_h.m4: Update.
591         * gnulib/import/m4/fnmatch.m4: Update.
592         * gnulib/import/m4/fnmatch_h.m4: Update.
593         * gnulib/import/m4/fpieee.m4: Update.
594         * gnulib/import/m4/frexp.m4: Update.
595         * gnulib/import/m4/frexpl.m4: Update.
596         * gnulib/import/m4/fstat.m4: Update.
597         * gnulib/import/m4/fstatat.m4: Update.
598         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
599         * gnulib/import/m4/getcwd-path-max.m4: Update.
600         * gnulib/import/m4/getcwd.m4: Update.
601         * gnulib/import/m4/getdtablesize.m4: Update.
602         * gnulib/import/m4/getlogin.m4: Update.
603         * gnulib/import/m4/getlogin_r.m4: Update.
604         * gnulib/import/m4/getpagesize.m4: Update.
605         * gnulib/import/m4/getprogname.m4: Update.
606         * gnulib/import/m4/gettimeofday.m4: Update.
607         * gnulib/import/m4/glibc21.m4: Update.
608         * gnulib/import/m4/glob.m4: Update.
609         * gnulib/import/m4/glob_h.m4: Update.
610         * gnulib/import/m4/gnulib-cache.m4: Update.
611         * gnulib/import/m4/gnulib-common.m4: Update.
612         * gnulib/import/m4/gnulib-comp.m4: Update.
613         * gnulib/import/m4/gnulib-tool.m4: Update.
614         * gnulib/import/m4/hard-locale.m4: Update.
615         * gnulib/import/m4/include_next.m4: Update.
616         * gnulib/import/m4/inttypes-pri.m4: Update.
617         * gnulib/import/m4/inttypes.m4: Update.
618         * gnulib/import/m4/isnand.m4: Update.
619         * gnulib/import/m4/isnanl.m4: Update.
620         * gnulib/import/m4/largefile.m4: Update.
621         * gnulib/import/m4/limits-h.m4: Update.
622         * gnulib/import/m4/localcharset.m4: Update.
623         * gnulib/import/m4/locale-fr.m4: Update.
624         * gnulib/import/m4/locale-ja.m4: Update.
625         * gnulib/import/m4/locale-zh.m4: Update.
626         * gnulib/import/m4/localtime-buffer.m4: Update.
627         * gnulib/import/m4/longlong.m4: Update.
628         * gnulib/import/m4/lstat.m4: Update.
629         * gnulib/import/m4/malloc.m4: Update.
630         * gnulib/import/m4/malloca.m4: Update.
631         * gnulib/import/m4/math_h.m4: Update.
632         * gnulib/import/m4/mbrtowc.m4: Update.
633         * gnulib/import/m4/mbsinit.m4: Update.
634         * gnulib/import/m4/mbsrtowcs.m4: Update.
635         * gnulib/import/m4/mbstate_t.m4: Update.
636         * gnulib/import/m4/memchr.m4: Update.
637         * gnulib/import/m4/memmem.m4: Update.
638         * gnulib/import/m4/mempcpy.m4: Update.
639         * gnulib/import/m4/memrchr.m4: Update.
640         * gnulib/import/m4/mkdir.m4: Update.
641         * gnulib/import/m4/mkstemp.m4: Update.
642         * gnulib/import/m4/mmap-anon.m4: Update.
643         * gnulib/import/m4/mode_t.m4: Update.
644         * gnulib/import/m4/msvc-inval.m4: Update.
645         * gnulib/import/m4/msvc-nothrow.m4: Update.
646         * gnulib/import/m4/multiarch.m4: Update.
647         * gnulib/import/m4/nocrash.m4: Update.
648         * gnulib/import/m4/off_t.m4: Update.
649         * gnulib/import/m4/onceonly.m4: Update.
650         * gnulib/import/m4/open-cloexec.m4: Update.
651         * gnulib/import/m4/open.m4: Update.
652         * gnulib/import/m4/openat.m4: Update.
653         * gnulib/import/m4/opendir.m4: Update.
654         * gnulib/import/m4/pathmax.m4: Update.
655         * gnulib/import/m4/rawmemchr.m4: Update.
656         * gnulib/import/m4/readdir.m4: Update.
657         * gnulib/import/m4/readlink.m4: Update.
658         * gnulib/import/m4/realloc.m4: Update.
659         * gnulib/import/m4/rename.m4: Update.
660         * gnulib/import/m4/rewinddir.m4: Update.
661         * gnulib/import/m4/rmdir.m4: Update.
662         * gnulib/import/m4/save-cwd.m4: Update.
663         * gnulib/import/m4/secure_getenv.m4: Update.
664         * gnulib/import/m4/setenv.m4: Update.
665         * gnulib/import/m4/signal_h.m4: Update.
666         * gnulib/import/m4/ssize_t.m4: Update.
667         * gnulib/import/m4/stat-time.m4: Update.
668         * gnulib/import/m4/stat.m4: Update.
669         * gnulib/import/m4/std-gnu11.m4: Update.
670         * gnulib/import/m4/stdbool.m4: Update.
671         * gnulib/import/m4/stddef_h.m4: Update.
672         * gnulib/import/m4/stdint.m4: Update.
673         * gnulib/import/m4/stdio_h.m4: Update.
674         * gnulib/import/m4/stdlib_h.m4: Update.
675         * gnulib/import/m4/strchrnul.m4: Update.
676         * gnulib/import/m4/strdup.m4: Update.
677         * gnulib/import/m4/strerror.m4: Update.
678         * gnulib/import/m4/string_h.m4: Update.
679         * gnulib/import/m4/strstr.m4: Update.
680         * gnulib/import/m4/strtok_r.m4: Update.
681         * gnulib/import/m4/sys_socket_h.m4: Update.
682         * gnulib/import/m4/sys_stat_h.m4: Update.
683         * gnulib/import/m4/sys_time_h.m4: Update.
684         * gnulib/import/m4/sys_types_h.m4: Update.
685         * gnulib/import/m4/tempname.m4: Update.
686         * gnulib/import/m4/time_h.m4: Update.
687         * gnulib/import/m4/unistd-safer.m4: Update.
688         * gnulib/import/m4/unistd_h.m4: Update.
689         * gnulib/import/m4/warn-on-use.m4: Update.
690         * gnulib/import/m4/wchar_h.m4: Update.
691         * gnulib/import/m4/wchar_t.m4: Update.
692         * gnulib/import/m4/wctype_h.m4: Update.
693         * gnulib/import/m4/wint_t.m4: Update.
694         * gnulib/import/malloc.c: Update.
695         * gnulib/import/malloc/scratch_buffer.h: Update.
696         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
697         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
698         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
699         * gnulib/import/malloca.c: Update.
700         * gnulib/import/malloca.h: Update.
701         * gnulib/import/malloca.valgrind: Update.
702         * gnulib/import/math.in.h: Update.
703         * gnulib/import/mbrtowc.c: Update.
704         * gnulib/import/mbsinit.c: Update.
705         * gnulib/import/mbsrtowcs-impl.h: Update.
706         * gnulib/import/mbsrtowcs-state.c: Update.
707         * gnulib/import/mbsrtowcs.c: Update.
708         * gnulib/import/memchr.c: Update.
709         * gnulib/import/memmem.c: Update.
710         * gnulib/import/mempcpy.c: Update.
711         * gnulib/import/memrchr.c: Update.
712         * gnulib/import/mkdir.c: Update.
713         * gnulib/import/mkstemp.c: Update.
714         * gnulib/import/msvc-inval.c: Update.
715         * gnulib/import/msvc-inval.h: Update.
716         * gnulib/import/msvc-nothrow.c: Update.
717         * gnulib/import/msvc-nothrow.h: Update.
718         * gnulib/import/open.c: Update.
719         * gnulib/import/openat-die.c: Update.
720         * gnulib/import/openat-priv.h: Update.
721         * gnulib/import/openat-proc.c: Update.
722         * gnulib/import/openat.c: Update.
723         * gnulib/import/openat.h: Update.
724         * gnulib/import/opendir.c: Update.
725         * gnulib/import/pathmax.h: Update.
726         * gnulib/import/pipe-safer.c: Update.
727         * gnulib/import/rawmemchr.c: Update.
728         * gnulib/import/readdir.c: Update.
729         * gnulib/import/readlink.c: Update.
730         * gnulib/import/realloc.c: Update.
731         * gnulib/import/ref-add.sin: Update.
732         * gnulib/import/ref-del.sin: Update.
733         * gnulib/import/rename.c: Update.
734         * gnulib/import/rewinddir.c: Update.
735         * gnulib/import/rmdir.c: Update.
736         * gnulib/import/same-inode.h: Update.
737         * gnulib/import/save-cwd.c: Update.
738         * gnulib/import/save-cwd.h: Update.
739         * gnulib/import/scratch_buffer.h: Update.
740         * gnulib/import/secure_getenv.c: Update.
741         * gnulib/import/setenv.c: Update.
742         * gnulib/import/signal.in.h: Update.
743         * gnulib/import/stat-time.c: Update.
744         * gnulib/import/stat-time.h: Update.
745         * gnulib/import/stat-w32.c: Update.
746         * gnulib/import/stat-w32.h: Update.
747         * gnulib/import/stat.c: Update.
748         * gnulib/import/stdbool.in.h: Update.
749         * gnulib/import/stddef.in.h: Update.
750         * gnulib/import/stdint.in.h: Update.
751         * gnulib/import/stdio.in.h: Update.
752         * gnulib/import/stdlib.in.h: Update.
753         * gnulib/import/str-two-way.h: Update.
754         * gnulib/import/strchrnul.c: Update.
755         * gnulib/import/strdup.c: Update.
756         * gnulib/import/streq.h: Update.
757         * gnulib/import/strerror-override.c: Update.
758         * gnulib/import/strerror-override.h: Update.
759         * gnulib/import/strerror.c: Update.
760         * gnulib/import/string.in.h: Update.
761         * gnulib/import/stripslash.c: Update.
762         * gnulib/import/strnlen1.c: Update.
763         * gnulib/import/strnlen1.h: Update.
764         * gnulib/import/strstr.c: Update.
765         * gnulib/import/strtok_r.c: Update.
766         * gnulib/import/sys_stat.in.h: Update.
767         * gnulib/import/sys_time.in.h: Update.
768         * gnulib/import/sys_types.in.h: Update.
769         * gnulib/import/tempname.c: Update.
770         * gnulib/import/tempname.h: Update.
771         * gnulib/import/time.in.h: Update.
772         * gnulib/import/unistd--.h: Update.
773         * gnulib/import/unistd-safer.h: Update.
774         * gnulib/import/unistd.in.h: Update.
775         * gnulib/import/unsetenv.c: Update.
776         * gnulib/import/verify.h: Update.
777         * gnulib/import/extra/snippet/warn-on-use.h: Update.
778         * gnulib/import/wchar.in.h: Update.
779         * gnulib/import/wctype.in.h: Update.
780         * gnulib/import/xalloc-oversized.h: Update.
781         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
782         "53e2c179f26a890fa6685af4b6c1397ee370433b".
783
784 2018-08-16  Gary Benson <gbenson@redhat.com>
785
786         PR gdb/13000:
787         * gdb/main.c (captured_main_1): Exit with nonzero status
788         in batch mode if the last command to be executed failed.
789         * NEWS: Mention the above.
790
791 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
792
793         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
794         end of warning message.
795
796 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
797
798         PR gdb/22943:
799         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
800         (aarch64_extract_return_value): Use
801         aapcs_is_vfp_call_or_return_candidate.
802         (aarch64_return_in_memory): Likewise.
803         (aarch64_store_return_value): Likewise.
804
805 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
806
807         * aarch64-tdep.c
808         (aapcs_is_vfp_call_or_return_candidate): Make static
809         (pass_in_v_or_stack): Remove function.
810         (pass_in_v_vfp_candidate): New function.
811         (aarch64_push_dummy_call): Check for float register candidates.
812
813 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
814
815         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
816         (aapcs_is_vfp_call_or_return_candidate_1): New function.
817         (aapcs_is_vfp_call_or_return_candidate): Likewise.
818
819 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
820
821         PR build/23399
822         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
823         (struct ipa_sym_addresses): Rename to...
824         (struct ipa_sym_addresses_common): ... this.
825         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
826
827 2018-08-28  Tom Tromey  <tom@tromey.com>
828
829         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
830         (token_fifo): Now a std::vector.
831         (yylex, c_parse): Update.
832         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
833         (token_fifo): Now a std::vector.
834         (yylex, d_parse): Update.
835         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
836         (token_fifo): Now a std::vector.
837         (yylex, go_parse): Update.
838
839 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
840
841         * parser-defs.h (struct type_stack) <elements>: Change type to
842         std::vector<union type_stack_elt>.
843         <depth, size>: Remove.
844         * parse.c (parse_exp_in_context_1): Adjust.
845         (type_stack_reserve): Remove.
846         (check_type_stack_depth): Remove.
847         (insert_into_type_stack): Adjust to std::vector.
848         (insert_type): Likewise.
849         (push_type): Likewise.
850         (push_type_int): Likewise.
851         (insert_type_address_space): Likewise.
852         (pop_type): Likewise.
853         (pop_type_int): Likewise.
854         (pop_typelist): Likewise.
855         (pop_type_stack): Likewise.
856         (append_type_stack): Likewise.
857         (push_type_stack): Likewise.
858         (get_type_stack): Likewise.
859         (type_stack_cleanup): Likewise.
860         (push_typelist): Likewise.
861         (follow_types): Likewise.
862         (_initialize_parse): Likewise.
863
864 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
865
866         * NEWS: Mention csky target.
867
868 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
869             Hafiz Abid Qadeer  <abidh@codesourcery.com>
870             Don Breazeal  <donb@codesourcery.com>
871
872         * csky-linux-tdep.c: New file.
873         * csky-tdep.c: Likewise.
874         * csky-tdep.h: Likewise.
875         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
876         csky-tdep.o.
877         (HFILES_NO_SRCDIR): Add csky-tdep.h.
878         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
879         * configure.tgt: Add csky support.
880
881 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
882
883         * python/py-framefilter.c (py_print_frame): Print frame architecture
884         when printing on an MI output.
885
886 2018-08-27  Tom Tromey  <tom@tromey.com>
887
888         PR build/23087:
889         * configure: Rebuild.
890         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
891
892 2018-08-27  Tom Tromey  <tom@tromey.com>
893
894         * aarch64-linux-tdep.c
895         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
896         casts to int.
897
898 2018-08-27  Tom Tromey  <tom@tromey.com>
899
900         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
901         unsigned.
902         (ppc64_standard_linkage1, ppc64_standard_linkage2)
903         (ppc64_standard_linkage3, ppc64_standard_linkage4)
904         (ppc64_standard_linkage5, ppc64_standard_linkage6)
905         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
906         unsigned.
907
908 2018-08-27  Tom Tromey  <tom@tromey.com>
909
910         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
911         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
912
913 2018-08-27  Tom Tromey  <tom@tromey.com>
914
915         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
916         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
917         ULONGEST_MAX.
918         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
919         ULONGEST_MAX.
920         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
921         ULONGEST_MAX.
922         * sparc-linux-tdep.c (sparc32_linux_sigframe)
923         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
924         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
925         ULONGEST_MAX.
926         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
927         (ppc64_linux_sigaction_tramp_frame)
928         (ppc32_linux_sighandler_tramp_frame)
929         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
930         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
931         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
932         * mn10300-linux-tdep.c (am33_linux_sigframe)
933         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
934         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
935         * mips-linux-tdep.c (mips_linux_o32_sigframe)
936         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
937         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
938         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
939         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
940         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
941         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
942         * microblaze-linux-tdep.c
943         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
944         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
945         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
946         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
947         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
948         * common/common-types.h (ULONGEST_MAX): New define.
949         (CORE_ADDR_MAX): Fix formatting.
950         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
951         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
952         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
953         (arm_linux_rt_sigreturn_tramp_frame)
954         (arm_eabi_linux_sigreturn_tramp_frame)
955         (arm_eabi_linux_rt_sigreturn_tramp_frame)
956         (thumb2_eabi_linux_sigreturn_tramp_frame)
957         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
958         (arm_linux_restart_syscall_tramp_frame)
959         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
960         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
961         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
962         ULONGEST_MAX.
963         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
964
965 2018-08-27  Tom Tromey  <tom@tromey.com>
966
967         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
968         CORE_ADDR_MAX.
969         * mips-tdep.c (mips_deal_with_atomic_sequence)
970         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
971         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
972         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
973         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
974         CORE_ADDR_MAX.
975         * aarch64-tdep.c (aarch64_software_single_step): Use
976         CORE_ADDR_MAX.
977
978 2018-08-27  Tom Tromey  <tom@tromey.com>
979
980         * linespec.c (complete_linespec_component): Add cast to "char".
981         * completer.c (completion_tracker::build_completion_result): Add
982         cast to "char".
983
984 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
985
986         * solist.h (struct solist, struct target_so_ops): Fix
987         indentation.
988
989 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
990
991         * ada-tasks.c (ada_task_info_s): Remove typedef.
992         (DEF_VEC_O(ada_task_info_s)): Remove.
993         (struct ada_tasks_inferior_data): Initialize fields.
994         <task_list>: Make an std::vector.
995         (get_ada_tasks_inferior_data): Allocate with new.
996         (ada_get_task_number): Adjust.
997         (get_task_number_from_id): Likewise.
998         (valid_task_id): Likewise.
999         (ada_get_task_info_from_ptid): Likewise.
1000         (iterate_over_live_ada_tasks): Likewise.
1001         (add_ada_task): Likewise.
1002         (read_known_tasks): Likewise.
1003         (ada_build_task_list): Likewise.
1004         (print_ada_task_info): Likewise.
1005         (info_task): Likewise.
1006         (task_command_1): Likewise.
1007
1008 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1009
1010         * ada-lang.c (add_angle_brackets): Return std::string.
1011
1012 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
1013
1014         * python/py-threadevent.c (py_get_event_thread): Initialize
1015         pythread.
1016
1017 2018-08-24  Pedro Alves  <palves@redhat.com>
1018
1019         * python/py-bpevent.c (create_breakpoint_event_object): Use
1020         copy-initialization.
1021         * python/py-continueevent.c (emit_continue_event): Use
1022         copy-initialization.
1023         * python/py-exitedevent.c (create_exited_event_object): Return a
1024         gdbpy_ref<>.
1025         (emit_exited_event): Use copy-initialization.
1026         * python/py-inferior.c (python_new_inferior)
1027         (python_inferior_deleted, add_thread_object): Use
1028         copy-initialization.
1029         * python/py-infevents.c (create_inferior_call_event_object)
1030         (create_register_changed_event_object)
1031         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1032         (emit_inferior_call_event, emit_memory_changed_event)
1033         (emit_register_changed_event): Use copy-initialization.
1034         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1035         Return a gdbpy_ref<>.
1036         (emit_new_objfile_event): Use copy-initialization.
1037         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1038         (emit_clear_objfiles_event): Use copy-initialization.
1039         * python/py-signalevent.c (create_signal_event_object): Use
1040         copy-initialization.
1041         * python/py-threadevent.c (create_thread_event_object): Use
1042         copy-initialization.
1043
1044 2018-08-24  Pedro Alves  <palves@redhat.com>
1045             Simon Marchi  <simon.marchi@ericsson.com>
1046
1047         PR gdb/23379
1048         * python/py-continueevent.c: Include "gdbthread.h".
1049         (create_continue_event_object): Add intro comment.  Add 'ptid'
1050         parameter.  Use it to find thread to pass to
1051         create_thread_event_object.
1052         (emit_continue_event): Pass PTID down to
1053         create_continue_event_object.
1054         * python/py-event.h (py_get_event_thread): Declare.
1055         (create_thread_event_object): Remove default from 'thread'
1056         parameter.
1057         * python/py-stopevent.c (create_stop_event_object): Use
1058         py_get_event_thread.
1059         * python/py-threadevent.c (get_event_thread): Rename to ...
1060         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1061         and use it to find the thread.
1062         (create_thread_event_object): Assert that THREAD isn't null.
1063         Don't find the event thread here.
1064
1065 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1066
1067         * block.h (blockrange, blockranges): New struct declarations.
1068         (struct block): Add new field named `ranges'.
1069         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1070         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1071         macros for accessing ranges in struct block.
1072         (make_blockranges): New declaration.
1073         block.c (make_blockranges): New function.
1074         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1075         for block.
1076         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1077         * blockframe.c (cache_pc_function_block): New static global.
1078         (clear_pc_function_cache): Clear cache_pc_function_block.
1079         (find_pc_partial_function): Move comment to symtab.h.  Add
1080         support for non-contiguous blocks.
1081         * cli/cli-cmds.c (block.h): Include.
1082         (print_disassembly): Handle printing of non-contiguous blocks.
1083         (disassemble_current_function): Likewise.
1084         (disassemble_command): Likewise.
1085
1086         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1087         BLOCK_START.
1088         * blockframe.c (get_pc_function_start): Likewise.
1089         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1090         (gcc_symbol_address): Likewise.
1091         * compile/compile-object-run.c (compile_object_run): Likewise.
1092         * compile/compile.c (get_expr_block_and_pc): Likewise.
1093         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1094         (func_addr_to_tail_call_list): Likewise.
1095         * findvar.c (default_read_var_value): Likewise.
1096         * inline-frame.c (inline_frame_this_id): Likewise.
1097         (skip-inline_frames): Likewise.
1098         * infcmd.c (until_next_command): Likewise.
1099         * linespec.c (convert_linespec_to_sals): Likewise.
1100         * parse.c (parse_exp_in_context_1): Likewise.
1101         * printcmd.c (build_address_symbolic): likewise.
1102         (info_address_command): Likewise.
1103         symtab.c (find_function_start_sal): Likewise.
1104         (skip_prologue_sal): Likewise.
1105         (find_function_alias_target): Likewise.
1106         (find_gnu_ifunc): Likewise.
1107         * stack.c (find_frame_funname): Likewise.
1108         * symtab.c (fixup_symbol_section): Likewise.
1109         (find_function_start_sal): Likewise.
1110         (skip_prologue_sal): Likewsie.
1111         (find_function_alias_target): Likewise.
1112         (find_gnu_ifunc): Likewise.
1113         * tracepoint.c (info_scope_command): Likewise.
1114         * value.c (value_fn_field): Likewise.
1115
1116         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1117         in place of find_pc_partial_function.
1118         * blockframe.c (find_function_entry_range_from_pc): New function.
1119         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1120         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1121         for each range in a block.
1122
1123
1124 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1125
1126         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1127         incrementation.
1128
1129 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1130
1131         * solib-svr4.c (read_program_headers_from_bfd): Return
1132         gdb::optional<gdb::byte_vector>.
1133         (svr4_exec_displacement): Adjust.
1134
1135 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1136
1137         * solib-svr4.c (read_program_header): Return
1138         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1139         (find_program_interpreter): Return
1140         gdb::optional<gdb::byte_vector>.
1141         (scan_dyntag_auxv): Adjust.
1142         (enable_break): Adjust.
1143         (svr4_exec_displacement): Adjust.
1144
1145 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1146
1147         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1148         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1149
1150 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1151
1152         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1153         string_vprintf.
1154         * guile/scm-utils.c (gdbscm_printf): Likewise.
1155         * serial.c (serial_printf): Likewise.
1156         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1157
1158 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1159
1160         * stack.c (print_frame): Print frame architecture when printing on
1161         an MI output.
1162         * NEWS: Mention new "arch" attribute in frame output.
1163
1164 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1165
1166         * arch/aarch64.h (aarch64_regnum): Update comment.
1167
1168 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1169
1170         * NEWS: Add SVE to 8.2 section.
1171
1172 2018-08-21  Pedro Alves  <palves@redhat.com>
1173
1174         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1175         out from gdbscm_parse_function_args.
1176         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1177         gdbscm_parse_function_args_1.
1178
1179 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1180
1181         PR gdb/17816
1182         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1183         operator.
1184
1185 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1186
1187         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1188
1189 2018-08-19  Michael Spang  <spang@google.com>
1190
1191         PR gdb/11786
1192         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1193         for PT_TLS segments.
1194
1195 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1196
1197         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1198         dwarf_variable_value.
1199         * dwarf2-frame.c (class dwarf_expr_executor):
1200         Add override for dwarf_variable_value.
1201         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1202         (class symbol_needs_eval_context): Likewise.
1203         (indirect_synthetic_pointer): Add forward declaration.
1204         (sect_variable_value): New function.
1205         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1206         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1207         for DW_OP_GNU_variable_value.
1208
1209 2018-08-16  Tom Tromey  <tom@tromey.com>
1210
1211         * top.c (read_command_file): Update.
1212         (command_line_input): Remove "repeat" argument.
1213         * ada-lang.c (get_selections): Update.
1214         * linespec.c (decode_line_2): Update.
1215         * defs.h (command_line_input): Remove argument.
1216         * cli/cli-script.c (read_next_line): Update.
1217         * python/py-gdb-readline.c: Update.
1218
1219 2018-08-17  Tom Tromey  <tom@tromey.com>
1220
1221         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1222         command_line_input.
1223
1224 2018-08-15  Tom Tromey  <tom@tromey.com>
1225
1226         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1227
1228 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1229
1230         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1231         If used, use find_pc_partial_function to find address range
1232         to disassemble.
1233         * mi/mi-main.c (mi_cmd_list_features): Report
1234         "data-disassemble-a-option" feature.
1235         * NEWS: Mention new -data-disassemble option -a.
1236
1237 2018-08-13  Tom Tromey  <tom@tromey.com>
1238
1239         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1240
1241 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1242
1243         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1244         (aarch64_linux_collect_sve_regset): Likewise.
1245         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1246         * regcache.h (regcache_map_entry_size): New function.
1247
1248 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1249
1250         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1251         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1252         (SVE_HEADER_VL_LENGTH): Likewise.
1253         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1254         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1255         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1256         (SVE_HEADER_SIZE_OFFSET): Likewise.
1257         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1258         (SVE_HEADER_VL_OFFSET): Likewise.
1259         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1260         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1261         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1262         (SVE_HEADER_SIZE): Likewise.
1263         (aarch64_linux_core_read_vq): Add function.
1264         (aarch64_linux_core_read_description): Check for SVE section.
1265
1266 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1267
1268         * aarch64-fbsd-tdep.c
1269         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1270         collect_size.
1271         * aarch64-linux-tdep.c
1272         (aarch64_linux_iterate_over_regset_sections): Likewise.
1273         * alpha-linux-tdep.c
1274         (alpha_linux_iterate_over_regset_sections):
1275         * alpha-nbsd-tdep.c
1276         (alphanbsd_iterate_over_regset_sections): Likewise.
1277         * amd64-fbsd-tdep.c
1278         (amd64fbsd_iterate_over_regset_sections): Likewise.
1279         * amd64-linux-tdep.c
1280         (amd64_linux_iterate_over_regset_sections): Likewise.
1281         * arm-bsd-tdep.c
1282         (armbsd_iterate_over_regset_sections): Likewise.
1283         * arm-fbsd-tdep.c
1284         (arm_fbsd_iterate_over_regset_sections): Likewise.
1285         * arm-linux-tdep.c
1286         (arm_linux_iterate_over_regset_sections): Likewise.
1287         * corelow.c (get_core_registers_cb): Likewise.
1288         (core_target::fetch_registers): Likewise.
1289         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1290         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1291         * gdbarch.h (void): Regenerate.
1292         * gdbarch.sh: Add supply_size and collect_size.
1293         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1294         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1295         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1296         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1297         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1298         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1299         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1300         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1301         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1302         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1303         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1304         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1305         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1306         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1307         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1308         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1309         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1310         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1311         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1312         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1313         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1314         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1315         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1316         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1317         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1318         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1319         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1320         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1321         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1322         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1323
1324 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1325
1326         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1327         with string_printf.
1328
1329 2018-08-10  Keith Seitz  <keiths@redhat.com>
1330
1331         * compile/compile-c-support.c (add_code_header, add_code_footer):
1332         Move into policy class.
1333         (c_push_user_expression, pop_user_expression_nop)
1334         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1335         (compile_program): New host class.
1336         (c_compile_program): New typedef.
1337         (c_compute_porgram): Use c_compile_program.
1338
1339 2018-08-10  Keith Seitz  <keiths@redhat.com>
1340
1341         * compile/compile-internal.h (compile_instance::~compile_instance):
1342         Remove calls to htab_delete.
1343         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1344         * compile.c (compile_instance::compile_instance): Initialize
1345         htab unique pointers.
1346         (compile_instance::get_cached_type, compile_instance::insert_type)
1347         (compile_instance::error_symbol_once): Update for unique_ptr.
1348
1349 2018-08-10  Keith Seitz  <keiths@redhat.com>
1350
1351         * compile/compile-c-symbols.c (struct symbol_error)
1352         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1353         (compile_instance::insert_symbol_error)
1354         (compile_instance::error_symbol_once): Move to ...
1355         * compile/compile.c: ... here.
1356
1357 2018-08-10  Keith Seitz  <keiths@redhat.com>
1358
1359         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1360         instead of `new_compile_instance'.
1361         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1362         Update description.
1363         If the symbol error map is not initialized, create it.
1364         (generate_c_for_for_one_symbol): Do not check/initialize
1365         the symbol error map.
1366         * compile/compile-c-types.c (compile_c_instance): Make a class.
1367         Update all callers.
1368         (compile_instance::compile_instance): Initialize the type cache.
1369         (get_cached_type): New function.
1370         (insert_type): Update description.
1371         (compile_c_instance::m_default_cflags): Define.
1372         (convert_type): Update description.  Use get_cached_type.
1373         (delete_instance): Moved to destructor.
1374         (new_compile_instance): Moved to constructor.
1375         * compile/compile-c.h (compile_c_instance): Make class inheriting
1376         from compile_instance.
1377         <base>: Remove field.
1378         <type_map, symbol_err_map>: Move to base class.
1379         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1380         * compile/compile-internal.h (compile_instance): Make class.
1381         <type_map_t, symbol_err_map_t>: Define.
1382         <fe>: Rename to `m_gcc_fe'.
1383         <scope, block, gcc_target_options>: Add `m_' prefix.
1384         <m_type_map, m_symbol_err_map>: New fields, moved from
1385         compile_c_instance.
1386         <destroy>: Remove.
1387         (convert_type, new_compile_instance): Remove.
1388         * compile/compile.c (cleanup_compile_instance): Remove.
1389         (compile_to_object): Use unique_ptr to eliminate cleanups.
1390         (compile_instance::set_print_callback, compile_instance::version)
1391         (compile_instance::set_verbose)
1392         (compile_instance::set_driver_filename)
1393         (compile_instance::set_triplet_regexp)
1394         (compile_instance::set_arguments)
1395         (compile_instance::set_source_file)
1396         (compile_instance::compile): Define.
1397
1398 2018-08-10  Keith Seitz  <keiths@redhat.com>
1399
1400         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1401         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1402         gcc-c-fe.def to define C plugin.
1403         (delete_instance): Delete `c_plugin'.
1404         (new_compile_instance): Initialize `c_plugin'.
1405         * compile/compile-c.h: Include gcc_c_plugin.h.
1406         (struct compile_c_instance) <c_plugin>: New member.
1407         * gcc-c-plugin.h: New file.
1408         Update all callers with API change.
1409
1410 2018-08-10  Keith Seitz  <keiths@redhat.com>
1411
1412         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1413         (HFILES_NO_SRCDIR): ... to here.
1414         Add compile-internal.h and compile-c.h.
1415         * compile/compile-c-support.c: Include compile-c.h.
1416         * compile/compile-c-symbols.c: Include compile-c.h.
1417         (generate_c_for_variable_locations): Update comment.
1418         * compile/compile-c-types.c: Include compile-c.h.
1419         * compile/compile-c.h: New file -- moved C language declarations
1420         from other files here.
1421         * compile/compile-internal.h: Do not include hashtab.h or
1422         common/enum-flags.h.
1423         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1424         (gcc_convert_symbol, gcc_symbol_address)
1425         (generate_c_for_variable_locations, c_get_mode_for_size)
1426         (c_get_range_decl_name): Definitions moved to compile-c.h.
1427         * compile/compile-loc2c.c: Include compile-c.h.
1428
1429 2018-08-10  Keith Seitz  <keiths@redhat.com>
1430
1431         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1432         (c_symbol_substitution_name): ... this.
1433         Update all callers.
1434
1435 2018-08-10  Keith Seitz  <keiths@redhat.com>
1436
1437         * compile/compile-c-support.c (c_compute_program): Use
1438         unique_xmalloc_ptr to eliminate cleanup.
1439         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1440         Return a unique_xmalloc_ptr and eliminate cleanup.
1441         * compile/compile-internal.h (generate_c_for_variable_locations):
1442         Return unique_xmalloc_ptr and update description.
1443
1444 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1445
1446         * corelow.c (core_target::get_core_register_section): Rename
1447         min_size to section_min_size.
1448
1449 2018-08-09  Jim Wilson  <jimw@sifive.com>
1450
1451         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1452         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1453         * NEWS: Mention new GNU/Linux RISC-V target.
1454         * configure.host: Add riscv*-*-linux*.
1455         * configure.nat: Add riscv*.
1456         * configure.tgt: Add riscv*-*-linux*.
1457         * riscv-linux-nat.c: New file.
1458         * riscv-linux-tdep.c: New file.
1459
1460 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1461
1462         * infrun.c (resume): Make static, add forward declaration.
1463         (proceed): Update header comment.
1464         * infrun.h (resume): Delete declaration.
1465
1466 2018-08-09  Tom Tromey  <tom@tromey.com>
1467
1468         * riscv-tdep.h: Minor formatting fixes.
1469
1470 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1471
1472         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1473         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1474         (test_mkdir_recursive): Likewise.
1475         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1476
1477 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1478
1479         * valarith.c (value_subscripted_rvalue): If an array is not in
1480         memory, and we don't know the upper bound, then we can't know that
1481         the requested element exists or not.
1482
1483 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1484
1485         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1486         (target_options_to_string): Add comment.
1487
1488 2018-08-08  Tom Tromey  <tom@tromey.com>
1489
1490         * unittests/scoped_mmap-selftests.c: Check result of "write".
1491
1492 2018-08-08  Jim Wilson  <jimw@sifive.com>
1493
1494         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1495         (decode_register_index_short): New.
1496         (decode_j_type_insn, decode_cj_type_insn): New.
1497         (decode_b_type_insn, decode_cb_type_insn): New.
1498         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1499         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1500         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1501         is_c_sw_insn instead of is_sw_insn.
1502         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1503         (riscv_software_single_step): New.
1504         * riscv-tdep.h (riscv_software_single_step): Declare.
1505
1506         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1507         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1508
1509 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1510
1511         PR gdb/18050:
1512         * target.c (dispose_inferior): Don't dispose of inferiors that are
1513         already killed.
1514
1515 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1516
1517         * remote.c (remote_target::download_tracepoint): Change char* to
1518         const char*.
1519
1520 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1521
1522         * target.h (target_options_to_string): Return an std::string.
1523         * target.c (str_comma_list_concat_elem): Return void, use
1524         std::string.
1525         (do_option): Likewise.
1526         (target_options_to_string): Return an std::string.
1527         * linux-nat.c (linux_nat_target::wait): Adjust.
1528         * target-debug.h (target_debug_print_options): Adjust.
1529
1530 2018-08-07  Tom Tromey  <tom@tromey.com>
1531
1532         * Makefile.in (CPPFLAGS): New variable.
1533         (INTERNAL_CPPFLAGS): Use it.
1534
1535 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1536
1537         * NEWS: Mention the index cache.
1538
1539 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1540
1541         * common/pathstuff.h (get_standard_cache_dir): New.
1542         * common/pathstuff.c (get_standard_cache_dir): New.
1543         * build-id.h (build_id_to_string): New.
1544         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1545         DEBUG_STR_SUFFIX): Move to here.
1546         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1547         DEBUG_STR_SUFFIX): Move from there.
1548         (write_psymtabs_to_index): Make non-static, add basename
1549         parameter.  Write to temporary files, rename when done.
1550         (save_gdb_index_command): Adjust call to
1551         write_psymtabs_to_index.
1552         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1553         field.
1554         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1555         (get_gdb_index_contents_from_cache): New.
1556         (get_gdb_index_contents_from_cache_dwz): New.
1557         (dwarf2_initialize_objfile): Read index from cache.
1558         (dwarf2_build_psymtabs): Save to index.
1559         * dwarf-index-cache.h: New file.
1560         * dwarf-index-cache.c: New file.
1561         * dwarf-index-write.h: New file.
1562
1563 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1564
1565         * gnulib/aclocal.m4: Re-generate.
1566         * gnulib/config.in: Re-generate.
1567         * gnulib/configure: Re-generate.
1568         * gnulib/import/Makefile.am: Re-generate.
1569         * gnulib/import/Makefile.in: Re-generate.
1570         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1571         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1572         * gnulib/import/m4/mkdir.m4: New file.
1573         * gnulib/import/mkdir.c: New file.
1574         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1575         module.
1576
1577 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1578
1579         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1580         * common/scoped_mmap.c: New file.
1581         * common/scoped_mmap.h (destroy): New method.
1582         (~scoped_mmap, reset): Use destroy.
1583         (scoped_mmap): New move constructor.
1584         (mmap_file): New declaration.
1585         * unittests/scoped_mmap-selftests.c (test_normal,
1586         test_invalid_filename, run_tests): New functions.
1587         (_initialize_scoped_mmap_selftests): Register selftest.
1588
1589 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1590
1591         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1592         (read_gdb_index_from_buffer): ... this.  Remove section
1593         parameter, add buffer parameter.
1594         (get_gdb_index_contents_ftype,
1595         get_gdb_index_contents_dwz_ftype): New typedefs.
1596         (dwarf2_read_gdb_index): Add callback parameters to get the
1597         index contents.
1598         (get_gdb_index_contents_from_section): New.
1599         (dwarf2_initialize_objfile): Update call to
1600         dwarf2_read_gdb_index.
1601
1602 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1603
1604         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1605         (gdb_open_cloexec): Likewise.
1606         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1607         (commandline_from_pid): Likewise.
1608         (linux_xfer_osdata_threads): Likewise.
1609         (linux_xfer_osdata_fds): Likewise.
1610         * ada-lang.c (is_package_name): Likewise.
1611         * auxv.c (procfs_xfer_auxv): Likewise.
1612         * breakpoint.c (print_one_breakpoint_location): Use
1613         uiout::field_fmt.
1614         (print_one_catch_solib): Use string_printf.
1615         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1616         (add_pe_forwarded_sym): Likewise.
1617         * dwarf2read.c (create_type_unit_group): Likewise.
1618         (build_error_marker_type): Likewise.
1619         * infcall.c (get_function_name): Likewise.
1620         * valprint.c (print_converted_chars_to_obstack): Likewise.
1621         * xtensa-tdep.c (xtensa_register_type): Likewise.
1622
1623 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1624
1625         * remote.c (remote_target::download_tracepoint): Fix format
1626         string errors.
1627
1628 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1629
1630         * tracefile.c: Include common/byte-vector.h.
1631         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1632         with trace_regblock_size if needed.  Update uses of buf.
1633
1634 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1635
1636         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1637         std::vector<unsigned char>.
1638         * tracepoint.c (collection_list::collection_list): Remove
1639         m_regs_mask initializer from initializer list.  Resize
1640         m_regs_mask using the largest remote register number.
1641         (collection_list::add_remote_register): Remove size check on
1642         m_regs_mask.  Use at to access element.
1643         (collection_list::stringify): Change type of temp_buf to
1644         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1645         stringify the register mask.  Use pack_hex_byte for the register
1646         mask.
1647
1648 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1649
1650         * tracepoint.h (class collection_list) <add_register>: Remove.
1651         <add_remote_register, add_ax_registers, add_local_register>:
1652         Declare.
1653         <add_memrange>: Add scope parameter.
1654         * tracepoint.c (encode_actions_1): Likewise.
1655         (collection_list::add_register): Rename to ...
1656         (collection_list::add_remote_register): ... this.  Update
1657         comment.
1658         (collection_list::add_ax_registers, add_local_register): New
1659         methods.
1660         (collection_list::add_memrange): Add scope parameter.  Call
1661         add_local_register instead of add_register.
1662         (finalize_tracepoint_aexpr): New function.
1663         (collection_list::collect_symbol): Update calls to add_memrange.
1664         Call add_local_register instead of add_register.  Call
1665         add_ax_registers.  Call finalize_tracepoint_aexpr.
1666         (encode_actions_1): Get remote regnos for $reg action.  Call
1667         add_remote_register, add_ax_registers, and add_local_register.
1668         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1669         (validate_actionline): Call finalize_tracepoint_aexpr.
1670
1671 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1672
1673         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1674         Replace array buf with gdb::char_vector buf, of size
1675         get_remote_packet_size ().  Replace references to buf and
1676         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1677         and xsnprintf with snprintf.  Raise errors if the buffer is too
1678         small.
1679
1680 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1681
1682         * remote.c (remote_target::download_tracepoint): Fix the has_more
1683         predicate in the QTDP action list iteration.
1684
1685 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1686
1687         * remote.c (remote_target::download_tracepoint): Fix indentation
1688         in for block.
1689
1690 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1691
1692         * proc-api.c (_initialize_proc_api): Remove c, unused.
1693         * procfs.c (procfs_init_inferior): Remove signals, unused.
1694         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1695         unused.
1696
1697 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1698             Andrew Burgess  <andrew.burgess@embecosm.com>
1699
1700         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1701         'W_STOPCODE (0)' as this could be ambiguous.
1702
1703 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1704
1705         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1706         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1707         "ai_socktype").
1708
1709 2018-08-02  Tom Tromey  <tom@tromey.com>
1710
1711         PR symtab/16842.
1712         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1713         symbols.
1714         (process_structure_scope): Likewise.
1715
1716 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1717
1718         PR gdb/22629:
1719         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1720         kill inferior.
1721
1722 2018-08-02  Tom Tromey  <tom@tromey.com>
1723
1724         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1725         (darwin_suspend_inferior, darwin_resume_inferior)
1726         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1727         (darwin_check_new_threads): Check result of get_darwin_inferior.
1728
1729 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1730
1731         GDB 8.1.1 released.
1732
1733 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1734
1735         * varobj.c (varobj_get_path_expr_parent): Report an error if
1736         parent is a dynamic varobj.
1737
1738 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1739
1740         * gnulib/aclocal.m4: Re-generate.
1741         * gnulib/config.in: Re-generate.
1742         * gnulib/configure: Re-generate.
1743         * gnulib/import/Makefile.in: Re-generate.
1744         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1745         * gnulib/import/m4/onceonly.m4: Re-generate.
1746
1747 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1748
1749         * target-descriptions.c (struct xml_test_tdesc): New.
1750         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1751         (record_xml_tdesc): Update.
1752         (maintenance_check_xml_descriptions): Update.
1753         * target-descriptions.h (record_xml_tdesc): Update comment.
1754
1755 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1756
1757         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1758         checking array bounds are defined.
1759
1760 2018-07-30  Tom Tromey  <tom@tromey.com>
1761
1762         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1763         irreflexivity violation.
1764
1765 2018-07-30  Tom Tromey  <tom@tromey.com>
1766
1767         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1768         * value.c (unpack_long): Remove lint code.
1769         * valops.c (value_ind): Remove lint code.
1770         * valarith.c (value_x_binop, value_x_unop, value_equal)
1771         (value_pos): Remove lint code.
1772
1773 2018-07-28  Tom de Vries  <tdevries@suse.de>
1774
1775         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1776         with undefined upper bound as <optimized out>.
1777
1778 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1779
1780         * gcore.in: Rename variable "name" to "prefix".  Expand
1781         "usage" text.
1782
1783 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1784
1785         * windows-nat.c (windows_nat_target::create_inferior): Update to
1786         call close() in global namespace.
1787
1788 2018-07-26  Tom Tromey  <tom@tromey.com>
1789
1790         * dwarf-index-write.c (add_address_entry): Don't add objfile
1791         offsets.
1792         * dbxread.c (find_stab_function): Rename from
1793         find_stab_function_addr.  Return a bound_minimal_symbol.
1794         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1795         Don't add objfile offsets.
1796         (end_psymtab): Use raw_text_low, raw_text_high,
1797         MSYMBOL_VALUE_RAW_ADDRESS.
1798         (read_ofile_symtab): Update.
1799         (process_one_symbol): Update.
1800         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1801         offsets.
1802         (dw2_relocate): Remove.
1803         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1804         searching addrmap.
1805         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1806         Update.
1807         (process_psymtab_comp_unit_reader, add_partial_symbol)
1808         (add_partial_subprogram, dwarf2_ranges_read): Update.
1809         (load_partial_dies): Update.
1810         (add_address_entry): Don't add objfile offsets.
1811         (dwarf2_build_include_psymtabs): Update.
1812         (create_addrmap_from_aranges): Don't add objfile offsets.
1813         (dw2_find_pc_sect_compunit_symtab): Update.
1814         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1815         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1816         Update.
1817         (parse_partial_symbols): Don't add objfile offsets.  Use
1818         raw_text_low, raw_text_high.  Update.
1819         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1820         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1821         or call 'relocate' quick function.  Clear psymbol_map.
1822         * psympriv.h (struct partial_symbol) <address>: Add section
1823         offset.
1824         <set_unrelocated_address>: Rename from set_address.
1825         <raw_text_low, raw_text_high>: New methods.
1826         <text_low, text_high>: Add objfile parameter.
1827         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1828         set_unrelocated_address.
1829         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1830         (find_pc_psymbol): Update.
1831         (fixup_psymbol_section, relocate_psymtabs): Remove.
1832         (dump_psymtab, psym_functions): Update.
1833         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1834         parameter.
1835         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1836         (start_psymtab_common): Update.
1837         * symfile-debug.c (debug_qf_relocate): Remove.
1838         (debug_sym_quick_functions): Update.
1839         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1840         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1841         Update.
1842
1843 2018-07-26  Tom Tromey  <tromey@redhat.com>
1844
1845         * dbxread.c (end_psymtab): Use text_high_valid and
1846         text_low_valid.
1847         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1848         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1849         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1850         Update comment.
1851         <text_low_valid, text_high_valid>: New fields.
1852         <set_text_low, set_text_high>: Update.
1853         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1854
1855 2018-07-26  Tom Tromey  <tom@tromey.com>
1856
1857         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1858         Update.
1859         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1860         textlow and texthigh fields.
1861         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1862         Update.
1863         * mdebugread.c (parse_lines, parse_partial_symbols)
1864         (psymtab_to_symtab_1): Update.
1865         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1866         Rename fields.  Update comment.  Now private.
1867         <text_low, text_high, set_text_low, set_text_high>: New methods.
1868         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1869         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1870         (start_psymtab_common, maintenance_info_psymtabs)
1871         (maintenance_check_psymtabs): Update.
1872         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1873         texthigh fields.
1874         (scan_xcoff_symtab): Update.
1875
1876 2018-07-26  Tom Tromey  <tromey@redhat.com>
1877
1878         * psympriv.h (struct partial_symbol) <unrelocated_address,
1879         address, set_address>: New methods.
1880         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1881         (fixup_psymbol_section, relocate_psymtabs): Update.
1882         (print_partial_symbols): Add 'objfile' parameter.  Update.
1883         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1884         Update.
1885
1886 2018-07-26  Tom Tromey  <tom@tromey.com>
1887
1888         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1889         (debug_names::write_psymbols): Update.
1890         * psympriv.h (struct partial_symbol): Derive from
1891         general_symbol_info.
1892         <obj_section>: New method.
1893         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1894         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1895         (find_pc_sect_psymbol, fixup_psymbol_section)
1896         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1897         (print_partial_symbols, recursively_search_psymtabs)
1898         (compare_psymbols, psymbol_hash, psymbol_compare)
1899         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1900         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1901
1902 2018-07-26  Tom Tromey  <tromey@redhat.com>
1903
1904         * dbxread.c (end_psymtab): Remove dead code.
1905
1906 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1907
1908         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1909         DWARF unwinders are disabled.
1910         * dwarf2-frame.c: Add dwarf2read.h include.
1911         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1912         disabled.
1913         (dwarf2_frame_unwinders_enabled_p): Define.
1914         (show_dwarf_unwinders_enabled_p): New function.
1915         (_initialize_dwarf2_frame): Register switch to control DWARF
1916         unwinder use.
1917         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1918         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1919         (show_dwarf_cmdlist): Remove static keyword.
1920         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1921         (show_dwarf_cmdlist): Declare.
1922         * NEWS: Document new feature.
1923
1924 2018-07-26  Tom de Vries  <tdevries@suse.de>
1925
1926         PR breakpoints/23366
1927         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1928
1929 2018-07-26  Tom de Vries  <tdevries@suse.de>
1930
1931         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1932         DW_AT_count can't be translated to a dynamic prop.
1933
1934 2018-07-25  Tom de Vries  <tdevries@suse.de>
1935
1936         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1937         try/catch.
1938
1939 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1940
1941         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1942
1943 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1944
1945         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1946
1947 2018-07-24  Keith Seitz  <keiths@redhat.comt
1948
1949         PR symtab/23010
1950         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1951         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1952         instead of add_symbol_to_list.
1953         (read_file_scope): Call prepare_one_comp_unit before reading
1954         any other DIEs.
1955
1956 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1957
1958         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1959
1960 2018-07-24  Tom Tromey  <tom@tromey.com>
1961
1962         * utils.c (malloc, realloc, free): Don't declare.
1963         * configure, config.in: Rebuild.
1964         * configure.ac: Don't check for declarations of free, malloc, or
1965         realloc.
1966
1967 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1968
1969         * aarch64-linux-nat.c
1970         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1971         variable.
1972         * arm-linux-nat.c (fetch_regs): Likewise.
1973         (store_regs): Likewise.
1974         (fetch_vfp_regs): Likewise.
1975         (store_vfp_regs): Likewise.
1976         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1977         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1978         (arm_linux_nat_target::insert_watchpoint): Likewise.
1979         (arm_linux_nat_target::remove_watchpoint): Likewise.
1980         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1981         Likewise.
1982         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1983         Likewise.
1984         * ppc-linux-nat.c (fetch_register): Likewise.
1985         (fetch_all_gp_regs): Likewise.
1986         (fetch_ppc_registers): Likewise.
1987         (store_all_gp_regs): Likewise.
1988         (store_ppc_registers): Likewise.
1989         (hwdebug_insert_point): Likewise.
1990         (can_use_watchpoint_cond_accel): Likewise.
1991         * remote-sim.c (gdb_os_write_stdout): Likewise.
1992
1993 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1994             Tom Tromey  <tom@tromey.com>
1995
1996         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1997         test for it.
1998         * configure: Rebuild.
1999
2000 2018-07-22  Tom Tromey  <tom@tromey.com>
2001
2002         * regformats/regdat.sh: Define xmltarget_${name} inside
2003         #ifndef IN_PROCESS_AGENT.
2004
2005 2018-07-22  Tom Tromey  <tom@tromey.com>
2006
2007         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2008
2009 2018-07-22  Tom Tromey  <tom@tromey.com>
2010
2011         * symfile.c (reread_symbols): Notify iter, not objfile.
2012
2013 2018-07-22  Tom Tromey  <tom@tromey.com>
2014
2015         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2016         Use arch_ops.
2017         (ravenscar_thread_target::prepare_to_store): Likewise.
2018
2019 2018-07-22  Tom Tromey  <tom@tromey.com>
2020
2021         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2022         unused variable.  Call value_fetch_lazy when needed.
2023         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2024         Remove unused variable.  Call value_fetch_lazy when needed.
2025
2026 2018-07-22  Tom Tromey  <tom@tromey.com>
2027
2028         * m32c-tdep.c (mark_dma): Return void.
2029         (make_regs): Remove unused declarations.
2030
2031 2018-07-22  Tom Tromey  <tom@tromey.com>
2032
2033         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2034         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2035         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2036         bkscm_get_valid_block_smob_arg_unsafe for effect.
2037
2038 2018-07-22  Tom Tromey  <tom@tromey.com>
2039
2040         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2041         value_type.
2042
2043 2018-07-22  Tom Tromey  <tom@tromey.com>
2044
2045         * windows-nat.c (saved_context): Conditionally define.
2046         * remote.c (remote_target::remote_btrace_maybe_reopen):
2047         Conditionally declare "warned".
2048         * inflow.c (sigquit_ours): Conditionally define.
2049         (new_tty): Move "tty" declaration inside #if.
2050         * guile/guile.c (guile_datadir): Conditionally define.
2051         * charset.c (set_be_le_names): Move some declarations inside #if.
2052         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2053         #if.
2054         (parse_xml_btrace_conf): Likewise.
2055
2056 2018-07-22  Tom Tromey  <tom@tromey.com>
2057
2058         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2059
2060 2018-07-22  Tom Tromey  <tom@tromey.com>
2061
2062         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2063         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2064         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2065         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2066         * stack.c (frame_apply_level_command): Remove unused variable.
2067         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2068         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2069         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2070         unused variable.
2071         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2072         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2073         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2074         variable.
2075         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2076         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2077         variable.
2078         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2079         Remove unused variable.
2080         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2081         variable.
2082         * common/tdesc.c (print_xml_feature::visit): Remove unused
2083         variable.
2084         * compile/compile-object-load.c (store_regs): Remove unused
2085         variables.
2086         * complaints.c (clear_complaints): Remove unused variable.
2087         * corelow.c (core_target_open): Remove unused variable.
2088         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2089         variable.
2090         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2091         variable.
2092         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2093         variable.
2094         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2095         variable.
2096         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2097         variable.
2098         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2099         variable.
2100         * ia64-tdep.c (examine_prologue): Remove unused variable.
2101         * infcall.c (run_inferior_call): Remove unused variable.
2102         * inferior.c (exit_inferior): Remove unused variable.
2103         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2104         * linespec.c (decode_line_2): Remove unused variable.
2105         * linux-nat.c (super_close): Remove.
2106         * linux-tdep.c (linux_info_proc): Remove unused variable.
2107         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2108         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2109         Remove unused variable.
2110         * parse.c (find_minsym_type_and_address): Remove unused variable.
2111         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2112         variable.
2113         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2114         variable.
2115         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2116         variables.
2117         * record-btrace.c (record_btrace_target::store_registers): Remove
2118         unused variable.
2119         (cmd_show_record_btrace_cpu): Remove unused variable.
2120         * riscv-tdep.c (riscv_register_reggroup_p)
2121         (riscv_push_dummy_call, riscv_return_value): Remove unused
2122         variable.
2123         * rust-exp.y (literal): Remove unused variable.
2124         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2125         unused variable.
2126         <STRUCTOP_ANONYMOUS>: Likewise.
2127         * s390-linux-tdep.c (s390_linux_init_abi_31)
2128         (s390_linux_init_abi_64): Remove unused variable.
2129         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2130         (file_select_thread, net_windows_open, _initialize_ser_windows):
2131         Remove unused variables.
2132         * symtab.c (find_pc_sect_line): Remove unused variable.
2133         * target-memory.c (compute_garbled_blocks): Remove unused
2134         variable.
2135         (target_write_memory_blocks): Remove unused variable.
2136         * target.c (target_stack::unpush): Remove unused variables.
2137         * tracepoint.c (start_tracing, all_tracepoint_actions)
2138         (merge_uploaded_trace_state_variables)
2139         (print_one_static_tracepoint_marker): Remove unused variable.
2140         * unittests/basic_string_view/element_access/char/1.cc (test01):
2141         Remove unused variable.
2142         * windows-nat.c (windows_continue, windows_add_all_dlls)
2143         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2144         Remove unused variables.
2145
2146 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2147
2148         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2149         attr_profile in HAVE_ELF.
2150         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2151         HAVE_ELF.
2152
2153 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2154
2155         * frame.c (frame_register_unwind): Change parameter name.
2156         (frame_unwind_register): Likewise.
2157         (frame_unwind_register_value): Likewise.
2158         (frame_unwind_register_signed): Likewise.
2159         (frame_unwind_register_unsigned): Likewise.
2160         * frame.h (frame_register_unwind): Likewise.
2161         (frame_unwind_register): Likewise.
2162         (frame_unwind_register_value): Likewise.
2163         (frame_unwind_register_signed): Likewise.
2164         (frame_unwind_register_unsigned): Likewise.
2165         (frame_unwind_arch): Likewise.
2166
2167 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2168
2169         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2170         ISA maintenance.
2171
2172 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2173
2174         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2175         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2176         hand.
2177
2178 2018-07-20  Keith Seitz  <keiths@redhat.com>
2179
2180         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2181         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2182         m_compunit_symtab, m_language>: Add "m_" prefix.
2183         Update all uses.
2184         * buildsym.c: Update all uses.
2185
2186 2018-07-20  Tom Tromey  <tom@tromey.com>
2187
2188         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2189         * buildsym.h (record_line_ftype): Remove typedef.
2190
2191 2018-07-20  Tom Tromey  <tom@tromey.com>
2192
2193         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2194         (end_expandable_symtab): Likewise.
2195         (end_symtab_get_static_block): Likewise.
2196         (end_symtab_from_static_block): Likewise.
2197         * buildsym-legacy.c (augment_type_symtab): Remove.
2198         (end_expandable_symtab): Remove.
2199         (end_symtab_get_static_block): Remove.
2200         (end_symtab_from_static_block): Remove.
2201
2202 2018-07-20  Tom Tromey  <tom@tromey.com>
2203
2204         * dwarf2read.c: Include buildsym.h.
2205         (struct dwarf2_cu) <builder>: New method.
2206         (fixup_go_packaging): Update.
2207         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2208         use scoped_free_pendings.
2209         (using_directives): Add "cu" parameter, remove "language".
2210         (read_import_statement, setup_type_unit_groups, )
2211         (read_func_scope, read_lexical_block_scope)
2212         (dwarf2_record_block_ranges, read_namespace): Update.
2213         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2214         (lnp_state_machine::handle_end_sequence): Update.
2215         (class lnp_state_machine) <m_cu>: New member.
2216         <m_record_line_callback>: Remove.
2217         <m_currently_recording_lines>: New member.
2218         (lnp_state_machine::handle_set_file): Update.
2219         (noop_record_line): Remove.
2220         (dwarf_record_line_p): Add cu parameter.
2221         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2222         (lnp_state_machine::record_line)
2223         (lnp_state_machine::lnp_state_machine)
2224         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2225         (dwarf_decode_lines): Update.
2226         (dwarf2_start_subfile): Add cu parameter.
2227         (dwarf2_start_symtab, new_symbol): Update.
2228         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2229         Remove dwarf2_per_objfile parameter.
2230         (dwarf_decode_macros): Update.
2231
2232 2018-07-20  Tom Tromey  <tom@tromey.com>
2233
2234         * stabsread.c (define_symbol): Update.
2235         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2236         * dwarf2read.c (new_symbol): Update.
2237         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2238         * cp-namespace.c: Include buildsym.h.
2239         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2240         * buildsym-legacy.c (get_buildsym_compunit): New function.
2241
2242 2018-07-20  Tom Tromey  <tom@tromey.com>
2243
2244         * xcoffread.c: Include buildsym-legacy.h.
2245         * windows-nat.c: Include buildsym-legacy.h.
2246         * stabsread.c: Include buildsym-legacy.h.
2247         * mdebugread.c: Include buildsym-legacy.h.
2248         * buildsym-legacy.h: New file.
2249         * buildsym-legacy.c: New file, from buildsym.c.
2250         * go32-nat.c: Include buildsym-legacy.h.
2251         * dwarf2read.c: Include buildsym-legacy.h.
2252         * dbxread.c: Include buildsym-legacy.h.
2253         * cp-namespace.c: Include buildsym-legacy.h.
2254         * coffread.c: Include buildsym-legacy.h.
2255         * buildsym.h: Move some contents to buildsym-legacy.h.
2256         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2257         buildsym-legacy.c.
2258         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2259
2260 2018-07-20  Tom Tromey  <tom@tromey.com>
2261
2262         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2263         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2264         (buildsym_compunit::buildsym_compunit)
2265         (buildsym_compunit::~buildsym_compunit)
2266         (buildsym_compunit::get_macro_table): Define.
2267
2268 2018-07-20  Tom Tromey  <tom@tromey.com>
2269
2270         * buildsym.c (reset_symtab_globals): Remove.
2271         (buildsym_compunit::end_symtab_from_static_block): Update.
2272         (buildsym_compunit::augment_type_symtab): Update.
2273         (end_symtab_from_static_block): Call free_buildsym_compunit.
2274         (augment_type_symtab, end_symtab, end_expandable_symtab):
2275         Likewise.
2276
2277 2018-07-20  Tom Tromey  <tom@tromey.com>
2278
2279         * arch-utils.c: Do not include buildsym.h.
2280         * mipsread.c: Do not include buildsym.h.
2281         * machoread.c: Do not include buildsym.h.
2282         * elfread.c: Do not include buildsym.h.
2283
2284 2018-07-20  Tom Tromey  <tom@tromey.com>
2285
2286         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2287         initialization.
2288         (buildsym_compunit): Add new constructor.
2289         (struct buildsym_compunit) <get_last_source_file, finish_block,
2290         record_block_range, start_subfile, patch_subfile_names,
2291         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2292         set_last_source_start_addr, get_last_source_start_addr,
2293         get_local_using_directives, set_local_using_directives,
2294         get_global_using_directives, outermost_context_p,
2295         get_current_context_stack, get_context_stack_depth,
2296         get_current_subfile, get_local_symbols, get_file_symbols,
2297         get_global_symbols, record_debugformat, record_producer,
2298         push_context, pop_context, end_symtab_get_static_block,
2299         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2300         New public methods.
2301         <record_pending_block, finish_block_internal, make_blockvector,
2302         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2303         private methods.
2304         Update all users.
2305
2306 2018-05-22  Tom Tromey  <tom@tromey.com>
2307
2308         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2309         parameter.
2310         (finish_block_internal): Update.
2311
2312 2018-07-20  Tom Tromey  <tom@tromey.com>
2313
2314         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2315         parameter.
2316         (finish_block_internal): Update.
2317
2318 2018-07-20  Tom Tromey  <tom@tromey.com>
2319
2320         * buildsym.h (EXTERN): Don't define or undef.
2321         * buildsym.c (EXTERN): Don't define.
2322
2323 2018-07-20  Tom Tromey  <tom@tromey.com>
2324
2325         * buildsym.c: Remove TODO comment.
2326
2327 2018-07-20  Tom Tromey  <tom@tromey.com>
2328
2329         * coffread.c (coff_symtab_read): Update.
2330         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2331         (xcoff_new_init): Update.
2332         * mipsread.c (mipscoff_new_init): Update.
2333         * mdebugread.c (mdebug_build_psymtabs): Update.
2334         * elfread.c (elf_new_init): Update.
2335         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2336         Update.
2337         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2338         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2339         (stabsect_build_psymtabs): Update.
2340         * buildsym.h (buildsym_init): Don't declare.
2341         * buildsym.c: Update comment.
2342         (prepare_for_building): Remove.
2343         (start_symtab, restart_symtab): Update.
2344         (reset_symtab_globals): Update comment.
2345         (buildsym_init): Remove.
2346
2347 2018-07-20  Tom Tromey  <tom@tromey.com>
2348
2349         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2350         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2351         (read_enum_type, common_block_start, common_block_end)
2352         (cleanup_undefined_types_1, finish_global_stabs): Update.
2353         * mdebugread.c (psymtab_to_symtab_1): Update.
2354         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2355         (read_lexical_block_scope, new_symbol): Update.
2356         * dbxread.c (process_one_symbol): Update.
2357         * coffread.c (coff_symtab_read, process_coff_symbol)
2358         (coff_read_enum_type): Update.
2359         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2360         declare.
2361         (get_local_symbols, get_file_symbols, get_global_symbols): New
2362         functions.
2363         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2364         m_global_symbols.
2365         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2366         (~scoped_free_pendings): Update.
2367         (finish_block, prepare_for_building, reset_symtab_globals)
2368         (end_symtab_get_static_block, end_symtab_with_blockvector)
2369         (augment_type_symtab, push_context): Update.
2370         (get_local_symbols, get_file_symbols, get_global_symbols): New
2371         functions.
2372         (buildsym_init): Update.
2373
2374 2018-07-20  Tom Tromey  <tom@tromey.com>
2375
2376         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2377         (process_full_type_unit): Likewise.
2378         (dwarf2_start_symtab): Set list_in_scope.
2379
2380 2018-07-20  Tom Tromey  <tom@tromey.com>
2381
2382         * dwarf2read.c (process_psymtab_comp_unit_reader)
2383         (build_type_psymtabs_reader): Do not set list_in_scope.
2384
2385 2018-07-20  Tom Tromey  <tom@tromey.com>
2386
2387         * buildsym.c (free_pendings): Remove.
2388         (add_symbol_to_list, scoped_free_pendings)
2389         (finish_block_internal, buildsym_init): Update.
2390
2391 2018-07-20  Tom Tromey  <tom@tromey.com>
2392
2393         * xcoffread.c (read_xcoff_symtab): Update.
2394         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2395         Update.
2396         * dbxread.c (process_one_symbol): Update.
2397         * coffread.c (coff_symtab_read): Update.
2398         * buildsym.h (finish_block): Update.
2399         * buildsym.c (finish_block): Remove "listhead" argument.
2400         (end_symtab_get_static_block): Update.
2401
2402 2018-07-20  Tom Tromey  <tom@tromey.com>
2403
2404         * buildsym.h (class scoped_free_pendings): Remove constructor.
2405         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2406         method.
2407         <m_pending_block_obstack, m_pending_blocks>: New members.
2408         (pending_block_obstack, pending_blocks): Remove.
2409         (scoped_free_pendings::scoped_free_pendings): Default.
2410         (~scoped_free_pendings): Update.
2411         (free_pending_blocks): Remove.
2412         (finish_block_internal, record_pending_block, make_blockvector)
2413         (end_symtab_get_static_block, augment_type_symtab, push_context)
2414         (buildsym_init): Update.
2415
2416 2018-07-20  Tom Tromey  <tom@tromey.com>
2417
2418         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2419         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2420         members.
2421         (pending_addrmap, pending_addrmap_obstack)
2422         (pending_addrmap_interesting): Remove.
2423         (scoped_free_pendings, record_block_range, make_blockvector)
2424         (prepare_for_building, reset_symtab_globals, buildsym_init):
2425         Update.
2426
2427 2018-07-20  Tom Tromey  <tom@tromey.com>
2428
2429         * xcoffread.c (process_linenos): Update.
2430         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2431         * mdebugread.c (psymtab_to_symtab_1): Update.
2432         * dwarf2read.c (setup_type_unit_groups)
2433         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2434         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2435         * dbxread.c (process_one_symbol): Update.
2436         * coffread.c (coff_symtab_read, enter_linenos)
2437         (process_coff_symbol): Update.
2438         * buildsym.h (current_subfile): Don't declare.
2439         (get_current_subfile): Declare.
2440         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2441         member.
2442         (start_subfile, free_buildsym_compunit, push_subfile)
2443         (prepare_for_building, start_symtab): Update.
2444         (get_current_subfile): New function.
2445
2446 2018-07-20  Tom Tromey  <tom@tromey.com>
2447
2448         * coffread.c (coff_symtab_read): Update.
2449         * xcoffread.c (read_xcoff_symtab): Update.
2450         * dwarf2read.c (new_symbol): Update.
2451         (read_func_scope, read_lexical_block_scope): Update.
2452         * dbxread.c (process_one_symbol): Update.
2453         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2454         (outermost_context_p): Remove macro.
2455         (outermost_context_p, get_current_context_stack)
2456         (get_context_stack_depth): Declare.
2457         (pop_context): Return struct context_stack.
2458         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2459         member.
2460         (context_stack_size): Remove.
2461         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2462         (prepare_for_building, end_symtab_get_static_block)
2463         (augment_type_symtab, push_context): Update.
2464         (pop_context): Return struct context_stack.
2465         (outermost_context_p, get_current_context_stack)
2466         (get_context_stack_depth): New functions.
2467         (buildsym_init): Update.
2468
2469 2018-07-20  Tom Tromey  <tom@tromey.com>
2470
2471         * rust-exp.y: Now a pure parser.  Update all rules.
2472         (%union): Move earlier.
2473         (current_parser, work_obstack): Remove globals.
2474         (rust_parser, ~rust_parser): Update.
2475         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2476         lex_character, lex_number, lex_string, lex_identifier,
2477         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2478         convert_name, convert_params_to_expression,
2479         convert_ast_to_expression, ast_basic_type, ast_operation,
2480         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2481         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2482         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2483         ast_array_type, ast_slice_type, ast_reference_type,
2484         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2485         (rust_parse): Update.
2486         (rustyyerror, rustyylex): Add parser parameter.
2487         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2488         (rust_lex_stringish_test, rust_lex_test_sequence)
2489         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2490         (rust_lex_test_push_back, rust_lex_tests): Update.
2491
2492 2018-07-19  Pedro Alves  <palves@redhat.com>
2493
2494         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2495         gdb::unique_xmalloc_ptr.
2496         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2497         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2498         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2499         copy-initialization.
2500         * guile/scm-pretty-print.c (ppscm_print_children): Use
2501         gdb::unique_xmalloc_ptr instead of cleanups.
2502         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2503         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2504         gdb::unique_xmalloc_ptr.
2505         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2506         Adjust to use gdb::unique_xmalloc_ptr.
2507         * guile/scm-utils.c (extract_arg): Adjust.
2508         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2509         gdb::unique_xmalloc_ptr instead of a cleanup.
2510
2511 2018-07-19  Tom Tromey  <tom@tromey.com>
2512
2513         * utils.c (do_value_free_to_mark)
2514         (make_cleanup_value_free_to_mark): Remove.
2515         * utils.h (make_cleanup_value_free_to_mark): Remove.
2516
2517 2018-07-19  Pedro Alves  <palves@redhat.com>
2518
2519         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2520         forwarding reference.
2521
2522 2018-07-18  Pedro Alves  <palves@redhat.com>
2523
2524         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2525         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2526         cleanup.
2527
2528 2018-07-18  Pedro Alves  <palves@redhat.com>
2529
2530         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2531         exceptions.
2532         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2533         (gdbscm_wrap): New.
2534         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2535         directly instead of a cleanup.
2536         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2537         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2538         (vlscm_binop_gdbthrow): New, factored out from ...
2539         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2540         (vlscm_rich_compare): Use gdbscm_wrap.
2541         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2542         instead of a cleanup.
2543         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2544         cleanup.
2545         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2546         Use xfree directly instead of a cleanup.
2547         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2548         Adjust to use gdbscm_wrap and scoped_value_mark.
2549         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2550         (gdbscm_value_address, gdbscm_value_dereference)
2551         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2552         scoped_value_mark.
2553         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2554         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2555         scoped_value_mark.
2556         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2557         gdbscm_wrap and scoped_value_mark.
2558         (gdbscm_value_to_string): Use xfree directly instead of a
2559         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2560         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2561         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2562         scoped_value_mark.
2563         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2564         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2565         scoped_value_mark.
2566         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2567         gdbscm_wrap.
2568
2569 2018-07-18  Tom de Vries  <tdevries@suse.de>
2570
2571         * findvar.c (default_read_var_value): Also resolve dynamic type for
2572         LOC_OPTIMIZED_OUT vars.
2573
2574 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2575
2576         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2577         decoding.
2578
2579 2018-07-17  Tom Tromey  <tom@tromey.com>
2580
2581         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2582         (compute_enum_list, pascm_set_param_value_x)
2583         (gdbscm_parameter_value): Update.
2584         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2585         (gdbscm_scm_to_host_string): Update.
2586         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2587         Update.
2588         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2589         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2590         * guile/scm-string.c (gdbscm_scm_to_string): Return
2591         unique_xmalloc_ptr.
2592         (gdbscm_scm_to_host_string): Likewise.
2593
2594 2018-07-17  Tom Tromey  <tom@tromey.com>
2595
2596         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2597         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2598         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2599         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2600         unique_xmalloc_ptr.
2601
2602 2018-07-17  Tom Tromey  <tom@tromey.com>
2603
2604         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2605         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2606         Update.
2607         * guile/scm-cmd.c (cmdscm_function): Update.
2608         * guile/scm-pretty-print.c
2609         (ppscm_print_exception_unless_memory_error): Update.
2610         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2611         Return unique_xmalloc_ptr.
2612
2613 2018-07-17  Tom Tromey  <tom@tromey.com>
2614
2615         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2616         Use string_printf.
2617
2618 2018-07-17  Jim Wilson  <jimw@sifive.com>
2619
2620         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2621         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2622         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2623         unecessary braces after EF_RISCV_RVC test.  Delete call to
2624         set_gdbarch_decr_pc_after_break.
2625
2626         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2627         RISCV_LAST_FP_REGNUM + 1.
2628         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2629
2630 2018-07-17  Tom Tromey  <tom@tromey.com>
2631
2632         * configure.ac: Remove --disable-gdbcli.
2633         * configure: Rebuild.
2634         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2635         (SUBDIR_CLI_CFLAGS): Remove.
2636         (SFILES): Use SUBDIR_CLI_SRCS.
2637         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2638
2639 2018-07-17  Tom Tromey  <tom@tromey.com>
2640
2641         PR gdb/18624:
2642         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2643
2644 2018-07-16  Jim Wilson  <jimw@sifive.com>
2645
2646         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2647
2648 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2649
2650         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2651         variable.
2652         (libunwind_frame_sniffer): Likewise.
2653         (libunwind_frame_prev_register): Likewise.
2654         (libunwind_sigtramp_frame_sniffer): Likewise.
2655         * ia64-tdep.c (ia64_access_reg): Likewise.
2656         (ia64_access_rse_reg): Likewise.
2657         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2658         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2659
2660 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2661
2662         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2663
2664 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2665
2666         * remote-sim.c (gdbsim_target::close,
2667         gdbsim_target::mourn_inferior): Remove unused variables.
2668
2669 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2670
2671         * ia64-tdep.c (ktab_buf): New global.
2672         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2673         (get_kernel_table): Adjust.
2674
2675 2018-07-16  Tom Tromey  <tom@tromey.com>
2676
2677         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2678         * dwarf2read.c (using_directives, new_symbol): Use
2679         outermost_context_p.
2680         * dbxread.c (process_one_symbol): Use outermost_context_p.
2681         * coffread.c (coff_symtab_read): Use outermost_context_p.
2682
2683 2018-07-16  Tom Tromey  <tom@tromey.com>
2684
2685         * dwarf2read.c (using_directives, read_func_scope)
2686         (read_lexical_block_scope): Update.
2687         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2688         * buildsym.h (local_using_directives, global_using_directives):
2689         Don't declare.
2690         (get_local_using_directives, set_local_using_directives)
2691         (get_global_using_directives): Declare.
2692         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2693         m_global_using_directives>: New members.
2694         (finish_block_internal, prepare_for_building)
2695         (reset_symtab_globals, end_symtab_get_static_block)
2696         (push_context): Update.
2697         (get_local_using_directives, set_local_using_directives)
2698         (get_global_using_directives): New functions.
2699         (buildsym_init): Update.
2700
2701 2018-07-16  Tom Tromey  <tom@tromey.com>
2702
2703         * xcoffread.c (xcoff_initial_scan): Don't call
2704         free_pending_blocks.
2705         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2706         * buildsym.h (class scoped_free_pendings): Add constructor.
2707         (free_pending_blocks): Don't declare.
2708         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2709         (free_pending_blocks): Now static.
2710
2711 2018-07-16  Tom Tromey  <tom@tromey.com>
2712
2713         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2714         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2715         member.
2716         (struct subfile_stack): Remove.
2717         (subfile_stack): Remove.
2718         (push_subfile, pop_subfile, buildsym_init): Update.
2719
2720 2018-07-16  Tom Tromey  <tom@tromey.com>
2721
2722         * buildsym.c (push_subfile): Use gdb_assert.
2723         (pop_subfile): Use gdb_assert.
2724
2725 2018-07-16  Tom Tromey  <tom@tromey.com>
2726
2727         * buildsym.h (merge_symbol_lists): Remove.
2728         * buildsym.c (merge_symbol_lists): Remove.
2729
2730 2018-07-16  Tom Tromey  <tom@tromey.com>
2731
2732         * stabsread.c (scan_file_globals): Update comment.
2733         * stabsread.h (scan_file_globals): Move from buildsym.h.
2734         * buildsym.h (scan_file_globals): Move to stabsread.h.
2735
2736 2018-07-16  Tom Tromey  <tom@tromey.com>
2737
2738         * xcoffread.c (xcoff_new_init): Update.
2739         * mipsread.c (mipscoff_new_init): Update.
2740         * mdebugread.c (mdebug_build_psymtabs): Update.
2741         * elfread.c (elf_new_init): Update.
2742         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2743         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2744         * buildsym.h (buildsym_new_init): Don't declare.
2745         * buildsym.c (buildsym_new_init): Remove.
2746
2747 2018-07-16  Tom Tromey  <tom@tromey.com>
2748
2749         * stabsread.h (within_function): Move from buildsym.h.
2750         * stabsread.c (start_stabs): Clear within_function.
2751         * coffread.c (coff_start_symtab): Clear within_function.
2752         * buildsym.h (within_function): Move to stabsread.h.
2753         * buildsym.c (prepare_for_building): Update.
2754
2755 2018-07-16  Tom Tromey  <tom@tromey.com>
2756
2757         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2758         * dwarf2read.c (dwarf2_start_symtab): Don't set
2759         processing_gcc_compilation.
2760         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2761
2762 2018-07-16  Tom Tromey  <tom@tromey.com>
2763
2764         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2765         (next_symbol_text_func): Move from buildsym.h.
2766         * stabsread.c (hashname): Move from buildsym.c.
2767         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2768         (next_symbol_text_func, hashname): Move to stabsread.h.
2769         * buildsym.c: Don't include bcache.h
2770         (hashname): Move to stasbread.c.
2771
2772 2018-07-16  Tom Tromey  <tom@tromey.com>
2773
2774         * buildsym.h (context_stack_size): Don't declare.
2775         * buildsym.c (context_stack_size): New global.
2776
2777 2018-07-16  Tom Tromey  <tom@tromey.com>
2778
2779         * dbxread.c (processing_acc_compilation): New global.
2780         * buildsym.h (processing_acc_compilation): Don't declare.
2781
2782 2018-07-16  Tom Tromey  <tom@tromey.com>
2783
2784         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2785         * dbxread.c (read_ofile_symtab): Update.
2786         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2787         * buildsym.h (last_source_start_addr): Remove.
2788         (set_last_source_start_addr, get_last_source_start_addr):
2789         Declare.
2790         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2791         parameter.
2792         (struct buildsym_compunit) <m_last_source_start_addr>: New
2793         member.
2794         (prepare_for_building): Remove start_addr parameter.
2795         (start_symtab, restart_symtab, end_symtab_get_static_block)
2796         (end_symtab_with_blockvector): Update.
2797         (set_last_source_start_addr, get_last_source_start_addr): New
2798         functions.
2799
2800 2018-07-16  Tom Tromey  <tom@tromey.com>
2801
2802         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2803         member.
2804         (have_line_numbers): Remove.
2805         (record_line, prepare_for_building, end_symtab_get_static_block)
2806         (augment_type_symtab): Update.
2807
2808 2018-07-16  Tom Tromey  <tom@tromey.com>
2809
2810         * buildsym.c (~buildsym_compunit): Free the macro table.
2811         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2812         methods.
2813         <m_pending_macros>: New member.
2814         (pending_macros): Remove.
2815         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2816         (reset_symtab_globals, end_symtab_get_static_block)
2817         (end_symtab_with_blockvector, augment_type_symtab)
2818         (buildsym_init): Update.
2819
2820 2018-07-16  Tom Tromey  <tom@tromey.com>
2821
2822         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2823         parameter.
2824         (buildsym_compunit::set_last_source_file): New method.
2825         <m_last_source_file>: New member.
2826         (prepare_for_building): Remove "name" parameter.
2827         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2828         (last_source_file): Remove.
2829         (set_last_source_file, get_last_source_file): Update.
2830
2831 2018-07-16  Tom Tromey  <tom@tromey.com>
2832
2833         * buildsym.c (prepare_for_building): Add assert.
2834
2835 2018-07-16  Tom Tromey  <tom@tromey.com>
2836
2837         * buildsym.c (~buildsym_compunit): Update.
2838         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2839         (start_subfile, patch_subfile_names)
2840         (end_symtab_with_blockvector): Update.
2841
2842 2018-07-16  Tom Tromey  <tom@tromey.com>
2843
2844         * buildsym.c (struct buildsym_compunit): Add constructor,
2845         destructor, initializers.
2846         (start_buildsym_compunit): Remove.
2847         (free_buildsym_compunit): Use "delete".
2848         (start_symtab, restart_symtab): Use "new".
2849
2850 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2851
2852         * symfile.c (set_objfile_default_section_offset): Remove struct
2853         keyword.
2854
2855 2018-07-14  Stafford Horne  <shorne@gmail.com>
2856
2857         * (Responsible Maintainers): Add myself as or1k maintainer.
2858
2859 2018-07-13  Tom Tromey  <tom@tromey.com>
2860
2861         * symfile.c (set_objfile_default_section_offset): Use extra braces
2862         around initializer.
2863
2864 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2865
2866         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2867         non-branching basr.
2868
2869 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2870
2871         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2872         unittests/cli-utils-selftests.c
2873         * unittests/cli-utils-selftests.c: New file.
2874
2875 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2876
2877         * NEWS: Mention new commands. Mention change to 'thread apply'.
2878
2879 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2880
2881         * thread.c (thr_try_catch_cmd): New function.
2882         (thread_apply_all_command): Handle qcs flags.
2883         (thread_apply_command): Handle qcs flags.
2884         (taas_command): New function.
2885         (tfaas_command): New function.
2886         (_initialize_thread): Update to setup the new commands 'taas
2887         and 'tfaas'. Change doc string for 'thread apply'.
2888
2889 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2890
2891         * stack.c: (trailing_outermost_frame): New function, mostly
2892         extracted from backtrace_command_1.
2893         (leading_innermost_frame): New function.
2894         (backtrace_command_1): Update to call trailing_outermost_frame.
2895         (frame_apply_command_count): New function.
2896         (frame_apply_level_command): New function.
2897         (frame_apply_all_command): New function.
2898         (frame_apply_command): New function.
2899         (faas_command): New function.
2900         (frame_cmd_list): New variable.
2901         (_initialize_stack): Update to setup the new commands 'frame apply'
2902         and 'faas'.
2903
2904 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2905
2906         * cli-utils.c (number_or_range_parser::get_number): Only handle
2907         numbers or convenience var as numbers.
2908         (parse_flags): New function.
2909         (parse_flags_qcs): New function.
2910         (number_or_range_parser::finished): Ensure parsing end is detected
2911         before end of string.
2912         * cli-utils.h (parse_flags): New function.
2913         (parse_flags_qcs): New function.
2914         (number_or_range_parser): Remove m_finished bool.
2915         (number_or_range_parser::skip_range): Set m_in_range to false.
2916
2917 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2918
2919         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2920         on Windows.
2921
2922 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2923             Jan Kratochvil  <jan.kratochvil@redhat.com>
2924             Paul Fertser  <fercerpav@gmail.com>
2925             Tsutomu Seki  <sekiriki@gmail.com>
2926             Pedro Alves  <palves@redhat.com>
2927
2928         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2929         'unittests/parse-connection-spec-selftests.c'.
2930         (COMMON_SFILES): Add 'common/netstuff.c'.
2931         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2932         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2933         * common/netstuff.c: New file.
2934         * common/netstuff.h: New file.
2935         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2936         (wait_for_connect): Update comment.  New parameter
2937         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2938         Use 'sock' directly instead of 'scb->fd'.
2939         (try_connect): New function, with code from 'net_open'.
2940         (net_open): Rewrite main loop to deal with multiple
2941         sockets/addresses.  Handle IPv6-style hostnames; implement
2942         support for IPv6 connections.
2943         * unittests/parse-connection-spec-selftests.c: New file.
2944
2945 2018-07-11  Pedro Alves  <palves@redhat.com>
2946
2947         PR gdb/23377
2948         * remote.c (remote_target::remote_detach_pid): Call
2949         set_current_process.
2950
2951 2018-07-11  Pedro Alves  <palves@redhat.com>
2952
2953         * h8300-tdep.c (h8300_gdbarch_init): Remove
2954         set_gdbarch_ecoff_reg_to_regnum calls.
2955
2956 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2957
2958         PR c++/23373
2959         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2960         offsets/sizes for static members of a class/struct.
2961
2962 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2963
2964         * target-descriptions.c (tdesc_register_bitsize): Rename.
2965         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2966         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2967         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2968
2969 2018-07-10  Tom Tromey  <tom@tromey.com>
2970
2971         * breakpoint.c (moribund_locations): Now static and a
2972         std::vector.
2973         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2974         (build_bpstat_chain, update_global_location_list)
2975         (breakpoint_retire_moribund): Update.
2976         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2977         VEC.
2978
2979 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2980
2981         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2982         (riscv_register_reggroup_p): Use new function, remove unneeded
2983         parenthesis.
2984         (riscv_push_dummy_call): Extend assert to compare against xlen or
2985         flen based on register type.
2986
2987 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2988
2989         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2990
2991 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2992
2993         * remote.c (show_hardware_watchpoint_limit): New function.
2994         (show_hardware_watchpoint_length_limit): New function.
2995         (show_hardware_breakpoint_limit): New function.
2996         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2997         where appropriate, update help text.
2998
2999 2018-07-09  Tom Tromey  <tom@tromey.com>
3000
3001         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3002         (CLIBS): Don't mention NAT_CLIBS.
3003
3004 2018-07-09  Tom Tromey  <tom@tromey.com>
3005
3006         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3007         (LIBGDB_OBS, clean mostlyclean): Update.
3008         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3009
3010 2018-07-09  Tom Tromey  <tom@tromey.com>
3011
3012         * Makefile.in (%.c: %.y): Use ECHO_YACC.
3013         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
3014         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3015
3016 2018-07-09  Tom Tromey  <tom@tromey.com>
3017
3018         * Makefile.in (ALLDEPFILES): Remove exec.c.
3019         (COMMON_OBS): Remove exec.o.
3020         (COMMON_SFILES): Add exec.c.
3021
3022 2018-07-09  Tom Tromey  <tom@tromey.com>
3023
3024         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3025
3026 2018-07-09  Tom Tromey  <tom@tromey.com>
3027
3028         * Makefile.in (clean mostlyclean): Remove stamp-version.
3029         (version.c): Depend on stamp-version.
3030         (stamp-version): New rule, from version.c rule.
3031
3032 2018-07-09  Tom Tromey  <tom@tromey.com>
3033
3034         * Makefile.in (init.c): Depend on stamp-init.
3035         (stamp-init): New rule, from init.c rule.
3036         (clean mostlyclean): Remove stamp-init.
3037
3038 2018-07-09  Tom Tromey  <tom@tromey.com>
3039
3040         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3041         SUBDIR_GCC_COMPILE_SRCS.
3042
3043 2018-07-09  Tom Tromey  <tom@tromey.com>
3044
3045         * Makefile.in (init.c): Remove some unused sed rules.
3046
3047 2018-07-09  Tom Tromey  <tom@tromey.com>
3048
3049         * Makefile.in (TSOBS): Remove.
3050         (INIT_FILES): Update.
3051         (LIBGDB_OBS): Update.
3052         (COMMON_SFILES): Add inflow.c.
3053         (SFILES): Remove inflow.c.
3054
3055 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3056
3057         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3058
3059 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3060
3061         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3062         get_saveloc_name, is_signal_frame_name, step_name,
3063         init_remote_name, create_addr_space_name,
3064         destroy_addr_space_name, search_unwind_table_name,
3065         find_dyn_list_name): Constify.
3066
3067 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3068
3069         * darwin-nat.c (darwin_pthread_kill): New function.
3070         (darwin_resume_thread): Use darwin_pthread_kill.
3071
3072 2018-07-05  Tom de Vries  <tdevries@suse.de>
3073
3074         * macroexp.c (macro_buffer) <operator=>: New member function.
3075
3076 2018-07-04  Tom Tromey  <tom@tromey.com>
3077
3078         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3079
3080 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3081
3082         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3083         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3084         * maint.c: Likewise.
3085         * top.c: Likewise.
3086
3087 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3088
3089         * NEWS: Create a new section for the next release branch.
3090         Rename the section of the current branch, now that it has
3091         been cut.
3092
3093 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3094
3095         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3096         * version.in: Bump version to 8.2.50.DATE-git.
3097
3098 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3099             Pedro Alves  <palves@redhat.com>
3100
3101         * linux-nat.c (linux_init_ptrace): Rename to ...
3102         (linux_init_ptrace_procfs): ... this.  Call
3103         linux_proc_init_warnings.
3104         (linux_nat_target::post_attach)
3105         (linux_nat_target::post_startup_inferior): Adjust.
3106         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3107         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3108
3109 2018-07-04  Tom de Vries  <tdevries@suse.de>
3110
3111         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3112         check ...
3113         (read_comp_unit_head): ... here.
3114
3115 2018-07-03  Tom Tromey  <tom@tromey.com>
3116
3117         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3118         (stop_tracing, tstatus_command)
3119         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3120         (print_one_static_tracepoint_marker): Update.
3121         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3122         std::vector.
3123         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3124         VEC.
3125         (all_tracepoints, static_tracepoints_here): Return std::vector.
3126
3127 2018-07-03  Tom Tromey  <tom@tromey.com>
3128
3129         * common/ptid.c (ptid_equal): Remove.
3130         * common/ptid.h (ptid_equal): Don't declare.
3131         * ada-tasks.c: Update.
3132         * breakpoint.c: Update.
3133         * common/agent.c: Update.
3134         * corelow.c: Update.
3135         * darwin-nat-info.c: Update.
3136         * darwin-nat.c: Update.
3137         * dcache.c: Update.
3138         * dtrace-probe.c: Update.
3139         * dummy-frame.c: Update.
3140         * fbsd-nat.c: Update.
3141         * frame.c: Update.
3142         * gdbthread.h: Update.
3143         * gnu-nat.c: Update.
3144         * go32-nat.c: Update.
3145         * inf-loop.c: Update.
3146         * inf-ptrace.c: Update.
3147         * infcall.c: Update.
3148         * infcmd.c: Update.
3149         * inflow.c: Update.
3150         * infrun.c: Update.
3151         * linux-fork.c: Update.
3152         * linux-nat.c: Update.
3153         * linux-thread-db.c: Update.
3154         * mi/mi-cmd-var.c: Update.
3155         * mi/mi-interp.c: Update.
3156         * mi/mi-main.c: Update.
3157         * nto-procfs.c: Update.
3158         * ppc-linux-tdep.c: Update.
3159         * procfs.c: Update.
3160         * python/py-inferior.c: Update.
3161         * python/py-record-btrace.c: Update.
3162         * python/py-record.c: Update.
3163         * ravenscar-thread.c: Update.
3164         * regcache.c: Update.
3165         * remote-sim.c: Update.
3166         * remote.c: Update.
3167         * sol-thread.c: Update.
3168         * solib.c: Update.
3169         * target.c: Update.
3170         * tui/tui-stack.c: Update.
3171         * varobj.c: Update.
3172         * windows-nat.c: Update.
3173         * windows-tdep.c: Update.
3174
3175 2018-07-03  Tom Tromey  <tom@tromey.com>
3176
3177         * common/ptid.c (ptid_match): Remove.
3178         * common/ptid.h (ptid_match): Don't declare.
3179         * fbsd-nat.c: Update.
3180         * infcmd.c: Update.
3181         * infrun.c: Update.
3182         * linux-nat.c: Update.
3183         * record-btrace.c: Update.
3184         * regcache.c: Update.
3185         * remote.c: Update.
3186
3187 2018-07-03  Tom Tromey  <tom@tromey.com>
3188
3189         * common/ptid.c (ptid_tid_p): Remove.
3190         * common/ptid.h (ptid_tid_p): Don't declare.
3191         * sol-thread.c: Update.
3192
3193 2018-07-03  Tom Tromey  <tom@tromey.com>
3194
3195         * common/ptid.c (ptid_lwp_p): Remove.
3196         * common/ptid.h (ptid_lwp_p): Don't declare.
3197         * fbsd-nat.c: Update.
3198         * linux-nat.c: Update.
3199         * nat/linux-procfs.c: Update.
3200         * nat/x86-linux-dregs.c: Update.
3201         * sol-thread.c: Update.
3202
3203 2018-07-03  Tom Tromey  <tom@tromey.com>
3204
3205         * common/ptid.c (ptid_is_pid): Remove.
3206         * common/ptid.h (ptid_is_pid): Don't declare.
3207         * infrun.c: Update.
3208         * linux-nat.c: Update.
3209         * mi/mi-interp.c: Update.
3210         * remote.c: Update.
3211         * thread.c: Update.
3212
3213 2018-07-03  Tom Tromey  <tom@tromey.com>
3214
3215         * common/ptid.c (ptid_get_tid): Remove.
3216         * common/ptid.h (ptid_get_tid): Don't declare.
3217         * ada-tasks.c: Update.
3218         * aix-thread.c: Update.
3219         * bsd-uthread.c: Update.
3220         * darwin-nat.c: Update.
3221         * fbsd-nat.c: Update.
3222         * i386-darwin-nat.c: Update.
3223         * infrun.c: Update.
3224         * linux-tdep.c: Update.
3225         * nto-procfs.c: Update.
3226         * ppc-ravenscar-thread.c: Update.
3227         * python/py-infthread.c: Update.
3228         * ravenscar-thread.c: Update.
3229         * sol-thread.c: Update.
3230         * sparc-ravenscar-thread.c: Update.
3231         * windows-nat.c: Update.
3232
3233 2018-07-03  Tom Tromey  <tom@tromey.com>
3234
3235         * common/ptid.c (ptid_get_lwp): Remove.
3236         * common/ptid.h (ptid_get_lwp): Don't declare.
3237         * aarch64-linux-nat.c: Update.
3238         * ada-tasks.c: Update.
3239         * aix-thread.c: Update.
3240         * amd64-linux-nat.c: Update.
3241         * arm-linux-nat.c: Update.
3242         * corelow.c: Update.
3243         * fbsd-nat.c: Update.
3244         * fbsd-tdep.c: Update.
3245         * gnu-nat.c: Update.
3246         * i386-cygwin-tdep.c: Update.
3247         * i386-gnu-nat.c: Update.
3248         * i386-linux-nat.c: Update.
3249         * ia64-linux-nat.c: Update.
3250         * inf-ptrace.c: Update.
3251         * infrun.c: Update.
3252         * linux-fork.c: Update.
3253         * linux-nat.c: Update.
3254         * linux-tdep.c: Update.
3255         * linux-thread-db.c: Update.
3256         * mips-linux-nat.c: Update.
3257         * nat/aarch64-linux-hw-point.c: Update.
3258         * nat/aarch64-linux.c: Update.
3259         * nat/linux-btrace.c: Update.
3260         * nat/linux-osdata.c: Update.
3261         * nat/linux-procfs.c: Update.
3262         * nat/x86-linux-dregs.c: Update.
3263         * obsd-nat.c: Update.
3264         * ppc-fbsd-nat.c: Update.
3265         * ppc-linux-nat.c: Update.
3266         * procfs.c: Update.
3267         * python/py-infthread.c: Update.
3268         * ravenscar-thread.c: Update.
3269         * remote.c: Update.
3270         * s390-linux-nat.c: Update.
3271         * sol-thread.c: Update.
3272         * sol2-tdep.c: Update.
3273         * spu-linux-nat.c: Update.
3274         * x86-linux-nat.c: Update.
3275         * xtensa-linux-nat.c: Update.
3276
3277 2018-07-03  Tom Tromey  <tom@tromey.com>
3278
3279         * common/ptid.c (ptid_get_pid): Remove.
3280         * common/ptid.h (ptid_get_pid): Don't declare.
3281         * aarch64-linux-nat.c: Update.
3282         * ada-lang.c: Update.
3283         * aix-thread.c: Update.
3284         * alpha-bsd-nat.c: Update.
3285         * amd64-fbsd-nat.c: Update.
3286         * amd64-linux-nat.c: Update.
3287         * arm-linux-nat.c: Update.
3288         * arm-nbsd-nat.c: Update.
3289         * auxv.c: Update.
3290         * break-catch-syscall.c: Update.
3291         * breakpoint.c: Update.
3292         * bsd-uthread.c: Update.
3293         * corelow.c: Update.
3294         * ctf.c: Update.
3295         * darwin-nat.c: Update.
3296         * fbsd-nat.c: Update.
3297         * fbsd-tdep.c: Update.
3298         * gcore.c: Update.
3299         * gnu-nat.c: Update.
3300         * hppa-nbsd-nat.c: Update.
3301         * hppa-obsd-nat.c: Update.
3302         * i386-fbsd-nat.c: Update.
3303         * ia64-linux-nat.c: Update.
3304         * inf-ptrace.c: Update.
3305         * infcmd.c: Update.
3306         * inferior.c: Update.
3307         * inferior.h: Update.
3308         * inflow.c: Update.
3309         * infrun.c: Update.
3310         * linux-fork.c: Update.
3311         * linux-nat.c: Update.
3312         * linux-tdep.c: Update.
3313         * linux-thread-db.c: Update.
3314         * m68k-bsd-nat.c: Update.
3315         * mi/mi-interp.c: Update.
3316         * mi/mi-main.c: Update.
3317         * mips-linux-nat.c: Update.
3318         * mips-nbsd-nat.c: Update.
3319         * mips64-obsd-nat.c: Update.
3320         * nat/aarch64-linux-hw-point.c: Update.
3321         * nat/aarch64-linux.c: Update.
3322         * nat/linux-btrace.c: Update.
3323         * nat/linux-osdata.c: Update.
3324         * nat/linux-procfs.c: Update.
3325         * nat/x86-linux-dregs.c: Update.
3326         * nto-procfs.c: Update.
3327         * obsd-nat.c: Update.
3328         * ppc-linux-nat.c: Update.
3329         * ppc-nbsd-nat.c: Update.
3330         * ppc-obsd-nat.c: Update.
3331         * proc-service.c: Update.
3332         * procfs.c: Update.
3333         * python/py-inferior.c: Update.
3334         * python/py-infthread.c: Update.
3335         * ravenscar-thread.c: Update.
3336         * record.c: Update.
3337         * remote-sim.c: Update.
3338         * remote.c: Update.
3339         * rs6000-nat.c: Update.
3340         * s390-linux-nat.c: Update.
3341         * sh-nbsd-nat.c: Update.
3342         * sol-thread.c: Update.
3343         * sparc-nat.c: Update.
3344         * sparc64-tdep.c: Update.
3345         * spu-linux-nat.c: Update.
3346         * spu-tdep.c: Update.
3347         * target-debug.h: Update.
3348         * target.c: Update.
3349         * thread.c: Update.
3350         * tid-parse.c: Update.
3351         * tracefile-tfile.c: Update.
3352         * vax-bsd-nat.c: Update.
3353         * windows-nat.c: Update.
3354         * x86-linux-nat.c: Update.
3355         * x86-nat.c: Update.
3356
3357 2018-07-03  Tom Tromey  <tom@tromey.com>
3358
3359         * common/ptid.c (pid_to_ptid): Remove.
3360         * common/ptid.h (pid_to_ptid): Don't declare.
3361         * aix-thread.c: Update.
3362         * arm-linux-nat.c: Update.
3363         * common/ptid.c: Update.
3364         * common/ptid.h: Update.
3365         * corelow.c: Update.
3366         * ctf.c: Update.
3367         * darwin-nat.c: Update.
3368         * fbsd-nat.c: Update.
3369         * fork-child.c: Update.
3370         * gnu-nat.c: Update.
3371         * go32-nat.c: Update.
3372         * inf-ptrace.c: Update.
3373         * infcmd.c: Update.
3374         * inferior.c: Update.
3375         * infrun.c: Update.
3376         * linux-fork.c: Update.
3377         * linux-nat.c: Update.
3378         * nat/aarch64-linux-hw-point.c: Update.
3379         * nat/fork-inferior.c: Update.
3380         * nat/x86-linux-dregs.c: Update.
3381         * nto-procfs.c: Update.
3382         * obsd-nat.c: Update.
3383         * procfs.c: Update.
3384         * progspace.c: Update.
3385         * remote.c: Update.
3386         * rs6000-nat.c: Update.
3387         * s390-linux-nat.c: Update.
3388         * sol-thread.c: Update.
3389         * spu-linux-nat.c: Update.
3390         * target.c: Update.
3391         * top.c: Update.
3392         * tracefile-tfile.c: Update.
3393         * windows-nat.c: Update.
3394
3395 2018-07-03  Tom Tromey  <tom@tromey.com>
3396
3397         * common/ptid.h (ptid_build): Don't declare.
3398         * common/ptid.c (ptid_build): Remove.
3399         * aix-thread.c: Update.
3400         * bsd-kvm.c: Update.
3401         * bsd-uthread.c: Update.
3402         * common/agent.c: Update.
3403         * common/ptid.c: Update.
3404         * common/ptid.h: Update.
3405         * corelow.c: Update.
3406         * darwin-nat.c: Update.
3407         * fbsd-nat.c: Update.
3408         * gnu-nat.c: Update.
3409         * linux-fork.c: Update.
3410         * linux-nat.c: Update.
3411         * linux-thread-db.c: Update.
3412         * nat/linux-osdata.c: Update.
3413         * nat/linux-procfs.c: Update.
3414         * nto-procfs.c: Update.
3415         * obsd-nat.c: Update.
3416         * proc-service.c: Update.
3417         * procfs.c: Update.
3418         * ravenscar-thread.c: Update.
3419         * remote-sim.c: Update.
3420         * remote.c: Update.
3421         * sol-thread.c: Update.
3422         * target.c: Update.
3423         * windows-nat.c: Update.
3424
3425 2018-07-03  Tom Tromey  <tom@tromey.com>
3426
3427         * infrun.c (follow_exec): Use exit_inferior_silent.
3428         * inferior.c (exit_inferior_num_silent): Remove.
3429         * inferior.h (exit_inferior_num_silent): Don't declare.
3430
3431 2018-07-03  Tom Tromey  <tom@tromey.com>
3432
3433         PR cli/23340:
3434         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3435         inferior_ptid on error.
3436
3437 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3438             Simon Marchi  <simon.marchi@polymtl.ca>
3439
3440         PR tdep/8282
3441         * disasm.h (gdb_disassembler): Add
3442         `m_disassembler_options_holder'. member
3443         * disasm.c (get_all_disassembler_options): New function.
3444         (gdb_disassembler::gdb_disassembler): Use it.
3445         (gdb_buffered_insn_length_init_dis): Likewise.
3446         (gdb_buffered_insn_length): Adjust accordingly.
3447         (set_disassembler_options): Handle options with arguments.
3448         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3449         line if showing options with descriptions.
3450         (disassembler_options_completer): Adapt to using the
3451         `disasm_options_and_args_t' structure.
3452         * mips-tdep.c (mips_disassembler_options): New variable.
3453         (mips_disassembler_options_o32): Likewise.
3454         (mips_disassembler_options_n32): Likewise.
3455         (mips_disassembler_options_n64): Likewise.
3456         (gdb_print_insn_mips): Don't set `disassembler_options'.
3457         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3458         functions.
3459         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3460         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3461         `gdbarch_disassembler_options_implicit' and
3462         `gdbarch_valid_disassembler_options'.
3463         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3464         `disasm_options_and_args_t' structure.
3465         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3466         method.
3467         (valid_disassembler_options): Switch from `disasm_options_t' to
3468         the `disasm_options_and_args_t' structure.
3469         * NEWS: Document `set disassembler-options' support for the MIPS
3470         target.
3471         * gdbarch.h: Regenerate.
3472         * gdbarch.c: Regenerate.
3473
3474 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3475
3476         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3477
3478 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3479
3480         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3481         parameter in call to amd64_target_description.
3482         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3483         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3484         (amd64fbsd_init_abi): Likewise.
3485         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3486         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3487         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3488         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3489
3490 2018-06-29  Pedro Alves  <palves@redhat.com>
3491
3492         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3493         "segments" parameter.
3494         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3495         (_initialize_amd64_tdep): Update call to
3496         amd64_create_target_description.
3497         (amd64_target_description): Add "segments" parameter.  Adjust
3498         the implementation to use it.
3499         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3500         call to amd64_create_target_description.
3501         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3502         * gdb/arch/amd64.h (amd64_create_target_description): Add
3503         "segments" register.
3504         * gdb/arch/amd64.c (amd64_create_target_description): Add
3505         "segments" parameter.  Call create_feature_i386_64bit_segments
3506         only if SEGMENTS is true.
3507         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3508         call to amd64_create_target_description.
3509
3510 2018-06-29  Pedro Alves  <palves@redhat.com>
3511
3512         * thread.c (thread_target_id_str): New, factored out from ...
3513         (print_thread_info_1): ... here.  Use it to compute the max
3514         "Target Id" column width.
3515
3516 2018-06-29  Pedro Alves  <palves@redhat.com>
3517
3518         * remote.c (remote_target::extra_thread_info): Delete
3519         'display_buf' and 'n' locals.  from the cache, regardless of
3520         packet mechanims is in use.  Use cache for qThreadExtra and qP
3521         methods too.
3522
3523 2018-06-29  Pedro Alves  <palves@redhat.com>
3524
3525         * blockframe.c (find_pc_sect_containing_function): New function.
3526         * breakpoint.c (print_breakpoint_location): Don't call
3527         find_pc_sect_function.
3528         * linespec.c (create_sals_line_offset): Record the location's
3529         symbol in the sal.
3530         * linespec.c (convert_address_location_to_sals): Fill in sal's
3531         symbol with find_pc_sect_containing_function.
3532         * symtab.c (find_function_start_sal): Rename to ...
3533         (find_function_start_sal_1): ... this.
3534         (find_function_start_sal): Reimplement as wrapper around
3535         find_function_start_sal_1, and use
3536         find_pc_sect_containing_function to fill in the sal's symbol.
3537         (find_function_start_sal(symbol*, bool)): Adjust.
3538         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3539         comments.
3540         (find_pc_sect_containing_function): Declare.
3541
3542 2018-06-29  Pedro Alves  <palves@redhat.com>
3543
3544         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3545         true if the the location has no symbol.
3546
3547 2018-06-28  Tom Tromey  <tom@tromey.com>
3548
3549         * NEWS: Mention --enable-codesign.
3550         * silent-rules.mk (ECHO_SIGN): New variable.
3551         * configure.ac: Add --enable-codesign.
3552         * configure: Rebuild.
3553         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3554         (gdb$(EXEEXT)): Optionally invoke codesign.
3555
3556 2018-06-28  Pedro Alves  <palves@redhat.com>
3557
3558         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3559         comments.
3560         (switch_to_thread_no_regs): Adjust comment.
3561         * infcmd.c (stop_pc): Delete.
3562         (post_create_inferior, info_program_command): Replace references
3563         to stop_pc with references to thread_info->suspend.stop_pc.
3564         * inferior.h (stop_pc): Delete declaration.
3565         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3566         (handle_inferior_event_1, handle_signal_stop)
3567         (process_event_stop_test, keep_going_stepped_thread)
3568         (handle_step_into_function, handle_step_into_function_backward)
3569         (print_stop_location): Replace references to stop_pc with
3570         references to thread_info->suspend.stop_pc.
3571         (struct infcall_suspend_state) <stop_pc>: Delete field.
3572         (save_infcall_suspend_state, restore_infcall_suspend_state):
3573         Remove references to inf_stat->stop_pc.
3574         * linux-fork.c (fork_load_infrun_state): Likewise.
3575         * record-btrace.c (record_btrace_set_replay): Likewise.
3576         * record-full.c (record_full_goto_entry): Likewise.
3577         * remote.c (print_one_stopped_thread): Likewise.
3578         * target.c (target_resume): Extend comment.
3579         * thread.c (set_executing_thread): New.
3580         (set_executing): Use it.
3581         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3582         Remove references to stop_pc.
3583
3584 2018-06-28  Pedro Alves  <palves@redhat.com>
3585
3586         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3587         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3588
3589 2018-06-28  Tom Tromey  <tom@tromey.com>
3590
3591         * coffread.c (coff_symfile_finish): Update.
3592         * xcoffread.c (xcoff_symfile_finish): Update.
3593         * elfread.c (elf_symfile_finish): Update.
3594         * symfile.h (dwarf2_free_objfile): Don't declare.
3595         * dwarf2read.c (_initialize_dwarf2_read): Use
3596         register_objfile_data_with_cleanup.
3597         (dwarf2_free_objfile): Now static.  Change signature.
3598
3599 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3600
3601         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3602         option "-o" to add-symbol-file-load to add an offset to each
3603         section's load address.
3604         * symfile.c (set_objfile_default_section_offset): New function.
3605
3606 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3607
3608         * symfile.c (add_symbol_file_command): Make sure that sections
3609         with the same name are sorted in the same order.
3610
3611 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3612
3613         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3614         require the second argument.  If omitted, load sections at the
3615         addresses specified in the file.
3616
3617 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3618
3619         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3620         (_initialize_symfile): Add option "-o" to symbol-file to add an
3621         offset to each section of the symbol file.
3622
3623 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3624
3625         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3626
3627 2018-06-27  Tom Tromey  <tom@tromey.com>
3628
3629         * stack.c (_initialize_stack): Update "func" help text.
3630
3631 2018-06-27  Tom Tromey  <tom@tromey.com>
3632
3633         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3634         std::vector.
3635         (unwind_infopy_str, pyuw_create_unwind_info)
3636         (unwind_infopy_add_saved_register, pyuw_sniffer)
3637         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3638         Update.
3639         (struct saved_reg): Add constructor.
3640         <value>: Now a gdbpy_ref<>.
3641
3642 2018-06-27  Tom Tromey  <tom@tromey.com>
3643
3644         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3645
3646 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3647
3648         * gdb-gdb.py.in: Format using autopep8.
3649
3650 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3651
3652         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3653         (type_lookup_function): Recognize CORE_ADDR values.
3654
3655 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3656
3657         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3658         print tag_name.
3659
3660 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3661
3662         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3663         <__lt__>: Add.
3664
3665 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3666
3667         * gdb-gdb.py: Move to...
3668         * gdb-gdb.py.in: ... here.
3669         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3670         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3671         dependencies.
3672         (distclean): Remove gdb-gdb.py when cleaning.
3673         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3674         * configure: Re-generate.
3675
3676 2018-06-27  Pedro Alves  <palves@redhat.com>
3677
3678         * proc-service.c (get_ps_regcache): New.
3679         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3680         (ps_lsetfpregs): Use it.
3681
3682 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3683
3684         PR gdb/21695
3685         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3686         (dwarf_decode_lines_1): Adjust.
3687
3688 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3689
3690         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3691         override.
3692         <info_proc>: Likewise.
3693
3694 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3695
3696         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3697         to windows_fetch_one_register, and only handle the case of
3698         fetching one register.  Move the code that reloads the context
3699         and iterates over all registers if R is negative to...
3700         (windows_nat_target::fetch_registers): ... here.
3701         (do_windows_store_inferior_registers): Rename to
3702         windows_store_one_register, and only handle the case of storing
3703         one register.  Move the code that handles the case where r is
3704         negative to...
3705         (windows_nat_target::store_registers) ... here.
3706
3707 2018-06-26  Tom Tromey  <tom@tromey.com>
3708
3709         PR rust/22574:
3710         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3711         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3712         Update.
3713         (rust_internal_print_type): Add podata parameter.
3714         (rust_print_type): Update.
3715
3716 2018-06-26  Tom Tromey  <tom@tromey.com>
3717
3718         * typeprint.h (struct print_offset_data) <update, finish,
3719         maybe_print_hole>: New methods.
3720         <indentation>: New constant.
3721         * typeprint.c (print_offset_data::indentation): Define.
3722         (print_offset_data::maybe_print_hole, print_offset_data::update)
3723         (print_offset_data::finish): Move from c-typeprint.c and rename.
3724         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3725         (print_spaces_filtered_with_print_options): Update.
3726         (c_print_type_union_field_offset, maybe_print_hole)
3727         (c_print_type_struct_field_offset): Move to typeprint.c and
3728         rename.
3729         (c_type_print_base_struct_union): Update.
3730
3731 2018-06-25  Pedro Alves  <palves@redhat.com>
3732
3733         * gdbthread.h (thread_info_ref, delete_thread)
3734         (delete_thread_silent, first_thread_of_inferior)
3735         (any_thread_of_inferior, switch_to_thread)
3736         (enable_thread_stack_temporaries)
3737         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3738         (get_last_thread_stack_temporary)
3739         (value_in_thread_stack_temporaries, can_access_registers_thread):
3740         Spell out "struct thread_info" instead of just "thread_info".
3741         * inferior.h (notice_new_inferior): Likewise.
3742
3743 2018-06-25  Pedro Alves  <palves@redhat.com>
3744
3745         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3746         pass thread_info pointer to delete_thread.
3747         (windows_nat_target::detach): Pass inferior pointer to
3748         detach_inferior.
3749         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3750         delete_thread.
3751         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3752         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3753         and pass a thread_info pointer to delete_thread.
3754         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3755         pass thread_info pointer to delete_thread.
3756         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3757         delete_thread_silent call.
3758         * procfs.c (procfs_target::detach): Pass inferior pointer to
3759         detach_inferior.
3760         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3761         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3762         delete_thread_silent call.
3763         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3764         pass thread_info pointer to delete_thread.
3765         (windows_nat_target::detach): Pass inferior pointer to
3766         delete_inferior.
3767
3768 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3769
3770         * regcache.c (readable_regcache::read_part): Fix asserts.
3771         (reg_buffer::raw_collect_part): New function.
3772         (regcache::write_part): Fix asserts.
3773         (reg_buffer::raw_supply_part): New function.
3774         (regcache::transfer_regset_register): New helper function.
3775         (regcache::transfer_regset): Call new functions.
3776         (regcache_supply_regset): Use gdb_byte*.
3777         (regcache::supply_regset): Likewise.
3778         (regcache_collect_regset): Likewise.
3779         (regcache::collect_regset): Likewise.
3780         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3781         (reg_buffer::raw_supply_part): Likewise.
3782         (regcache::transfer_regset_register): Likewise.
3783         (regcache::transfer_regset): Use gdb_byte*.
3784
3785 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3786
3787         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3788
3789 2018-06-21  Pedro Alves  <palves@redhat.com>
3790
3791         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3792         instead of a ptid_t.  All callers adjusted.
3793         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3794         adjusted.
3795         (print_ada_task_info, display_current_task_id, task_command_1):
3796         Adjust.
3797         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3798         inferior_thread.
3799         (breakpoint_kind): Adjust.
3800         (remove_breakpoints_pid): Rename to ...
3801         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3802         pointer.  All callers adjusted.
3803         (bpstat_clear_actions): Use inferior_thread.
3804         (get_bpstat_thread): New.
3805         (bpstat_do_actions): Use it.
3806         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3807         to take a thread_info pointer.  All callers adjusted.
3808         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3809         (breakpoint_re_set_thread): Use inferior_thread.
3810         * breakpoint.h (struct inferior): Forward declare.
3811         (bpstat_stop_status): Update.
3812         (remove_breakpoints_pid): Delete.
3813         (remove_breakpoints_inf): New.
3814         * bsd-uthread.c (bsd_uthread_target::wait)
3815         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3816         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3817         (maint_btrace_packet_history_cmd)
3818         (maint_btrace_clear_packet_history_cmd): Adjust.
3819         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3820         inferior_thread.
3821         * cli/cli-interp.c: Include "inferior.h".
3822         * common/refcounted-object.h (struct
3823         refcounted_object_ref_policy): New.
3824         * compile/compile-object-load.c: Include gdbthread.h.
3825         (store_regs): Use inferior_thread.
3826         * corelow.c (core_target::close): Use current_inferior.
3827         (core_target_open): Adjust to use first_thread_of_inferior and use
3828         the current inferior.
3829         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3830         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3831         <thread>: ... this new field.  All references adjusted.
3832         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3833         Take a thread_info pointer instead of a ptid_t.
3834         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3835         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3836         thread_info pointer instead of a ptid_t.
3837         * elfread.c: Include "inferior.h".
3838         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3839         Use inferior_thread.
3840         * eval.c (evaluate_subexp): Likewise.
3841         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3842         inferior_thread.
3843         * gdb_proc_service.h (struct thread_info): Forward declare.
3844         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3845         <thread>: ... this new field.  All references adjusted.
3846         * gdbarch.h, gdbarch.c: Regenerate.
3847         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3848         'thread' parameter.  All implementations and callers adjusted.
3849         * gdbthread.h (thread_info) <set_running>: New method.
3850         (delete_thread, delete_thread_silent): Take a thread_info pointer
3851         instead of a ptid.
3852         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3853         (first_thread_of_process): Delete, replaced by ...
3854         (first_thread_of_inferior): ... this new function.  All callers
3855         adjusted.
3856         (any_live_thread_of_process): Delete, replaced by ...
3857         (any_live_thread_of_inferior): ... this new function.  All callers
3858         adjusted.
3859         (switch_to_thread, switch_to_no_thread): Declare.
3860         (is_executing): Delete.
3861         (enable_thread_stack_temporaries): Update comment.
3862         <enable_thread_stack_temporaries>: Take a thread_info pointer
3863         instead of a ptid_t.  Incref the thread.
3864         <~enable_thread_stack_temporaries>: Decref the thread.
3865         <m_ptid>: Delete
3866         <m_thr>: New.
3867         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3868         (get_last_thread_stack_temporary)
3869         (value_in_thread_stack_temporaries, can_access_registers_thread):
3870         Take a thread_info pointer instead of a ptid_t.  All callers
3871         adjusted.
3872         * infcall.c (get_call_return_value): Use inferior_thread.
3873         (run_inferior_call): Work with thread pointers instead of ptid_t.
3874         (call_function_by_hand_dummy): Work with thread pointers instead
3875         of ptid_t.  Use thread_info_ref.
3876         * infcmd.c (proceed_thread_callback): Access thread's state
3877         directly.
3878         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3879         access thread's state directly.
3880         (continue_command): Use inferior_thread.
3881         (info_program_command): Use find_thread_ptid and access thread
3882         state directly.
3883         (proceed_after_attach_callback): Use thread state directly.
3884         (notice_new_inferior): Take a thread_info pointer instead of a
3885         ptid_t.  All callers adjusted.
3886         (exit_inferior): Take an inferior pointer instead of a pid.  All
3887         callers adjusted.
3888         (exit_inferior_silent): New.
3889         (detach_inferior): Delete.
3890         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3891         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3892         (detach_inferior_command, kill_inferior_command): Use
3893         find_inferior_id instead of valid_gdb_inferior_id and
3894         gdb_inferior_id_to_pid.
3895         (inferior_command): Use inferior and thread pointers.
3896         * inferior.h (struct thread_info): Forward declare.
3897         (notice_new_inferior): Take a thread_info pointer instead of a
3898         ptid_t.  All callers adjusted.
3899         (detach_inferior): Delete declaration.
3900         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3901         instead of a pid.  All callers adjusted.
3902         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3903         (valid_gdb_inferior_id): Delete.
3904         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3905         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3906         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3907         ...
3908         <inf>: ... this new field.
3909         <step_ptid>: Delete, replaced by ...
3910         <step_thread>: ... this new field.
3911         (get_displaced_stepping_state): Take an inferior pointer instead
3912         of a pid.  All callers adjusted.
3913         (displaced_step_in_progress_any_inferior): Adjust.
3914         (displaced_step_in_progress_thread): Take a thread pointer instead
3915         of a ptid_t.  All callers adjusted.
3916         (displaced_step_in_progress, add_displaced_stepping_state): Take
3917         an inferior pointer instead of a pid.  All callers adjusted.
3918         (get_displaced_step_closure_by_addr): Adjust.
3919         (remove_displaced_stepping_state): Take an inferior pointer
3920         instead of a pid.  All callers adjusted.
3921         (displaced_step_prepare_throw, displaced_step_prepare)
3922         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3923         All callers adjusted.
3924         (start_step_over): Adjust.
3925         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3926         displaced step queue.
3927         (do_target_resume): Adjust.
3928         (fetch_inferior_event): Use inferior_thread.
3929         (context_switch, get_inferior_stop_soon): Take an
3930         execution_control_state pointer instead of a ptid_t.  All callers
3931         adjusted.
3932         (switch_to_thread_cleanup): Delete.
3933         (stop_all_threads): Use scoped_restore_current_thread.
3934         * inline-frame.c: Include "gdbthread.h".
3935         (inline_state) <inline_state>: Take a thread pointer instead of a
3936         ptid_t.  All callers adjusted.
3937         <ptid>: Delete, replaced by ...
3938         <thread>: ... this new field.
3939         (find_inline_frame_state): Take a thread pointer instead of a
3940         ptid_t.  All callers adjusted.
3941         (skip_inline_frames, step_into_inline_frame)
3942         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3943         pointer instead of a ptid_t.  All callers adjusted.
3944         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3945         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3946         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3947         pointers directly.
3948         * linux-nat.c (get_detach_signal): Likewise.
3949         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3950         (thread_db_notice_clone): Adjust.
3951         (thread_db_find_new_threads_silently)
3952         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3953         a thread pointer instead of a ptid_t.  All callers adjusted.
3954         * mi/mi-cmd-var.c: Include "inferior.h".
3955         (mi_cmd_var_update_iter): Update to use thread pointers.
3956         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3957         inferior directly.
3958         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3959         out to ...
3960         (mi_output_running): ... this new function.
3961         (mi_on_resume_1): Adjust to use it.
3962         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3963         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3964         directly.
3965         (interrupt_thread_callback): : Adjust to use thread and inferior
3966         pointers.
3967         * proc-service.c: Include "gdbthread.h".
3968         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3969         * progspace-and-thread.c: Include "inferior.h".
3970         * progspace.c: Include "inferior.h".
3971         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3972         hold a reference to an inferior_object.
3973         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3974         inferior_thread.
3975         * python/py-inferior.c (struct inferior_object): Give the type a
3976         tag name instead of a typedef.
3977         (python_on_normal_stop): No need to check if the current thread is
3978         listed.
3979         (inferior_to_inferior_object): Change return type to
3980         inferior_object.  All callers adjusted.
3981         (find_thread_object): Delete, bits factored out to ...
3982         (thread_to_thread_object): ... this new function.
3983         * python/py-infthread.c (create_thread_object): Use
3984         inferior_to_inferior_object.
3985         (thpy_is_stopped): Use thread pointer directly.
3986         (gdbpy_selected_thread): Use inferior_thread.
3987         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3988         field, replaced with ...
3989         <thread>: ... this new field.  All users adjusted.
3990         (btpy_insn_or_gap_new): Drop const.
3991         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3992         callers adjusted.
3993         * python/py-record.c: Include "gdbthread.h".
3994         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3995         a ptid_t.  All callers adjusted.
3996         (gdbpy_current_recording): Use inferior_thread.
3997         * python/py-record.h (recpy_record_object) <ptid>: Delete
3998         field, replaced with ...
3999         <thread>: ... this new field.  All users adjusted.
4000         (recpy_element_object) <ptid>: Delete
4001         field, replaced with ...
4002         <thread>: ... this new field.  All users adjusted.
4003         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4004         a ptid_t.  All callers adjusted.
4005         * python/py-threadevent.c: Include "gdbthread.h".
4006         (get_event_thread): Use thread_to_thread_object.
4007         * python/python-internal.h (struct inferior_object): Forward
4008         declare.
4009         (find_thread_object, find_inferior_object): Delete declarations.
4010         (thread_to_thread_object, inferior_to_inferior_object): New
4011         declarations.
4012         * record-btrace.c: Include "inferior.h".
4013         (require_btrace_thread): Use inferior_thread.
4014         (record_btrace_frame_sniffer)
4015         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4016         (get_thread_current_frame): Use scoped_restore_current_thread and
4017         switch_to_thread.
4018         (get_thread_current_frame): Use thread pointer directly.
4019         (record_btrace_replay_at_breakpoint): Use thread's inferior
4020         pointer directly.
4021         * record-full.c: Include "inferior.h".
4022         * regcache.c: Include "gdbthread.h".
4023         (get_thread_arch_regcache): Use the inferior's address space
4024         directly.
4025         (get_thread_regcache, registers_changed_thread): New.
4026         * regcache.h (get_thread_regcache(thread_info *thread)): New
4027         overload.
4028         (registers_changed_thread): New.
4029         (remote_target) <remote_detach_1>: Swap order of parameters.
4030         (remote_add_thread): <remote_add_thread>: Return the new thread.
4031         (get_remote_thread_info(ptid_t)): New overload.
4032         (remote_target::remote_notice_new_inferior): Use thread pointers
4033         directly.
4034         (remote_target::process_initial_stop_replies): Use
4035         thread_info::set_running.
4036         (remote_target::remote_detach_1, remote_target::detach)
4037         (extended_remote_target::detach): Adjust.
4038         * stack.c (frame_show_address): Use inferior_thread.
4039         * target-debug.h (target_debug_print_thread_info_pp): New.
4040         * target-delegates.c: Regenerate.
4041         * target.c (default_thread_address_space): Delete.
4042         (memory_xfer_partial_1): Use current_inferior.
4043         (target_detach): Use current_inferior.
4044         (target_thread_address_space): Delete.
4045         (generic_mourn_inferior): Use current_inferior.
4046         * target.h (struct target_ops) <thread_address_space>: Delete.
4047         (target_thread_address_space): Delete.
4048         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4049         pointers directly.
4050         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4051         thread pointer instead of a ptid_t.  Adjust all callers.
4052         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4053         (first_thread_of_process): Delete, replaced by ...
4054         (first_thread_of_inferior): ... this new function.  All callers
4055         adjusted.
4056         (any_thread_of_process): Rename to ...
4057         (any_thread_of_inferior): ... this, and take an inferior pointer.
4058         (any_live_thread_of_process): Rename to ...
4059         (any_live_thread_of_inferior): ... this, and take an inferior
4060         pointer.
4061         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4062         (value_in_thread_stack_temporaries)
4063         (get_last_thread_stack_temporary): Take a thread pointer instead
4064         of a ptid_t.  Adjust all callers.
4065         (thread_info::set_running): New.
4066         (validate_registers_access): Use inferior_thread.
4067         (can_access_registers_ptid): Rename to ...
4068         (can_access_registers_thread): ... this, and take a thread
4069         pointer.
4070         (print_thread_info_1): Adjust to compare thread pointers instead
4071         of ptids.
4072         (switch_to_no_thread, switch_to_thread): Make extern.
4073         (scoped_restore_current_thread::~scoped_restore_current_thread):
4074         Use m_thread pointer directly.
4075         (scoped_restore_current_thread::scoped_restore_current_thread):
4076         Use inferior_thread.
4077         (thread_command): Use thread pointer directly.
4078         (thread_num_make_value_helper): Use inferior_thread.
4079         * top.c (execute_command): Use inferior_thread.
4080         * tui/tui-interp.c: Include "inferior.h".
4081         * varobj.c (varobj_create): Use inferior_thread.
4082         (value_of_root_1): Use find_thread_global_id instead of
4083         global_thread_id_to_ptid.
4084
4085 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4086
4087         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4088         possible.
4089         (regcache::write_part): Likewise.
4090         (readable_regcache::cooked_read_part): Update comment.
4091         (readable_regcache::cooked_write_part): Likewise.
4092         * regcache.h: (readable_regcache::read_part): Likewise.
4093         (regcache::write_part): Likewise.
4094
4095 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4096             Dirk Schubert  <dirk.schubert@arm.com>
4097
4098         * aarch64-linux-nat.c (post_attach): New.
4099         (aarch64_linux_nat_target::post_attach): Override post_attach to
4100         record the number of hardware debug registers.
4101
4102 2018-06-20  Tom Tromey  <tom@tromey.com>
4103
4104         * python/py-param.c (add_setshow_generic): Make parameters const.
4105         (parmpy_init): Update.
4106
4107 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4108
4109         * regcache.h (regcache_cooked_read_ftype): Rename to...
4110         (register_read_ftype): ...this, change type to function_view.
4111         (class reg_buffer) <save>: Remove src parameter.
4112         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4113         parameter non-const in first overload.  Remove src parameter in
4114         second overload.
4115         * regcache.c (do_cooked_read): Remove.
4116         (readonly_detached_regcache::readonly_detached_regcache): Make
4117         parameter non-const, adjust call to other constructor.
4118         (reg_buffer::save): Remove src parameter.
4119         * frame.c (do_frame_register_read): Remove.
4120         (frame_save_as_regcache): Use lambda function.
4121         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4122         parameter to ppu2spu_data *.
4123         (ppu2spu_sniffer): Use lambda function.
4124
4125 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4126
4127         * record-full.c (record_full_target::insert_breakpoint): Remove
4128         "struct" keyword, add const.
4129
4130 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4131
4132         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4133         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4134         * configure.ac: Remove AC_PREREQ, add missing quoting.
4135         * gnulib/configure.ac: Modernize usage of
4136         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4137         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4138         (AUTOMAKE_VERSION): Bump to 1.15.1.
4139         * configure: Re-generate.
4140         * config.in: Re-generate.
4141         * aclocal.m4: Re-generate.
4142         * gnulib/aclocal.m4: Re-generate.
4143         * gnulib/config.in: Re-generate.
4144         * gnulib/configure: Re-generate.
4145         * gnulib/import/Makefile.in: Re-generate.
4146
4147 2018-06-19  Pedro Alves  <palves@redhat.com>
4148
4149         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4150         (lookup_minimal_symbol_by_pc_section): ... here with
4151         gdb_assert_not_reached added.
4152
4153 2018-06-19  Pedro Alves  <palves@redhat.com>
4154
4155         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4156         parameter with a block parameter.  Compare location's block symbol
4157         with the frame's block instead of addresses.
4158         (skip_inline_frames): Pass the current block instead of the
4159         frame's address.  Break out as soon as we determine the frame
4160         should not be skipped.
4161
4162 2018-06-18  Tom Tromey  <tom@tromey.com>
4163
4164         * solib-aix.c (solib_aix_get_section_offsets): Return
4165         unique_xmalloc_ptr.
4166         (solib_aix_solib_create_inferior_hook): Update.
4167
4168 2018-06-18  Tom Tromey  <tom@tromey.com>
4169
4170         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4171
4172 2018-06-18  Tom Tromey  <tom@tromey.com>
4173
4174         * solib-frv.c (frv_relocate_main_executable): Use
4175         unique_xmalloc_ptr.
4176         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4177         unique_xmalloc_ptr.
4178
4179 2018-06-18  Tom Tromey  <tom@tromey.com>
4180
4181         * objfiles.h (inhibit_section_map_updates): Update.
4182         (resume_section_map_updates, resume_section_map_updates_cleanup):
4183         Remove.
4184         * solib-svr4.c (svr4_handle_solib_event): Update.
4185         * objfiles.c (inhibit_section_map_updates): Return
4186         scoped_restore_tmpl<int>.
4187         (resume_section_map_updates, resume_section_map_updates_cleanup):
4188         Remove.
4189
4190 2018-06-18  Tom Tromey  <tom@tromey.com>
4191
4192         * valprint.h (read_string): Update.
4193         * valprint.c (read_string): Change type of "buffer".
4194         (val_print_string): Update.
4195         * python/py-value.c (valpy_string): Update.
4196         * language.h (struct language_defn) <la_get_string>: Change
4197         type of "buffer".
4198         (default_get_string, c_get_string): Update.
4199         * language.c (default_get_string): Change type of "buffer".
4200         * guile/scm-value.c (gdbscm_value_to_string): Update.
4201         * c-lang.c (c_get_string): Change type of "buffer".
4202
4203 2018-06-18  Tom Tromey  <tom@tromey.com>
4204
4205         * ser-mingw.c (struct pipe_state_destroyer): New.
4206         (pipe_state_up): New typedef.
4207         (cleanup_pipe_state): Remove.
4208         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4209
4210 2018-06-18  Tom Tromey  <tom@tromey.com>
4211
4212         * rust-lang.h (rust_yyerror): Don't declare.
4213         * rust-lang.c (rust_language_defn): Update.
4214         * rust-exp.y (yyerror): Now static.
4215         * parse.c (parse_exp_in_context_1): Update.
4216         * p-lang.h (p_yyerror): Don't declare.
4217         * p-lang.c (p_language_defn): Update.
4218         * p-exp.y (yyerror): Now static.
4219         * opencl-lang.c (opencl_language_defn): Update.
4220         * objc-lang.c (objc_language_defn): Update.
4221         * m2-lang.h (m2_yyerror): Don't declare.
4222         * m2-lang.c (m2_language_defn): Update.
4223         * m2-exp.y (yyerror): Now static.
4224         * language.h (struct language_defn) <la_error>: Remove.
4225         * language.c (unk_lang_error): Remove.
4226         (unknown_language_defn, auto_language_defn): Remove.
4227         * go-lang.h (go_yyerror): Don't declare.
4228         * go-lang.c (go_language_defn): Update.
4229         * go-exp.y (yyerror): Now static.
4230         * f-lang.h (f_yyerror): Don't declare.
4231         * f-lang.c (f_language_defn): Update.
4232         * f-exp.y (yyerror): Now static.
4233         * d-lang.h (d_yyerror): Don't declare.
4234         * d-lang.c (d_language_defn): Update.
4235         * d-exp.y (yyerror): Now static.
4236         * c-lang.h (c_yyerror): Don't declare.
4237         * c-lang.c (c_language_defn, cplus_language_defn)
4238         (asm_language_defn, minimal_language_defn): Update.
4239         * c-exp.y (yyerror): Now static.
4240         * ada-lang.h (ada_yyerror): Don't declare.
4241         * ada-lang.c (ada_language_defn): Update.
4242         * ada-exp.y (yyerror): Now static.
4243
4244 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4245
4246         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4247         (store_sveregs_to_thread): Likewise.
4248         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4249         (aarch64_linux_store_inferior_registers): Likewise.
4250         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4251         function.
4252         (aarch64_sve_regs_copy_to_regcache): Likewise.
4253         (aarch64_sve_regs_copy_from_regcache): Likewise.
4254         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4255         declaration.
4256         (aarch64_sve_regs_copy_to_regcache): Likewise.
4257         (aarch64_sve_regs_copy_from_regcache): Likewise.
4258         (sve_context): Structure from Linux headers.
4259         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4260         (SVE_SIG_ZREG_SIZE): Likewise.
4261         (SVE_SIG_PREG_SIZE): Likewise.
4262         (SVE_SIG_FFR_SIZE): Likewise.
4263         (SVE_SIG_REGS_OFFSET): Likewise.
4264         (SVE_SIG_ZREGS_OFFSET): Likewise.
4265         (SVE_SIG_ZREG_OFFSET): Likewise.
4266         (SVE_SIG_ZREGS_SIZE): Likewise.
4267         (SVE_SIG_PREGS_OFFSET): Likewise.
4268         (SVE_SIG_PREG_OFFSET): Likewise.
4269         (SVE_SIG_PREGS_SIZE): Likewise.
4270         (SVE_SIG_FFR_OFFSET): Likewise.
4271         (SVE_SIG_REGS_SIZE): Likewise.
4272         (SVE_SIG_CONTEXT_SIZE): Likewise.
4273         (SVE_PT_REGS_MASK): Likewise.
4274         (SVE_PT_REGS_FPSIMD): Likewise.
4275         (SVE_PT_REGS_SVE): Likewise.
4276         (SVE_PT_VL_INHERIT): Likewise.
4277         (SVE_PT_VL_ONEXEC): Likewise.
4278         (SVE_PT_REGS_OFFSET): Likewise.
4279         (SVE_PT_FPSIMD_OFFSET): Likewise.
4280         (SVE_PT_FPSIMD_SIZE): Likewise.
4281         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4282         (SVE_PT_SVE_PREG_SIZE): Likewise.
4283         (SVE_PT_SVE_FFR_SIZE): Likewise.
4284         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4285         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4286         (__SVE_SIG_TO_PT): Likewise.
4287         (SVE_PT_SVE_OFFSET): Likewise.
4288         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4289         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4290         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4291         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4292         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4293         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4294         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4295         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4296         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4297         (SVE_PT_SVE_SIZE): Likewise.
4298         (SVE_PT_SIZE): Likewise.
4299         (HAS_SVE_STATE): New define.
4300
4301 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4302
4303         * nat/aarch64-sve-linux-sigcontext.h: New file.
4304         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4305         new files.
4306         (SVE_VQ_MIN): Likewise.
4307         (SVE_VQ_MAX): Likewise.
4308         (SVE_VL_MIN): Likewise.
4309         (SVE_VL_MAX): Likewise.
4310         (SVE_NUM_ZREGS): Likewise.
4311         (SVE_NUM_PREGS): Likewise.
4312         (sve_vl_valid): Likewise.
4313         (struct user_sve_header): Likewise.
4314
4315 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4316             Richard Bunt <Richard.Bunt@arm.com>
4317
4318         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4319         was requested by GDB.
4320
4321 2018-06-15  Tom de Vries  <tdevries@suse.de>
4322
4323         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4324
4325 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4326
4327         * gnulib/update-gnulib.sh: Print expected versions of
4328         autoconf/aclocal.
4329
4330 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4331
4332         * arch-utils.c (default_type_align): Use type_length_units.
4333         * gdbtypes.c (type_align): Use type_length_units.
4334
4335 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4336
4337         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4338         of 'define' command.
4339
4340 2018-06-14  Tom de Vries  <tdevries@suse.de>
4341
4342         PR cli/22573
4343         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4344         get_no_prettyformat_print_options.
4345
4346 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4347
4348         * sparc-nat.h: Include target.h.
4349         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4350         <fetch_registers>: Remove this argument in function call.
4351         <store_registers>: Remove this argument in function call, remove
4352         extra semicolon.
4353         <low_forget_process>: Call sparc64_forget_process instead of
4354         sparc_forget_process.
4355
4356 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4357
4358         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4359         (procfs_target::make_corefile_notes): Adjust to new
4360         target_read_alloc return type.
4361
4362 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4363             Stephen Roberts  <stephen.roberts@arm.com>
4364
4365         PR gdb/22882
4366         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4367         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4368         Move should_notify_stop local into more inner scope.
4369
4370 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4371             Stephen Roberts  <stephen.roberts@arm.com>
4372
4373         PR gdb/22882
4374         * infrun.c (resume_1): Add call to mark_async_event_handler.
4375
4376 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4377
4378         * infrun.c (do_target_wait): Change old version of $pc printed.
4379
4380 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4381
4382         * dwarf2read.c (read_index_from_section): Rename to...
4383         (read_gdb_index_from_section): ... this, update all callers.
4384         (dwarf2_read_index): Rename to...
4385         (dwarf2_read_gdb_index): ... this, update all callers.
4386
4387 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4388
4389         * gdb/hppa-linux-nat.c
4390         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4391         hppa_linux_nat_target::fetch_registers.
4392
4393 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4394
4395         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4396         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4397         (AARCH64_DWARF_SVE_FFR): Likewise.
4398         (AARCH64_DWARF_SVE_P0): Likewise.
4399         (AARCH64_DWARF_SVE_Z0): Likewise.
4400
4401 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4402
4403         * common/common-regcache.h (raw_compare): New function.
4404         * regcache.c (regcache::raw_compare): Likewise.
4405         * regcache.h (regcache::raw_compare): New declaration.
4406
4407 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4408
4409         * common/common-regcache.h (reg_buffer_common): New structure.
4410         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4411         (reg_buffer::raw_supply): Likewise.
4412         (reg_buffer::raw_supply_integer): Likewise.
4413         (reg_buffer::raw_supply_zeroed): Likewise.
4414         (reg_buffer::raw_collect): Likewise.
4415         (reg_buffer::raw_collect_integer): Likewise.
4416         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4417         (reg_buffer::raw_supply): Likewise.
4418         (reg_buffer::raw_supply_integer): Likewise.
4419         (reg_buffer::raw_supply_zeroed): Likewise.
4420         (reg_buffer::raw_collect): Likewise.
4421         (reg_buffer::raw_collect_integer): Likewise.
4422
4423 2018-06-10  Tom Tromey  <tom@tromey.com>
4424
4425         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4426         (class remote_state) <stop_reply_queue>: Now std::vector.
4427         (remote_state::~remote_state)
4428         (remote_target::stop_reply_queue_length): Update.
4429         (struct queue_iter_param, remove_child_of_pending_fork)
4430         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4431         (check_pending_event_prevents_wildcard_vcont_callback)
4432         (remove_stop_reply_for_inferior)
4433         (remove_stop_reply_of_remote_state)
4434         (remote_notif_remove_once_on_match)
4435         (stop_reply_match_ptid_and_ws)
4436         (remote_kill_child_of_pending_fork): Remove.
4437         (remote_target::remove_new_fork_children)
4438         (remote_target::check_pending_events_prevent_wildcard_vcont)
4439         (remote_target::discard_pending_stop_replies)
4440         (remote_target::discard_pending_stop_replies_in_queue)
4441         (remote_target::remote_notif_remove_queued_reply)
4442         (remote_target::queued_stop_reply)
4443         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4444         (remote_target::wait, remote_target::kill_new_fork_children)
4445         (remote_target::async): Update.
4446
4447 2018-06-10  Tom Tromey  <tom@tromey.com>
4448
4449         * record-full.c (record_full_arch_list_cleanups): Remove.
4450         (record_full_message): Use try/catch.
4451         (record_full_wait_cleanups): Remove.
4452         (record_full_wait_1): Use try/catch.
4453         (record_full_restore): Likewise.
4454
4455 2018-06-10  Tom Tromey  <tom@tromey.com>
4456
4457         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4458         declare VEC.  Add constructor.
4459         <in_target_beneath>: Now bool.
4460         (record_full_breakpoints): Now a std::vector, static.
4461         (record_full_sync_record_breakpoints)
4462         (record_full_init_record_breakpoints)
4463         (record_full_target::insert_breakpoint)
4464         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4465
4466 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4467
4468         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4469         * serial.c (serial_interface_lookup): Remove struct keyword.
4470
4471 2018-06-10  Tom Tromey  <tom@tromey.com>
4472
4473         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4474         method.
4475         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4476         a method.
4477         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4478         method.
4479         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4480         "beneath" as a method.
4481         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4482         Use "beneath" as a method.
4483
4484 2018-06-10  Tom Tromey  <tom@tromey.com>
4485
4486         * tracefile.c (struct trace_file_writer_deleter): New.
4487         <operator()>: Rename from trace_file_writer_xfree.
4488         (trace_file_writer_up): New typedef.
4489         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4490
4491 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4492
4493         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4494         <m_registers, m_register_status>: Change type to
4495         std::unique_ptr.
4496         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4497         XCNEWVEC.
4498
4499 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4500
4501         * common/common-regcache.h (enum register_status): Add
4502         underlying type "signed char".
4503         * regcache.h (reg_buffer) <m_register_status>: Change type to
4504         register_status *.
4505         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4506         register_status instead of signed char.
4507         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4508         (reg_buffer::get_register_status): Remove cast.
4509         (readable_regcache::raw_read): Remove cast.
4510         (readable_regcache::cooked_read): Remove cast.
4511
4512 2018-06-09  Tom Tromey  <tom@tromey.com>
4513
4514         * source.c (reverse_search_command, forward_search_command): Use
4515         scoped_fd.
4516
4517 2018-06-09  Tom Tromey  <tom@tromey.com>
4518
4519         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4520         (serial_ops_list): Now static, std::vector.
4521         (serial_interface_lookup, serial_add_interface): Update.
4522
4523 2018-06-09  Tom Tromey  <tom@tromey.com>
4524
4525         * dwarf2read.c (process_cu_includes): Update.
4526         (process_full_comp_unit): Update.
4527         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4528         std::vector.
4529
4530 2018-06-08  Paul Koning  <paul_koning@dell.com>
4531
4532         PR gdb/23252
4533
4534         * python/python.c (do_start_initialization):
4535         Avoid call to internal Python API.
4536         (init__gdb_module): New function.
4537
4538 2018-06-08  Gary Benson <gbenson@redhat.com>
4539
4540         * linux-thread-db.c (valprint.h): New include.
4541         (struct check_thread_db_info): New structure.
4542         (check_thread_db_on_load, tdb_testinfo): New static globals.
4543         (check_thread_db, check_thread_db_callback): New functions.
4544         (try_thread_db_load_1): Run integrity checks if requested.
4545         (maintenance_check_libthread_db): New function.
4546         (_initialize_thread_db): Register "maint check libthread-db"
4547         and "maint set/show check-libthread-db".
4548         * NEWS: Mention the above new commands.
4549
4550 2018-06-08  Tom Tromey  <tom@tromey.com>
4551
4552         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4553         now a method.
4554
4555 2018-06-08  Tom Tromey  <tom@tromey.com>
4556
4557         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4558
4559 2018-06-08  Tom Tromey  <tom@tromey.com>
4560
4561         * common/btrace-common.h (struct btrace_data): Add constructor,
4562         destructor, move assignment operator.
4563         <empty, clear, fini>: New methods.
4564         <format>: Initialize.
4565         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4566         (btrace_data_empty): Don't declare.
4567         * common/btrace-common.c (btrace_data_init): Remove.
4568         (btrace_data::fini): Rename from btrace_data_fini.
4569         (btrace_data::empty): Rename from btrace_data_empty.
4570         (btrace_data::clear): Rename from btrace_data_clear.  Return
4571         bool.
4572         * btrace.h (make_cleanup_btrace_data): Don't declare.
4573         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4574         (parse_xml_btrace): Update.
4575         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4576         (maint_btrace_clear_packet_history_cmd): Update.
4577
4578 2018-06-07  Pedro Alves  <palves@redhat.com>
4579
4580         * target.h (target_ops) <beneath>: Now a method.  All references
4581         updated.
4582         (class target_stack): New.
4583         * target.c (g_target_stack): New.
4584         (g_current_top_target): Delete.
4585         (current_top_target): Get the top target out of g_target_stack.
4586         (target_stack::push, target_stack::unpush): New.
4587         (push_target, unpush_target): Reimplement.
4588         (target_is_pushed): Reimplement in terms of g_target_stack.
4589         (target_ops::beneath, target_stack::find_beneath): New.
4590
4591 2018-06-07  Pedro Alves  <palves@redhat.com>
4592
4593         * target.h (find_target_beneath): Delete declaration.
4594         * target.c (find_target_beneath): Delete definition.
4595         * aix-thread.c: All callers of find_target_beneath adjusted to
4596         call target_ops::beneath instead.
4597         * bsd-uthread.c: Likewise.
4598         * linux-thread-db.c: Likewise.
4599         * ravenscar-thread.c: Likewise.
4600         * sol-thread.c: Likewise.
4601         * spu-multiarch.c: Likewise.
4602
4603 2018-06-07  Pedro Alves  <palves@redhat.com>
4604
4605         * target.h (target_ops) <beneath>: Now a method.  All references
4606         updated.
4607         (target_ops) <m_beneath>: New.
4608         * target.c (target_ops::beneath): New.
4609         * corelow.c: Adjust all references to target_ops::beneath.
4610         * linux-thread-db.c: Likewise.
4611         * make-target-delegates: Likewise.
4612         * record-btrace.c: Likewise.
4613         * record-full.c: Likewise.
4614         * remote.c: Likewise.
4615         * target.c: Likewise.
4616         * target-delegates.c: Regenerate.
4617
4618 2018-06-07  Pedro Alves  <palves@redhat.com>
4619
4620         * target.h (target_stack): Delete.
4621         (current_top_target): Declare function.
4622         * target.c (target_stack): Delete.
4623         (g_current_top_target): New.
4624         (current_top_target): New function.
4625         * auxv.c: Use current_top_target instead of target_stack
4626         throughout.
4627         * avr-tdep.c: Likewise.
4628         * breakpoint.c: Likewise.
4629         * corefile.c: Likewise.
4630         * elfread.c: Likewise.
4631         * eval.c: Likewise.
4632         * exceptions.c: Likewise.
4633         * frame.c: Likewise.
4634         * gdbarch-selftests.c: Likewise.
4635         * gnu-v3-abi.c: Likewise.
4636         * ia64-tdep.c: Likewise.
4637         * ia64-vms-tdep.c: Likewise.
4638         * infcall.c: Likewise.
4639         * infcmd.c: Likewise.
4640         * infrun.c: Likewise.
4641         * linespec.c: Likewise.
4642         * linux-tdep.c: Likewise.
4643         * minsyms.c: Likewise.
4644         * ppc-linux-nat.c: Likewise.
4645         * ppc-linux-tdep.c: Likewise.
4646         * procfs.c: Likewise.
4647         * regcache.c: Likewise.
4648         * remote.c: Likewise.
4649         * rs6000-tdep.c: Likewise.
4650         * s390-linux-nat.c: Likewise.
4651         * s390-tdep.c: Likewise.
4652         * solib-aix.c: Likewise.
4653         * solib-darwin.c: Likewise.
4654         * solib-dsbt.c: Likewise.
4655         * solib-spu.c: Likewise.
4656         * solib-svr4.c: Likewise.
4657         * solib-target.c: Likewise.
4658         * sparc-tdep.c: Likewise.
4659         * sparc64-tdep.c: Likewise.
4660         * spu-tdep.c: Likewise.
4661         * symfile.c: Likewise.
4662         * symtab.c: Likewise.
4663         * target-descriptions.c: Likewise.
4664         * target-memory.c: Likewise.
4665         * target.c: Likewise.
4666         * target.h: Likewise.
4667         * tracefile-tfile.c: Likewise.
4668         * tracepoint.c: Likewise.
4669         * valops.c: Likewise.
4670         * valprint.c: Likewise.
4671         * value.c: Likewise.
4672         * windows-tdep.c: Likewise.
4673         * mi/mi-main.c: Likewise.
4674
4675 2018-06-07  Tom Tromey  <tom@tromey.com>
4676
4677         * valprint.h (build_address_symbolic): Declare.
4678         * printcmd.c (print_address_symbolic): Update.
4679         (build_address_symbolic): Change "name" and "filename" to
4680         std::string.
4681         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4682         Update.
4683         * defs.h (build_address_symbolic): Remove declaration.
4684
4685 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4686
4687         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4688         (aarch64_vnv_type): Add function.
4689         (aarch64_pseudo_register_name): Add V regs for SVE.
4690         (aarch64_pseudo_register_type): Likewise.
4691         (aarch64_pseudo_register_reggroup_p): Likewise.
4692         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4693         (aarch64_pseudo_read_value): Add V regs for SVE.
4694         (aarch64_pseudo_write_2): Use V0 offset for SVE
4695         (aarch64_pseudo_write): Add V regs for SVE.
4696         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4697
4698 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4699
4700         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4701         (sve_vl_from_vq): Likewise.
4702
4703 2018-06-05  Tom Tromey  <tom@tromey.com>
4704
4705         * cli/cli-cmds.c (show_version): Update.
4706         * top.c (print_gdb_version): Add "interactive" parameter.
4707         Update.
4708         * main.c (captured_main_1): Update.
4709         * top.h (print_gdb_version): Add "interactive" parameter and a
4710         comment.
4711
4712 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4713
4714         * common/enum-flags.h: Add trailing semicolon to example in
4715         comment.
4716
4717 2018-06-05  Tom Tromey  <tom@tromey.com>
4718
4719         PR cli/12326:
4720         * NEWS: Add entry about pager.
4721         * utils.c (pagination_disabled_for_command): New global.
4722         (prompt_for_continue): Allow "c" response to prompt.
4723         (reinitialize_more_filter): Clear
4724         pagination_disabled_for_command.
4725         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4726
4727 2018-06-04  Tom Tromey  <tom@tromey.com>
4728
4729         * ada-lang.h (ada_lookup_symbol_list): Update.
4730         * ada-lang.c (resolve_subexp): Update.
4731         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4732         parameter.
4733         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4734         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4735         results parameter to std::vector.
4736         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4737         Update.
4738         * ada-exp.y (block_lookup): Update.
4739         (select_possible_type_sym): Change type of syms.  Remove nsyms
4740         parameter.
4741         (write_var_or_type, write_name_assoc): Update.
4742
4743 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4744
4745         * windows-nat.c (windows_nat_target::xfer_partial): Return
4746         TARGET_XFER_E_IO if we need to delegate to the target beneath
4747         but BENEATH is NULL.
4748
4749 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4750
4751         * Makefile.in (config.status): Add configure.nat as a
4752         dependency.
4753
4754 2018-06-04  Tom Tromey  <tom@tromey.com>
4755
4756         * cp-name-parser.y (cpname_state): Add method declarations.
4757         (HANDLE_QUAL): Update.
4758         (cpname_state::d_grab, cpname_state::fill_comp)
4759         (cpname_state::make_operator, cpname_state::make_dtor)
4760         (cpname_state::make_builtin_type, cpname_state::make_name)
4761         (cpname_state::d_qualify, cpname_state::d_int_type)
4762         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4763         (%union): Move earlier.
4764
4765 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4766
4767         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4768
4769 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4770
4771         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4772         (aarch64_pseudo_write_1): Likewise.
4773         (aarch64_pseudo_read_value): Use helper.
4774         (aarch64_pseudo_write): Likewise.
4775
4776 2018-06-04  Pedro Alves  <palves@redhat.com>
4777
4778         * darwin-nat.c (darwin_ops): Delete.
4779         (darwin_attach_pid): Use get_native_target.
4780
4781 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4782
4783         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4784         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4785
4786 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4787
4788         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4789         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4790         (aarch64_gdbarch_init): Check for SVE.
4791         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4792
4793 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4794
4795         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4796         * aarch64-tdep.h (aarch64_read_description): Likewise.
4797         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4798         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4799         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4800         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4801         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4802
4803 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4804
4805         * value.c (value_fetch_lazy_bitfield): New.
4806         (value_fetch_lazy_memory): New.
4807         (value_fetch_lazy_register): New.
4808         (value_fetch_lazy): Factor out to smaller functions.
4809
4810 2018-06-01  Tom Tromey  <tom@tromey.com>
4811
4812         * cp-name-parser.y (backslashable, represented): Now const.
4813
4814 2018-06-01  Tom Tromey  <tom@tromey.com>
4815
4816         * cp-name-parser.y: Include parser-defs.h.
4817         (parser_fprintf): Remove declaration.
4818
4819 2018-06-01  Tom Tromey  <tom@tromey.com>
4820
4821         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4822         %parse-param.
4823         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4824         (global_result): Remove globals.
4825         (struct cpname_state): New.
4826         (yyparse): Don't declare.
4827         (yylex, yyerror): Move declarations after %union.
4828         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4829         (make_name): Add state parameter.
4830         Update all callers.
4831         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4832         parameter.
4833         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4834         Update.
4835         (yylex): Add lvalp, state parameters.
4836         (yyerror): Add state parameter.
4837         (cp_demangled_name_to_comp): Update.
4838
4839 2018-06-01  Tom Tromey  <tom@tromey.com>
4840
4841         * cp-name-parser.y (parser_fprintf): Declare.
4842         (GDB_YY_REMAP_PREFIX): Define.
4843         Include yy-remap.h.  Don't redefine yy* identifiers.
4844
4845 2018-06-01  Tom Tromey  <tom@tromey.com>
4846
4847         * python/py-type.c (typy_legacy_template_argument): Update.
4848         * cp-support.h (cp_demangled_name_to_comp): Update.
4849         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4850         parameter to be a "std::string *".
4851         (main): Update.
4852
4853 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4854
4855         * ada-lex.l: Include "diagnostics.h" instead of
4856         "common/diagnostics.h".
4857         * unittests/environ-selftests.c: Likewise.
4858         * common/diagnostics.h: Moved to ../include.
4859
4860 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4861
4862         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4863         to language_mode_manual while calling breakpoint_re_set_one.
4864
4865 2018-06-01  Tom Tromey  <tom@tromey.com>
4866
4867         * valops.c (value_cast_structs, destructor_name_p): Update.
4868         * symtab.c (gdb_mangle_name): Update.
4869         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4870         Update.
4871         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4872         (pascal_object_print_value_fields, pascal_object_print_value):
4873         Update.
4874         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4875         * linespec.c (find_methods): Update.
4876         * gdbtypes.h (type_name_no_tag): Remove.
4877         (type_name_or_error): Rename from type_name_no_tag_or_error.
4878         * gdbtypes.c (type_name_no_tag): Remove.
4879         (type_name_or_error): Rename from type_name_no_tag_or_error.
4880         (lookup_struct_elt_type, check_typedef): Update.
4881         * expprint.c (print_subexp_standard): Update.
4882         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4883         * d-namespace.c (d_lookup_nested_symbol): Update.
4884         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4885         (cp_print_class_member): Update.
4886         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4887         * completer.c (add_struct_fields): Update.
4888         * c-typeprint.c (cp_type_print_derivation_info)
4889         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4890         Update.
4891         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4892         (ada_prefer_type, ada_is_exception_sym): Update.
4893
4894 2018-06-01  Tom Tromey  <tom@tromey.com>
4895
4896         * valops.c (enum_constant_from_type, value_namespace_elt)
4897         (value_maybe_namespace_elt): Update.
4898         * valarith.c (find_size_for_pointer_math): Update.
4899         * target-descriptions.c (make_gdb_type): Update.
4900         * symmisc.c (print_symbol): Update.
4901         * stabsread.c (define_symbol, read_type)
4902         (complain_about_struct_wipeout, add_undefined_type)
4903         (cleanup_undefined_types_1): Update.
4904         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4905         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4906         (rust_internal_print_type, rust_composite_type)
4907         (rust_evaluate_funcall, rust_evaluate_subexp)
4908         (rust_inclusive_range_type_p): Update.
4909         * python/py-type.c (typy_get_tag): Update.
4910         * p-typeprint.c (pascal_type_print_base): Update.
4911         * mdebugread.c (parse_symbol, parse_type): Update.
4912         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4913         Update.
4914         * guile/scm-type.c (gdbscm_type_tag): Update.
4915         * go-lang.c (sixg_string_p): Update.
4916         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4917         Update.
4918         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4919         (TYPE_TAG_NAME): Remove.
4920         * gdbtypes.c (type_name_no_tag): Simplify.
4921         (check_typedef, check_types_equal, recursive_dump_type)
4922         (copy_type_recursive, arch_composite_type): Update.
4923         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4924         in summary mode when needed.
4925         * eval.c (evaluate_funcall): Update.
4926         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4927         (process_structure_scope, read_enumeration_type)
4928         (read_namespace_type, read_module_type, determine_prefix): Update.
4929         * cp-support.c (inspect_type): Update.
4930         * coffread.c (process_coff_symbol, decode_base_type): Update.
4931         * c-varobj.c (c_is_path_expr_parent): Update.
4932         * c-typeprint.c (c_type_print_base_struct_union): Update.
4933         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4934         summary when using C language.
4935         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4936         (gen_maybe_namespace_elt): Update.
4937         * ada-lang.c (ada_type_name): Simplify.
4938         (empty_record, ada_template_to_fixed_record_type_1)
4939         (template_to_static_fixed_type)
4940         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4941
4942 2018-06-01  Tom Tromey  <tom@tromey.com>
4943
4944         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4945         c_print_type.
4946         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4947         (c_print_type): Update.
4948         (c_print_type): New overload.
4949         (c_type_print_varspec_prefix, c_type_print_args)
4950         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4951         (c_type_print_base_struct_union, c_type_print_base_1)
4952         (cp_type_print_method_args): Add "language" parameter.
4953         (c_type_print_base): Update.
4954         * c-lang.h (c_print_type): Add new overload.
4955
4956 2018-06-01  Tom Tromey  <tom@tromey.com>
4957
4958         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4959         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4960
4961 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4962
4963         * aarch64-tdep.c (aarch64_sve_register_names): New const
4964         var.
4965         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4966         (AARCH64_SVE_Z_REGS_NUM): New define.
4967         (AARCH64_SVE_P_REGS_NUM): Likewise.
4968         (AARCH64_SVE_NUM_REGS): Likewise.
4969
4970 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4971
4972         * nat/linux-ptrace.h [__alpha__]
4973         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4974         definitions.
4975
4976 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4977
4978         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4979         the endianness selected.
4980         * NEWS: Document `set endian auto' mode operation update.
4981
4982 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4983
4984         * Makefile.in: Add new header.
4985         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4986         (sve_vl_from_vg): Likewise.
4987         (sve_vq_from_vl): Likewise.
4988         (sve_vl_from_vq): Likewise.
4989         (sve_vq_from_vg): Likewise.
4990         (sve_vg_from_vq): Likewise.
4991         * configure.nat: Add new c file.
4992         * nat/aarch64-sve-linux-ptrace.c: New file.
4993         * nat/aarch64-sve-linux-ptrace.h: New file.
4994
4995 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4996
4997         * aarch64-linux-nat.c (aarch64_linux_read_description):
4998         Add parmeter zero.
4999         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5000         Likewise.
5001         * aarch64-tdep.c (tdesc_aarch64_list): Add.
5002         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5003         (aarch64_gdbarch_init): Add parmeter zero.
5004         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5005         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5006         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5007         parmeter.
5008         * doc/gdb.texinfo: Describe SVE feature
5009         * features/aarch64-sve.c: New file.
5010
5011 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
5012
5013         PR gdb/23210
5014         * gdbarch.sh (significant_addr_bit): Default to zero when
5015         not set by target architecture.
5016         * gdbarch.c: Re-generated.
5017         * utils.c (address_significant): Update.
5018
5019 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
5020
5021         * stack.c (func_command): Remove trailing newline in call to error.
5022
5023 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5024
5025         * regcache.h (regcache_raw_collect): Remove, update callers to
5026         use regcache::raw_collect.
5027         * regcache.c (regcache_raw_collect): Remove.
5028
5029 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5030
5031         * regcache.h (regcache_raw_supply): Remove, update callers to
5032         use detached_regcache::raw_supply.
5033         * regcache.c (regcache_raw_supply): Remove.
5034
5035 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5036
5037         * regcache.h (regcache_cooked_write_part): Remove, update
5038         callers to use regcache::cooked_write_part.
5039         * regcache.c (regcache_cooked_write_part): Remove.
5040
5041 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5042
5043         * regcache.h (regcache_cooked_read_part): Remove, update callers
5044         to use readable_regcache::cooked_read_part.
5045         * regcache.c (regcache_cooked_read_part): Remove.
5046
5047 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5048
5049         * regcache.h (regcache_cooked_read_value): Remove, update
5050         callers to use readable_regcache::cooked_read_value.
5051         * regcache.c (regcache_cooked_read_value): Remove.
5052
5053 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5054
5055         * regcache.h (regcache_cooked_write): Remove, update callers to
5056         use regcache::cooked_write.
5057         * regcache.c (regcache_cooked_write): Remove.
5058
5059 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5060
5061         * regcache.h (regcache_invalidate): Remove, update callers to
5062         use detached_regcache::invalidate instead.
5063         * regcache.c (regcache_invalidate): Remove.
5064
5065 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5066
5067         * regcache.h (regcache_raw_write_part): Remove, update callers
5068         to use regcache::raw_write_part instead.
5069         * regcache.c (regcache_raw_write_part): Remove.
5070
5071 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5072
5073         * regcache.h (regcache_raw_read_part): Remove, update callers to
5074         use readable_regcache::raw_read_part instead.
5075         * regcache.c (regcache_raw_read_part): Remove.
5076
5077 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5078
5079         * regcache.h (regcache_cooked_read): Remove, update callers to
5080         use readable_regcache::cooked_read instead.
5081         * regcache.c (regcache_cooked_read): Remove.
5082
5083 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5084
5085         * regcache.h (regcache_raw_write): Remove, update callers to use
5086         regcache::raw_write instead.
5087         * regcache.c (regcache_raw_write): Remove.
5088
5089 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5090
5091         * regcache.h (regcache_raw_read): Remove, update callers to use
5092         readable_regcache::raw_read instead.
5093         * regcache.c (regcache_raw_read): Remove.
5094
5095 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5096
5097         * regcache.h (regcache_raw_update): Remove, update callers to
5098         use readable_regcache::raw_update instead.
5099         * regcache.c (regcache_raw_update): Remove.
5100
5101 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5102
5103         * regcache.h (regcache_register_status): Remove, update callers
5104         to use reg_buffer::get_register_status directly instead.
5105         * regcache.c (regcache_register_status): Remove.
5106
5107 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5108
5109         * regcache.h (regcache_get_ptid): Remove, update all callers to
5110         call regcache::ptid instead.
5111         * regcache.c (regcache_get_ptid): Remove.
5112
5113 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5114
5115         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5116
5117 2018-05-30  Pedro Alves  <palves@redhat.com>
5118
5119         * common/common-exceptions.h (exception_rethrow): Use
5120         ATTRIBUTE_NORETURN.
5121
5122 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5123
5124         * breakpoint.c (print_solib_event, check_status_catch_solib):
5125         Remove struct keyword in range-based for loops.
5126         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5127         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5128         Likewise.
5129         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5130         Likewise.
5131         * symfile.c (addr_info_make_relative): Likewise.
5132         * thread.c (value_in_thread_stack_temporaries): Likewise.
5133
5134 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5135
5136         PR gdb/16841
5137         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5138         aggregate type to get its real type before accessing it.
5139
5140 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5141
5142         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5143         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5144         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5145         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5146         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5147         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5148         * printcmd.c (info_address_command): Likewise.
5149
5150 2018-05-29  Tom Tromey  <tom@tromey.com>
5151
5152         * windows-nat.c (handle_exception): Update fall-through comment.
5153
5154 2018-05-29  Tom Tromey  <tom@tromey.com>
5155
5156         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5157         (struct program_space) <added_solibs>: Now a std::vector.
5158         * breakpoint.c (print_solib_event): Update.
5159         (check_status_catch_solib): Update.
5160         * progspace.c (clear_program_space_solib_cache): Update.
5161         * solib.c (update_solib_list): Update.
5162
5163 2018-05-29  Tom Tromey  <tom@tromey.com>
5164
5165         * python/py-type.c (typy_richcompare): Update.
5166         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5167         * gdbtypes.h (types_deeply_equal): Return bool.
5168         (types_equal): Likewise.
5169         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5170         declare VEC.
5171         (check_types_equal): Change worklist to std::vector.  Return
5172         bool.
5173         (struct type_equality_entry): Add constructor.
5174         (compare_maybe_null_strings): Return bool.
5175         (check_types_worklist): Return bool.  Change worklist to
5176         std::vector.
5177         (types_deeply_equal): Use std::vector.
5178         (types_equal): Return bool.
5179         (compare_maybe_null_strings): Simplify.
5180
5181 2018-05-29  Tom Tromey  <tom@tromey.com>
5182
5183         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5184
5185 2018-05-29  Tom Tromey  <tom@tromey.com>
5186
5187         * objc-lang.h: Don't include cp-support.h.
5188         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5189         declare VEC.
5190
5191 2018-05-27  Tom Tromey  <tom@tromey.com>
5192
5193         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5194
5195 2018-05-25  Tom Tromey  <tom@tromey.com>
5196
5197         * value.c (value::location): Initialize.
5198
5199 2018-05-25  Tom Tromey  <tom@tromey.com>
5200
5201         * dbxread.c (init_bincl_list): Remove.
5202         (bincl_list): Now a std::vector.
5203         (bincls_allocated, next_bincl): Remove.
5204         (free_bincl_list, do_free_bincl_list_cleanup)
5205         (make_cleanup_free_bincl_list): Remove.
5206         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5207         unique_xmalloc_ptr.
5208         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5209         (struct header_file_location): Add constructor.
5210         (add_bincl_to_list): Remove.
5211
5212 2018-05-25  Tom Tromey  <tom@tromey.com>
5213
5214         * tui/tui.c (tui_enable): Update.
5215         * mi/mi-interp.c (mi_interp::init): Update.
5216         * interps.h (class interp) <name>: New method.
5217         <m_name>: Rename from name.
5218         (~scoped_restore_interp): Update.
5219         * interps.c (interp::interp): Update.
5220         (interp_add, interp_set, interp_lookup_existing)
5221         (current_interp_named_p): Update.
5222
5223 2018-05-25  Tom Tromey  <tom@tromey.com>
5224
5225         * interps.c (interp_name): Remove.
5226         * mi/mi-interp.c (mi_interp::init): Update.
5227         * interps.h (interp_name): Remove.
5228         (~scoped_restore_interp): Update.
5229         * tui/tui.c (tui_enable): Update.
5230
5231 2018-05-25  Tom Tromey  <tom@tromey.com>
5232
5233         * utils.c (fputs_maybe_filtered): Update.
5234         * linespec.c (decode_line_full): Update.
5235         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5236         (mi_print_breakpoint_for_event, mi_solib_loaded)
5237         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5238         (mi_user_selected_context_changed): Update.
5239         * mi/mi-main.c (mi_execute_command): Update.
5240         * cli/cli-script.c (execute_control_command): Update.
5241         * python/python.c (execute_gdb_command): Update.
5242         * solib.c (info_sharedlibrary_command): Update.
5243         * interps.c (interp_ui_out): Remove.
5244         * interps.h (interp_ui_out): Remove.
5245
5246 2018-05-25  Tom Tromey  <tom@tromey.com>
5247
5248         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5249         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5250         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5251
5252 2018-05-25  Tom Tromey  <tom@tromey.com>
5253
5254         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5255         * interps.c (interp_exec): Use scoped_restore.
5256
5257 2018-05-25  Tom Tromey  <tom@tromey.com>
5258
5259         * remote.c (remote_target::remote_file_get): Use
5260         gdb::byte_vector.
5261         (remote_target::remote_file_put): Likewise.
5262
5263 2018-05-25  Tom Tromey  <tom@tromey.com>
5264
5265         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5266         a std::string.
5267         (get_pe_section_index, add_pe_exported_sym): Update.
5268         (read_pe_exported_syms): Use gdb::def_vector.
5269
5270 2018-05-25  Tom Tromey  <tom@tromey.com>
5271
5272         * frame.c (remove_prev_frame): Remove.
5273         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5274
5275 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5276
5277         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5278         Remove prototypes.
5279         * mips-linux-nat.c (supply_fpregset): Always call
5280         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5281         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5282         `mips_fill_fpregset'.
5283         * mips-linux-tdep.c (mips_supply_fpregset)
5284         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5285         (mips_fill_fpregset_wrapper): Remove functions.
5286         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5287         (mips_linux_fpregset): Remove variable.
5288         (mips_linux_iterate_over_regset_sections): Use
5289         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5290         (mips_linux_o32_sigframe_init): Remove comment.
5291
5292 2018-05-25  Pedro Alves  <palves@redhat.com>
5293
5294         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5295         (struct readahead_cache, struct packet_reg, struct
5296         remote_arch_state, class remote_state): Move higher up in the
5297         file.
5298         (remote_target::m_remote_state): Now an object instead of a pointer.
5299         (remote_target::get_remote_state): Adjust.
5300
5301 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5302
5303         * stack.c (select_and_print_frame): Delete.
5304         (struct function_bounds): Move struct within function.
5305         (func_command): Most content moved into new function
5306         find_frame_for_function, use new function, print result, add
5307         function comment.
5308         (find_frame_for_function): New function, now returns a result.
5309
5310 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5311
5312         * stack.c (iterate_over_block_arg_vars): Fix comment.
5313         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5314
5315 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5316
5317         PR gdb/23203
5318         * frame.c
5319         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5320         Define.
5321         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5322         Define.
5323         * frame.h (class scoped_restore_selected_frame): New class.
5324         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5325         of any exception, use scoped_restore_selected_frame to restore the
5326         frame instead.
5327
5328 2018-05-24  Pedro Alves  <palves@redhat.com>
5329
5330         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5331         override.
5332
5333 2018-05-23  Tom Tromey  <tom@tromey.com>
5334
5335         * complaints.c (struct complaints): Remove.
5336         (symfile_complaint_book): Remove.
5337         (series): New global.
5338         (complaint_internal): Update.
5339         (clear_complaints): Update.
5340
5341 2018-05-23  Tom Tromey  <tom@tromey.com>
5342
5343         * complaints.c (counters): New global.
5344         (struct complain): Remove.
5345         (struct complaints) <root>: Remove.
5346         (complaint_sentinel): Remove.
5347         (symfile_complaint_book): Update.
5348         (find_complaint) Remove.
5349         (complaint_internal, clear_complaints): Update.
5350
5351 2018-05-23  Tom Tromey  <tom@tromey.com>
5352
5353         * complaints.c (struct complain) <file, line>: Remove.
5354         (find_complaint): Remove file, line parameters.
5355         (complaint_internal): Update.
5356
5357 2018-05-23  Tom Tromey  <tom@tromey.com>
5358
5359         * complaints.c (vcomplaint): Remove.
5360         (complaint_internal) Merge in contents of vcomplaint.
5361
5362 2018-05-23  Tom Tromey  <tom@tromey.com>
5363
5364         * complaints.c (struct complaints) <explanation>: Remove.
5365         (symfile_explanations): Remove.
5366         (symfile_complaint_book): Update.
5367         (vcomplaint): Update.
5368         (struct explanation): Remove.
5369
5370 2018-05-23  Tom Tromey  <tom@tromey.com>
5371
5372         * complaints.c (symfile_complaints): Remove.
5373         (complaint_internal): Remove "complaints" parameter.
5374         (clear_complaints, vcomplaint): Remove "c" parameter.
5375         (get_complaints): Remove.
5376         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5377         (dwarf2_debug_line_missing_file_complaint)
5378         (dwarf2_debug_line_missing_end_sequence_complaint)
5379         (dwarf2_complex_location_expr_complaint)
5380         (dwarf2_const_value_length_mismatch_complaint)
5381         (dwarf2_section_buffer_overflow_complaint)
5382         (dwarf2_macro_malformed_definition_complaint)
5383         (dwarf2_invalid_attrib_class_complaint)
5384         (create_addrmap_from_index, dw2_symtab_iter_next)
5385         (dw2_expand_marked_cus)
5386         (dw2_debug_names_iterator::find_vec_in_debug_names)
5387         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5388         (create_debug_type_hash_table, init_cutu_and_read_dies)
5389         (partial_die_parent_scope, add_partial_enumeration)
5390         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5391         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5392         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5393         (create_cus_hash_table, create_dwp_hash_table)
5394         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5395         (dwarf2_rnglists_process, dwarf2_ranges_process)
5396         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5397         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5398         (handle_struct_member_die, process_structure_scope)
5399         (read_array_type, read_common_block, read_module_type)
5400         (read_tag_pointer_type, read_typedef, read_base_type)
5401         (read_subrange_type, load_partial_dies, partial_die_info::read)
5402         (partial_die_info::read, partial_die_info::read)
5403         (partial_die_info::read, read_checked_initial_length_and_offset)
5404         (dwarf2_string_attr, read_formatted_entries)
5405         (dwarf_decode_line_header)
5406         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5407         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5408         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5409         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5410         (get_signatured_type, get_DW_AT_signature_type)
5411         (decode_locdesc, file_file_name, consume_improper_spaces)
5412         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5413         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5414         (dwarf2_symbol_mark_computed, set_die_type)
5415         (read_attribute_value): Update.
5416         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5417         Update.
5418         * dbxread.c (unknown_symtype_complaint)
5419         (lbrac_mismatch_complaint, repeated_header_complaint)
5420         (set_namestring, function_outside_compilation_unit_complaint)
5421         (read_dbx_symtab, process_one_symbol): Update.
5422         * gdbtypes.c (stub_noname_complaint): Update.
5423         * windows-nat.c (handle_unload_dll): Update.
5424         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5425         (decode_base_type): Update.
5426         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5427         (eb_complaint, record_include_begin, record_include_end)
5428         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5429         (process_xcoff_symbol, read_symbol)
5430         (function_outside_compilation_unit_complaint)
5431         (scan_xcoff_symtab): Update.
5432         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5433         * buildsym.c (finish_block_internal, make_blockvector)
5434         (end_symtab_get_static_block, augment_type_symtab): Update.
5435         * dtrace-probe.c (dtrace_process_dof)
5436         (dtrace_static_probe_ops::get_probes): Update.
5437         * complaints.h (struct complaint): Don't declare.
5438         (symfile_complaints): Remove.
5439         (complaint_internal): Remove "complaints" parameter.
5440         (complaint): Likewise.
5441         (clear_complaints): Likewise.
5442         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5443         (reread_symbols): Update.
5444         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5445         (dwarf2_frame_cache, decode_frame_entry): Update.
5446         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5447         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5448         (info_selectors_command): Update.
5449         * macrotab.c (macro_include, check_for_redefinition)
5450         (macro_undef): Update.
5451         * objfiles.c (filter_overlapping_sections): Update.
5452         * stabsread.c (invalid_cpp_abbrev_complaint)
5453         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5454         (define_symbol, error_type, read_type, rs6000_builtin_type)
5455         (stabs_method_name_from_physname, read_member_functions)
5456         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5457         (attach_fields_to_type, complain_about_struct_wipeout)
5458         (read_range_type, read_args, common_block_start)
5459         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5460         Update.
5461         * mdebugread.c (index_complaint, unknown_ext_complaint)
5462         (basic_type_complaint, bad_tag_guess_complaint)
5463         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5464         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5465         (parse_procedure, parse_lines)
5466         (function_outside_compilation_unit_complaint)
5467         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5468         (bad_tag_guess_complaint, reg_value_complaint): Update.
5469         * cp-support.c (demangled_name_complaint): Update.
5470         * macroscope.c (sal_macro_scope): Update.
5471         * dwarf-index-write.c (class debug_names): Update.
5472
5473 2018-05-23  Tom Tromey  <tom@tromey.com>
5474
5475         * complaints.c (clear_complaints): Remove "noisy" parameter.
5476         * complaints.h (clear_complaints): Update.
5477         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5478         (reread_symbols): Update.
5479
5480 2018-05-23  Tom Tromey  <tom@tromey.com>
5481
5482         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5483         SUBSEQUENT_MESSAGE.
5484         (vcomplaint, clear_complaints): Update.
5485         (symfile_explanations): Remove some messages.
5486
5487 2018-05-23  Tom Tromey  <tom@tromey.com>
5488
5489         * complaints.c (internal_complaint): Remove.
5490         * complaints.h (internal_complaint): Remove.
5491
5492 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5493
5494         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5495
5496 2018-05-22  Pedro Alves  <palves@redhat.com>
5497
5498         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5499         (remote_fileio_badfd, remote_fileio_return_errno)
5500         (remote_fileio_return_success, remote_fileio_func_open)
5501         (remote_fileio_func_open, remote_fileio_func_close)
5502         (remote_fileio_func_read, remote_fileio_func_write)
5503         (remote_fileio_func_lseek, remote_fileio_func_rename)
5504         (remote_fileio_func_unlink, remote_fileio_func_stat)
5505         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5506         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5507         remote_target parameter.
5508         (remote_fio_func_map) <func>: Add remote_target parameter.
5509         (do_remote_fileio_request, remote_fileio_request):
5510         * remote-fileio.h (remote_fileio_request):
5511         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5512         remote_target parameter.
5513         (remote_notif_process, handle_notification): Adjust to pass down
5514         the remote.
5515         (remote_notif_state_allocate): Add remote_target parameter.  Save
5516         it.
5517         * remote-notif.h (struct remote_target): Forward declare.
5518         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5519         remote_target parameter.
5520         (struct remote_notif_state) <remote>: New field.
5521         (remote_notif_ack, remote_notif_parse): Add remote_target
5522         parameter.
5523         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5524         remote_target parameter.
5525         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5526         (threads_listing_context, rmt_thread_action, protocol_feature)
5527         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5528         (packet_result, struct threads_listing_context, remote_state):
5529         Move definitions and declarations higher up.
5530         (remote_target) <~remote_target>: Declare.
5531         (remote_download_command_source, remote_file_put, remote_file_get)
5532         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5533         (remote_hostio_pread_vFile, remote_hostio_send_command)
5534         (remote_hostio_set_filesystem, remote_hostio_open)
5535         (remote_hostio_close, remote_hostio_unlink, remote_state)
5536         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5537         (get_memory_write_packet_size, get_memory_read_packet_size)
5538         (append_pending_thread_resumptions, remote_detach_1)
5539         (append_resumption, remote_resume_with_vcont)
5540         (add_current_inferior_and_thread, wait_ns, wait_as)
5541         (process_stop_reply, remote_notice_new_inferior)
5542         (process_initial_stop_replies, remote_add_thread)
5543         (btrace_sync_conf, remote_btrace_maybe_reopen)
5544         (remove_new_fork_children, kill_new_fork_children)
5545         (discard_pending_stop_replies, stop_reply_queue_length)
5546         (check_pending_events_prevent_wildcard_vcont)
5547         (discard_pending_stop_replies_in_queue, stop_reply)
5548         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5549         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5550         (remote_interrupt_as, remote_interrupt_ns)
5551         (remote_get_noisy_reply, remote_query_attached)
5552         (remote_add_inferior, remote_current_thread, get_current_thread)
5553         (set_thread, set_general_thread, set_continue_thread)
5554         (set_general_process, write_ptid)
5555         (remote_unpack_thread_info_response, remote_get_threadinfo)
5556         (parse_threadlist_response, remote_get_threadlist)
5557         (remote_threadlist_iterator, remote_get_threads_with_ql)
5558         (remote_get_threads_with_qxfer)
5559         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5560         (get_offsets, remote_check_symbols, remote_supported_packet)
5561         (remote_query_supported, remote_packet_size)
5562         (remote_serial_quit_handler, remote_detach_pid)
5563         (remote_vcont_probe, remote_resume_with_hc)
5564         (send_interrupt_sequence, interrupt_query)
5565         (remote_notif_get_pending_events, fetch_register_using_p)
5566         (send_g_packet, process_g_packet, fetch_registers_using_g)
5567         (store_register_using_P, store_registers_using_G)
5568         (set_remote_traceframe, check_binary_download)
5569         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5570         (remote_xfer_live_readonly_partial, remote_read_bytes)
5571         (remote_send_printf, remote_flash_write, readchar)
5572         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5573         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5574         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5575         (extended_remote_disable_randomization, extended_remote_run)
5576         (send_environment_packet, extended_remote_environment_support)
5577         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5578         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5579         (packet_command): Now methods of ...
5580         (remote_target): ... this class.
5581         (m_remote_state) <remote_target>: New field.
5582         (struct remote_state) <stop_reply_queue,
5583         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5584         fields.
5585         (remote_state::remote_state): Allocate stop_reply_queue.
5586         (remote_state): Delete global.
5587         (get_remote_state_raw): Delete.
5588         (remote_target::get_remote_state): Allocate m_remote_state on
5589         demand.
5590         (get_current_remote_target): New.
5591         (remote_ops, extended_remote_ops): Delete.
5592         (wait_forever_enabled_p, remote_async_inferior_event_token):
5593         Delete, moved to struct remote_state.
5594         (remote_target::close): Delete self.  Destruction bits split to
5595         ...
5596         (remote_target::~remote_target): ... this.
5597         (show_memory_packet_size): Adjust to use
5598         get_current_remote_target.
5599         (struct protocol_feature) <func>: Add remote_target parameter.
5600         All callers adjusted.
5601         (curr_quit_handler_target): New.
5602         (remote_serial_quit_handler): Reimplement.
5603         (remote_target::open_1): Adjust to use get_current_remote_target.
5604         Heap-allocate remote_target/extended_remote_target instances.
5605         (vcont_builder::vcont_builder): Add remote_target parameter, and
5606         save it in m_remote.  All callers adjusted.
5607         (vcont_builder::m_remote): New field.
5608         (vcont_builder::restart, vcont_builder::flush)
5609         (vcont_builder::push_action): Use it.
5610         (remote_target::commit_resume): Use it.
5611         (struct queue_iter_param) <remote>: New field.
5612         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5613         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5614         (check_pending_event_prevents_wildcard_vcont_callback)
5615         (remote_target::check_pending_events_prevent_wildcard_vcont)
5616         (remote_target::discard_pending_stop_replies)
5617         (remote_target::discard_pending_stop_replies_in_queue)
5618         (remote_target::remote_notif_remove_queued_reply): Fill in
5619         'remote' field.
5620         (remote_notif_get_pending_events): New.
5621         (remote_target::readchar, remote_target::remote_serial_write):
5622         Save/restore curr_quit_handler_target.
5623         (putpkt): New.
5624         (kill_new_fork_children): Fill in 'remote' field.
5625         (packet_command): Use get_current_remote_target, defer to
5626         remote_target method of same name.
5627         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5628         parameter, and save it in m_remote.  All callers adjusted.
5629         (scoped_remote_fd::release): Use m_remote.
5630         (scoped_remote_fd::m_remote): New field.
5631         (remote_file_put, remote_file_get, remote_file_delete): Use
5632         get_current_remote_target, defer to remote_target method of same
5633         name.
5634         (remote_btrace_reset): Add remote_state paremeter.  Update all
5635         callers.
5636         (remote_async_inferior_event_handler). Pass down 'data'.
5637         (remote_new_objfile): Use get_current_remote_target.
5638         (remote_target::vcont_r_supported): New.
5639         (set_range_stepping): Use get_current_remote_target and
5640         remote_target::vcont_r_supported.
5641         (_initialize_remote): Don't allocate 'remote_state' and
5642         'stop_reply_queue' globals.
5643         * remote.h (struct remote_target): Forward declare.
5644         (getpkt, putpkt, remote_notif_get_pending_events): Add
5645         'remote_target' parameter.
5646
5647 2018-05-22  Pedro Alves  <palves@redhat.com>
5648
5649         * remote.c (vcont_builder): Now a class.  Make all data members
5650         private.
5651         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5652         Declare methods.
5653         (vcont_builder_restart): Rename to ...
5654         (vcont_builder::restart): ... this.
5655         (vcont_builder_flush): Rename to ...
5656         (vcont_builder::flush): ... this.
5657         (vcont_builder_push_action): Rename to ...
5658         (vcont_builder::push_action): ... this.
5659         (remote_target::commit_resume): Adjust.
5660
5661 2018-05-22  Pedro Alves  <palves@redhat.com>
5662
5663         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5664         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5665         (get_fixed_memory_packet_size): New.
5666         (get_memory_packet_size): Use it.
5667         (set_memory_packet_size): Don't override the config size with
5668         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5669         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5670         Don't refer to get_memory_packet_size if not connected to a remote
5671         target.  Show "(default)" if configured size is 0.
5672
5673 2018-05-22  Pedro Alves  <palves@redhat.com>
5674
5675         * remote.c (remote_target::mourn_inferior): Move
5676         discard_pending_stop_replies call here from ...
5677         (_initialize_remote): ... here.
5678
5679 2018-05-22  Pedro Alves  <palves@redhat.com>
5680
5681         * remote.c (compare_section_command): Remove set_general_process
5682         call.
5683
5684 2018-05-22  Pedro Alves  <palves@redhat.com>
5685
5686         * remote.c (struct packet_reg, struct remote_arch_state):
5687         Move higher up in the file.
5688         (remote_state) <m_arch_states>: Store remote_arch_state values
5689         instead of remote_arch_state pointers.
5690         (remote_state::get_remote_arch_state): Adjust.
5691
5692 2018-05-22  Pedro Alves  <palves@redhat.com>
5693
5694         * remote.c: Include <unordered_map>.
5695         (remote_state): Now a class.
5696         (remote_state) <get_remote_arch_state>: Declare method.
5697         <get_remote_arch_state>: New field.
5698         (remote_arch_state) <remote_arch_state>: Declare ctor.
5699         <regs>: Now a unique_ptr.
5700         (remote_gdbarch_data_handle): Delete.
5701         (get_remote_arch_state): Delete.
5702         (remote_state::get_remote_arch_state): New.
5703         (get_remote_state): Adjust to call remote_state's
5704         get_remote_arch_state method.
5705         (init_remote_state): Delete, bits factored out to ...
5706         (remote_arch_state::remote_arch_state): ... this new method.
5707         (get_remote_packet_size, get_memory_packet_size)
5708         (process_g_packet, remote_target::fetch_registers)
5709         (remote_target::prepare_to_store, store_registers_using_G)
5710         (remote_target::store_registers, remote_target::get_trace_status):
5711         Adjust to call remote_state's method.
5712         (_initialize_remote): Remove reference to
5713         remote_gdbarch_data_handle.
5714
5715 2018-05-22  Pedro Alves  <palves@redhat.com>
5716
5717         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5718         pread>: New method declarations.
5719         (remote_target::open_1): Adjust.
5720         (readahead_cache_invalidate): Rename to ...
5721         (readahead_cache::invalidate): ... this, and adjust to be a class
5722         method.
5723         (readahead_cache_invalidate_fd): Rename to ...
5724         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5725         class method.
5726         (remote_hostio_pwrite): Adjust.
5727         (remote_hostio_pread_from_cache): Rename to ...
5728         (readahead_cache::pread): ... this, and adjust to be a class
5729         method.
5730         (remote_hostio_close): Adjust.
5731
5732 2018-05-22  Pedro Alves  <palves@redhat.com>
5733
5734         * remote.c (remote_hostio_close_cleanup): Delete.
5735         (class scoped_remote_fd): New.
5736         (remote_file_put, remote_file_get): Use it.
5737
5738 2018-05-22  Pedro Alves  <palves@redhat.com>
5739
5740         (struct vCont_action_support): Use bool and initialize all fields.
5741         (struct readahead_cache): Initialize all fields.
5742         (remote_state): Use bool and initialize all fields.
5743         (remote_state::remote_state, remote_state::~remote_state): New.
5744         (new_remote_state): Delete.
5745         (_initialize_remote): Use new to allocate remote_state.
5746
5747 2018-05-22  Pedro Alves  <palves@redhat.com>
5748             張俊芝  <zjz@zjz.name>
5749
5750         PR gdb/22973
5751         * c-exp.y: Include "c-support.h".
5752         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5753         of tolower.  Use c_ident_is_alpha to scan names.
5754         * c-lang.c: Include "c-support.h".
5755         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5756         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5757         * c-support.h: New file, with bits factored out from ...
5758         * cp-name-parser.y: ... this file.
5759         Include "c-support.h".
5760         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5761         c-support.h and renamed.
5762         (symbol_end, yylex): Adjust.
5763
5764 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5765
5766         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5767         parameter type to CORE_ADDR.
5768         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5769         parameter type in declaration to CORE_ADDR.
5770         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5771         target_auxv_search to get AT_HWCAP and use the result to get the
5772         target description.
5773         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5774         to CORE_ADDR. Remove the cast of the return value to unsigned
5775         long. Fix error predicate of target_auxv_search.
5776         (ppc_linux_nat_target::read_description): Change the type of the
5777         hwcap variable to CORE_ADDR.
5778
5779 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5780
5781         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5782         if the size of fpscr is larger than 32 bits.
5783
5784 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5785
5786         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5787         (ppc32_linux_vsxregmap): New global.
5788         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5789         regcache_supply_regset, and regcache_collect_regset.
5790         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5791         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5792         (fetch_vsx_register, store_vsx_register): Remove.
5793         (fetch_vsx_registers): Add regno parameter. Get regset using
5794         ppc_linux_vsxregset. Use regset to supply registers.
5795         (store_vsx_registers): Add regno parameter. Get regset using
5796         ppc_linux_vsxregset. Use regset to collect registers.
5797         (fetch_register): Call fetch_vsx_registers instead of
5798         fetch_vsx_register.
5799         (store_register): Call store_vsx_registers instead of
5800         store_vsx_register.
5801         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5802         new regno parameter.
5803         (store_ppc_registers): Call store_vsx_registers with -1 for the
5804         new regno parameter.
5805         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5806         (ppc_collect_vsxregset): Remove.
5807
5808 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5809
5810         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5811         offset fields.
5812         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5813         for vector register offset fields.
5814         (ppc64_fbsd_reg_offsets): Likewise.
5815         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5816         to vector register offset fields.
5817         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5818         to vector register offset fields.
5819         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5820         vector register offset fields.
5821         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5822         initializers for vector register offset fields.
5823         (rs6000_aix64_reg_offsets): Likewise.
5824         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5825         (ppc_supply_vrregset): Remove.
5826         (ppc_collect_vrregset): Remove.
5827         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5828         (ppc_linux_vrregset) : New function.
5829         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5830         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5831         (ppc32_linux_vrregset): Remove.
5832         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5833         and use result instead of ppc32_linux_vrregset.
5834         (ppc32_linux_reg_offsets): Remove initializers for vector register
5835         offset fields.
5836         (ppc64_linux_reg_offsets): Likewise.
5837         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5838         * ppc-linux-nat.c: Include regset.h.
5839         (gdb_vrregset_t): Adjust comment to account for little-endian
5840         mode.
5841         (supply_vrregset, fill_vrregset): Remove.
5842         (fetch_altivec_register, store_altivec_register): Remove.
5843         (fetch_altivec_registers): Add regno parameter. Get regset using
5844         ppc_linux_vrregset. Use regset to supply registers.
5845         (store_altivec_registers): Add regno parameter. Get regset using
5846         ppc_linux_vrregset. Use regset to collect registers.
5847         (fetch_register): Call fetch_altivec_registers instead of
5848         fetch_altivec_register.
5849         (store_register): Call store_altivec_registers instead of
5850         store_altivec_register.
5851         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5852         the new regno parameter.
5853         (store_ppc_registers): Call store_altivec_registers with -1 for
5854         the new regno parameter.
5855
5856 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5857
5858         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5859         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5860         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5861         (gdb_vrregset_t): Change array type size to
5862         PPC_LINUX_SIZEOF_VRREGSET.
5863         (gdb_vsxregset_t): Change array type size to
5864         PPC_LINUX_SIZEOF_VSXREGSET.
5865         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5866         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5867         PPC_LINUX_SIZEOF_VSXREGSET.
5868
5869 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5870
5871         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5872         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5873         nat/ppc-linux.c.
5874         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5875         ppc_linux_target_wordsize with tid.
5876         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5877         wordsize with tid.
5878         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5879         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5880         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5881         tid parameter. Remove static specifier.
5882         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5883         (ppc_linux_target_wordsize): New declaration.
5884
5885 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5886
5887         * arch/ppc-linux-common.c: New file.
5888         * arch/ppc-linux-common.h: New file.
5889         * arch/ppc-linux-tdesc.h: New file.
5890         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5891         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5892         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5893         arch/ppc-linux-tdesc.h.
5894         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5895         arch/ppc-linux-tdesc.h.
5896         (ppc_linux_nat_target::read_description): Remove target
5897         description matching code. Fill a ppc_linux_features struct and
5898         call ppc_linux_match_description with it. Move comment about ISA
5899         2.05 to ppc-linux-common.c.
5900         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5901         arch/ppc-linux-tdesc.h.
5902         (ppc_linux_core_read_description): Remove target description
5903         matching code. Fill a ppc_linux_features struct and call
5904         ppc_linux_match_description with it.
5905         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5906         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5907         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5908         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5909         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5910         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5911         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5912         (tdesc_powerpc_e500l): Remove.
5913
5914 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5915
5916         * ada-lang.c (catch_assert_command): Pass empty string instead
5917         of NULL for excep_string argument.
5918
5919 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5920
5921         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5922         the width of the requested register exceeds the width of the
5923         `ptrace' data type.
5924
5925 2018-05-21  Tom Tromey  <tom@tromey.com>
5926
5927         * printcmd.c (output_command): Remove.
5928         (output_command_const): Rename to output_command.
5929         * valprint.h (output_command): Rename from output_command_const.
5930         * tracepoint.c (trace_dump_actions): Call output_command.
5931
5932 2018-05-21  Tom Tromey  <tom@tromey.com>
5933
5934         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5935         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5936         * ada-lang.h (create_ada_exception_catchpoint): Update.
5937         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5938         std::string.
5939         (create_excep_cond_exprs, ~ada_catchpoint)
5940         (should_stop_exception, print_one_exception)
5941         (print_mention_exception, print_recreate_exception): Update.
5942         (ada_get_next_arg): Remove.
5943         (catch_ada_exception_command_split): Use std::string.  Change type
5944         of "excep_string", "cond_string".
5945         (catch_ada_exception_command): Update.
5946         (create_ada_exception_catchpoint): Change type of excep_string.
5947         (ada_exception_sal): Remove excep_string parameter.
5948         (~ada_catchpoint): Remove.
5949
5950 2018-05-21  Tom Tromey  <tom@tromey.com>
5951
5952         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5953         cleanup.
5954
5955 2018-05-21  Tom Tromey  <tom@tromey.com>
5956
5957         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5958         Return unique_xmalloc_ptr.
5959         (print_it_exception): Update.
5960
5961 2018-05-21  Tom Tromey  <tom@tromey.com>
5962
5963         * tracepoint.c (trace_dump_actions): Use std::string.
5964
5965 2018-05-21  Tom Tromey  <tom@tromey.com>
5966
5967         * symfile.c (reread_symbols): Use std::string for original_name.
5968
5969 2018-05-21  Tom Tromey  <tom@tromey.com>
5970
5971         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5972         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5973         constructor.
5974
5975 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5976
5977         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5978         instance to...
5979         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5980         * objfiles.c (get_objfile_bfd_data): Allocate
5981         objfile_per_bfd_storage with obstack_new when allocating on
5982         obstack.
5983
5984 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5985
5986         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5987         OBSTACK_ZALLOC.
5988         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5989         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5990         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5991         (add_pending): Likewise.
5992         (parse_symbol): Likewise.
5993         (parse_partial_symbols): Likewise.
5994         (psymtab_to_symtab_1): Likewise.
5995         (new_psymtab): Likewise.
5996         (elfmdebug_build_psymtabs): Likewise.
5997         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5998         * objfiles.c (get_objfile_bfd_data): Likewise.
5999         (objfile_register_static_link): Likewise.
6000         * psymtab.c (allocate_psymtab): Likewise.
6001         * stabsread.c (read_member_functions): Likewise.
6002         * xcoffread.c (xcoff_end_psymtab): Likewise.
6003
6004 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6005
6006         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6007         compiler supports std::is_trivially_constructible.
6008         * common/poison.h: Include obstack.h.
6009         (IsMallocable): Define to is_trivially_constructible if the
6010         compiler supports it, define to true_type otherwise.
6011         (xobnew): New.
6012         (XOBNEW): Redefine.
6013         (xobnewvec): New.
6014         (XOBNEWVEC): Redefine.
6015         * gdb_obstack.h (obstack_zalloc): New.
6016         (OBSTACK_ZALLOC): Redefine.
6017         (obstack_calloc): New.
6018         (OBSTACK_CALLOC): Redefine.
6019         (obstack_new): New.
6020         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6021         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6022         gdbarch.c.
6023         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6024         obstack_calloc/obstack_zalloc.
6025         (gdbarch_obstack_zalloc): Remove.
6026         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6027
6028 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6029
6030         * stack.c (backtrace_command_1): Remove useless variable int i.
6031
6032 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6033
6034         * stack.c (print_frame_info): Fix comment.
6035
6036 2018-05-18  Tom Tromey  <tom@tromey.com>
6037
6038         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6039         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6040         (~dwarf2_per_objfile): Update
6041         (dwarf2_get_dwz_file): Use new.
6042         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6043         unique_ptr.
6044
6045 2018-05-18  Tom Tromey  <tom@tromey.com>
6046
6047         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6048         unique_ptr.
6049         * dwarf2read.c (struct dwp_file): Add constructor and
6050         initializers.
6051         (open_and_init_dwp_file): Return a unique_ptr.
6052         (dwarf2_per_objfile, create_dwp_hash_table)
6053         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6054         (lookup_dwo_unit_in_dwp): Update.
6055         (open_and_init_dwp_file, get_dwp_file): Update.
6056
6057 2018-05-18  Tom Tromey  <tom@tromey.com>
6058
6059         * dwarf2read.c (dwarf2_per_objfile): Update.
6060         (struct mapped_index): Add initializers.
6061         (dwarf2_read_index): Use new.
6062         (dw2_symtab_iter_init): Update.
6063         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6064         unique_ptr.
6065
6066 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6067
6068         * dwarf2read.c (mapped_index) <total_size>: Remove.
6069
6070 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6071
6072         * unittests/format_pieces-selftests.c (test_format_specifier):
6073         Add ARI comments.
6074
6075 2018-05-18  Tom Tromey  <tom@tromey.com>
6076
6077         * c-typeprint.c (maybe_print_hole): New function.
6078         (c_print_type_struct_field_offset): Update.
6079         (c_type_print_base_struct_union): Call maybe_print_hole.
6080
6081 2018-05-17  Keith Seitz  <keiths@redhat.com>
6082
6083         * breakpoint.c (build_bpstat_chain): New function, moved from
6084         bpstat_stop_status.
6085         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6086         If no stop chain is passed, call build_bpstat_chain to build it.
6087         * breakpoint.h (build_bpstat_chain): Declare.
6088         (bpstat_stop_status): Move documentation here from breakpoint.c.
6089         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6090         build the stop chain and pass it to skip_inline_frames.
6091         Pass this stop chain to bpstat_stop_status.
6092         * inline-frame.c: Include breakpoint.h.
6093         (stopped_by_user_bp_inline_frame): New function.
6094         (skip_inline_frames): Add parameter `stop_chain'.
6095         Move documention to inline-frame.h.
6096         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6097         whether the frame should be elided.
6098         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6099         Add moved documentation and update for new parameter.
6100
6101 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6102
6103         PR cli/14975
6104         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6105         unittests/format_pieces-selftests.c.
6106         * common/format.h (format_piece) <operator==>: New.
6107         (format_pieces) <operator[]>: Remove.
6108         * common/format.c (format_pieces::format_pieces): Handle \e.
6109         * unittests/format_pieces-selftests.c: New.
6110
6111 2018-05-17  Tom Tromey  <tom@tromey.com>
6112
6113         PR symtab/23010:
6114         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6115         (dw2_instantiate_symtab): Add skip_partial parameter.
6116         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6117         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6118         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6119         (dw2_expand_symtabs_matching_one)
6120         (dw2_find_pc_sect_compunit_symtab)
6121         (dw2_debug_names_lookup_symbol)
6122         (dw2_debug_names_expand_symtabs_for_function): Update.
6123         (init_cutu_and_read_dies): Add skip_partial parameter.
6124         (process_psymtab_comp_unit, build_type_psymtabs_1)
6125         (process_skeletonless_type_unit, load_partial_comp_unit)
6126         (psymtab_to_symtab_1): Update.
6127         (load_full_comp_unit): Add skip_partial parameter.
6128         (process_imported_unit_die, dwarf2_read_addr_index)
6129         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6130         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6131         (read_signatured_type): Update.
6132
6133 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6134
6135         * value.c (release_value): Remove unused variable.
6136         (record_latest_value): Likewise.
6137         (access_value_history): Likewise.
6138         (preserve_values): Likewise.
6139
6140 2018-05-17  Tom Tromey  <tom@tromey.com>
6141
6142         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6143         Initialize.
6144
6145 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6146
6147         PR gdb/22286
6148         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6149         Also handle registers whose width is not a multiple of
6150         PTRACE_TYPE_RET.
6151         (linux_nat_trad_target::store_register): Likewise.
6152
6153 2018-05-16  Tom Tromey  <tom@tromey.com>
6154
6155         * gdbcore.h (core_bfd): Redefine.
6156         * corelow.c (core_target::close): Update.
6157         (core_target_open): Update.
6158         * progspace.h (struct program_space) <cbfd>: Now a
6159         gdb_bfd_ref_ptr.
6160
6161 2018-05-16  Tom Tromey  <tom@tromey.com>
6162
6163         PR cli/19551:
6164         * symfile-add-flags.h (enum symfile_add_flags)
6165         <SYMFILE_NOT_FILENAME>: New constant.
6166         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6167         objfile name from BFD.
6168         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6169         * minidebug.c (find_separate_debug_file_in_section): Put
6170         ".gnu_debugdata" into BFD's file name.
6171
6172 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6173
6174         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6175         Remove.
6176
6177 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6178
6179         PR binutils/21446
6180         * aarch64-tdep.c (aarch64_analyze_prologue,
6181         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6182         Indicate not interested in errors.
6183
6184 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6185
6186         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6187         Supply the MIPS_ZERO_REGNUM register.
6188
6189 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6190
6191         * mips-tdep.c (mask_address_var): Make variable static.
6192
6193 2018-05-14  Tom Tromey  <tom@tromey.com>
6194
6195         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6196
6197 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6198
6199         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6200         FXSAVE_ADDR for the mxcsr register.
6201
6202 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6203
6204         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6205
6206 2018-05-11  Pedro Alves  <palves@redhat.com>
6207
6208         * corelow.c (core_target) <core_target>: No longer inline.
6209         Initialize m_core_gdbarch, m_core_vec and build the section table
6210         here.
6211         <~core_target>: New.
6212         <core_gdbarch, get_core_register_section>: New methods.
6213         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6214         factored out from ...
6215         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6216         (core_ops): Delete.
6217         (sniff_core_bfd): Add gdbarch parameter.
6218         (core_close): Delete, merged into ...
6219         (core_target::close): ... here.  Delete self.
6220         (core_close_cleanup): Delete.
6221         (core_target_open): Allocate a core_target on the heap.  Use a
6222         unique_ptr instead of a cleanup.  Bits moved into the core_target
6223         ctor.  Adjust to use core_target methods instead of globals.
6224         (get_core_register_section): Rename to ...
6225         (core_target::get_core_register_section): ... this and adjust.
6226         (struct get_core_registers_cb_data): New.
6227         (get_core_registers_cb): Use it.  Use bool.
6228         (core_target::fetch_registers, core_target::files_info)
6229         (core_target::xfer_partial, core_target::read_description)
6230         (core_target::pid_to, core_target::thread_name): Adjust to
6231         reference class fields instead of globals.
6232         * target.h (struct target_ops_deleter, target_ops_up): New.
6233
6234 2018-05-11  Pedro Alves  <palves@redhat.com>
6235
6236         * corefile.c (core_file_command): Move to corelow.c.
6237         * corelow.c (the_core_target): Delete.
6238         (core_file_command): Moved from corefile.c.  Check exec_bfd
6239         instead of the_core_target.  Use target_detach instead of calling
6240         into the_core_target directly.
6241         (maybe_say_no_core_file_now): New.
6242         (core_target::detach): Use it.
6243         (_initialize_corelow): Remove references to the_core_target.
6244         * gdbcore.h (the_core_target): Delete.
6245
6246 2018-05-11  Tom Tromey  <tromey@redhat.com>
6247             Pedro Alves  <palves@redhat.com>
6248
6249         * corefile.c (core_bfd): Remove.
6250         * gdbcore.h (core_bfd): Now a macro.
6251         * progspace.h (struct program_space) <cbfd>: New field.
6252
6253 2018-05-11  Tom Tromey  <tom@tromey.com>
6254
6255         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6256         gdb::def_vector.
6257
6258 2018-05-10  Tom Tromey  <tom@tromey.com>
6259
6260         * configure: Rebuild.
6261         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6262
6263 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6264
6265         PR server/23158:
6266         * regformats/regdat.sh: Adjust script, following the addition
6267         of the new expedite_regs parameter to init_target_desc.
6268
6269 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6270     
6271         PR gdb/23127
6272         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6273         set_gdbarch_significant_addr_bit.
6274         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6275         set_gdbarch_significant_addr_bit.
6276         * utils.c (address_significant): Update to sign extend addr.
6277
6278 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6279
6280         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6281         (xtensa_linux_init_abi): Limit tdep->num_regs by
6282         tdep->num_nopriv_regs.
6283         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6284         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6285         not initialized.
6286
6287 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6288
6289         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6290
6291 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6292
6293         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6294         (I387_MXCSR_INIT_VAL): New constant.
6295         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6296         buffer if it was supplied by the inferior.
6297         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6298         (i387_xsave_get_clear_bv): New function.
6299         (i387_supply_xsave): Only read x87 control registers from the
6300         xsave buffer if the feature is enabled, and the state will have
6301         been written, otherwise, provide a suitable default.
6302         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6303         including x87 control registers.  Update control registers if they
6304         have changed from the default value, and mark features as enabled
6305         as required.
6306         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6307
6308 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6309
6310         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6311
6312 2018-05-07  Tom Tromey  <tom@tromey.com>
6313
6314         * configure: Rebuild.
6315         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6316
6317 2018-05-07  Tom Tromey  <tom@tromey.com>
6318
6319         PR tdep/20362:
6320         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6321         bit.  Use correct value for VDIV.
6322
6323 2018-05-04  Tom Tromey  <tom@tromey.com>
6324
6325         * configure: Rebuild.
6326         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6327
6328 2018-05-04  Tom Tromey  <tom@tromey.com>
6329
6330         * linux-record.c (record_linux_system_call) <case
6331         RECORD_SYS_RECVFROM>: Add "break".
6332
6333 2018-05-04  Tom Tromey  <tom@tromey.com>
6334
6335         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6336         Add missing "break".
6337         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6338         Add missing "break".
6339
6340 2018-05-04  Tom Tromey  <tom@tromey.com>
6341
6342         * rs6000-tdep.c (ppc_process_record_op4)
6343         (ppc_process_record_op63): Add fall-through comment.
6344
6345 2018-05-04  Tom Tromey  <tom@tromey.com>
6346
6347         * i386-tdep.c (i386_process_record): Add fall-through comment.
6348
6349 2018-05-04  Tom Tromey  <tom@tromey.com>
6350
6351         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6352         comment.
6353
6354 2018-05-04  Tom Tromey  <tom@tromey.com>
6355
6356         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6357         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6358         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6359         comment.
6360         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6361         comment.
6362         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6363         comment.
6364
6365 2018-05-04  Tom Tromey  <tom@tromey.com>
6366
6367         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6368
6369 2018-05-04  Tom Tromey  <tom@tromey.com>
6370
6371         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6372         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6373         * symfile.c (section_is_mapped): Fix fall-through comment.
6374         * stabsread.c (define_symbol, read_member_functions): Fix
6375         fall-through comment.
6376         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6377         comment.
6378         * remote.c (remote_wait_as): Fix fall-through comment.
6379         * p-exp.y (yylex): Fix fall-through comment.
6380         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6381         comment.
6382         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6383         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6384         * jv-exp.y (yylex): Fix fall-through comment.
6385         * go-exp.y (lex_one_token): Fix fall-through comment.
6386         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6387         fall-through comment.
6388         * f-exp.y (yylex): Fix fall-through comment.
6389         * dwarf2read.c (process_die): Fix fall-through comments.
6390         * dbxread.c (process_one_symbol): Fix fall-through comment.
6391         * d-exp.y (lex_one_token): Fix fall-through comment.
6392         * cp-name-parser.y (yylex): Fix fall-through comment.
6393         * coffread.c (coff_symtab_read): Fix fall-through comment.
6394         * c-exp.y (lex_one_token): Fix fall-through comment.
6395         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6396         comment.
6397         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6398         comment.
6399
6400 2018-05-04  Tom Tromey  <tom@tromey.com>
6401
6402         PR python/22730:
6403         * NEWS: Mention gdb.execute change.
6404         * gdbcmd.h (execute_control_command): Don't declare.
6405         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6406         execute_control_commands, execute_control_commands_to_string.
6407         * cli/cli-script.h (execute_control_commands)
6408         (execute_control_commands_to_string): Declare.
6409         (execute_control_command): Add from_tty parameter.
6410         * cli/cli-script.c (execute_control_commands)
6411         (execute_control_commands_to_string): New functions.
6412         (execute_user_command): Use execute_control_commands.
6413         (execute_control_command_1): Add "from_tty" parameter.  Update.
6414         (execute_control_command): Likewise.
6415
6416 2018-05-04  Tom Tromey  <tom@tromey.com>
6417
6418         PR python/22731:
6419         * NEWS: Mention that breakpoint commands are writable.
6420         * python/py-breakpoint.c (bppy_set_commands): New function.
6421         (breakpoint_object_getset) <"commands">: Use it.
6422
6423 2018-05-04  Tom Tromey  <tom@tromey.com>
6424
6425         * tracepoint.c (actions_command): Update.
6426         * mi/mi-cmd-break.c (mi_command_line_array)
6427         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6428         (mi_read_next_line): Remove.
6429         (mi_cmd_break_commands): Update.
6430         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6431         function_view.
6432         * cli/cli-script.c (get_command_line): Update.
6433         (process_next_line): Use function_view.  Constify.
6434         (recurse_read_control_structure, read_command_lines)
6435         (read_command_lines_1): Change argument types to function_view.
6436         (do_define_command, document_command): Update.
6437         * breakpoint.h (check_tracepoint_command): Don't declare.
6438         * breakpoint.c (check_tracepoint_command): Remove.
6439         (commands_command_1, create_tracepoint_from_upload): Update.
6440
6441 2018-05-04  Tom Tromey  <tom@tromey.com>
6442
6443         PR gdb/11750:
6444         * cli/cli-script.h (enum command_control_type) <define_control>:
6445         New constant.
6446         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6447         (build_command_line, execute_control_command_1)
6448         (process_next_line): Likewise.
6449         (do_define_command): New function, extracted from define_command.
6450         (define_command): Use it.
6451
6452 2018-05-04  Tom Tromey  <tom@tromey.com>
6453
6454         * tracepoint.c (actions_command): Update.
6455         * cli/cli-script.h (read_command_lines): Update.
6456         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6457         (MAX_TMPBUF): Remove define.
6458         (define_command): Use string_printf.
6459         (document_command): Likewise.
6460         * breakpoint.c (commands_command_1): Update.
6461
6462 2018-05-04  Tom Tromey  <tom@tromey.com>
6463
6464         * top.c (execute_command): Update.
6465         * cli/cli-script.h (print_command_lines): Now varargs.
6466         * cli/cli-script.c (print_command_lines): Now varargs.
6467         (execute_control_command_1) <case while_control, case if_control>:
6468         Update.
6469
6470 2018-05-04  Tom Tromey  <tom@tromey.com>
6471
6472         * tracepoint.c (all_tracepoint_actions): Rename from
6473         all_tracepoint_actions_and_cleanup.  Change return type.
6474         (actions_command, encode_actions_1, encode_actions)
6475         (trace_dump_actions, tdump_command): Update.
6476         * remote.c (remote_download_command_source): Update.
6477         * python/python.c (gdbpy_eval_from_control_command)
6478         (python_command, python_interactive_command): Update.
6479         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6480         * guile/guile.c (guile_command)
6481         (gdbscm_eval_from_control_command, guile_command): Update.
6482         * compile/compile.c (compile_code_command)
6483         (compile_print_command, compile_to_object): Update.
6484         * cli/cli-script.h (struct command_lines_deleter): New.
6485         (counted_command_line): New typedef.
6486         (struct command_line): Add constructor, destructor.
6487         <body_list>: Remove.
6488         <body_list_0, body_list_1>: New members.
6489         (command_line_up): Remove typedef.
6490         (read_command_lines, read_command_lines_1, get_command_line):
6491         Update.
6492         (copy_command_lines): Don't declare.
6493         * cli/cli-script.c (build_command_line): Use "new".
6494         (get_command_line): Return counted_command_line.
6495         (print_command_lines, execute_user_command)
6496         (execute_control_command_1, while_command, if_command): Update.
6497         (realloc_body_list): Remove.
6498         (process_next_line, recurse_read_control_structure): Update.
6499         (read_command_lines, read_command_lines_1): Return counted_command_line.
6500         (free_command_lines): Use "delete".
6501         (copy_command_lines): Remove.
6502         (define_command, document_command, show_user_1): Update.
6503         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6504         a counted_command_line.
6505         * breakpoint.h (counted_command_line): Remove typedef.
6506         (breakpoint_set_commands): Update.
6507         * breakpoint.c (check_no_tracepoint_commands)
6508         (validate_commands_for_breakpoint): Update.
6509         (breakpoint_set_commands): Change commands to be a
6510         counted_command_line.
6511         (commands_command_1, update_dprintf_command_list)
6512         (create_tracepoint_from_upload): Update.
6513
6514 2018-05-04  Tom Tromey  <tom@tromey.com>
6515
6516         * cli/cli-decode.h (cmd_list_element): New constructor.
6517         (~cmd_list_element): New destructor.
6518         (struct cmd_list_element): Add initializers.
6519         * cli/cli-decode.c (do_add_cmd): Use "new".
6520         (delete_cmd): Use "delete".
6521
6522 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6523             Pedro Alves <palves@redhat.com>
6524
6525         PR breakpoints/19806 and support for PR external/20207.
6526         * NEWS: Mention Aarch64 watchpoint improvements.
6527         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6528         watchpoints and PR external/20207 watchpoints.
6529         * nat/aarch64-linux-hw-point.c
6530         (kernel_supports_any_contiguous_range): New.
6531         (aarch64_watchpoint_offset): New.
6532         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6533         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6534         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6535         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6536         next_addr_orig_p.  Support PR external/20207 watchpoints.
6537         (aarch64_downgrade_regs): New.
6538         (aarch64_dr_state_insert_one_point): New parameters offset and
6539         addr_orig.
6540         (aarch64_dr_state_remove_one_point): Likewise.
6541         (aarch64_handle_breakpoint): Update caller.
6542         (aarch64_handle_aligned_watchpoint): Likewise.
6543         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6544         aligned_offset.
6545         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6546         aarch64_downgrade_regs.
6547         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6548         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6549         (DR_CONTROL_MASK): ... this.
6550         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6551         (unsigned int aarch64_watchpoint_offset): New prototype.
6552         (aarch64_linux_set_debug_regs): Remove const from state.
6553         * utils.c (align_up, align_down): Move to ...
6554         * common/common-utils.c (align_up, align_down): ... here.
6555         * utils.h (align_up, align_down): Move to ...
6556         * common/common-utils.h (align_up, align_down): ... here.
6557
6558 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6559
6560         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6561         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6562         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6563         Re-implement to match the ABI as summarized in GCC's
6564         gcc/config/sparc/sparc.c.  All callers updated.
6565         (sparc32_store_arguments): Remove assertion.
6566
6567 2018-05-04  Tom Tromey  <tom@tromey.com>
6568
6569         * printcmd.c: Don't include tui.h.
6570         (decode_format): Use skip_spaces.
6571
6572 2018-05-04  Tom Tromey  <tom@tromey.com>
6573
6574         PR gdb/22619:
6575         * printcmd.c (last_count): New global.
6576         (x_command): Use saved count when repeating.
6577
6578 2018-05-04  Tom Tromey  <tom@tromey.com>
6579
6580         * nto-procfs.c (do_closedir_cleanup): Remove.
6581         (procfs_pidlist): Use gdb_dir_up.
6582         * procfs.c (do_closedir_cleanup): Remove.
6583         (proc_update_threads): Use gdb_dir_up.
6584         * common/filestuff.h (struct gdb_dir_deleter): New.
6585         (gdb_dir_up): New typedef.
6586
6587 2018-05-04  Tom Tromey  <tom@tromey.com>
6588
6589         * ada-lang.c (print_mention_exception): Use std::string.
6590
6591 2018-05-04  Tom Tromey  <tom@tromey.com>
6592
6593         * ada-lang.c (create_excep_cond_exprs): Update.
6594         (ada_exception_catchpoint_cond_string): Use std::string.
6595
6596 2018-05-04  Tom Tromey  <tom@tromey.com>
6597
6598         * ada-lang.c (xget_renaming_scope): Return std::string.
6599         (old_renaming_is_invisible): Update.
6600
6601 2018-05-04  Tom Tromey  <tom@tromey.com>
6602
6603         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6604         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6605
6606 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6607
6608         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6609
6610 2018-05-04  Tom Tromey  <tom@tromey.com>
6611
6612         * remote.c (remote_query_supported_append): Change type.
6613         (remote_check_symbols): Update.
6614
6615 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6616
6617         PR gdb/11420
6618         * configure.ac: Prepend libpython.
6619         * python/python-config.py: Likewise.
6620         * configure: Regenerate.
6621
6622 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6623
6624         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6625
6626 2018-05-03  Pedro Alves  <palves@redhat.com>
6627
6628         * s390-linux-nat.c
6629         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6630         override.  Write 'true' instead of '1'.
6631         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6632         declaration.
6633
6634 2018-05-02  Pedro Alves  <palves@redhat.com>
6635
6636         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6637         add_inf_child_target.
6638         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6639         add_inf_child_target.
6640         * aix-thread.c (aix_thread_target_info): New.
6641         (aix_thread_target) <shortname, longname, doc>: Delete.
6642         <info>: New.
6643         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6644         add_inf_child_target.
6645         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6646         add_inf_child_target.
6647         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6648         add_inf_child_target.
6649         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6650         add_inf_child_target.
6651         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6652         add_inf_child_target.
6653         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6654         add_inf_child_target.
6655         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6656         add_inf_child_target.
6657         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6658         add_inf_child_target.
6659         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6660         add_inf_child_target.
6661         * bfd-target.c (target_bfd_target_info): New.
6662         (target_bfd) <shortname, longname, doc>: Delete.
6663         <info>: New.
6664         * bsd-kvm.c (bsd_kvm_target_info): New.
6665         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6666         <info>: New.
6667         (bsd_kvm_target::open): Rename to ...
6668         (bsd_kvm_target_open): ... this.  Adjust.
6669         * bsd-uthread.c (bsd_uthread_target_info): New.
6670         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6671         <info>: New.
6672         * corefile.c (core_file_command): Adjust.
6673         * corelow.c (core_target_info): New.
6674         (core_target) <shortname, longname, doc>: Delete.
6675         <info>: New.
6676         (core_target::open): Rename to ...
6677         (core_target_open): ... this.  Adjust.
6678         * ctf.c (ctf_target_info): New.
6679         (ctf_target) <shortname, longname, doc>: Delete.
6680         <info>: New.
6681         (ctf_target::open): Rename to ...
6682         (ctf_target_open): ... this.
6683         (_initialize_ctf): Adjust.
6684         * exec.c (exec_target_info): New.
6685         (exec_target) <shortname, longname, doc>: Delete.
6686         <info>: New.
6687         (exec_target::open): Rename to ...
6688         (exec_target_open): ... this.
6689         * gdbcore.h (core_target_open): Declare.
6690         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6691         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6692         add_inf_child_target.
6693         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6694         add_inf_child_target.
6695         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6696         add_inf_child_target.
6697         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6698         add_inf_child_target.
6699         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6700         add_inf_child_target.
6701         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6702         add_inf_child_target.
6703         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6704         add_inf_child_target.
6705         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6706         add_inf_child_target.
6707         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6708         add_inf_child_target.
6709         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6710         add_inf_child_target.
6711         * inf-child.c (inf_child_target_info): New.
6712         (inf_child_target::info): New.
6713         (inf_child_open_target): Remove 'target' parameter.  Use
6714         get_native_target instead.
6715         (inf_child_target::open): Delete.
6716         (add_inf_child_target): New.
6717         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6718         Delete.
6719         <info>: New.
6720         (add_inf_child_target): Declare.
6721         (inf_child_open_target): Declare.
6722         * linux-thread-db.c (thread_db_target_info): New.
6723         (thread_db_target) <shortname, longname, doc>: Delete.
6724         <info>: New.
6725         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6726         add_inf_child_target.
6727         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6728         add_inf_child_target.
6729         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6730         add_inf_child_target.
6731         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6732         add_inf_child_target.
6733         * make-target-delegates (print_class): Adjust.
6734         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6735         add_inf_child_target.
6736         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6737         add_inf_child_target.
6738         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6739         add_inf_child_target.
6740         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6741         add_inf_child_target.
6742         * nto-procfs.c (nto_native_target_info): New.
6743         (nto_procfs_target_native) <shortname, longname, doc>:
6744         Delete.
6745         <info>: New.
6746         (nto_procfs_target_info): New.
6747         (nto_procfs_target_procfs) <shortname, longname, doc>:
6748         Delete.
6749         <info>: New.
6750         (init_procfs_targets): Adjust.
6751         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6752         add_inf_child_target.
6753         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6754         add_inf_child_target.
6755         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6756         add_inf_child_target.
6757         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6758         add_inf_child_target.
6759         * ravenscar-thread.c (ravenscar_target_info): New.
6760         (ravenscar_thread_target) <shortname, longname, doc>:
6761         Delete.
6762         <info>: New.
6763         * record-btrace.c (record_btrace_target_info):
6764         (record_btrace_target) <shortname, longname, doc>: Delete.
6765         <info>: New.
6766         (record_btrace_target::open): Rename to ...
6767         (record_btrace_target_open): ... this.  Adjust.
6768         * record-full.c (record_longname, record_doc): New.
6769         (record_full_base_target) <shortname, longname, doc>: Delete.
6770         <info>: New.
6771         (record_full_target_info): New.
6772         (record_full_target): <shortname>: Delete.
6773         <info>: New.
6774         (record_full_core_open_1, record_full_open_1): Update comments.
6775         (record_full_base_target::open): Rename to ...
6776         (record_full_open): ... this.
6777         (cmd_record_full_restore): Update.
6778         (_initialize_record_full): Update.
6779         * remote-sim.c (remote_sim_target_info): New.
6780         (gdbsim_target) <shortname, longname, doc>: Delete.
6781         <info>: New.
6782         (gdbsim_target::open): Rename to ...
6783         (gdbsim_target_open): ... this.
6784         (_initialize_remote_sim): Adjust.
6785         * remote.c (remote_doc): New.
6786         (remote_target_info): New.
6787         (remote_target) <shortname, longname, doc>: Delete.
6788         <info>: New.
6789         (extended_remote_target_info): New.
6790         (extended_remote_target) <shortname, longname, doc>: Delete.
6791         <info>: New.
6792         (remote_target::open_1): Make static.  Adjust.
6793         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6794         * s390-linux-nat.c (_initialize_s390_nat): Use
6795         add_inf_child_target.
6796         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6797         add_inf_child_target.
6798         * sol-thread.c (thread_db_target_info): New.
6799         (sol_thread_target) <shortname, longname, doc>: Delete.
6800         <info>: New.
6801         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6802         add_inf_child_target.
6803         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6804         add_inf_child_target.
6805         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6806         add_inf_child_target.
6807         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6808         add_inf_child_target.
6809         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6810         add_inf_child_target.
6811         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6812         add_inf_child_target.
6813         * spu-linux-nat.c (_initialize_spu_nat): Use
6814         add_inf_child_target.
6815         * spu-multiarch.c (spu_multiarch_target_info): New.
6816         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6817         <info>: New.
6818         * target-delegates.c: Regenerate.
6819         * target.c: Include <unordered_map>.
6820         (target_ops_p): Delete.
6821         (DEF_VEC_P(target_ops_p)): Delete.
6822         (target_factories): New.
6823         (test_target_info): New.
6824         (test_target_ops::info): New.
6825         (open_target): Adjust to use target_factories.
6826         (add_target_with_completer): Rename to ...
6827         (add_target): ... this.  Change prototype.  Register target_info
6828         and open callback in target_factories.  Register target_info in
6829         command context instead of target_ops.
6830         (add_target): Delete old implementation.
6831         (add_deprecated_target_alias): Change prototype.  Adjust.
6832         (the_native_target): New.
6833         (set_native_target, get_native_target): New.
6834         (find_default_run_target): Use the_native_target.
6835         (find_attach_target, find_run_target): Simplify.
6836         (target_ops::open): Delete.
6837         (dummy_target_info): New.
6838         (dummy_target::shortname, dummy_target::longname)
6839         (dummy_target::doc): Delete.
6840         (dummy_target::info): New.
6841         (debug_target::shortname, debug_target::longname)
6842         (debug_target::doc): Delete.
6843         (debug_target::info): New.
6844         * target.h (struct target_info): New.
6845         (target_ops::~target_ops): Add comment.
6846         (target_ops::info): New.
6847         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6848         longer virtual.  Implement in terms of target_info.
6849         (set_native_target, get_native_target): Declare.
6850         (target_open_ftype): New.
6851         (add_target, add_target_with_completer)
6852         (add_deprecated_target_alias): Change prototype.
6853         (test_target) <shortname, longname, doc>: Delete.
6854         <info>: New.
6855         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6856         add_inf_child_target.
6857         * tracefile-tfile.c (tfile_target_info): New.
6858         (tfile_target) <shortname, longname, doc>: Delete.
6859         <info>: New.
6860         (tfile_target::open): Rename to ...
6861         (tfile_target_open): ... this.
6862         (_initialize_tracefile_tfile): Adjust.
6863         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6864         add_inf_child_target.
6865         * windows-nat.c (_initialize_windows_nat): Use
6866         add_inf_child_target.
6867         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6868         add_inf_child_target.
6869
6870 2018-05-02  Pedro Alves  <palves@redhat.com>
6871
6872         * linux-nat.h (linux_nat_target) <low_new_thread,
6873         low_delete_thread, low_new_fork, low_forget_process,
6874         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6875         New virtual methods.
6876         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6877         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6878         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6879         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6880         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6881         Delete.
6882         * linux-fork.c (delete_fork): Adjust to call low method.
6883         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6884         (linux_nat_new_fork, linux_nat_forget_process_hook)
6885         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6886         (linux_nat_status_is_event):
6887         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6888         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6889         to call low method.
6890         (sigtrap_is_event): Rename to ...
6891         (linux_nat_target::low_status_is_event): ... this.
6892         (linux_nat_set_status_is_event): Delete.
6893         (save_stop_reason, linux_nat_wait_1)
6894         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6895         low methods.
6896         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6897         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6898         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6899         (linux_nat_set_prepare_to_resume): Delete.
6900         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6901         low virtual methods.
6902         * amd64-linux-nat.c: Likewise.
6903         * arm-linux-nat.c: Likewise.
6904         * i386-linux-nat.c: Likewise.
6905         * ia64-linux-nat.c: Likewise.
6906         * mips-linux-nat.c: Likewise.
6907         * ppc-linux-nat.c: Likewise.
6908         * s390-linux-nat.c: Likewise.
6909         * sparc64-linux-nat.c: Likewise.
6910         * x86-linux-nat.c: Likewise.
6911         * x86-linux-nat.h: Include "nat/x86-linux.h".
6912         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6913         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6914         Override methods.
6915
6916 2018-05-02  Pedro Alves  <palves@redhat.com>
6917
6918         * target.h (target_ops)
6919         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6920         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6921         stopped_by_watchpoint, have_continuable_watchpoint,
6922         stopped_data_address, watchpoint_addr_within_range,
6923         can_accel_watchpoint_condition, can_run, thread_alive,
6924         has_all_memory, has_memory, has_stack, has_registers,
6925         has_execution, can_async_p, is_async_p, supports_non_stop,
6926         always_non_stop_p, can_execute_reverse, supports_multi_process,
6927         supports_enable_disable_tracepoint,
6928         supports_disable_randomization, supports_string_tracing,
6929         supports_evaluation_of_breakpoint_conditions,
6930         can_run_breakpoint_commands, filesystem_is_local,
6931         can_download_tracepoint, get_trace_state_variable_value,
6932         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6933         record_is_replaying, record_will_replay,
6934         augmented_libraries_svr4_read>: Adjust to return bool.
6935         * aarch64-linux-nat.c: All implementations adjusted.
6936         * aix-thread.c: All implementations adjusted.
6937         * arm-linux-nat.c: All implementations adjusted.
6938         * breakpoint.c: All implementations adjusted.
6939         * bsd-kvm.c: All implementations adjusted.
6940         * bsd-uthread.c: All implementations adjusted.
6941         * corelow.c: All implementations adjusted.
6942         * ctf.c: All implementations adjusted.
6943         * darwin-nat.c: All implementations adjusted.
6944         * darwin-nat.h: All implementations adjusted.
6945         * exec.c: All implementations adjusted.
6946         * fbsd-nat.c: All implementations adjusted.
6947         * fbsd-nat.h: All implementations adjusted.
6948         * gnu-nat.c: All implementations adjusted.
6949         * gnu-nat.h: All implementations adjusted.
6950         * go32-nat.c: All implementations adjusted.
6951         * ia64-linux-nat.c: All implementations adjusted.
6952         * inf-child.c: All implementations adjusted.
6953         * inf-child.h: All implementations adjusted.
6954         * inf-ptrace.c: All implementations adjusted.
6955         * inf-ptrace.h: All implementations adjusted.
6956         * linux-nat.c: All implementations adjusted.
6957         * linux-nat.h: All implementations adjusted.
6958         * mips-linux-nat.c: All implementations adjusted.
6959         * nto-procfs.c: All implementations adjusted.
6960         * ppc-linux-nat.c: All implementations adjusted.
6961         * procfs.c: All implementations adjusted.
6962         * ravenscar-thread.c: All implementations adjusted.
6963         * record-btrace.c: All implementations adjusted.
6964         * record-full.c: All implementations adjusted.
6965         * remote-sim.c: All implementations adjusted.
6966         * remote.c: All implementations adjusted.
6967         * s390-linux-nat.c: All implementations adjusted.
6968         * sol-thread.c: All implementations adjusted.
6969         * spu-multiarch.c: All implementations adjusted.
6970         * target-delegates.c: All implementations adjusted.
6971         * target.c: All implementations adjusted.
6972         * target.h: All implementations adjusted.
6973         * tracefile-tfile.c: All implementations adjusted.
6974         * tracefile.c: All implementations adjusted.
6975         * tracefile.h: All implementations adjusted.
6976         * windows-nat.c: All implementations adjusted.
6977         * x86-linux-nat.h: All implementations adjusted.
6978         * x86-nat.h: All implementations adjusted.
6979
6980 2018-05-02  Pedro Alves  <palves@redhat.com>
6981
6982         * make-target-delegates (scan_target_h): Don't trim lines here.
6983         Replace sequences of tabs and/or whitespace with a single
6984         whitespace.
6985         (top level, parsing methods): Trim each line before processing it
6986         here.
6987
6988 2018-05-02  Pedro Alves  <palves@redhat.com>
6989             John Baldwin  <jhb@freebsd.org>
6990
6991         * target.h (enum strata) <debug_stratum>: New.
6992         (struct target_ops) <all delegation methods>: Replace by C++
6993         virtual methods, and drop "to_" prefix.  All references updated
6994         throughout.
6995         <to_shortname, to_longname, to_doc, to_data,
6996         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6997         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6998         virtual methods.  All references updated throughout.
6999         <can_attach, supports_terminal_ours, can_create_inferior,
7000         get_thread_control_capabilities, attach_no_wait>: New
7001         virtual methods.
7002         <insert_breakpoint, remove_breakpoint>: Now
7003         TARGET_DEFAULT_NORETURN methods.
7004         <info_proc>: Now returns bool.
7005         <to_magic>: Delete.
7006         (OPS_MAGIC): Delete.
7007         (current_target): Delete.  All references replaced by references
7008         to ...
7009         (target_stack): ... this.  New.
7010         (target_shortname, target_longname): Adjust.
7011         (target_can_run): Now a function declaration.
7012         (default_child_has_all_memory, default_child_has_memory)
7013         (default_child_has_stack, default_child_has_registers)
7014         (default_child_has_execution): Remove target_ops parameter.
7015         (complete_target_initialization): Delete.
7016         (memory_breakpoint_target): New template class.
7017         (test_target_ops): Refactor as a C++ class with virtual methods.
7018         * make-target-delegates (NAME_PART): Tighten.
7019         (POINTER_PART, CP_SYMBOL): New.
7020         (SIMPLE_RETURN_PART): Reimplement.
7021         (VEC_RETURN_PART): Expect less.
7022         (RETURN_PART, VIRTUAL_PART): New.
7023         (METHOD): Adjust to C++ virtual methods.
7024         (scan_target_h): Remove reference to C99.
7025         (dname): Output "target_ops::" prefix.
7026         (write_function_header): Adjust to output a C++ class method.
7027         (write_declaration): New.
7028         (write_delegator): Adjust to output a C++ class method.
7029         (tdname): Output "dummy_target::" prefix.
7030         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7031         method.
7032         (tdefault_names, debug_names): Delete.
7033         (return_types, tdefaults, styles, argtypes_array): New.
7034         (top level): All methods are delegators.
7035         (print_class): New.
7036         (top level): Print dummy_target and debug_target classes.
7037         * target-delegates.c: Regenerate.
7038         * target-debug.h (target_debug_print_enum_info_proc_what)
7039         (target_debug_print_thread_control_capabilities)
7040         (target_debug_print_thread_info_p): New.
7041         * target.c (dummy_target): Delete.
7042         (the_dummy_target, the_debug_target): New.
7043         (target_stack): Now extern.
7044         (set_targetdebug): Push/unpush debug target.
7045         (default_child_has_all_memory, default_child_has_memory)
7046         (default_child_has_stack, default_child_has_registers)
7047         (default_child_has_execution): Remove target_ops parameter.
7048         (complete_target_initialization): Delete.
7049         (add_target_with_completer): No longer call
7050         complete_target_initialization.
7051         (target_supports_terminal_ours): Use regular delegation.
7052         (update_current_target): Delete.
7053         (push_target): No longer check magic number.  Don't call
7054         update_current_target.
7055         (unpush_target): Don't call update_current_target.
7056         (target_is_pushed): No longer check magic number.
7057         (target_require_runnable): Skip for all stratums over
7058         process_stratum.
7059         (target_ops::info_proc): New.
7060         (target_info_proc): Use find_target_at and
7061         find_default_run_target.
7062         (target_supports_disable_randomization): Use regular delegation.
7063         (target_get_osdata): Use find_target_at.
7064         (target_ops::open, target_ops::close, target_ops::can_attach)
7065         (target_ops::attach, target_ops::can_create_inferior)
7066         (target_ops::create_inferior, target_ops::can_run)
7067         (target_can_run): New.
7068         (default_fileio_target): Use regular delegation.
7069         (target_ops::fileio_open, target_ops::fileio_pwrite)
7070         (target_ops::fileio_pread, target_ops::fileio_fstat)
7071         (target_ops::fileio_close, target_ops::fileio_unlink)
7072         (target_ops::fileio_readlink): New.
7073         (target_fileio_open_1, target_fileio_unlink)
7074         (target_fileio_readlink): Always call the target method.  Handle
7075         FILEIO_ENOSYS.
7076         (return_zero, return_zero_has_execution): Delete.
7077         (init_dummy_target): Delete.
7078         (dummy_target::dummy_target, dummy_target::shortname)
7079         (dummy_target::longname, dummy_target::doc)
7080         (debug_target::debug_target, debug_target::shortname)
7081         (debug_target::longname, debug_target::doc): New.
7082         (target_supports_delete_record): Use regular delegation.
7083         (setup_target_debug): Delete.
7084         (maintenance_print_target_stack): Skip debug_stratum.
7085         (initialize_targets): Instantiate the_dummy_target and
7086         the_debug_target.
7087         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7088         use target_stack.
7089         (target_auxv_search, fprint_target_auxv): Adjust.
7090         (info_auxv_command): Adjust to use target_stack.
7091         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7092         * exceptions.c (print_flush): Handle a NULL target_stack.
7093         * regcache.c (target_ops_no_register): Refactor as class with
7094         virtual methods.
7095
7096         * exec.c (exec_target): New class.
7097         (exec_ops): Now an exec_target.
7098         (exec_open, exec_close_1, exec_get_section_table)
7099         (exec_xfer_partial, exec_files_info, exec_has_memory)
7100         (exec_make_note_section): Refactor as exec_target methods.
7101         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7102         Delete.
7103         (exec_target::find_memory_regions): New.
7104         (_initialize_exec): Don't call init_exec_ops.
7105         * gdbcore.h (exec_file_clear): Delete.
7106
7107         * corefile.c (core_target): Delete.
7108         (core_file_command): Adjust.
7109         * corelow.c (core_target): New class.
7110         (the_core_target): New.
7111         (core_close): Remove target_ops parameter.
7112         (core_close_cleanup): Adjust.
7113         (core_target::close): New.
7114         (core_open, core_detach, get_core_registers, core_files_info)
7115         (core_xfer_partial, core_thread_alive, core_read_description)
7116         (core_pid_to_str, core_thread_name, core_has_memory)
7117         (core_has_stack, core_has_registers, core_info_proc): Rework as
7118         core_target methods.
7119         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7120         (_initialize_corelow): Initialize the_core_target.
7121         * gdbcore.h (core_target): Delete.
7122         (the_core_target): New.
7123
7124         * ctf.c: (ctf_target): New class.
7125         (ctf_ops): Now a ctf_target.
7126         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7127         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7128         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7129         methods.
7130         (init_ctf_ops): Delete.
7131         (_initialize_ctf): Don't call it.
7132         * tracefile-tfile.c (tfile_target): New class.
7133         (tfile_ops): Now a tfile_target.
7134         (tfile_open, tfile_close, tfile_files_info)
7135         (tfile_get_tracepoint_status, tfile_trace_find)
7136         (tfile_fetch_registers, tfile_xfer_partial)
7137         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7138         Refactor as tfile_target methods.
7139         (tfile_xfer_partial_features): Remove target_ops parameter.
7140         (init_tfile_ops): Delete.
7141         (_initialize_tracefile_tfile): Don't call it.
7142         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7143         (tracefile_has_stack, tracefile_has_registers)
7144         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7145         tracefile_target methods.
7146         (init_tracefile_ops): Delete.
7147         (tracefile_target::tracefile_target): New.
7148         * tracefile.h: Include "target.h".
7149         (tracefile_target): New class.
7150         (init_tracefile_ops): Delete.
7151
7152         * spu-multiarch.c (spu_multiarch_target): New class.
7153         (spu_ops): Now a spu_multiarch_target.
7154         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7155         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7156         (spu_search_memory, spu_mourn_inferior): Refactor as
7157         spu_multiarch_target methods.
7158         (init_spu_ops): Delete.
7159         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7160         complete_target_initialization.
7161
7162         * ravenscar-thread.c (ravenscar_thread_target): New class.
7163         (ravenscar_ops): Now a ravenscar_thread_target.
7164         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7165         (ravenscar_thread_alive, ravenscar_pid_to_str)
7166         (ravenscar_fetch_registers, ravenscar_store_registers)
7167         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7168         (ravenscar_stopped_by_hw_breakpoint)
7169         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7170         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7171         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7172         methods.
7173         (init_ravenscar_thread_ops): Delete.
7174         (_initialize_ravenscar): Remove references to
7175         init_ravenscar_thread_ops and complete_target_initialization.
7176
7177         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7178         (bsd_uthread_target): New class.
7179         (bsd_uthread_ops): Now a bsd_uthread_target.
7180         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7181         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7182         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7183         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7184         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7185         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7186         (bsd_uthread_target): Delete function.
7187         (_initialize_bsd_uthread): Remove reference to
7188         complete_target_initialization.
7189
7190         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7191         (target_bfd): ... this new class.
7192         (target_bfd_xfer_partial, target_bfd_get_section_table)
7193         (target_bfd_close): Refactor as target_bfd methods.
7194         (target_bfd::~target_bfd): New.
7195         (target_bfd_reopen): Adjust.
7196         (target_bfd::close): New.
7197
7198         * record-btrace.c (record_btrace_target): New class.
7199         (record_btrace_ops): Now a record_btrace_target.
7200         (record_btrace_open, record_btrace_stop_recording)
7201         (record_btrace_disconnect, record_btrace_close)
7202         (record_btrace_async, record_btrace_info)
7203         (record_btrace_insn_history, record_btrace_insn_history_range)
7204         (record_btrace_insn_history_from, record_btrace_call_history)
7205         (record_btrace_call_history_range)
7206         (record_btrace_call_history_from, record_btrace_record_method)
7207         (record_btrace_is_replaying, record_btrace_will_replay)
7208         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7209         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7210         (record_btrace_store_registers, record_btrace_prepare_to_store)
7211         (record_btrace_to_get_unwinder)
7212         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7213         (record_btrace_commit_resume, record_btrace_wait)
7214         (record_btrace_stop, record_btrace_can_execute_reverse)
7215         (record_btrace_stopped_by_sw_breakpoint)
7216         (record_btrace_supports_stopped_by_sw_breakpoint)
7217         (record_btrace_stopped_by_hw_breakpoint)
7218         (record_btrace_supports_stopped_by_hw_breakpoint)
7219         (record_btrace_update_thread_list, record_btrace_thread_alive)
7220         (record_btrace_goto_begin, record_btrace_goto_end)
7221         (record_btrace_goto, record_btrace_stop_replaying_all)
7222         (record_btrace_execution_direction)
7223         (record_btrace_prepare_to_generate_core)
7224         (record_btrace_done_generating_core): Refactor as
7225         record_btrace_target methods.
7226         (init_record_btrace_ops): Delete.
7227         (_initialize_record_btrace): Remove reference to
7228         init_record_btrace_ops.
7229         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7230         the execution_direction global.
7231         (record_full_base_target, record_full_target)
7232         (record_full_core_target): New classes.
7233         (record_full_ops): Now a record_full_target.
7234         (record_full_core_ops): Now a record_full_core_target.
7235         (record_full_target::detach, record_full_target::disconnect)
7236         (record_full_core_target::disconnect)
7237         (record_full_target::mourn_inferior, record_full_target::kill):
7238         New.
7239         (record_full_open, record_full_close, record_full_async): Refactor
7240         as methods of the record_full_base_target class.
7241         (record_full_resume, record_full_commit_resume): Refactor
7242         as methods of the record_full_target class.
7243         (record_full_wait, record_full_stopped_by_watchpoint)
7244         (record_full_stopped_data_address)
7245         (record_full_stopped_by_sw_breakpoint)
7246         (record_full_supports_stopped_by_sw_breakpoint)
7247         (record_full_stopped_by_hw_breakpoint)
7248         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7249         methods of the record_full_base_target class.
7250         (record_full_store_registers, record_full_xfer_partial)
7251         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7252         Refactor as methods of the record_full_target class.
7253         (record_full_can_execute_reverse, record_full_get_bookmark)
7254         (record_full_goto_bookmark, record_full_execution_direction)
7255         (record_full_record_method, record_full_info, record_full_delete)
7256         (record_full_is_replaying, record_full_will_replay)
7257         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7258         (record_full_stop_replaying): Refactor as methods of the
7259         record_full_base_target class.
7260         (record_full_core_resume, record_full_core_kill)
7261         (record_full_core_fetch_registers)
7262         (record_full_core_prepare_to_store)
7263         (record_full_core_store_registers, record_full_core_xfer_partial)
7264         (record_full_core_insert_breakpoint)
7265         (record_full_core_remove_breakpoint)
7266         (record_full_core_has_execution): Refactor
7267         as methods of the record_full_core_target class.
7268         (record_full_base_target::supports_delete_record): New.
7269         (init_record_full_ops): Delete.
7270         (init_record_full_core_ops): Delete.
7271         (record_full_save): Refactor as method of the
7272         record_full_base_target class.
7273         (_initialize_record_full): Remove references to
7274         init_record_full_ops and init_record_full_core_ops.
7275
7276         * remote.c (remote_target, extended_remote_target): New classes.
7277         (remote_ops): Now a remote_target.
7278         (extended_remote_ops): Now an extended_remote_target.
7279         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7280         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7281         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7282         (remote_pass_signals, remote_set_syscall_catchpoint)
7283         (remote_program_signals, )
7284         (remote_thread_always_alive): Remove target_ops parameter.
7285         (remote_thread_alive, remote_thread_name)
7286         (remote_update_thread_list, remote_threads_extra_info)
7287         (remote_static_tracepoint_marker_at)
7288         (remote_static_tracepoint_markers_by_strid)
7289         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7290         (remote_open): Refactor as methods of remote_target.
7291         (extended_remote_open, extended_remote_detach)
7292         (extended_remote_attach, extended_remote_post_attach):
7293         (extended_remote_supports_disable_randomization)
7294         (extended_remote_create_inferior): : Refactor as method of
7295         extended_remote_target.
7296         (remote_set_permissions, remote_open_1, remote_detach)
7297         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7298         (remote_resume, remote_commit_resume, remote_stop)
7299         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7300         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7301         (remote_prepare_to_store, remote_store_registers)
7302         (remote_flash_erase, remote_flash_done, remote_files_info)
7303         (remote_kill, remote_mourn, remote_insert_breakpoint)
7304         (remote_remove_breakpoint, remote_insert_watchpoint)
7305         (remote_watchpoint_addr_within_range)
7306         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7307         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7308         (remote_supports_stopped_by_sw_breakpoint)
7309         (remote_stopped_by_hw_breakpoint)
7310         (remote_supports_stopped_by_hw_breakpoint)
7311         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7312         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7313         (remote_verify_memory): Refactor as methods of remote_target.
7314         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7315         parameter.
7316         (remote_xfer_partial, remote_get_memory_xfer_limit)
7317         (remote_search_memory, remote_rcmd, remote_memory_map)
7318         (remote_pid_to_str, remote_get_thread_local_address)
7319         (remote_get_tib_address, remote_read_description): Refactor as
7320         methods of remote_target.
7321         (remote_target::fileio_open, remote_target::fileio_pwrite)
7322         (remote_target::fileio_pread, remote_target::fileio_close): New.
7323         (remote_hostio_readlink, remote_hostio_fstat)
7324         (remote_filesystem_is_local, remote_can_execute_reverse)
7325         (remote_supports_non_stop, remote_supports_disable_randomization)
7326         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7327         (remote_supports_enable_disable_tracepoint)
7328         (remote_supports_string_tracing)
7329         (remote_can_run_breakpoint_commands, remote_trace_init)
7330         (remote_download_tracepoint, remote_can_download_tracepoint)
7331         (remote_download_trace_state_variable, remote_enable_tracepoint)
7332         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7333         (remote_trace_start, remote_get_trace_status)
7334         (remote_get_tracepoint_status, remote_trace_stop)
7335         (remote_trace_find, remote_get_trace_state_variable_value)
7336         (remote_save_trace_data, remote_get_raw_trace_data)
7337         (remote_set_disconnected_tracing, remote_core_of_thread)
7338         (remote_set_circular_trace_buffer, remote_traceframe_info)
7339         (remote_get_min_fast_tracepoint_insn_len)
7340         (remote_set_trace_buffer_size, remote_set_trace_notes)
7341         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7342         (remote_disable_btrace, remote_teardown_btrace)
7343         (remote_read_btrace, remote_btrace_conf)
7344         (remote_augmented_libraries_svr4_read, remote_load)
7345         (remote_pid_to_exec_file, remote_can_do_single_step)
7346         (remote_execution_direction, remote_thread_handle_to_thread_info):
7347         Refactor as methods of remote_target.
7348         (init_remote_ops, init_extended_remote_ops): Delete.
7349         (remote_can_async_p, remote_is_async_p, remote_async)
7350         (remote_thread_events, remote_upload_tracepoints)
7351         (remote_upload_trace_state_variables): Refactor as methods of
7352         remote_target.
7353         (_initialize_remote): Remove references to init_remote_ops and
7354         init_extended_remote_ops.
7355
7356         * remote-sim.c (gdbsim_target): New class.
7357         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7358         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7359         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7360         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7361         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7362         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7363         Refactor as methods of gdbsim_target.
7364         (gdbsim_ops): Now a gdbsim_target.
7365         (init_gdbsim_ops): Delete.
7366         (gdbsim_cntrl_c): Adjust.
7367         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7368
7369         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7370         (the_amd64_linux_nat_target): New.
7371         (amd64_linux_fetch_inferior_registers)
7372         (amd64_linux_store_inferior_registers): Refactor as methods of
7373         amd64_linux_nat_target.
7374         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7375         * i386-linux-nat.c: Don't include "linux-nat.h".
7376         (i386_linux_nat_target): New class.
7377         (the_i386_linux_nat_target): New.
7378         (i386_linux_fetch_inferior_registers)
7379         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7380         as methods of i386_linux_nat_target.
7381         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7382         * inf-child.c (inf_child_ops): Delete.
7383         (inf_child_fetch_inferior_registers)
7384         (inf_child_store_inferior_registers): Delete.
7385         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7386         methods of inf_child_target.
7387         (inf_child_target::supports_terminal_ours)
7388         (inf_child_target::terminal_init)
7389         (inf_child_target::terminal_inferior)
7390         (inf_child_target::terminal_ours_for_output)
7391         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7392         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7393         New.
7394         (inf_child_open, inf_child_disconnect, inf_child_close)
7395         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7396         (inf_child_post_startup_inferior, inf_child_can_run)
7397         (inf_child_pid_to_exec_file): Refactor as methods of
7398         inf_child_target.
7399         (inf_child_follow_fork): Delete.
7400         (inf_child_target::can_create_inferior)
7401         (inf_child_target::can_attach): New.
7402         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7403         (inf_child_target::has_stack, inf_child_target::has_registers)
7404         (inf_child_target::has_execution): New.
7405         (inf_child_fileio_open, inf_child_fileio_pwrite)
7406         (inf_child_fileio_pread, inf_child_fileio_fstat)
7407         (inf_child_fileio_close, inf_child_fileio_unlink)
7408         (inf_child_fileio_readlink, inf_child_use_agent)
7409         (inf_child_can_use_agent): Refactor as methods of
7410         inf_child_target.
7411         (return_zero, inf_child_target): Delete.
7412         (inf_child_target::inf_child_target): New.
7413         * inf-child.h: Include "target.h".
7414         (inf_child_target): Delete function prototype.
7415         (inf_child_target): New class.
7416         (inf_child_open_target, inf_child_mourn_inferior)
7417         (inf_child_maybe_unpush_target): Delete.
7418         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7419         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7420         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7421         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7422         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7423         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7424         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7425         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7426         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7427         methods of inf_ptrace_target.
7428         (inf_ptrace_target): Delete function.
7429         * inf-ptrace.h: Include "inf-child.h".
7430         (inf_ptrace_target): Delete function declaration.
7431         (inf_ptrace_target): New class.
7432         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7433         * linux-nat.c (linux_target): New.
7434         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7435         (linux_nat_target::~linux_nat_target): New.
7436         (linux_child_post_attach, linux_child_post_startup_inferior)
7437         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7438         (linux_child_remove_fork_catchpoint)
7439         (linux_child_insert_vfork_catchpoint)
7440         (linux_child_remove_vfork_catchpoint)
7441         (linux_child_insert_exec_catchpoint)
7442         (linux_child_remove_exec_catchpoint)
7443         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7444         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7445         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7446         (linux_nat_stopped_data_address)
7447         (linux_nat_stopped_by_sw_breakpoint)
7448         (linux_nat_supports_stopped_by_sw_breakpoint)
7449         (linux_nat_stopped_by_hw_breakpoint)
7450         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7451         (linux_nat_kill, linux_nat_mourn_inferior)
7452         (linux_nat_xfer_partial, linux_nat_thread_alive)
7453         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7454         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7455         (linux_child_static_tracepoint_markers_by_strid)
7456         (linux_nat_is_async_p, linux_nat_can_async_p)
7457         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7458         (linux_nat_supports_multi_process)
7459         (linux_nat_supports_disable_randomization, linux_nat_async)
7460         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7461         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7462         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7463         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7464         methods of linux_nat_target.
7465         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7466         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7467         parameter.
7468         (check_stopped_by_watchpoint): Adjust.
7469         (linux_xfer_partial): Delete.
7470         (linux_target_install_ops, linux_target, linux_nat_add_target):
7471         Delete.
7472         (linux_nat_target::linux_nat_target): New.
7473         * linux-nat.h: Include "inf-ptrace.h".
7474         (linux_nat_target): New.
7475         (linux_target, linux_target_install_ops, linux_nat_add_target):
7476         Delete function declarations.
7477         (linux_target): Declare global.
7478         * linux-thread-db.c (thread_db_target): New.
7479         (thread_db_target::thread_db_target): New.
7480         (thread_db_ops): Delete.
7481         (the_thread_db_target): New.
7482         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7483         (thread_db_update_thread_list, thread_db_pid_to_str)
7484         (thread_db_extra_thread_info)
7485         (thread_db_thread_handle_to_thread_info)
7486         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7487         (thread_db_resume): Refactor as methods of thread_db_target.
7488         (init_thread_db_ops): Delete.
7489         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7490         * x86-linux-nat.c: Don't include "linux-nat.h".
7491         (super_post_startup_inferior): Delete.
7492         (x86_linux_nat_target::~x86_linux_nat_target): New.
7493         (x86_linux_child_post_startup_inferior)
7494         (x86_linux_read_description, x86_linux_enable_btrace)
7495         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7496         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7497         methods of x86_linux_nat_target.
7498         (x86_linux_create_target): Delete.  Bits folded ...
7499         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7500         pointer.
7501         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7502         (x86_linux_nat_target): New class.
7503         (x86_linux_create_target): Delete.
7504         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7505         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7506         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7507         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7508         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7509         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7510         make extern.
7511         (x86_use_watchpoints): Delete.
7512         * x86-nat.h: Include "breakpoint.h" and "target.h".
7513         (x86_use_watchpoints): Delete.
7514         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7515         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7516         (x86_insert_watchpoint, x86_remove_watchpoint)
7517         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7518         (x86_stopped_by_hw_breakpoint): New declarations.
7519         (x86_nat_target): New template class.
7520
7521         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7522         (the_ppc_linux_nat_target): New.
7523         (ppc_linux_fetch_inferior_registers)
7524         (ppc_linux_can_use_hw_breakpoint)
7525         (ppc_linux_region_ok_for_hw_watchpoint)
7526         (ppc_linux_ranged_break_num_registers)
7527         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7528         (ppc_linux_insert_mask_watchpoint)
7529         (ppc_linux_remove_mask_watchpoint)
7530         (ppc_linux_can_accel_watchpoint_condition)
7531         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7532         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7533         (ppc_linux_watchpoint_addr_within_range)
7534         (ppc_linux_masked_watch_num_registers)
7535         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7536         (ppc_linux_read_description): Refactor as methods of
7537         ppc_linux_nat_target.
7538         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7539
7540         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7541         (procfs_target): New class.
7542         (the_procfs_target): New.
7543         (procfs_target): Delete function.
7544         (procfs_auxv_parse, procfs_attach, procfs_detach)
7545         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7546         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7547         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7548         (procfs_create_inferior, procfs_update_thread_list)
7549         (procfs_thread_alive, procfs_pid_to_str)
7550         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7551         (procfs_stopped_data_address, procfs_insert_watchpoint)
7552         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7553         (proc_find_memory_regions, procfs_info_proc)
7554         (procfs_make_note_section): Refactor as methods of procfs_target.
7555         (_initialize_procfs): Adjust.
7556         * sol-thread.c (sol_thread_target): New class.
7557         (sol_thread_ops): Now a sol_thread_target.
7558         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7559         (sol_thread_fetch_registers, sol_thread_store_registers)
7560         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7561         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7562         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7563         (init_sol_thread_ops): Delete.
7564         (_initialize_sol_thread): Adjust.  Remove references to
7565         init_sol_thread_ops and complete_target_initialization.
7566
7567         * windows-nat.c (windows_nat_target): New class.
7568         (windows_fetch_inferior_registers)
7569         (windows_store_inferior_registers, windows_resume, windows_wait)
7570         (windows_attach, windows_detach, windows_pid_to_exec_file)
7571         (windows_files_info, windows_create_inferior)
7572         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7573         (windows_close, windows_pid_to_str, windows_xfer_partial)
7574         (windows_get_tib_address, windows_get_ada_task_ptid)
7575         (windows_thread_name, windows_thread_alive): Refactor as
7576         windows_nat_target methods.
7577         (do_initial_windows_stuff): Adjust.
7578         (windows_target): Delete function.
7579         (_initialize_windows_nat): Adjust.
7580
7581         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7582         (darwin_mourn_inferior, darwin_kill_inferior)
7583         (darwin_create_inferior, darwin_attach, darwin_detach)
7584         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7585         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7586         (darwin_supports_multi_process): Refactor as darwin_nat_target
7587         methods.
7588         (darwin_resume_to, darwin_files_info): Delete.
7589         (_initialize_darwin_inferior): Rename to ...
7590         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7591         * darwin-nat.h: Include "inf-child.h".
7592         (darwin_nat_target): New class.
7593         (darwin_complete_target): Delete.
7594         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7595         (darwin_target): New.
7596         (i386_darwin_fetch_inferior_registers)
7597         (i386_darwin_store_inferior_registers): Refactor as methods of
7598         darwin_nat_target.
7599         (darwin_complete_target): Delete, with ...
7600         (_initialize_i386_darwin_nat): ... bits factored out here.
7601
7602         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7603         (the_alpha_linux_nat_target): New.
7604         (alpha_linux_register_u_offset): Refactor as
7605         alpha_linux_nat_target method.
7606         (_initialize_alpha_linux_nat): Adjust.
7607         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7608         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7609         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7610         methods of linux_nat_trad_target.
7611         (linux_trad_target): Delete.
7612         * linux-nat-trad.h (linux_trad_target): Delete function.
7613         (linux_nat_trad_target): New class.
7614         * mips-linux-nat.c (mips_linux_nat_target): New class.
7615         (super_fetch_registers, super_store_registers, super_close):
7616         Delete.
7617         (the_mips_linux_nat_target): New.
7618         (mips64_linux_regsets_fetch_registers)
7619         (mips64_linux_regsets_store_registers)
7620         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7621         (mips_linux_register_u_offset, mips_linux_read_description)
7622         (mips_linux_can_use_hw_breakpoint)
7623         (mips_linux_stopped_by_watchpoint)
7624         (mips_linux_stopped_data_address)
7625         (mips_linux_region_ok_for_hw_watchpoint)
7626         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7627         (mips_linux_close): Refactor as methods of mips_linux_nat.
7628         (_initialize_mips_linux_nat): Adjust to C++ification.
7629
7630         * aix-thread.c (aix_thread_target): New class.
7631         (aix_thread_ops): Now an aix_thread_target.
7632         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7633         (aix_thread_fetch_registers, aix_thread_store_registers)
7634         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7635         (aix_thread_thread_alive, aix_thread_pid_to_str)
7636         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7637         Refactor as methods of aix_thread_target.
7638         (init_aix_thread_ops): Delete.
7639         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7640         and complete_target_initialization.
7641         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7642         (rs6000_nat_target): New class.
7643         (the_rs6000_nat_target): New.
7644         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7645         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7646         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7647         (super_create_inferior): Delete.
7648         (_initialize_rs6000_nat): Adjust to C++ification.
7649
7650         * arm-linux-nat.c (arm_linux_nat_target): New class.
7651         (the_arm_linux_nat_target): New.
7652         (arm_linux_fetch_inferior_registers)
7653         (arm_linux_store_inferior_registers, arm_linux_read_description)
7654         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7655         (arm_linux_remove_hw_breakpoint)
7656         (arm_linux_region_ok_for_hw_watchpoint)
7657         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7658         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7659         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7660         arm_linux_nat_target.
7661         (_initialize_arm_linux_nat): Adjust to C++ification.
7662
7663         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7664         (the_aarch64_linux_nat_target): New.
7665         (aarch64_linux_fetch_inferior_registers)
7666         (aarch64_linux_store_inferior_registers)
7667         (aarch64_linux_child_post_startup_inferior)
7668         (aarch64_linux_read_description)
7669         (aarch64_linux_can_use_hw_breakpoint)
7670         (aarch64_linux_insert_hw_breakpoint)
7671         (aarch64_linux_remove_hw_breakpoint)
7672         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7673         (aarch64_linux_region_ok_for_hw_watchpoint)
7674         (aarch64_linux_stopped_data_address)
7675         (aarch64_linux_stopped_by_watchpoint)
7676         (aarch64_linux_watchpoint_addr_within_range)
7677         (aarch64_linux_can_do_single_step): Refactor as methods of
7678         aarch64_linux_nat_target.
7679         (super_post_startup_inferior): Delete.
7680         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7681
7682         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7683         (the_hppa_linux_nat_target): New.
7684         (hppa_linux_fetch_inferior_registers)
7685         (hppa_linux_store_inferior_registers): Refactor as methods of
7686         hppa_linux_nat_target.
7687         (_initialize_hppa_linux_nat): Adjust to C++ification.
7688
7689         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7690         (the_ia64_linux_nat_target): New.
7691         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7692         (ia64_linux_stopped_data_address)
7693         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7694         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7695         ia64_linux_nat_target methods.
7696         (super_xfer_partial): Delete.
7697         (_initialize_ia64_linux_nat): Adjust to C++ification.
7698
7699         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7700         (the_m32r_linux_nat_target): New.
7701         (m32r_linux_fetch_inferior_registers)
7702         (m32r_linux_store_inferior_registers): Refactor as
7703         m32r_linux_nat_target methods.
7704         (_initialize_m32r_linux_nat): Adjust to C++ification.
7705
7706         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7707         (the_m68k_linux_nat_target): New.
7708         (m68k_linux_fetch_inferior_registers)
7709         (m68k_linux_store_inferior_registers): Refactor as
7710         m68k_linux_nat_target methods.
7711         (_initialize_m68k_linux_nat): Adjust to C++ification.
7712
7713         * s390-linux-nat.c (s390_linux_nat_target): New class.
7714         (the_s390_linux_nat_target): New.
7715         (s390_linux_fetch_inferior_registers)
7716         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7717         (s390_insert_watchpoint, s390_remove_watchpoint)
7718         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7719         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7720         (s390_auxv_parse, s390_read_description): Refactor as methods of
7721         s390_linux_nat_target.
7722         (_initialize_s390_nat): Adjust to C++ification.
7723
7724         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7725         (the_sparc_linux_nat_target): New.
7726         (_initialize_sparc_linux_nat): Adjust to C++ification.
7727         * sparc-nat.c (sparc_fetch_inferior_registers)
7728         (sparc_store_inferior_registers): Remove target_ops parameter.
7729         * sparc-nat.h (sparc_fetch_inferior_registers)
7730         (sparc_store_inferior_registers): Remove target_ops parameter.
7731         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7732         (the_sparc64_linux_nat_target): New.
7733         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7734
7735         * spu-linux-nat.c (spu_linux_nat_target): New class.
7736         (the_spu_linux_nat_target): New.
7737         (spu_child_post_startup_inferior, spu_child_post_attach)
7738         (spu_child_wait, spu_fetch_inferior_registers)
7739         (spu_store_inferior_registers, spu_xfer_partial)
7740         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7741         methods.
7742         (_initialize_spu_nat): Adjust to C++ification.
7743
7744         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7745         (the_tilegx_linux_nat_target): New.
7746         (fetch_inferior_registers, store_inferior_registers):
7747         Refactor as methods.
7748         (_initialize_tile_linux_nat): Adjust to C++ification.
7749
7750         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7751         (the_xtensa_linux_nat_target): New.
7752         (xtensa_linux_fetch_inferior_registers)
7753         (xtensa_linux_store_inferior_registers): Refactor as
7754         xtensa_linux_nat_target methods.
7755         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7756
7757         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7758         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7759         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7760         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7761         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7762         (fbsd_stopped_by_sw_breakpoint)
7763         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7764         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7765         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7766         (fbsd_post_startup_inferior, fbsd_post_attach)
7767         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7768         (fbsd_set_syscall_catchpoint)
7769         (super_xfer_partial, super_resume, super_wait)
7770         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7771         (fbsd_handle_debug_trap): Remove target_ops parameter.
7772         (fbsd_nat_add_target): Delete.
7773         * fbsd-nat.h: Include "inf-ptrace.h".
7774         (fbsd_nat_add_target): Delete.
7775         (USE_SIGTRAP_SIGINFO): Define.
7776         (fbsd_nat_target): New class.
7777
7778         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7779         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7780         (amd64bsd_target): Delete.
7781         * amd64-bsd-nat.h: New file.
7782         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7783         "x86-bsd-nat.h".
7784         (amd64_fbsd_nat_target): New class.
7785         (the_amd64_fbsd_nat_target): New.
7786         (amd64fbsd_read_description): Refactor as method of
7787         amd64_fbsd_nat_target.
7788         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7789         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7790         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7791         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7792         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7793         (i386bsd_target): Delete.
7794         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7795         (i386bsd_fetch_inferior_registers)
7796         (i386bsd_store_inferior_registers): Declare.
7797         (i386_bsd_nat_target): New class.
7798         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7799         (the_i386_fbsd_nat_target): New.
7800         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7801         i386_fbsd_nat_target methods.
7802         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7803         (_initialize_i386fbsd_nat): Adjust to C++ification.
7804         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7805         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7806         (_initialize_x86_bsd_nat): Adjust to C++ification.
7807         * x86-bsd-nat.h: Include "x86-nat.h".
7808         (x86bsd_target): Delete declaration.
7809         (x86bsd_nat_target): New class.
7810
7811         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7812         (the_aarch64_fbsd_nat_target): New.
7813         (aarch64_fbsd_fetch_inferior_registers)
7814         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7815         aarch64_fbsd_nat_target.
7816         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7817         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7818         (the_alpha_bsd_nat_target): New.
7819         (alphabsd_fetch_inferior_registers)
7820         (alphabsd_store_inferior_registers): Refactor as
7821         alpha_bsd_nat_target methods.
7822         (_initialize_alphabsd_nat): Refactor as methods of
7823         alpha_bsd_nat_target.
7824         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7825         (the_amd64_nbsd_nat_target): New.
7826         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7827         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7828         (the_amd64_obsd_nat_target): New.
7829         (_initialize_amd64obsd_nat): Adjust to C++ification.
7830         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7831         (the_arm_fbsd_nat_target): New.
7832         (arm_fbsd_fetch_inferior_registers)
7833         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7834         (_initialize_arm_fbsd_nat): Refactor as methods of
7835         arm_fbsd_nat_target.
7836         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7837         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7838         (the_arm_netbsd_nat_target): New.
7839         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7840         arm_netbsd_nat_target.
7841         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7842         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7843         (the_hppa_nbsd_nat_target): New.
7844         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7845         hppa_nbsd_nat_target methods.
7846         (_initialize_hppanbsd_nat): Adjust to C++ification.
7847         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7848         (the_hppa_obsd_nat_target): New.
7849         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7850         methods of hppa_obsd_nat_target.
7851         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7852         add_target.
7853         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7854         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7855         add_target.
7856         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7857         (_initialize_i386obsd_nat): Use add_target.
7858         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7859         (the_m68k_bsd_nat_target): New.
7860         (m68kbsd_fetch_inferior_registers)
7861         (m68kbsd_store_inferior_registers): Refactor as methods of
7862         m68k_bsd_nat_target.
7863         (_initialize_m68kbsd_nat): Adjust to C++ification.
7864         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7865         (the_mips_fbsd_nat_target): New.
7866         (mips_fbsd_fetch_inferior_registers)
7867         (mips_fbsd_store_inferior_registers): Refactor as methods of
7868         mips_fbsd_nat_target.
7869         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7870         add_target.
7871         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7872         (the_mips_nbsd_nat_target): New.
7873         (mipsnbsd_fetch_inferior_registers)
7874         (mipsnbsd_store_inferior_registers): Refactor as methods of
7875         mips_nbsd_nat_target.
7876         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7877         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7878         (the_mips64_obsd_nat_target): New.
7879         (mips64obsd_fetch_inferior_registers)
7880         (mips64obsd_store_inferior_registers): Refactor as methods of
7881         mips64_obsd_nat_target.
7882         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7883         add_target.
7884         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7885         nbsd_nat_target.
7886         * nbsd-nat.h: Include "inf-ptrace.h".
7887         (nbsd_nat_target): New class.
7888         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7889         (obsd_wait): Refactor as methods of obsd_nat_target.
7890         (obsd_add_target): Delete.
7891         * obsd-nat.h: Include "inf-ptrace.h".
7892         (obsd_nat_target): New class.
7893         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7894         (the_ppc_fbsd_nat_target): New.
7895         (ppcfbsd_fetch_inferior_registers)
7896         (ppcfbsd_store_inferior_registers): Refactor as methods of
7897         ppc_fbsd_nat_target.
7898         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7899         add_target.
7900         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7901         (the_ppc_nbsd_nat_target): New.
7902         (ppcnbsd_fetch_inferior_registers)
7903         (ppcnbsd_store_inferior_registers): Refactor as methods of
7904         ppc_nbsd_nat_target.
7905         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7906         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7907         (the_ppc_obsd_nat_target): New.
7908         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7909         methods of ppc_obsd_nat_target.
7910         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7911         add_target.
7912         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7913         (the_sh_nbsd_nat_target): New.
7914         (shnbsd_fetch_inferior_registers)
7915         (shnbsd_store_inferior_registers): Refactor as methods of
7916         sh_nbsd_nat_target.
7917         (_initialize_shnbsd_nat): Adjust to C++ification.
7918         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7919         (inf_ptrace_xfer_partial): Delete.
7920         (sparc_xfer_partial, sparc_target): Delete.
7921         * sparc-nat.h (sparc_fetch_inferior_registers)
7922         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7923         (sparc_target): Delete function declaration.
7924         (sparc_target): New template class.
7925         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7926         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7927         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7928         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7929         add_target.
7930         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7931         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7932         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7933         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7934         add_target.
7935         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7936         (the_vax_bsd_nat_target): New.
7937         (vaxbsd_fetch_inferior_registers)
7938         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7939         methods.
7940         (_initialize_vaxbsd_nat): Adjust to C++ification.
7941
7942         * bsd-kvm.c (bsd_kvm_target): New class.
7943         (bsd_kvm_ops): Now a bsd_kvm_target.
7944         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7945         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7946         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7947         bsd_kvm_target.
7948         (bsd_kvm_return_one): Delete.
7949         (bsd_kvm_add_target): Adjust to C++ification.
7950
7951         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7952         (nto_procfs_target_procfs): New classes.
7953         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7954         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7955         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7956         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7957         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7958         (procfs_remove_hw_breakpoint, procfs_resume)
7959         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7960         (procfs_kill_inferior, procfs_store_registers)
7961         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7962         as methods of nto_procfs_target.
7963         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7964         (nto_native_ops): Delete.
7965         (procfs_open, procfs_native_open): Delete.
7966         (nto_native_ops): Now an nto_procfs_target_native.
7967         (init_procfs_targets): Adjust to C++ification.
7968         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7969         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7970         Refactor as methods of nto_procfs_target.
7971
7972         * go32-nat.c (go32_nat_target): New class.
7973         (the_go32_nat_target): New.
7974         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7975         (go32_store_registers, go32_xfer_partial, go32_files_info)
7976         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7977         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7978         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7979         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7980         (go32_target): Delete.
7981         (_initialize_go32_nat): Adjust to C++ification.
7982
7983         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7984         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7985         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7986         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7987         gnu_nat_target.
7988         (gnu_target): Delete.
7989         * gnu-nat.h (gnu_target): Delete.
7990         (gnu_nat_target): New class.
7991         * i386-gnu-nat.c (gnu_base_target): New.
7992         (i386_gnu_nat_target): New class.
7993         (the_i386_gnu_nat_target): New.
7994         (_initialize_i386gnu_nat): Adjust to C++ification.
7995
7996 2018-05-02  Pedro Alves  <palves@redhat.com>
7997
7998         * bfd-target.c (target_bfd_xclose): Rename to ...
7999         (target_bfd_close): ... this.
8000         (target_bfd_reopen): Adjust.
8001         * target.c (target_close): Remove references to to_xclose.
8002         * target.h (target_ops::to_xclose): Delete.
8003         (target_ops::to_close): Update comments.
8004
8005 2018-05-02  Pedro Alves  <palves@redhat.com>
8006
8007         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8008         "linux-nat.h".
8009         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8010         * inf-ptrace.c (inf_ptrace_register_u_offset)
8011         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8012         (inf_ptrace_store_register, inf_ptrace_store_registers)
8013         (inf_ptrace_trad_target): Move to ...
8014         * linux-nat-trad.c: ... this new file.
8015         * linux-nat-trad.h: New file.
8016         * linux-nat.c (linux_target_install_ops): Make extern.
8017         (linux_trad_target): Delete.
8018         * linux-nat.h (linux_trad_target): Delete declaration.
8019         (linux_target_install_ops): Declare.
8020         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8021         "linux-nat.h".
8022
8023 2018-05-02  Pedro Alves  <palves@redhat.com>
8024
8025         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8026         procfs_target/add_target here.
8027         * procfs.c (procfs_target): Make static.
8028         (_initialize_procfs): Call add_target here.
8029         * procfs.h (struct target_ops): Remove forward declaration.
8030         (procfs_target): Remove declaration.
8031         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8032
8033 2018-05-02  Pedro Alves  <palves@redhat.com>
8034
8035         * procfs.c (procfs_stopped_by_watchpoint)
8036         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8037         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8038         Forward declare.
8039         (procfs_use_watchpoints): Delete, move contents...
8040         (procfs_target): ... here.
8041         * procfs.h (procfs_use_watchpoints): Delete declaration.
8042         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8043         procfs_use_watchpoints.
8044         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8045         procfs_use_watchpoints.
8046
8047 2018-05-02  Tom Tromey  <tom@tromey.com>
8048
8049         PR python/20084:
8050         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8051         and var_zuinteger_unlimited.
8052         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8053         and PARAM_ZUINTEGER_UNLIMITED.
8054         (set_parameter_value): Handle var_zuinteger and
8055         var_zuinteger_unlimited.
8056         (add_setshow_generic): Likewise.
8057         (parmpy_init): Likewise.
8058
8059 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8060
8061         PR rust/23124
8062         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8063         pointer is not null before dereferencing it.
8064
8065 2018-04-30  Tom Tromey  <tom@tromey.com>
8066
8067         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8068         is_mi_like_p.
8069
8070 2018-04-30  Tom Tromey  <tom@tromey.com>
8071
8072         * breakpoint.c (mention): Remove use of is_mi_like_p.
8073         (print_mention_ranged_breakpoint): Likewise.
8074         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8075         of is_mi_like_p.
8076
8077 2018-04-30  Tom Tromey  <tom@tromey.com>
8078
8079         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8080
8081 2018-04-30  Tom Tromey  <tom@tromey.com>
8082
8083         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8084         (info_spu_event_command): Remove some uses of is_mi_like_p.
8085
8086 2018-04-30  Tom Tromey  <tom@tromey.com>
8087
8088         * python/py-framefilter.c (py_print_single_arg)
8089         (enumerate_locals, py_print_args, py_print_frame): Remove some
8090         uses of is_mi_like_p.
8091
8092 2018-04-30  Tom Tromey  <tom@tromey.com>
8093
8094         * ui-out.c: Update.
8095         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8096         * ui-out.h (ui_out::is_mi_like_p): Now const.
8097         (ui_out::do_is_mi_like_p): Now const.
8098         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8099
8100 2018-04-30  Tom Tromey  <tom@tromey.com>
8101
8102         * varobj.c (varobj_set_visualizer): Use new_reference.
8103         * python/python.c (gdbpy_decode_line): Use new_reference.
8104         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8105         new_reference.
8106
8107 2018-04-30  Tom Tromey  <tom@tromey.com>
8108
8109         * varobj.c (install_new_value): Use new_reference.
8110         * value.h (value_incref): Return void.  Swap intro comment with
8111         value_decref.
8112         * value.c (set_value_parent): Use new_reference.
8113         (value_incref): Return void.  Update intro comment.
8114         (release_value): Use new_reference.
8115         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8116
8117 2018-04-30  Tom Tromey  <tom@tromey.com>
8118
8119         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8120         * gdb_bfd.h (new_bfd_ref): Remove.
8121         (gdb_bfd_open): Update comment.
8122         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8123         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8124         (gdb_bfd_fdopenr): Use new_reference.
8125         * exec.c (exec_file_attach): Use new_reference.
8126
8127 2018-04-30  Tom Tromey  <tom@tromey.com>
8128
8129         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8130         method.
8131
8132 2018-04-30  Tom Tromey  <tom@tromey.com>
8133
8134         * jit.c (jit_read_code_entry): Use type_align.
8135         * i386-tdep.c (i386_gdbarch_init): Don't call
8136         set_gdbarch_long_long_align_bit.
8137         * gdbarch.sh: Remove long_long_align_bit.
8138         * gdbarch.c, gdbarch.h: Rebuild.
8139         * arc-tdep.c (arc_type_align): New function.
8140         (arc_gdbarch_init): Use arc_type_align.  Don't call
8141         set_gdbarch_long_long_align_bit.
8142
8143 2018-04-30  Tom Tromey  <tom@tromey.com>
8144
8145         * rust-lang.c (rust_type_alignment): Remove.
8146         (rust_composite_type): Use type_align.
8147
8148 2018-04-30  Tom Tromey  <tom@tromey.com>
8149
8150         * NEWS: Mention Type.align.
8151         * python/py-type.c (typy_get_alignof): New function.
8152         (type_object_getset): Add "alignof".
8153
8154 2018-04-30  Tom Tromey  <tom@tromey.com>
8155
8156         PR exp/17095:
8157         * NEWS: Update.
8158         * std-operator.def (UNOP_ALIGNOF): New operator.
8159         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8160         New.
8161         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8162         * c-lang.c (c_op_print_tab): Add alignof.
8163         * c-exp.y (ALIGNOF): New token.
8164         (exp): Add "ALIGNOF" production.
8165         (ident_tokens): Add _Alignof and alignof.
8166
8167 2018-04-30  Tom Tromey  <tom@tromey.com>
8168
8169         * i386-tdep.c (i386_type_align): New function.
8170         (i386_gdbarch_init): Update.
8171         * gdbarch.sh (type_align): New method.
8172         * gdbarch.c, gdbarch.h: Rebuild.
8173         * arch-utils.h (default_type_align): Declare.
8174         * arch-utils.c (default_type_align): New function.
8175         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8176         (struct type) <align_log2>: New field.
8177         <instance_flags>: Now a bitfield.
8178         (TYPE_RAW_ALIGN): New macro.
8179         (type_align, type_raw_align, set_type_align): Declare.
8180         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8181         functions.
8182         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8183         (get_alignment, maybe_set_alignment): New functions.
8184         (read_structure_type, read_enumeration_type, read_array_type)
8185         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8186         (read_subrange_type, read_base_type): Set type alignment.
8187
8188 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8189
8190         * dwarf2read.c (read_index_from_section): Use bool.
8191
8192 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8193
8194         PR gdb/22950
8195         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8196         with #ifdef.
8197
8198 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8199
8200         PR build/22873
8201         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8202         last step, and do it atomically.
8203
8204 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8205
8206         * compile/compile-c-types.c (convert_int, convert_float):
8207         Update for C FE v1.
8208
8209 2018-04-27  Tom Tromey  <tom@tromey.com>
8210
8211         PR rust/22545:
8212         * rust-lang.c (rust_inclusive_range_type_p): New function.
8213         (rust_range): Handle inclusive ranges.
8214         (rust_compute_range): Likewise.
8215         * rust-exp.y (struct rust_op) <inclusive>: New field.
8216         (DOTDOTEQ): New constant.
8217         (range_expr): Add "..=" productions.
8218         (operator_tokens): Add "..=" token.
8219         (ast_range): Add "inclusive" parameter.
8220         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8221         ranges.
8222         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8223         bounds values.
8224         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8225         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8226         Update comments.
8227         * expprint.c (print_subexp_standard): Handle new bounds values.
8228         (dump_subexp_body_standard): Likewise.
8229
8230 2018-04-27  Tom Tromey  <tom@tromey.com>
8231
8232         * configure: Rebuild.
8233         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8234         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8235         "OVERRIDE".
8236         (class symbol_needs_eval_context): Likewise.
8237         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8238         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8239         "virtual".
8240         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8241         "override".
8242         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8243         * aarch64-tdep.c (instruction_reader::read): Use "override".
8244         (instruction_reader_test::read): Likewise.
8245         * arm-tdep.c (instruction_reader::read): Use "override".
8246         (instruction_reader_thumb::read): Likewise.
8247
8248 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8249
8250         PR remote/9665
8251         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8252         instead of remote_send.
8253         (remote_send): Remove.
8254
8255 2018-04-26  Pedro Alves  <palves@redhat.com>
8256
8257         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8258         find_function_start_sal instead of find_pc_line.
8259
8260 2018-04-26  Pedro Alves  <palves@redhat.com>
8261
8262         * breakpoint.c (set_breakpoint_location_function): Handle
8263         mst_data_gnu_ifunc.
8264         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8265         * elfread.c (elf_symtab_read): Give data symbols with
8266         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8267         (elf_rel_plt_read): Update comment.
8268         * linespec.c (convert_linespec_to_sals): Handle
8269         mst_data_gnu_ifunc.
8270         (minsym_found): Handle mst_data_gnu_ifunc.
8271         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8272         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8273         * parse.c (find_minsym_type_and_address): Handle
8274         mst_data_gnu_ifunc.
8275         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8276         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8277         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8278         comment.
8279         <mst_data_gnu_ifunc>: New enumerator.
8280
8281 2018-04-26  Pedro Alves  <palves@redhat.com>
8282
8283         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8284         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8285         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8286         Handle it.
8287         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8288         (lookup_minimal_symbol_by_pc): Adjust.
8289         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8290         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8291         * minsyms.h (lookup_msym_prefer): New enum.
8292         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8293         parameter by a lookup_msym_prefer parameter.
8294
8295 2018-04-26  Pedro Alves  <palves@redhat.com>
8296
8297         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8298         ends in "@plt" instead of looking at the symbol's section.
8299
8300 2018-04-26  Pedro Alves  <palves@redhat.com>
8301
8302         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8303         all references.
8304         (find_pc_partial_function_gnu_ifunc): Rename to ...
8305         (find_pc_partial_function): ... this, and remove references to
8306         'is_gnu_ifunc_p'.
8307         (find_pc_partial_function): Delete old implementation.
8308         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8309
8310 2018-04-26  Pedro Alves  <palves@redhat.com>
8311
8312         * linespec.c (struct bound_minimal_symbol_search_key): New.
8313         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8314         skip first line if we found a GNU ifunc minimal symbol by name.
8315         (compare_msymbols): Change parameters to work with a destructured
8316         lhs minsym.
8317         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8318         functions.
8319
8320 2018-04-26  Pedro Alves  <palves@redhat.com>
8321
8322         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8323         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8324         address/name.
8325         (add_location_to_breakpoint): Store the minsym and the objfile in
8326         the breakpoint location.
8327         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8328         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8329         Record the minsym in the sal.
8330         * symtab.h (symtab_and_line) <msymbol>: New field.
8331
8332 2018-04-26  Pedro Alves  <palves@redhat.com>
8333
8334         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8335         unless we actually resolved the ifunc.
8336
8337 2018-04-26  Pedro Alves  <palves@redhat.com>
8338
8339         * c-exp.y (variable production): Prefer ifunc minsyms over
8340         regular function symbols.
8341         * symtab.c (find_gnu_ifunc): New function.
8342         * minsyms.h (lookup_msym_prefer): New enum.
8343         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8344         parameter by a lookup_msym_prefer parameter.
8345         * symtab.h (find_gnu_ifunc): New declaration.
8346
8347 2018-04-26  Pedro Alves  <palves@redhat.com>
8348
8349         * blockframe.c (find_gnu_ifunc_target_type): New function.
8350         (find_function_type): New.
8351         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8352         return a value with a memory address.
8353         (eval_call): For calls to GNU ifunc functions, try to find the
8354         type of the target function from the type that the resolver
8355         returns.
8356         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8357         symbols.
8358         * infcall.c (find_function_return_type): Delete.
8359         (find_function_addr): Add 'function_type' parameter.  For calls to
8360         GNU ifunc functions, try to find the type of the target function
8361         from the type that the resolver returns, and return it via
8362         FUNCTION_TYPE.
8363         (call_function_by_hand_dummy): Adjust to use the function type
8364         returned by find_function_addr.
8365         (find_function_addr): Add 'function_type' parameter and move
8366         description here.
8367         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8368         declarations.
8369
8370 2018-04-26  Pedro Alves  <palves@redhat.com>
8371
8372         * c-exp.y (variable production): Skip finding an alias for ifunc
8373         symbols.
8374
8375 2018-04-26  Pedro Alves  <palves@redhat.com>
8376
8377         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8378
8379 2018-04-25  Pedro Alves  <palves@redhat.com>
8380
8381         * infcmd.c (kill_command): Print the pid as string, not the whole
8382         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8383         message.
8384         * remote.c (remote_detach_1): Print the pid as string, not the
8385         whole thread's ptid.
8386
8387 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8388             Sergio Durigan Junior  <sergiodj@redhat.com>
8389             Pedro Alves  <palves@redhat.com>
8390
8391         * infcmd.c (kill_command): Print message when inferior has
8392         been killed.
8393         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8394         '1'.
8395         (add_inferior): Improve message printed when
8396         'print_inferior_events' is on.
8397         (exit_inferior): Remove message printed when
8398         'print_inferior_events' is on.
8399         (detach_inferior): Improve message printed when
8400         'print_inferior_events' is on.
8401         (initialize_inferiors): Use 'add_inferior_silent' to set
8402         'current_inferior_'.
8403         * inferior.h (print_inferior_events): Declare here as
8404         'extern'.
8405         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8406         '[Detaching...]' messages when 'print_inferior_events' is on.
8407         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8408         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8409         'Detaching after fork from child...', replace it by '... from
8410         parent...'.
8411         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8412         prefix/suffix when printing 'Detaching...' messages.  Print
8413         them when 'print_inferior_events' is on.
8414         * remote.c (remote_detach_1): Print message when detaching
8415         from inferior and '!is_fork_parent'.
8416
8417 2018-04-24  Tom Tromey  <tom@tromey.com>
8418
8419         * cli-out.h: Reindent.
8420
8421 2018-04-24  Tom Tromey  <tom@tromey.com>
8422
8423         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8424         (cli_ui_out::do_field_string): Use fputs_filtered.
8425         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8426
8427 2018-04-23  Tom Tromey  <tom@tromey.com>
8428
8429         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8430         gdb::unique_xmalloc_ptr.
8431
8432 2018-04-23  Tom Tromey  <tom@tromey.com>
8433
8434         * configure: Rebuild.
8435
8436 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8437
8438         PR gdb/23095
8439         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8440         prepare_for_testing.  Set normal_bp to r_debug_state if target
8441         is bsd.
8442
8443 2018-04-21  Pedro Alves  <palves@redhat.com>
8444             Rajendra SY  <rajendra.sy@gmail.com>
8445
8446         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8447         * remote.c (extended_remote_attach): In all-stop mode, mark the
8448         thread as executing.
8449
8450 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8451
8452         * thread.c (thread_apply_all_command): Fix comment.
8453         (thread_command): Fix comment.
8454
8455 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8456
8457         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8458         parameter.
8459         * features/aarch64-core.c (create_feature_aarch64_core):
8460         Regenerate.
8461         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8462         Likewise.
8463         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8464         Likewise.
8465         * features/i386/32bit-avx512.c
8466         (create_feature_i386_32bit_avx512): Likewise.
8467         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8468         Likewise.
8469         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8470         Likewise.
8471         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8472         Likewise.
8473         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8474         Likewise.
8475         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8476         Likewise.
8477         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8478         Likewise.
8479         * features/i386/64bit-avx512.c
8480         (create_feature_i386_64bit_avx512): Likewise.
8481         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8482         Likewise.
8483         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8484         Likewise.
8485         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8486         Likewise.
8487         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8488         Likewise.
8489         * features/i386/64bit-segments.c
8490         (create_feature_i386_64bit_segments): Likewise.
8491         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8492         Likewise.
8493         * features/i386/x32-core.c
8494         (create_feature_i386_x32_core): Likewise.
8495         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8496         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8497         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8498         * target-descriptions.c: In generated code, don't pass xml
8499         filename.
8500
8501 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8502
8503         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8504         (print_xml_feature::visit_post): Likewise.
8505         (print_xml_feature::visit): Likewise.
8506         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8507         (print_xml_feature): Add new class.
8508         * regformats/regdat.sh: Null xmltarget on feature targets.
8509         * target-descriptions.c (struct target_desc): Add xmltarget.
8510         (maintenance_check_tdesc_xml_convert): Add unittest function.
8511         (tdesc_get_features_xml): Add function to get xml.
8512         (maintenance_check_xml_descriptions): Test xml generation.
8513         * xml-tdesc.c (string_read_description_xml): Add function.
8514         * xml-tdesc.h (string_read_description_xml): Add declaration.
8515
8516 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8517
8518         * features/Makefile: Add feature marker to targets with new style
8519         target descriptions.
8520         * regformats/aarch64.dat: Regenerate.
8521         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8522         * regformats/i386/amd64-avx-linux.dat: Likewise.
8523         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8524         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8525         * regformats/i386/amd64-linux.dat: Likewise.
8526         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8527         * regformats/i386/amd64.dat: Likewise.
8528         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8529         * regformats/i386/i386-avx-linux.dat: Likewise.
8530         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8531         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8532         * regformats/i386/i386-linux.dat: Likewise.
8533         * regformats/i386/i386-mmx-linux.dat: Likewise.
8534         * regformats/i386/i386-mpx-linux.dat: Likewise.
8535         * regformats/i386/i386.dat: Likewise.
8536         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8537         * regformats/i386/x32-avx-linux.dat: Likewise.
8538         * regformats/i386/x32-linux.dat: Likewise.
8539         * regformats/tic6x-c62x-linux.dat: Likewise.
8540         * regformats/tic6x-c64x-linux.dat: Likewise.
8541         * regformats/tic6x-c64xp-linux.dat: Likewise.
8542         * regformats/regdat.sh: Parse feature marker.
8543
8544 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8545
8546         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8547         (tdesc_osabi_name): Likewise.
8548         * target-descriptions.c (tdesc_architecture_name): Add new
8549         function.
8550         (tdesc_osabi_name): Likewise.
8551
8552 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8553
8554         * common/tdesc.c (tdesc_predefined_type): Move to here.
8555         (tdesc_named_type): Likewise.
8556         (tdesc_create_vector): Likewise.
8557         (tdesc_create_struct): Likewise.
8558         (tdesc_set_struct_size): Likewise.
8559         (tdesc_create_union): Likewise.
8560         (tdesc_create_flags): Likewise.
8561         (tdesc_create_enum): Likewise.
8562         (tdesc_add_field): Likewise.
8563         (tdesc_add_typed_bitfield): Likewise.
8564         (tdesc_add_bitfield): Likewise.
8565         (tdesc_add_flag): Likewise.
8566         (tdesc_add_enum_value): Likewise.
8567         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8568         (struct tdesc_type_vector): Likewise.
8569         (struct tdesc_type_field): Likewise.
8570         (struct tdesc_type_with_fields): Likewise.
8571         (tdesc_create_enum): Add declaration.
8572         (tdesc_add_typed_bitfield): Likewise.
8573         (tdesc_add_enum_value): Likewise.
8574         * target-descriptions.c (tdesc_type_field): Move from here.
8575         (tdesc_type_builtin): Likewise.
8576         (tdesc_type_vector): Likewise.
8577         (tdesc_type_with_fields): Likewise.
8578         (tdesc_predefined_types): Likewise.
8579         (tdesc_named_type): Likewise.
8580         (tdesc_create_vector): Likewise.
8581         (tdesc_create_struct): Likewise.
8582         (tdesc_set_struct_size): Likewise.
8583         (tdesc_create_union): Likewise.
8584         (tdesc_create_flags): Likewise.
8585         (tdesc_create_enum): Likewise.
8586         (tdesc_add_field): Likewise.
8587         (tdesc_add_typed_bitfield): Likewise.
8588         (tdesc_add_bitfield): Likewise.
8589         (tdesc_add_flag): Likewise.
8590         (tdesc_add_enum_value): Likewise.
8591         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8592         (tdesc_add_typed_bitfield): Likewise.
8593         (tdesc_add_enum_value): Likewise.
8594
8595 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8596
8597         * common/tdesc.c (tdesc_feature::accept): Move to here.
8598         (tdesc_feature::operator==): Likewise.
8599         (tdesc_create_reg): Likewise.
8600         * common/tdesc.h (tdesc_type_kind): Likewise.
8601         (struct tdesc_type): Likewise.
8602         (struct tdesc_feature): Likewise.
8603         * regformats/regdat.sh: Create a feature.
8604         * target-descriptions.c (tdesc_type_kind): Move from here.
8605         (tdesc_type): Likewise.
8606         (tdesc_type_up): Likewise.
8607         (tdesc_feature): Likewise.
8608         (tdesc_create_reg): Likewise.
8609
8610 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8611
8612         * Makefile.in: Add arch/tdesc.c
8613         * common/tdesc.c: New file.
8614         * common/tdesc.h (tdesc_element_visitor): Move to here.
8615         (tdesc_element): Likewise.
8616         (tdesc_reg): Likewise.
8617         (tdesc_reg_up): Likewise.
8618         * regformats/regdef.h (reg): Add offset to constructors.
8619         * target-descriptions.c (tdesc_element_visitor): Move from here.
8620         (tdesc_element): Likewise.
8621         (tdesc_reg): Likewise.
8622         (tdesc_reg_up): Likewise.
8623
8624 2018-04-17  Tom Tromey  <tom@tromey.com>
8625
8626         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8627         discriminant field.
8628
8629 2018-04-17  Tom Tromey  <tom@tromey.com>
8630
8631         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8632
8633 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8634
8635         * symtab.c (print_symbol_info): Skip printing filename and line
8636         number when `last' is NULL.
8637         (symtab_symbol_info): Use empty string instead of NULL for first
8638         invocation of print_symbol_info.
8639         (rbreak_command): Pass NULL to `last' parameter of
8640         print_symbol_info.
8641
8642 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8643
8644         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8645         instead of nullptr.
8646
8647 2018-04-16  Pedro Alves  <palves@redhat.com>
8648
8649         * MAINTAINERS (sh): Remove.
8650         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8651         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8652         (ALLDEPFILES): Remove sh64-tdep.c.
8653         * NEWS: Mentions that support for SH-5/SH64 is removed.
8654         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8655         (sh*-*-openbsd*): Ditto.
8656         (sh64-*-elf*): Remove.
8657         (sh*): Remove.
8658         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8659         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8660         * sh-tdep.c: No longer include "sh64-tdep.h".
8661         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8662         * sh64-tdep.c, sh64-tdep.h: Remove files.
8663
8664 2018-04-16  Pedro Alves  <palves@redhat.com>
8665
8666         * MAINTAINERS: Remove m88k.
8667         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8668         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8669         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8670         * NEWS: Mention that support for m88k was removed.
8671         * configure.host (m88*-*-*): Remove support.
8672         * configure.nat (m88k-*-*): Remove support.
8673         * configure.tgt (m88*-*-openbsd*): Remove.
8674         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8675
8676 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8677
8678         * configure.tgt (x86_tobjs): New variable.
8679         (amd64_tobjs, i386_tobjs): Use it.
8680
8681 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8682
8683         * symtab.c (print_symbol_info): Precede the symbol definition by
8684         the line number when available.
8685         * NEWS: Advertise this enhancement.
8686
8687 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8688
8689         * NEWS (New options): announce set/show record btrace cpu.
8690         * btrace.c: Include record-btrace.h.
8691         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8692         the vendor is unknown.
8693         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8694         Maybe overwrite the btrace configuration's cpu.
8695         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8696         (btrace_fetch): Add cpu parameter.  Update callers.
8697         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8698         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8699         errata workarounds if the vendor is unknown.
8700         * python/py-record-btrace.c: Include record-btrace.h.
8701         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8702         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8703         * record-btrace.c (record_btrace_cpu_state_kind): New.
8704         (record_btrace_cpu): New.
8705         (set_record_btrace_cpu_cmdlist): New.
8706         (record_btrace_get_cpu): New.
8707         (require_btrace_thread, record_btrace_info)
8708         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8709         (cmd_set_record_btrace_cpu_none): New.
8710         (cmd_set_record_btrace_cpu_auto): New.
8711         (cmd_set_record_btrace_cpu): New.
8712         (cmd_show_record_btrace_cpu): New.
8713         (_initialize_record_btrace): Initialize set/show record btrace cpu
8714         commands.
8715         * record-btrace.h (record_btrace_get_cpu): New.
8716
8717 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8718
8719         * record.c (set_record_command): Fix typo in message.
8720
8721 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8722
8723         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8724
8725 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8726
8727         * infrun.c (process_event_stop_test): Call
8728         gdbarch_in_indirect_branch_thunk.
8729         * gdbarch.sh (in_indirect_branch_thunk): New.
8730         * gdbarch.c: Regenerated.
8731         * gdbarch.h: Regenerated.
8732         * x86-tdep.h: New.
8733         * x86-tdep.c: New.
8734         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8735         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8736         (ALLDEPFILES): Add x86-tdep.c.
8737         * arch-utils.h (default_in_indirect_branch_thunk): New.
8738         * arch-utils.c (default_in_indirect_branch_thunk): New.
8739         * i386-tdep: Include x86-tdep.h.
8740         (i386_in_indirect_branch_thunk): New.
8741         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8742         function.
8743         * amd64-tdep: Include x86-tdep.h.
8744         (amd64_in_indirect_branch_thunk): New.
8745         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8746
8747 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8748
8749         PR gdb/23053
8750         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8751         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8752         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8753         regression.
8754
8755 2018-04-12  Tom Tromey  <tom@tromey.com>
8756
8757         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8758         (rust_evaluate_subexp): Likewise.
8759
8760 2018-04-12  Pedro Alves  <palves@redhat.com>
8761
8762         * procfs.c (procfs_detach): Make forward declaration's prototype
8763         match definition's protototype.
8764         (proc_get_LDT_entry): Remove stale do_cleanups call.
8765
8766 2018-04-12  Pedro Alves  <palves@redhat.com>
8767
8768         * target.h (target_ops::to_has_exited): Delete.
8769         (target_has_exited): Delete.
8770         * target-delegates.c: Regenerate.
8771
8772 2018-04-11  Pedro Alves  <palves@redhat.com>
8773
8774         * target.c (fileio_fh_t::t): Add comment.
8775         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8776         (target_fileio_close): Handle a NULL target.
8777         (invalidate_fileio_fh): New.
8778         (target_close): Call it.
8779         * remote.c (remote_hostio_send_command): No longer check whether
8780         remote_desc is open.
8781
8782 2018-04-11  Pedro Alves  <palves@redhat.com>
8783
8784         * target.c (fileio_fh_t): Make it a named struct instead of a
8785         typedef.
8786         (fileio_fh_t::is_closed): New method.
8787         (DEF_VEC_O (fileio_fh_t)): Remove.
8788         (fileio_fhandles): Now a std::vector.
8789         (is_closed_fileio_fh): Delete.
8790         (acquire_fileio_fd): Adjust.  Rename parameters.
8791         (release_fileio_fd): Adjust.
8792         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8793         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8794         (target_fileio_close): Adjust.
8795
8796 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8797
8798         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8799         index.
8800
8801 2018-04-10  Pedro Alves  <palves@redhat.com>
8802
8803         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8804         (scoped_finish_thread_state): New class.
8805         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8806         cleanup.
8807         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8808         (fetch_inferior_event, normal_stop): Likewise.
8809         * thread.c (finish_thread_state_cleanup): Delete.
8810
8811 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8812             Pedro Alves  <palves@redhat.com>
8813
8814         * value.c: Include "selftest.h" and "common/array-view.h".
8815         (struct range) <operator ==>: New.
8816         (test_ranges_contain): New.
8817         (check_ranges_vector): New.
8818         (test_insert_into_bit_range_vector): New.
8819         (_initialize_values): Register selftests.
8820         * common/array-view.h (operator==, operator!=): New.
8821
8822 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8823
8824         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8825         an iterator.
8826         * inline-frame.c: Include <algorithm>.
8827         (struct inline_state): Add constructor.
8828         (inline_state_s): Remove.
8829         (DEF_VEC_O(inline_state_s)): Remove.
8830         (inline_states): Change type to std::vector.
8831         (find_inline_frame_state): Adjust to std::vector.
8832         (allocate_inline_frame_state): Remove.
8833         (clear_inline_frame_state): Adjust to std::vector.
8834         (skip_inline_frames): Adjust to std::vector.
8835
8836 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8837
8838         * tracepoint.h (struct trace_state_variable): Add constructor.
8839         <name>: Change type to std::string.
8840         * tracepoint.c (tsv_s): Remove.
8841         (DEF_VEC_O(tsv_s)): Remove.
8842         (tvariables): Change to std::vector.
8843         (create_trace_state_variable): Adjust to std::vector.
8844         (find_trace_state_variable): Likewise.
8845         (find_trace_state_variable_by_number): Likewise.
8846         (delete_trace_state_variable): Likewise.
8847         (trace_variable_command): Adjust to std::string.
8848         (delete_trace_variable_command): Likewise.
8849         (tvariables_info_1): Adjust to std::vector.
8850         (save_trace_state_variables): Likewise.
8851         (start_tracing): Likewise.
8852         (merge_uploaded_trace_state_variables): Adjust to std::vector
8853         and std::string.
8854         * target.h (struct target_ops)
8855         <to_download_trace_state_variable>: Pass reference to
8856         trace_state_variable.
8857         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8858         * target-delegates.c: Re-generate.
8859         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8860         (mi_tsv_deleted): Likewise.
8861         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8862         * remote.c (remote_download_trace_state_variable): Change
8863         pointer to reference and adjust.
8864         * make-target-delegates (parse_argtypes): Handle references.
8865         (write_function_header): Likewise.
8866         (munge_type): Likewise.
8867
8868 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8869
8870         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8871         string_view-selftests.c.
8872         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8873         testsuite.
8874         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8875         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8876         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8877         * unittests/basic_string_view/element_access/char/1.cc:
8878         Likewise.
8879         * unittests/basic_string_view/element_access/char/empty.cc:
8880         Likewise.
8881         * unittests/basic_string_view/element_access/char/front_back.cc:
8882         Likewise.
8883         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8884         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8885         Likewise.
8886         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8887         Likewise.
8888         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8889         Likewise.
8890         * unittests/basic_string_view/operations/compare/char/1.cc:
8891         Likewise.
8892         * unittests/basic_string_view/operations/compare/char/13650.cc:
8893         Likewise.
8894         * unittests/basic_string_view/operations/copy/char/1.cc:
8895         Likewise.
8896         * unittests/basic_string_view/operations/data/char/1.cc:
8897         Likewise.
8898         * unittests/basic_string_view/operations/find/char/1.cc:
8899         Likewise.
8900         * unittests/basic_string_view/operations/find/char/2.cc:
8901         Likewise.
8902         * unittests/basic_string_view/operations/find/char/3.cc:
8903         Likewise.
8904         * unittests/basic_string_view/operations/find/char/4.cc:
8905         Likewise.
8906         * unittests/basic_string_view/operations/rfind/char/1.cc:
8907         Likewise.
8908         * unittests/basic_string_view/operations/rfind/char/2.cc:
8909         Likewise.
8910         * unittests/basic_string_view/operations/rfind/char/3.cc:
8911         Likewise.
8912         * unittests/basic_string_view/operations/substr/char/1.cc:
8913         Likewise.
8914         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8915         * unittests/string_view-selftests.c: New file.
8916
8917 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8918
8919         * unittests/basic_string_view/capacity/1.cc: New file.
8920         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8921         * unittests/basic_string_view/cons/char/1.cc: New file.
8922         * unittests/basic_string_view/cons/char/2.cc: New file.
8923         * unittests/basic_string_view/cons/char/3.cc: New file.
8924         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8925         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8926         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8927         * unittests/basic_string_view/element_access/char/1.cc: New file.
8928         * unittests/basic_string_view/element_access/char/2.cc: New file.
8929         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8930         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8931         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8932         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8933         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8934         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8935         * unittests/basic_string_view/include.cc: New file.
8936         * unittests/basic_string_view/inserters/char/1.cc: New file.
8937         * unittests/basic_string_view/inserters/char/2.cc: New file.
8938         * unittests/basic_string_view/inserters/char/3.cc: New file.
8939         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8940         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8941         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8942         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8943         * unittests/basic_string_view/literals/types.cc: New file.
8944         * unittests/basic_string_view/literals/values.cc: New file.
8945         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8946         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8947         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8948         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8949         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8950         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8951         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8952         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8953         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8954         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8955         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8956         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8957         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8958         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8959         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8960         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8961         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8962         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8963         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8964         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8965         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8966         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8967         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8968         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8969         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8970         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8971         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8972         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8973         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8974         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8975         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8976         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8977         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8978         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8979         * unittests/basic_string_view/operators/char/2.cc: New file.
8980         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8981         * unittests/basic_string_view/range_access/char/1.cc: New file.
8982         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8983         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8984         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8985         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8986         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8987         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8988         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8989         * unittests/basic_string_view/typedefs.cc: New file.
8990         * unittests/basic_string_view/types/1.cc: New file.
8991
8992 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8993
8994         * common/gdb_string_view.h: Remove libstdc++ implementation
8995         details, adjust to gdb reality.
8996         * common/gdb_string_view.tcc: Likewise.
8997         * cli/cli-script.c (struct string_view): Remove.
8998         (user_args) <m_args>: Change element type to gdb::string_view.
8999         (user_args::insert_args): Adjust.
9000
9001 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9002
9003         * common/gdb_string_view.h: New file.
9004         * common/gdb_string_view.tcc: New file.
9005
9006 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9007
9008         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9009         * configure: Re-generate.
9010
9011 2018-04-09  Pedro Alves  <palves@redhat.com>
9012
9013         * gdbarch.sh: Include "observable.h" instead of "observer.h".
9014         (set_target_gdbarch): Call
9015         gdb::observers::architecture_changed.notify instead of
9016         observer_notify_architecture_changed.
9017
9018 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9019
9020         * tracepoint.c (struct current_traceframe_cleanup): Remove.
9021         (do_restore_current_traceframe_cleanup): Remove.
9022         (restore_current_traceframe_cleanup_dtor): Remove.
9023         (make_cleanup_restore_current_traceframe): Remove.
9024         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9025         New.
9026         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9027         * infrun.c (fetch_inferior_event): Use
9028         scoped_restore_current_traceframe.
9029
9030 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9031
9032         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9033         Remove.
9034         <n_allocated_type_units>: Remove.
9035         <all_type_units>: Change to std::vector.
9036         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9037         to std::vector change.
9038         (dwarf2_per_objfile::get_cutu): Likewise.
9039         (dwarf2_per_objfile::get_tu): Likewise.
9040         (create_signatured_type_table_from_index): Likewise.
9041         (create_signatured_type_table_from_debug_names): Likewise.
9042         (dw2_symtab_iter_next): Likewise.
9043         (dw2_print_stats): Likewise.
9044         (dw2_expand_all_symtabs): Likewise.
9045         (dw2_expand_marked_cus): Likewise.
9046         (dw2_debug_names_iterator::next): Likewise.
9047         (dwarf2_initialize_objfile): Likewise.
9048         (add_signatured_type_cu_to_table): Likewise.
9049         (create_all_type_units): Likewise.
9050         (add_type_unit): Likewise.
9051         (struct tu_abbrev_offset): Add constructor.
9052         (build_type_psymtabs_1): Adjust to std::vector change.
9053         (print_tu_stats): Likewise.
9054         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9055         (write_debug_names): Likewise.
9056
9057 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9058
9059         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9060         Make an std::vector.
9061         <n_comp_units>: Remove.
9062         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9063         to std::vector change.
9064         (dwarf2_per_objfile::get_cutu): Likewise.
9065         (dwarf2_per_objfile::get_cu): Likewise.
9066         (create_cus_from_index): Likewise.
9067         (create_addrmap_from_index): Likewise.
9068         (create_addrmap_from_aranges): Likewise.
9069         (dwarf2_read_index): Likewise.
9070         (dw2_find_last_source_symtab): Likewise.
9071         (dw2_map_symtabs_matching_filename): Likewise.
9072         (dw2_symtab_iter_next): Likewise.
9073         (dw2_print_stats): Likewise.
9074         (dw2_expand_all_symtabs): Likewise.
9075         (dw2_expand_symtabs_with_fullname): Likewise.
9076         (dw2_expand_marked_cus): Likewise.
9077         (dw2_map_symbol_filenames): Likewise.
9078         (create_cus_from_debug_names): Likewise.
9079         (dwarf2_read_debug_names): Likewise.
9080         (dw2_debug_names_iterator::next): Likewise.
9081         (dwarf2_initialize_objfile): Likewise.
9082         (set_partial_user): Likewise.
9083         (dwarf2_build_psymtabs_hard): Likewise.
9084         (read_comp_units_from_section): Remove arguments, adjust to
9085         std::vector change.
9086         (create_all_comp_units): Adjust to std::vector and
9087         read_comp_units_from_section changes.
9088         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9089         change.
9090         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9091         (psyms_seen_size): Likewise.
9092         (write_gdbindex): Likewise.
9093         (write_debug_names): Likewise.
9094
9095 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9096
9097         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9098         with dwarf2_per_objfile.
9099         (create_cus_from_index): Likewise.
9100         (create_signatured_type_table_from_index): Likewise.
9101         (dwarf2_read_index): Likewise.
9102         (dwarf2_initialize_objfile): Likewise.
9103         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9104         per_cu rather than get_dwarf2_per_objfile.
9105
9106 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9107
9108         * dwarf2read.h (struct signatured_type): Forward declare.
9109         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9110         New methods.
9111         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9112         (dw2_get_cutu): ...this.
9113         (dwarf2_per_objfile::get_cu): Rename from...
9114         (dw2_get_cu): ...this.
9115         (dwarf2_per_objfile::get_tu): New.
9116         (create_addrmap_from_index): Adjust.
9117         (create_addrmap_from_aranges): Adjust.
9118         (dw2_find_last_source_symtab): Adjust.
9119         (dw2_map_symtabs_matching_filename): Adjust.
9120         (dw2_symtab_iter_next): Adjust.
9121         (dw2_print_stats): Adjust.
9122         (dw2_expand_all_symtabs): Adjust.
9123         (dw2_expand_symtabs_with_fullname): Adjust.
9124         (dw2_expand_marked_cus): Adjust.
9125         (dw_expand_symtabs_matching_file_matcher): Adjust.
9126         (dw2_map_symbol_filenames): Adjust.
9127         (dw2_debug_names_iterator::next): Adjust.
9128         (dwarf2_initialize_objfile): Adjust.
9129         (set_partial_user): Adjust.
9130         (dwarf2_build_psymtabs_hard): Adjust.
9131
9132 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9133
9134         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9135         Remove unused variables.
9136         (dw2_map_symtabs_matching_filename): Likewise.
9137         (dwarf2_record_block_ranges): Likewise.
9138         (dwarf2_read_addr_index): Likewise.
9139         (follow_die_offset): Likewise.
9140
9141 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9142
9143         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9144         to symbol_file_add_main.
9145
9146 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9147
9148         PR mi/22299
9149         * mi/mi-console.c (do_fputc_async_safe): New.
9150         (mi_console_file::write_async_safe): New.
9151         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9152         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9153         New.
9154         * ui-file.c (ui_file::putstrn): Adjust call to
9155         fputstrn_unfiltered.
9156         * utils.c (printchar): Replace do_fputs and do_fprintf
9157         parameters by do_fputc.
9158         (fputstr_filtered): Adjust call to printchar.
9159         (fputstr_unfiltered): Likewise.
9160         (fputstrn_filtered): Likewise.
9161         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9162         printchar.
9163         * utils.h (do_fputc_ftype): New typedef.
9164         (fputstrn_unfiltered): Add do_fputc parameter.
9165
9166 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9167
9168         * regformats/i386/i386-avx.dat: Remove.
9169
9170 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9171
9172         PR gdb/22979
9173         * amd64-tdep.c (amd64_none_init_abi): New function.
9174         (amd64_x32_none_init_abi): New function.
9175         (_initialize_amd64_tdep): Register handlers for x86-64 and
9176         x64_32 with GDB_OSABI_NONE.
9177         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9178         GDB_OSABI_NONE osabi.
9179
9180 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9181
9182         PR gdb/22980
9183         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9184         GDB_OSABI_NONE.
9185         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9186         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9187
9188 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9189
9190         * common/byte-vector.h (char_vector): New type.
9191         * target.h (target_read_alloc): Return
9192         gdb::optional<byte_vector>.
9193         (target_read_stralloc): Return gdb::optional<char_vector>.
9194         (target_get_osdata): Return gdb::optional<char_vector>.
9195         * target.c (target_read_alloc_1): Templatize.  Replacement
9196         manual memory management with vector.
9197         (target_read_alloc): Change return type, adjust.
9198         (target_read_stralloc): Change return type, adjust.
9199         (target_get_osdata): Change return type, adjust.
9200         * auxv.c (struct auxv_info) <length>: Remove.
9201         <data>: Change type to gdb::optional<byte_vector>.
9202         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9203         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9204         (target_auxv_search): Adjust.
9205         (fprint_target_auxv): Adjust.
9206         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9207         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9208         (linux_make_corefile_notes): Adjust.
9209         * osdata.c (get_osdata): Adjust.
9210         * remote.c (remote_get_threads_with_qxfer): Adjust.
9211         (remote_memory_map): Adjust.
9212         (remote_traceframe_info): Adjust.
9213         (btrace_read_config): Adjust.
9214         (remote_read_btrace): Adjust.
9215         (remote_pid_to_exec_file): Adjust.
9216         * solib-aix.c (solib_aix_get_library_list): Adjust.
9217         * solib-dsbt.c (decode_loadmap): Don't free buf.
9218         (dsbt_get_initial_loadmaps): Adjust.
9219         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9220         * solib-target.c (solib_target_current_sos): Adjust.
9221         * tracepoint.c (sdata_make_value): Adjust.
9222         * xml-support.c (xinclude_start_include): Adjust.
9223         (xml_fetch_content_from_file): Adjust.
9224         * xml-support.h (xml_fetch_another): Change return type.
9225         (xml_fetch_content_from_file): Change return type.
9226         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9227         * xml-tdesc.c (file_read_description_xml): Adjust.
9228         (fetch_available_features_from_target): Change return type.
9229         (target_fetch_description_xml): Adjust.
9230         (target_read_description_xml): Adjust.
9231
9232 2018-04-06  Tom Tromey  <tom@tromey.com>
9233
9234         * value.c (~value): Update.
9235         (struct value) <contents>: Now unique_xmalloc_ptr.
9236         (value_contents_bits_eq, allocate_value_contents)
9237         (value_contents_raw, value_contents_all_raw)
9238         (value_contents_for_printing, value_contents_for_printing_const)
9239         (set_value_enclosing_type): Update.
9240
9241 2018-04-06  Tom Tromey  <tom@tromey.com>
9242
9243         * value.c (range_s): Remove typedef, VEC.
9244         (struct range): Add operator<.
9245         (range_lessthan): Remove.
9246         (ranges_contain): Change type.
9247         (~value): Update.
9248         (struct value) <unavailable, optimized_out>: Now std::vector.
9249         (value_entirely_available)
9250         (value_entirely_covered_by_range_vector)
9251         (value_entirely_unavailable, value_entirely_optimized_out):
9252         Update.
9253         (insert_into_bit_range_vector): Change argument type.
9254         (find_first_range_overlap): Likewise.
9255         (struct ranges_and_idx, value_contents_bits_eq)
9256         (require_not_optimized_out, require_available): Update.
9257         (ranges_copy_adjusted): Change argument types.
9258         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9259
9260 2018-04-06  Tom Tromey  <tom@tromey.com>
9261
9262         * value.c (~value): Update.
9263         (struct value) <parent>: Now a value_ref_ptr.
9264         (value_parent, set_value_parent, value_address, value_copy):
9265         Update.
9266
9267 2018-04-06  Tom Tromey  <tom@tromey.com>
9268
9269         * value.c (struct value): Add constructor, destructor, and member
9270         initializers.
9271         (allocate_value_lazy, value_decref): Update.
9272
9273 2018-04-06  Tom Tromey  <tom@tromey.com>
9274
9275         * value.c (struct value) <released, next>: Remove.
9276         (all_values): Now a std::vector.
9277         (allocate_value_lazy): Update.
9278         (value_next): Remove.
9279         (value_mark, value_free_to_mark, release_value)
9280         (value_release_to_mark): Update.
9281
9282 2018-04-06  Tom Tromey  <tom@tromey.com>
9283
9284         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9285         (free_value_chain): Remove.
9286         * value.c (free_value_chain): Remove.
9287         (value_release_to_mark): Return a std::vector.
9288         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9289         std::vector.
9290         (check_condition): Update.
9291         * eval.c (fetch_subexp_value): Change "val_chain" to a
9292         std::vector.
9293         * breakpoint.c (update_watchpoint): Update.
9294         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9295
9296 2018-04-06  Tom Tromey  <tom@tromey.com>
9297
9298         * value.h (free_all_values): Remove.
9299         * value.c (free_all_values): Remove.
9300
9301 2018-04-06  Tom Tromey  <tom@tromey.com>
9302
9303         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9304         (value_history_chain, value_history_count): Remove.
9305         (value_history): New global.
9306         (record_latest_value, access_value_history, show_values)
9307         (preserve_values): Update.
9308
9309 2018-04-06  Tom Tromey  <tom@tromey.com>
9310
9311         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9312         * varobj.c (varobj_set_display_format, varobj_set_value)
9313         (install_default_visualizer, construct_visualizer)
9314         (install_new_value, ~varobj, varobj_get_value_type)
9315         (my_value_of_variable, varobj_editable_p): Update.
9316         * c-varobj.c (c_describe_child, c_value_of_variable)
9317         (cplus_number_of_children, cplus_describe_child): Update.
9318         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9319         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9320         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9321
9322 2018-04-06  Tom Tromey  <tom@tromey.com>
9323
9324         * printcmd.c (last_examine_address): Change type to
9325         value_ref_ptr.
9326         (do_examine, x_command): Update.
9327
9328 2018-04-06  Tom Tromey  <tom@tromey.com>
9329
9330         * value.c (release_value): Update.
9331         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9332         (struct bpstats) <val>: Now a value_ref_ptr.
9333         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9334         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9335         (~watchpoint, print_it_watchpoint, watch_command_1)
9336         (invalidate_bp_value_on_memory_change): Update.
9337
9338 2018-04-06  Tom Tromey  <tom@tromey.com>
9339
9340         * varobj.c (varobj_clear_saved_item)
9341         (update_dynamic_varobj_children, install_new_value, ~varobj):
9342         Update.
9343         * value.h (value_incref): Move declaration earlier.
9344         (value_decref): Rename from value_free.
9345         (struct value_ref_policy): New.
9346         (value_ref_ptr): New typedef.
9347         (struct value_deleter): Remove.
9348         (gdb_value_up): Remove typedef.
9349         (release_value): Change return type.
9350         (release_value_or_incref): Remove.
9351         * value.c (set_value_parent): Update.
9352         (value_incref): Change return type.
9353         (value_decref): Rename from value_free.
9354         (value_free_to_mark, free_all_values, free_value_chain): Update.
9355         (release_value): Return value_ref_ptr.
9356         (release_value_or_incref): Remove.
9357         (record_latest_value, set_internalvar, clear_internalvar):
9358         Update.
9359         * stack.c (info_frame_command): Don't call value_free.
9360         * python/py-value.c (valpy_dealloc, valpy_new)
9361         (value_to_value_object): Update.
9362         * printcmd.c (do_examine): Update.
9363         * opencl-lang.c (lval_func_free_closure): Update.
9364         * mi/mi-main.c (register_changed_p): Don't call value_free.
9365         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9366         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9367         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9368         value_free.
9369         * guile/scm-value.c (vlscm_free_value_smob)
9370         (vlscm_scm_from_value): Update.
9371         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9372         (frame_unwind_register_unsigned, get_frame_register_bytes)
9373         (put_frame_register_bytes): Don't call value_free.
9374         * findvar.c (address_from_register): Don't call value_free.
9375         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9376         * dwarf2loc.c (entry_data_value_free_closure)
9377         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9378         (dwarf2_evaluate_loc_desc_full): Update.
9379         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9380         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9381         (~watchpoint, watch_command_1)
9382         (invalidate_bp_value_on_memory_change): Update.
9383         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9384
9385 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9386
9387         PR gdb/23022
9388         * warning.m4: Add -Wno-error=deprecated-register.
9389         * configure: Re-generate.
9390
9391 2018-04-05  Tom Tromey  <tom@tromey.com>
9392
9393         * linespec.h: Remove include of "vec.h".
9394
9395 2018-04-05  Tom Tromey  <tom@tromey.com>
9396
9397         * linespec.c (typep): Remove typedef.
9398         (find_methods, find_superclass_methods): Take a std::vector.
9399         (find_method): Use std::vector.
9400
9401 2018-04-05  Tom Tromey  <tom@tromey.com>
9402
9403         * utils.c (compare_strings): Remove.
9404         * utils.h (compare_strings): Remove.
9405         * objc-lang.h (find_imps): Update.
9406         * objc-lang.c (find_methods): Take a std::vector.
9407         (uniquify_strings, find_imps): Likewise.
9408         * linespec.c (find_methods): Take a std::vector.
9409         (decode_objc): Use std::vector.
9410         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9411         a std::vector.
9412         (find_method, find_function_symbols): Use std::vector.
9413
9414 2018-04-05  Tom Tromey  <tom@tromey.com>
9415
9416         * completer.c (completion_tracker::completion_tracker): Remove
9417         cast.
9418         (completion_tracker::discard_completions): Likewise.
9419         * breakpoint.c (ambiguous_names_p): Remove cast.
9420         * ada-lang.c (_initialize_ada_language): Remove cast.
9421         * utils.h (streq): Update.
9422         (streq_hash): Add new declaration.
9423         * utils.c (streq): Return bool.
9424         (streq_hash): New function.
9425
9426 2018-04-05  Tom Tromey  <tom@tromey.com>
9427
9428         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9429         Remove a string copy.
9430
9431 2018-04-05  Tom Tromey  <tom@tromey.com>
9432
9433         * linespec.c (filter_results): Use std::vector.
9434         (decode_line_2, decode_line_full): Update.
9435
9436 2018-04-05  Tom Tromey  <tom@tromey.com>
9437
9438         * linespec.c (canonical_to_fullform): Return std::string.
9439         (filter_results): Update.
9440         (struct decode_line_2_item): Add constructor.
9441         <fullform, displayform>: Now std::string.
9442         (decode_line_2_compare_items): Now a std::sort comparator.
9443         (decode_line_2): Update.
9444
9445 2018-04-05  Tom Tromey  <tom@tromey.com>
9446
9447         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9448         (unexpected_linespec_error): Update.
9449         (linespec_parse_basic, parse_linespec): Update.
9450
9451 2018-04-05  Tom Tromey  <tom@tromey.com>
9452
9453         * linespec.c (linespec_parse_basic): Reindent.
9454
9455 2018-04-05  Tom Tromey  <tom@tromey.com>
9456
9457         * minsyms.h (iterate_over_minimal_symbols): Update.
9458         * minsyms.c (iterate_over_minimal_symbols): Take a
9459         gdb::function_view.
9460         * linespec.c (struct collect_minsyms): Remove.
9461         (compare_msyms): Now a std::sort comparator.
9462         (add_minsym): Add parameters.
9463         (search_minsyms_for_name): Update.  Use std::vector.
9464
9465 2018-04-03  Tom Tromey  <tom@tromey.com>
9466
9467         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9468         gdb::byte_vector.
9469
9470 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9471
9472         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9473
9474 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9475
9476         PR gdb/16959
9477         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9478         printing static type.
9479
9480 2018-04-01  Tom Tromey  <tom@tromey.com>
9481
9482         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9483         (rs6000_xfer_shared_libraries): Update.
9484
9485 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9486
9487         * common/gdb_vecs.h (char_ptr): Remove.
9488         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9489
9490 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9491
9492         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9493         with std::vector.
9494         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9495
9496 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9497
9498         * tracepoint.h (struct uploaded_tp): Initialize fields.
9499         <actions, step_actions, cmd_strings>: Change type to
9500         std::vector<char *>.
9501         * tracepoint.c (get_uploaded_tp): Allocate with new.
9502         (free_uploaded_tps): Free with delete.
9503         (parse_tracepoint_definition): Adjust to std::vector change.
9504         * breakpoint.c (read_uploaded_action): Likewise.
9505         (create_tracepoint_from_upload): Likewise.
9506         * ctf.c (ctf_write_uploaded_tp): Likewise.
9507         (SET_ARRAY_FIELD): Likewise.
9508         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9509
9510 2018-03-30  Tom Tromey  <tom@tromey.com>
9511
9512         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9513         std::unique_ptr.
9514         (svr4_keep_data_in_core): Update.
9515         (svr4_read_so_list): Update.
9516
9517 2018-03-30  Tom Tromey  <tom@tromey.com>
9518
9519         * windows-nat.c (handle_output_debug_string, handle_exception):
9520         Update.
9521         * target.h (target_read_string): Update.
9522         * target.c (target_read_string): Change "string" to
9523         unique_xmalloc_ptr.
9524         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9525         Update.
9526         * solib-frv.c (frv_current_sos): Update.
9527         * solib-dsbt.c (dsbt_current_sos): Update.
9528         * solib-darwin.c (darwin_current_sos): Update.
9529         * linux-thread-db.c (inferior_has_bug): Update.
9530         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9531         Update.  Remove alloca.
9532         * ada-lang.c (ada_main_name): Update.
9533
9534 2018-03-30  Tom Tromey  <tom@tromey.com>
9535
9536         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9537         (struct dwo_file_deleter): New.
9538         (dwo_file_up): New typedef.
9539         (open_and_init_dwo_file): Use dwo_file_up.
9540         (free_dwo_file_cleanup): Remove.
9541
9542 2018-03-30  Tom Tromey  <tom@tromey.com>
9543
9544         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9545         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9546
9547 2018-03-30  Tom Tromey  <tom@tromey.com>
9548
9549         * dwarf2read.c (class free_cached_comp_units): New class.
9550         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9551         (free_cached_comp_units): Remove function.
9552
9553 2018-03-30  Tom Tromey  <tom@tromey.com>
9554
9555         * utils.h (make_cleanup_unpush_target): Remove.
9556         * inf-ptrace.c (struct target_unpusher): New.
9557         (target_unpush_up) New typedef.
9558         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9559         target_unpush_up.
9560         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9561
9562 2018-03-27  Tom Tromey  <tom@tromey.com>
9563
9564         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9565
9566 2018-03-27  Pedro Alves  <palves@redhat.com>
9567             Tom Tromey  <tom@tromey.com>
9568
9569         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9570         destructor.  Now a class.
9571         (gdb_readline_wrapper_cleanup): Remove function.
9572         (gdb_readline_wrapper): Remove cleanups.
9573
9574 2018-03-27  Tom Tromey  <tom@tromey.com>
9575
9576         * typeprint.h (struct type_print_options) <local_typedefs,
9577         global_typedefs>: Remove "struct" keyword.
9578         (class typedef_hash_table): New class.
9579         (recursively_update_typedef_hash, add_template_parameters)
9580         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9581         (find_typedef_in_hash): Don't declare.
9582         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9583         (typedef_hash_table::recursively_update): Rename from
9584         recursively_update_typedef_hash.  Now a member.
9585         (typedef_hash_table::add_template_parameters): Rename from
9586         add_template_parameters.  Now a member.
9587         (typedef_hash_table::typedef_hash_table): Now a constructor;
9588         rename from create_typedef_hash.
9589         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9590         rename from free_typedef_hash.
9591         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9592         (do_free_global_table): Remove.
9593         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9594         from copy_type_recursive.
9595         (create_global_typedef_table): Remove.
9596         (typedef_hash_table::find_global_typedef): Now a member of
9597         typedef_hash_table.
9598         (typedef_hash_table::find_typedef): Rename from
9599         find_typedef_in_hash; now a member.
9600         (whatis_exp): Update.
9601         * extension.h (struct ext_lang_type_printers): Add constructor and
9602         destructor.
9603         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9604         declare.
9605         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9606         Now a constructor; rename from start_ext_lang_type_printers.
9607         (ext_lang_type_printers): Now a destructor; rename from
9608         free_ext_lang_type_printers.
9609         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9610         Update.
9611         (c_type_print_base_struct_union): Update.  Remove cleanups.
9612
9613 2018-03-27  Tom Tromey  <tom@tromey.com>
9614
9615         * dwarf-index-write.c: Include <cmath>.
9616
9617 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9618
9619         * NEWS: Add entry describing new "set|show varsize-limit" command.
9620         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9621         command.
9622         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9623         "set variable".
9624
9625 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9626
9627         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9628         dwarf-index-write.c
9629         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9630         * dwarf-index-common.c: New file.
9631         * dwarf-index-common.h: New file.
9632         * dwarf-index-write.c: New file.
9633         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9634         (struct dwarf2_section_info): Move from here.
9635         (dwarf2_section_info_def): Likewise.
9636         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9637         (offset_type): Likewise.
9638         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9639         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9640         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9641         (byte_swap): Likewise.
9642         (MAYBE_SWAP): Likewise.
9643         (dwarf2_per_cu_ptr): Likewise.
9644         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9645         (struct tu_stats): Likewise.
9646         (struct dwarf2_per_objfile): Likewise.
9647         (struct dwarf2_per_cu_data): Likewise.
9648         (struct signatured_type): Likewise.
9649         (sig_type_ptr): Likewise.
9650         (DEF_VEC_P (sig_type_ptr)): Likewise.
9651         (INDEX4_SUFFIX): Likewise.
9652         (INDEX5_SUFFIX): Likewise.
9653         (DEBUG_STR_SUFFIX): Likewise.
9654         (dwarf2_read_section): Make non-static.
9655         (mapped_index_string_hash): Move from here.
9656         (dwarf5_djb_hash): Likewise.
9657         (file_write): Likewise.
9658         (class data_buf): Likewise.
9659         (struct symtab_index_entry): Likewise.
9660         (struct mapped_symtab): Likewise.
9661         (find_slot): Likewise.
9662         (hash_expand): Likewise.
9663         (add_index_entry): Likewise.
9664         (uniquify_cu_indices): Likewise.
9665         (class c_str_view): Likewise.
9666         (class c_str_view_hasher): Likewise.
9667         (class vector_hasher): Likewise.
9668         (write_hash_table): Likewise.
9669         (psym_index_map): Likewise.
9670         (struct addrmap_index_data): Likewise.
9671         (add_address_entry): Likewise.
9672         (add_address_entry_worker): Likewise.
9673         (write_address_map): Likewise.
9674         (symbol_kind): Likewise.
9675         (write_psymbols): Likewise.
9676         (struct signatured_type_index_data): Likewise.
9677         (write_one_signatured_type): Likewise.
9678         (recursively_count_psymbols): Likewise.
9679         (recursively_write_psymbols): Likewise.
9680         (class debug_names): Likewise.
9681         (check_dwarf64_offsets): Likewise.
9682         (psyms_seen_size): Likewise.
9683         (write_gdbindex): Likewise.
9684         (write_debug_names): Likewise.
9685         (assert_file_size): Likewise.
9686         (write_psymtabs_to_index): Likewise.
9687         (save_gdb_index_command): Likewise.
9688         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9689         command.
9690         * dwarf2read.h: New file.
9691
9692 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9693
9694         PR gdb/22670
9695         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9696         symbol name if the CU's language stores symbol names in linkage
9697         format.
9698         * language.h (struct language_defn)
9699         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9700         all instances of this struct.
9701
9702 2018-03-26  Tom Tromey  <tom@tromey.com>
9703
9704         * stack.c (backtrace_command_1): Remove verbose code.
9705
9706 2018-03-26  Tom Tromey  <tom@tromey.com>
9707
9708         * python/py-framefilter.c (py_print_type): Don't catch
9709         exceptions.  Return void.
9710         (py_print_value): Likewise.
9711         (py_print_single_arg): Likewise.
9712         (enumerate_args): Don't catch exceptions.
9713         (py_print_args): Likewise.
9714         (py_print_frame): Likewise.
9715         (gdbpy_apply_frame_filter): Catch exceptions here.
9716
9717 2018-03-26  Tom Tromey  <tom@tromey.com>
9718
9719         * stack.c (_initialize_stack): Remove trailing newlines from help
9720         text.  Add "Usage" line to "backtrace" help.
9721
9722 2018-03-26  Tom Tromey  <tom@tromey.com>
9723
9724         PR python/16486:
9725         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9726
9727 2018-03-26  Tom Tromey  <tom@tromey.com>
9728
9729         * python/py-framefilter.c (py_print_single_arg): Return
9730         EXT_LANG_BT_ERROR from catch.
9731
9732 2018-03-26  Tom Tromey  <tom@tromey.com>
9733
9734         PR backtrace/15584:
9735         * stack.c (backtrace_command_1): Move some code into no-filters
9736         "if".
9737
9738 2018-03-26  Tom Tromey  <tom@tromey.com>
9739
9740         * python/py-framefilter.c (throw_quit_or_print_exception): New
9741         function.
9742         (gdbpy_apply_frame_filter): Use it.
9743
9744 2018-03-26  Tom Tromey  <tom@tromey.com>
9745
9746         PR cli/17716:
9747         * python/py-framefilter.c (py_print_type, py_print_value)
9748         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9749         RETURN_MASK_ERROR.
9750
9751 2018-03-26  Tom Tromey  <tom@tromey.com>
9752
9753         * python/py-framefilter.c (enumerate_args): Use
9754         gdb::unique_xmalloc_ptr.
9755
9756 2018-03-26  Tom Tromey  <tom@tromey.com>
9757
9758         * python/py-framefilter.c (py_print_frame): Return
9759         EXT_LANG_BT_OK.
9760         (gdbpy_apply_frame_filter): Update comment.
9761         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9762         Remove.
9763         <EXT_LANG_BT_NO_FILTERS>: Change value.
9764
9765 2018-03-26  Tom Tromey  <tom@tromey.com>
9766
9767         PR backtrace/15582:
9768         * stack.c (backtrace_command): Parse "hide" argument.
9769         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9770         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9771         constant.
9772
9773 2018-03-26  Tom Tromey  <tom@tromey.com>
9774
9775         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9776         add "flags".
9777         (backtrace_command): Remove "fulltrace", add "flags".
9778
9779 2018-03-26  Tom Tromey  <tom@tromey.com>
9780
9781         * stack.c (backtrace_command): Rewrite command line parsing.
9782
9783 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9784
9785         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9786
9787 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9788
9789         * filename-seen-cache.h: Add include guard.
9790
9791 2018-03-26  Keith Seitz  <keiths@redhat.com>
9792
9793         * symfile.c (place_section): Remove "struct" from section_addr_info
9794         in comment.
9795         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9796         "struct" keyword from section_addr_info.
9797
9798 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9799
9800         * regformats/regdef.h (reg): Add constructors.
9801
9802 2018-03-25  Pedro Alves  <palves@redhat.com>
9803
9804         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9805         if then/else bodies in var_func_name extraction.
9806
9807 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9808
9809         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9810         lookup_minimal_symbol() to find symbol entry.
9811         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9812
9813 2018-03-23  Keith Seitz  <keiths@redhat.com>
9814
9815         PR c++/22968
9816         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9817         nested type definitions for C++, too.
9818
9819 2018-03-23  Tom Tromey  <tom@tromey.com>
9820
9821         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9822         a typedef.
9823         (macho_register_oso): Remove.
9824         (macho_symtab_read): Take a std::vector.
9825         (oso_el_compare_name): Now a std::sort comparator.
9826         (macho_symfile_read_all_oso): Take a std::vector.
9827         (macho_symfile_read): Use std::vector.  Remove cleanups.
9828
9829 2018-03-22  Tom Tromey  <tom@tromey.com>
9830
9831         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9832         (record_full_goto_bookmark): Use std::string.
9833
9834 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9835
9836         PR tdep/18295
9837         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9838         a single mask.
9839
9840 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9841
9842         * rs6000-tdep.c (store_insn_p): New function.
9843         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9844         and cr_reg to their unshifted values. Use store_insn_p to
9845         match LR saves using either R1 or fdata->alloca_reg. Use
9846         store_insn_p to match CR saves. Set alloca_reg_offset
9847         when alloca_reg and framep are set. Remove lr_reg shift
9848         when assigning to fdata->lr_register.
9849
9850 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9851
9852         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9853         command line args instead of emitting a warning.
9854
9855 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9856
9857         * tracepoint.h (struct static_tracepoint_marker): Initialize
9858         fields, define default constructor, move constructor and move
9859         assignment, disable the rest.
9860         <str_id, extra>: Make std::string.
9861         (release_static_tracepoint_marker): Remove.
9862         (free_current_marker): Remove.
9863         * tracepoint.c (free_current_marker): Remove.
9864         (parse_static_tracepoint_marker_definition): Adjust to
9865         std::string, use new hex2str overload.
9866         (release_static_tracepoint_marker): Remove.
9867         (print_one_static_tracepoint_marker): Get marker by reference
9868         and adjust to std::string.
9869         (info_static_tracepoint_markers_command): Adjust to std::vector
9870         changes
9871         * target.h (static_tracepoint_marker_p): Remove typedef.
9872         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9873         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9874         bool.
9875         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9876         * target-debug.h
9877         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9878         (target_debug_print_std_vector_static_tracepoint_marker): New.
9879         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9880         to...
9881         (target_debug_print_static_tracepoint_marker_p): ... this.
9882         * target-delegates.c: Re-generate.
9883         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9884         Make std::string.
9885         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9886         (decode_static_tracepoint_spec): Adjust to std::vector.
9887         (tracepoint_print_one_detail): Adjust to std::string.
9888         (strace_marker_decode_location): Adjust to std::string.
9889         (update_static_tracepoint): Adjust to std::string, remove call
9890         to release_static_tracepoint_marker.
9891         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9892         Adjust to std::vector.
9893         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9894         (remote_static_tracepoint_markers_by_strid): Adjust to
9895         std::vector.
9896         * common/rsp-low.h (hex2str): New overload with explicit count
9897         of bytes.
9898         * common/rsp-low.c (hex2str): New overload with explicit count
9899         of bytes.
9900         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9901         (_initialize_rsp_low_selftests): Add test_hex2str test.
9902         * unittests/tracepoint-selftests.c
9903         (test_parse_static_tracepoint_marker_definition): Adjust to
9904         std::string.
9905
9906 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9907
9908         * tracepoint.c (parse_static_tracepoint_marker_definition):
9909         Consider case where the definition is followed by more
9910         definitions.
9911         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9912         tracepoint-selftests.c.
9913         * unittests/tracepoint-selftests.c: New.
9914
9915 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9916
9917         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9918         Carvalho.
9919
9920 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9921
9922         * symtab.c (find_pc_sect_line): fixed indentation.
9923
9924 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9925
9926         * symtab.c (find_pc_sect_line): now uses binary search.
9927
9928 2018-03-19  Tom Tromey  <tom@tromey.com>
9929
9930         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9931         "IDENT" production.
9932
9933 2018-03-19  Pedro Alves  <palves@redhat.com>
9934             Tom Tromey  <tom@tromey.com>
9935
9936         * unittests/observable-selftests.c: New file.
9937         * common/observable.h: New file.
9938         * observable.h: New file.
9939         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9940         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9941         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9942         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9943         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9944         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9945         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9946         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9947         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9948         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9949         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9950         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9951         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9952         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9953         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9954         tui/tui-interp.c, valops.c: Update all users.
9955         * tui/tui-hooks.c (tui_bp_created_observer)
9956         (tui_bp_deleted_observer, tui_bp_modified_observer)
9957         (tui_inferior_exit_observer, tui_before_prompt_observer)
9958         (tui_normal_stop_observer, tui_register_changed_observer):
9959         Remove.
9960         (tui_observers_token): New global.
9961         (attach_or_detach, tui_attach_detach_observers): New functions.
9962         (tui_install_hooks, tui_remove_hooks): Use
9963         tui_attach_detach_observers.
9964         * record-btrace.c (record_btrace_thread_observer): Remove.
9965         (record_btrace_thread_observer_token): New global.
9966         * observer.sh: Remove.
9967         * observer.c: Rename to observable.c.
9968         * observable.c (namespace gdb_observers): Define new objects.
9969         (observer_debug): Move into gdb_observers namespace.
9970         (struct observer, struct observer_list, xalloc_observer_list_node)
9971         (xfree_observer_list_node, generic_observer_attach)
9972         (generic_observer_detach, generic_observer_notify): Remove.
9973         (_initialize_observer): Update.
9974         Don't include observer.inc.
9975         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9976         (clean mostlyclean): Likewise.
9977         (observer.h, observer.inc): Remove targets.
9978         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9979         (COMMON_SFILES): Use observable.c, not observer.c.
9980         * .gitignore: Remove observer.h.
9981
9982 2018-03-18  Tom Tromey  <tom@tromey.com>
9983
9984         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9985         gdb::def_vector.
9986         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9987
9988 2018-03-17  Tom Tromey  <tom@tromey.com>
9989
9990         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9991
9992 2018-03-17  Tom Tromey  <tom@tromey.com>
9993
9994         * target.c (class scoped_target_fd): New.
9995         (target_fileio_close_cleanup): Remove.
9996         (target_fileio_read_alloc_1): Use scoped_target_fd.
9997
9998 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9999
10000         * silent-rules.mk: New.
10001         * Makefile.in: Include silent-rules.mk
10002         (srcdir, VPATH, top_srcdir): Move up.
10003         (COMPILE): Add ECHO_CXX.
10004         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10005         (init.c): Add ECHO_INIT_C.
10006         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10007         (version.c): Add ECHO_GEN.
10008         (printcmd.o): Add ECHO_CXX.
10009         (target-float.o): Add ECHO_CXX.
10010         (ada-exp.o): Add ECHO_CXX.
10011         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10012         (insight$(EXEEXT)): Add ECHO_CXXLD.
10013         * gnulib/configure.ac: Add AM_SILENT_RULES.
10014         * gnulib/aclocal.m4: Re-generate.
10015         * gnulib/configure: Re-generate.
10016         * gnulib/import/Makefile.in: Re-generate.
10017
10018 2018-03-16  Tom Tromey  <tom@tromey.com>
10019
10020         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10021         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10022         * utils.c (do_free_section_addr_info)
10023         (make_cleanup_free_section_addr_info): Remove.
10024         * symfile.h (struct other_sections): Add constructor.
10025         (struct section_addr_info): Remove.
10026         (section_addr_info): New typedef.
10027         (struct sym_fns) <sym_offsets>: Change type of parameter.
10028         (build_section_addr_info_from_objfile)
10029         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10030         (default_symfile_offsets, symbol_file_add)
10031         (symbol_file_add_from_bfd)
10032         (build_section_addr_info_from_section_table): Update.
10033         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10034         * symfile.c (alloc_section_addr_info): Remove.
10035         (build_section_addr_info_from_section_table): Change return type.
10036         Update.
10037         (build_section_addr_info_from_bfd)
10038         (build_section_addr_info_from_objfile): Likewise.
10039         (free_section_addr_info): Remove.
10040         (relative_addr_info_to_section_offsets): Change type of "addrs".
10041         (addrs_section_compar): Now a std::sort comparator.
10042         (addrs_section_sort): Change return type.
10043         (addr_info_make_relative): Change type of "addrs".  Update.
10044         (default_symfile_offsets, syms_from_objfile_1)
10045         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10046         (symbol_file_add_separate): Update.
10047         (symbol_file_add): Change type of "addrs".  Update.
10048         (add_symbol_file_command): Update.  Remove cleanups.
10049         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10050         cleanups.
10051         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10052         * solib.c (solib_read_symbols): Update.
10053         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10054         * machoread.c (macho_symfile_offsets): Update.
10055         * jit.c (jit_bfd_try_read_symtab): Update.
10056
10057 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10058
10059         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10060         unittests/utils-selftests.c.
10061         * unittests/utils-selftests.c: New file.
10062
10063 2018-03-14  Tom Tromey  <tom@tromey.com>
10064
10065         PR cli/14977:
10066         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10067         for NULL.
10068
10069 2018-03-14  Tom Tromey  <tom@tromey.com>
10070
10071         PR cli/19918:
10072         * printcmd.c (printf_pointer): Allow "-" in format.
10073
10074 2018-03-14  Tom Tromey  <tom@tromey.com>
10075
10076         * printcmd.c (_initialize_printcmd): Add usage to printf.
10077
10078 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10079
10080         * MAINTAINERS: Update my email address.
10081
10082 2018-03-13  Tom Tromey  <tom@tromey.com>
10083
10084         * machoread.c (macho_check_dsym): Change filenamep to a
10085         std::string*.
10086         (macho_symfile_read): Update.
10087         * symfile.c (load_command): Use std::string.
10088
10089 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10090
10091         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10092         to error message string.
10093         (riscv_register_name): Use xsnprintf instead of sprintf.
10094         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10095         internal_error.
10096         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10097         error.
10098         (riscv_push_dummy_call): Likewise.
10099
10100 2018-03-12  Tom Tromey  <tom@tromey.com>
10101
10102         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10103         Use gdb::byte_vector.
10104         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10105
10106 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10107
10108         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10109         parameter type to readable_regcache.
10110         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10111         the declaration.
10112
10113 2018-03-11  Tom Tromey  <tom@tromey.com>
10114
10115         * dwarf2read.c (struct nextfield): Add initializers.
10116         (struct nextfnfield): Remove.
10117         (struct fnfieldlist): Add initializers.  Remove "length" and
10118         "head", use std::vector.
10119         (struct decl_field_list): Remove.
10120         (struct field_info): Add initializers.
10121         <fields, baseclasses>: Now std::vector.
10122         <nbaseclasses, nfnfields, typedef_field_list_count,
10123         nested_types_list_count>: Remove.
10124         (dwarf2_add_field, dwarf2_add_type_defn)
10125         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10126         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10127         (process_structure_scope): Update.
10128
10129 2018-03-11  Tom Tromey  <tom@tromey.com>
10130
10131         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10132         for use by std::sort.
10133         (build_type_psymtabs_1): Use std::vector.
10134
10135 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10136
10137         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10138         and LIBMPFR in the printed configuration.
10139
10140 2018-03-08  Tom Tromey  <tom@tromey.com>
10141
10142         * source.c (get_filename_and_charpos): Use scoped_fd.
10143         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10144         (procfs_pidlist): Likewise.
10145         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10146         (iterate_over_mappings): Likewise.
10147
10148 2018-03-08  Tom Tromey  <tom@tromey.com>
10149
10150         * infcall.c (struct call_return_meta_info)
10151         <stack_temporaries_enabled>: Remove.
10152         (get_call_return_value, call_function_by_hand_dummy): Update.
10153         * thread.c (disable_thread_stack_temporaries): Remove.
10154         (enable_thread_stack_temporaries): Remove.
10155         (thread_stack_temporaries_enabled_p): Return bool.
10156         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10157         (get_last_thread_stack_temporary): Update.
10158         * eval.c (evaluate_subexp): Update.
10159         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10160         class, not a function.
10161         (value_ptr, value_vec): Remove typedefs.
10162         (class thread_info) <stack_temporaries_enabled>: Now bool.
10163         <stack_temporaries>: Now a std::vector.
10164         (thread_stack_temporaries_enabled_p)
10165         (value_in_thread_stack_temporaries): Return bool.
10166
10167 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10168
10169         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10170         (getpkt_or_notif_sane_1): Likewise.
10171
10172 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10173
10174         * build-id.c (build_id_to_debug_bfd): Use std::string.
10175
10176 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10177
10178         * build-id.c (find_separate_debug_file_by_buildid): Return
10179         std::string.
10180         * build-id.h (find_separate_debug_file_by_buildid): Return
10181         std::string.
10182         * coffread.c (coff_symfile_read): Adjust to std::string.
10183         * elfread.c (elf_symfile_read): Adjust to std::string.
10184         * symfile.c (separate_debug_file_exists): Change parameter to
10185         std::string.
10186         (find_separate_debug_file): Return std::string.
10187         (find_separate_debug_file_by_debuglink): Return std::string.
10188         * symfile.h (find_separate_debug_file_by_debuglink): Return
10189         std::string.
10190
10191 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10192
10193         * common/xml-utils.c (xml_escape_text): Move code to...
10194         (xml_escape_text_append): ... this new function.
10195         * common/xml-utils.h (xml_escape_text_append): New declaration.
10196         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10197         New function.
10198         (_initialize_xml_utils): register test_xml_escape_text_append as
10199         a selftest.
10200
10201 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10202
10203         * defs.h: Remove MAX_REGISTER_SIZE.
10204         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10205         asserts.
10206         * python/py-unwind.c (pyuw_sniffer): Likewise.
10207
10208 2018-03-07  Tom Tromey  <tom@tromey.com>
10209
10210         * linux-tdep.c (linux_info_proc): Update.
10211         * target.h (struct target_ops) <to_fileio_readlink>: Return
10212         optional<string>.
10213         (target_fileio_readlink): Return optional<string>.
10214         * remote.c (remote_hostio_readlink): Return optional<string>.
10215         * inf-child.c (inf_child_fileio_readlink): Return
10216         optional<string>.
10217         * target.c (target_fileio_readlink): Return optional<string>.
10218
10219 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10220
10221         * regcache.c (cooked_read_test): Add riscv to the list of
10222         architectures that have a save_reggroup.
10223
10224 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10225
10226         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10227         value is not a dynamic class object.
10228
10229 2018-03-06  Tom Tromey  <tom@tromey.com>
10230
10231         * rust-exp.y: Formatting fixes.
10232
10233 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10234
10235         * riscv-tdep.c (riscv_register_name): Remove target description
10236         support.
10237         (riscv_gdbarch_init): Remove target description check.
10238
10239 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10240
10241         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10242         comment.
10243         * riscv-tdep.h: Likewise.
10244
10245 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10246
10247         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10248         (riscv_pseudo_register_write): Delete.
10249         (riscv_gdbarch_init): Remove all use of pseudo registers.
10250
10251 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10252
10253         * record-btrace.c (btrace_print_lines): Replace cleanup
10254         parameter with RAII equivalents.
10255         (btrace_insn_history): Replace cleanup with RAII equivalents.
10256         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10257         make_cleanup_ui_out_tuple_begin_end): Remove.
10258         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10259         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10260         make_cleanup_ui_out_list_begin_end): Remove.
10261
10262 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10263
10264         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10265         parameter types to std::vector.  Use bool.
10266         (record_btrace_wait): Replace VEC(tp_t) with
10267         std::vector<thread_info *>.
10268         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10269
10270 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10271
10272         * record-btrace.c (record_btrace_disable_callback): Remove.
10273         (struct scoped_btrace_disable): New.
10274         (record_btrace_open): Use scoped_btrace_disable.
10275
10276 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10277
10278         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10279         reading values from registers.
10280
10281 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10282
10283         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10284         where appropriate.
10285
10286 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10287
10288         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10289         change parameter type.  Use GDB's print functions, and use
10290         core_addr_to_string where appropriate.
10291         (riscv_push_dummy_call): Use core_addr_to_string where
10292         appropriate, update call to riscv_print_arg_location, and reindent
10293         a few lines.
10294         (riscv_return_value): Update call to riscv_print_arg_location.
10295
10296 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10297             Tim Newsome <tim@sifive.com>
10298             Albert Ou <a0u@eecs.berkeley.edu>
10299             Darius Rad <darius@bluespec.com>
10300
10301         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10302         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10303         (ALLDEPFILES): Add riscv-tdep.c
10304         * configure.tgt: Add riscv support.
10305         * riscv-tdep.c: New file.
10306         * riscv-tdep.h: New file.
10307         * NEWS: Mention new target.
10308         * MAINTAINERS: Add entry for riscv.
10309
10310 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10311
10312         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10313         fields within aggregates.
10314
10315 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10316
10317         * record-btrace.c (btrace_print_lines): Change type of flags to
10318         gdb_disassembly_flags.
10319
10320 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10321
10322         * fbsd-nat.c: Include "inf-ptrace.h".
10323         (USE_SIGTRAP_SIGINFO): Conditionally define.
10324         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10325         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10326         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10327         function.
10328         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10329         Likewise.
10330         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10331         Likewise.
10332         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10333         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10334         "supports_stopped_by_hw_breakpoint" target methods.
10335
10336 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10337
10338         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10339         * fbsd-nat.c (debug_fbsd_nat): New variable.
10340         (show_fbsd_nat_debug): New function.
10341         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10342         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10343
10344 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10345
10346         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10347         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10348         prototype.
10349         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10350         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10351         method.
10352
10353 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10354
10355         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10356         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10357
10358 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10359
10360         * charset.c (struct charset_vector): New.
10361         (charsets): Change type to charset_vector.
10362         (find_charset_names): Adjust.
10363         (add_one): Adjust.
10364         (_initialize_charset): Adjust.
10365
10366 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10367
10368         * progspace.h (struct program_space) <deleted_solibs>: Change
10369         type to std::vector<std::string>.
10370         * progspace.c (clear_program_space_solib_cache): Adjust.
10371         * breakpoint.c (print_solib_event): Adjust.
10372         (check_status_catch_solib): Adjust.
10373         * solib.c (update_solib_list): Adjust.
10374         * ui-out.h (class ui_out) <field_string>: New overload.
10375         * ui-out.c (ui_out::field_string): New overload.
10376
10377 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10378
10379         * progspace.h (struct program_space): Add constructor and
10380         destructor, initialize fields.
10381         (add_program_space): Remove.
10382         * progspace.c (add_program_space): Rename to...
10383         (program_space::program_space): ... this.
10384         (release_program_space): Rename to...
10385         (program_space::~program_space): ... this.
10386         (delete_program_space): Use delete to delete program_space.
10387         (initialize_progspace): Use new to allocate program_space.
10388         * inferior.c (add_inferior_with_spaces): Likewise.
10389         (clone_inferior_command): Likewise.
10390         * infrun.c (follow_fork_inferior): Likewise.
10391         (handle_vfork_child_exec_or_exit): Likewise.
10392
10393 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10394
10395         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10396         (delim_string_to_char_ptr_vec): Return std::vector of
10397         gdb::unique_xmalloc_ptr.
10398         (dirnames_to_char_ptr_vec_append): Take std::vector of
10399         gdb::unique_xmalloc_ptr.
10400         (dirnames_to_char_ptr_vec): Return std::vector of
10401         gdb::unique_xmalloc_ptr.
10402         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10403         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10404         (delim_string_to_char_ptr_vec): Return an std::vector of
10405         gdb::unique_xmalloc_ptr, adjust the code.
10406         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10407         gdb::unique_xmalloc_ptr, adjust the code.
10408         (dirnames_to_char_ptr_vec): Return an std::vector of
10409         gdb::unique_xmalloc_ptr, adjust the code.
10410         * auto-load.c (auto_load_safe_path_vec): Change type to
10411         std::vector of gdb::unique_xmalloc_ptr.
10412         (auto_load_expand_dir_vars): Return an std::vector of
10413         gdb::unique_xmalloc_ptr, adjust the code.
10414         (auto_load_safe_path_vec_update): Adjust.
10415         (filename_is_in_auto_load_safe_path_vec): Adjust.
10416         (auto_load_objfile_script_1): Adjust.
10417         * build-id.c (build_id_to_debug_bfd): Adjust.
10418         * linux-thread-db.c (thread_db_load_search): Adjust.
10419         * source.c (add_path): Adjust.
10420         (openp): Adjust.
10421         * symfile.c (find_separate_debug_file): Adjust.
10422         * utils.c (do_free_char_ptr_vec): Remove.
10423         (make_cleanup_free_char_ptr_vec): Remove.
10424
10425 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10426
10427         PR gdb/22907
10428         * common/pathstuff.c: Conditionally include "<windows.h>".
10429
10430 2018-03-01  Georg Sauthoff  <mail@georg.so>
10431
10432         PR gdb/22888
10433         * gcore.in: Quote variables and switch interpreter to bash.
10434
10435 2018-03-01  Tom Tromey  <tom@tromey.com>
10436
10437         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10438         assertion.  Add assertion for discriminant_index.
10439         (quirk_rust_enum): Use correct base type name in univariant case.
10440
10441 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10442
10443         * record.c (get_call_history_modifiers): Return a
10444         record_print_flags.
10445         (cmd_record_call_history): Adjust.
10446         * record-btrace.c (record_btrace_call_history): Adjust.
10447         (record_btrace_call_history_range): Adjust.
10448         (record_btrace_call_history_from): Adjust.
10449         * target-debug.h (target_debug_print_record_print_flags): New.
10450         * target-delegates.c: Re-generate.
10451         * target.c (target_call_history): Change flags type.
10452         (target_call_history_from): Likewise.
10453         (target_call_history_range): Likewise.
10454         * target.h (struct target_ops) <target_call_history>: Likewise.
10455         (target_call_history_from): Likewise.
10456         (target_call_history_range): Likewise.
10457
10458 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10459             Simon Marchi  <simon.marchi@polymtl.ca>
10460
10461         * common/common-utils.c: Include "sys/stat.h".
10462         (is_regular_file): Move here from "source.c"; change return
10463         type to "bool".
10464         * common/common-utils.h (is_regular_file): New prototype.
10465         * common/pathstuff.c (contains_dir_separator): New function.
10466         * common/pathstuff.h (contains_dir_separator): New prototype.
10467         * source.c: Don't include "sys/stat.h".
10468         (is_regular_file): Move to "common/common-utils.c".
10469
10470 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10471
10472         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10473         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10474         * auto-load.c: Include "common/pathstuff.h".
10475         * common/common-def.h (current_directory): Move here.
10476         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10477         function.
10478         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10479         prototype.
10480         * common/pathstuff.c: New file.
10481         * common/pathstuff.h: New file.
10482         * compile/compile.c: Include "common/pathstuff.h".
10483         * defs.h (current_directory): Move to "common/common-defs.h".
10484         * dwarf2read.c: Include "common/pathstuff.h".
10485         * exec.c: Likewise.
10486         * guile/scm-safe-call.c: Likewise.
10487         * linux-thread-db.c: Likewise.
10488         * main.c: Likewise.
10489         * nto-tdep.c: Likewise.
10490         * objfiles.c: Likewise.
10491         * source.c: Likewise.
10492         * symtab.c: Likewise.
10493         * utils.c: Include "common/pathstuff.h".
10494         (gdb_realpath): Move to "common/pathstuff.c".
10495         (gdb_realpath_keepfile): Likewise.
10496         (gdb_abspath): Likewise.
10497         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10498         (gdb_realpath_keepfile): Likewise.
10499         (gdb_abspath): Likewise.
10500
10501 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10502
10503         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10504         wildcard process pid for super_resume for kernels with a
10505         specific bug.
10506
10507 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10508
10509         * compile/compile.c (get_args): Add additional comments
10510         explaining function.
10511
10512 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10513             Tom Tromey  <tom@tromey.com>
10514
10515         * target.h (memory_write_request_s): Remove typedef.  Don't define
10516         VEC.
10517         (target_write_memory_blocks): Change argument to std::vector.
10518         (struct memory_write_request): Add constructor.
10519         * target-memory.c (compare_block_starting_address): Return bool.
10520         Change argument types.
10521         (claim_memory): Change arguments to use std::vector.
10522         (split_regular_and_flash_blocks, blocks_to_erase)
10523         (compute_garbled_blocks): Likewise.
10524         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10525         (target_write_memory_blocks): Change argument to std::vector.
10526         * symfile.c (struct load_section_data): Add constructor and
10527         destructor.  Use std::vector for "requests".
10528         (struct load_progress_data): Add initializers.
10529         (load_section_callback): Update.  Use "new".
10530         (clear_memory_write_data): Remove.
10531         (generic_load): Update.
10532
10533 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10534
10535         * arch/aarch64.h: Use common/tdesc.h.
10536
10537 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10538
10539         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10540         architecture with a 64-bit ABI.
10541
10542 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10543
10544         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10545         ahead of target description loading.
10546
10547 2018-02-26  Tom Tromey  <tom@tromey.com>
10548
10549         * stack.c (backtrace_command_1): Update.
10550         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10551         of "flags".
10552         * python/py-framefilter.c (py_print_frame)
10553         (gdbpy_apply_frame_filter): Change type of "flags".
10554         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10555         of "flags".
10556         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10557         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10558         * extension.h (enum frame_filter_flag): Rename from
10559         frame_filter_flags.
10560         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10561         (apply_ext_lang_frame_filter): Change type of "flags".
10562         * extension.c (apply_ext_lang_frame_filter): Change type of
10563         "flags".
10564         * extension-priv.h (struct extension_language_ops)
10565         <apply_frame_filter>: Change type of "flags".
10566
10567 2018-02-26  Tom Tromey  <tom@tromey.com>
10568
10569         PR python/16497:
10570         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10571         off-by-one in py_end computation.
10572         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10573         PRINT_MORE_FRAMES.
10574         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10575         constant.
10576
10577 2018-02-26  Tom Tromey  <tom@tromey.com>
10578
10579         * dwarf2read.c (struct variant_field): New.
10580         (struct nextfield) <variant>: New field.
10581         (dwarf2_add_field): Handle DW_TAG_variant_part.
10582         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10583         discriminated union.
10584         (read_structure_type): Handle DW_TAG_variant_part.
10585         (handle_struct_member_die): New function, extracted from
10586         process_structure_scope.  Handle DW_TAG_variant.
10587         (process_structure_scope): Handle discriminated unions.  Call
10588         handle_struct_member_die.
10589
10590 2018-02-26  Tom Tromey  <tom@tromey.com>
10591
10592         * rust-lang.h (rust_last_path_segment): Declare.
10593         * rust-lang.c (rust_last_path_segment): Now public.  Change
10594         contract.
10595         (struct disr_info): Remove.
10596         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10597         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10598         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10599         (rust_enum_p, rust_enum_variant): New function.
10600         (rust_underscore_fields): Remove "offset" parameter.
10601         (rust_print_enum): New function.
10602         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10603         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10604         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10605         enums.
10606         (rust_internal_print_type): New function, from rust_print_type.
10607         Remove enum code.
10608         (rust_print_type): Call rust_internal_print_type.
10609         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10610         Update enum handling.
10611         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10612         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10613         (rust_union_quirks): New functions.
10614         (process_full_comp_unit, process_full_type_unit): Call
10615         rust_union_quirks.
10616         (process_structure_scope): Update rust_unions if necessary.
10617
10618 2018-02-26  Tom Tromey  <tom@tromey.com>
10619
10620         * value.h (value_union_variant): Declare.
10621         * valops.c (value_union_variant): New function.
10622         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10623         (struct discriminant_info): New.
10624         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10625         enumerator.
10626         (struct main_type) <flag_discriminated_union>: New field.
10627
10628 2018-02-26  Tom Tromey  <tom@tromey.com>
10629
10630         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10631         unittests/unpack-selftests.c.
10632         * unittests/unpack-selftests.c: New file.
10633         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10634
10635 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10636
10637         * dwarf2read.c (struct partial_die_info) <read>: New method.
10638         (read_partial_die): Remove the declaration.
10639         (load_partial_dies): Update.
10640         (partial_die_info::partial_die_info):
10641         (read_partial_die): Change it to partial_die_info::read.
10642
10643 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10644
10645         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10646         (fixup_partial_die): Remove declaration.
10647         (scan_partial_symbols): Update.
10648         (partial_die_parent_scope): Likewise.
10649         (partial_die_full_name): Likewise.
10650         (fixup_partial_die): Change it to partial_die_info::fixup.
10651
10652 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10653
10654         * dwarf2read.c (read_partial_die): Update the declaration.
10655         (load_partial_dies): Caller update.
10656         (read_partial_die): Remove one argument abbrev_len.
10657
10658 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10659
10660         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10661         assignment operator.
10662         (load_partial_dies): Use ctor and copy ctor.
10663         (read_partial_die): Update.
10664         (dwarf2_cu::find_partial_die): Use ctor.
10665
10666 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10667
10668         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10669         (find_partial_die_in_comp_unit): Change it to
10670         dwarf2_cu::find_partial_die.
10671         (find_partial_die): Update.
10672
10673 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10674
10675         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10676         is NULL.
10677
10678 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10679
10680         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10681
10682 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10683
10684         * arch/amd64.h: Use common/tdesc.h.
10685         * arch/i386.c: Likewise.
10686         * arch/i386.h: Likewise.
10687         * arch/tic6x.c: Likewise.
10688         * arch/tdesc.h: Move file from here...
10689         * common/tdesc.h: ...to here.
10690         * features/aarch64-core.c: Regenerate.
10691         * features/aarch64-fpu.c: Regenerate.
10692         * features/i386/32bit-avx.c: Regenerate.
10693         * features/i386/32bit-avx512.c: Regenerate.
10694         * features/i386/32bit-core.c: Regenerate.
10695         * features/i386/32bit-linux.c: Regenerate.
10696         * features/i386/32bit-mpx.c: Regenerate.
10697         * features/i386/32bit-pkeys.c: Regenerate.
10698         * features/i386/32bit-sse.c: Regenerate.
10699         * features/i386/64bit-avx.c: Regenerate.
10700         * features/i386/64bit-avx512.c: Regenerate.
10701         * features/i386/64bit-core.c: Regenerate.
10702         * features/i386/64bit-linux.c: Regenerate.
10703         * features/i386/64bit-mpx.c: Regenerate.
10704         * features/i386/64bit-pkeys.c: Regenerate.
10705         * features/i386/64bit-segments.c: Regenerate.
10706         * features/i386/64bit-sse.c: Regenerate.
10707         * features/i386/x32-core.c: Regenerate.
10708         * features/tic6x-c6xp.c: Regenerate.
10709         * features/tic6x-core.c: Regenerate.
10710         * features/tic6x-gp.c: Regenerate.
10711         * target-descriptions.c: Use common/tdesc.h.
10712         * target-descriptions.h: Likewise.
10713
10714 2018-02-24  Tom Tromey  <tom@tromey.com>
10715
10716         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10717         (try_thread_db_load_from_dir, thread_db_load_search): Use
10718         std::string.
10719         (info_auto_load_libthread_db_compare): Return bool.  Change
10720         argument types.
10721         (info_auto_load_libthread_db): Use std::vector, std::string.
10722         Remove cleanups.
10723
10724 2018-02-24  Tom Tromey  <tom@tromey.com>
10725
10726         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10727         std::string.
10728         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10729         std::string*.
10730         * gdbarch.c: Rebuild.
10731         * gdbarch.h: Rebuild.
10732         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10733         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10734         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10735         std::string*.
10736
10737 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10738
10739         * gdbtypes.h (sect_offset): Change type to uint64_t.
10740         (sect_offset_str): New function.
10741         * dwarf2read.c (create_addrmap_from_aranges): Use
10742         sect_offset_str.
10743         (error_check_comp_unit_head): Likewise.
10744         (create_debug_type_hash_table): Likewise.
10745         (read_cutu_die_from_dwo): Likewise.
10746         (init_cutu_and_read_dies): Likewise.
10747         (init_cutu_and_read_dies_no_follow): Likewise.
10748         (process_psymtab_comp_unit_reader): Likewise.
10749         (partial_die_parent_scope): Likewise.
10750         (peek_die_abbrev): Likewise.
10751         (process_queue): Likewise.
10752         (dwarf2_physname): Likewise.
10753         (read_namespace_alias): Likewise.
10754         (read_import_statement): Likewise.
10755         (create_dwo_cu_reader): Likewise.
10756         (create_cus_hash_table): Likewise.
10757         (lookup_dwo_cutu): Likewise.
10758         (inherit_abstract_dies): Likewise.
10759         (read_func_scope): Likewise.
10760         (read_call_site_scope): Likewise.
10761         (dwarf2_add_member_fn): Likewise.
10762         (read_common_block): Likewise.
10763         (read_module_type): Likewise.
10764         (read_typedef): Likewise.
10765         (read_subrange_type): Likewise.
10766         (load_partial_dies): Likewise.
10767         (read_partial_die): Likewise.
10768         (find_partial_die): Likewise.
10769         (read_str_index): Likewise.
10770         (dwarf2_string_attr): Likewise.
10771         (build_error_marker_type): Likewise.
10772         (lookup_die_type): Likewise.
10773         (dump_die_shallow): Likewise.
10774         (follow_die_ref): Likewise.
10775         (dwarf2_fetch_die_loc_sect_off): Likewise.
10776         (dwarf2_fetch_constant_bytes): Likewise.
10777         (follow_die_sig): Likewise.
10778         (get_signatured_type): Likewise.
10779         (get_DW_AT_signature_type): Likewise.
10780         (dwarf2_find_containing_comp_unit): Likewise.
10781         (set_die_type): Likewise.
10782
10783 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10784
10785         * arch/aarch64.c: Include "common-defs.h".
10786         * arch/amd64.c: Likewise.
10787         * arch/i386.c: Likewise.
10788
10789 2018-02-21  Tom Tromey  <tom@tromey.com>
10790
10791         * value.h: (extract_field_op): Update.
10792         * eval.c (extract_field_op): Return a const char *.
10793         * expression.h (parse_expression_for_completion): Update.
10794         * completer.c (complete_expression): Update.
10795         (add_struct_fields): Make fieldname const.
10796         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10797         (mark_completion_tag, parse_exp_in_context_1): Update.
10798         (parse_expression_for_completion): Change "name" to
10799         unique_xmalloc_ptr*.
10800
10801 2018-02-21  Tom Tromey  <tom@tromey.com>
10802
10803         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10804
10805 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10806
10807         * avr-tdep.c (avr_read_pc): Change parameter type to
10808         readable_regcache.
10809         * gdbarch.sh (read_pc): Likewise.
10810         * gdbarch.c: Re-generated.
10811         * gdbarch.h: Re-generated.
10812         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10813         readable_regcache.
10814         * ia64-tdep.c (ia64_read_pc): Likewise.
10815         * mips-tdep.c (mips_read_pc): Likewise.
10816         * spu-tdep.c (spu_read_pc): Likewise.
10817
10818 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10819
10820         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10821         * regcache-dump.c: New file.
10822         * regcache.c: Move register_dump to regcache-dump.c.
10823         (maintenance_print_registers): Likewise.
10824         (maintenance_print_raw_registers): Likewise.
10825         (maintenance_print_cooked_registers): Likewise.
10826         (maintenance_print_register_groups): Likewise.
10827         (maintenance_print_remote_registers): Likewise.
10828         (_initialize_regcache): Likewise.
10829         * regcache.h (register_dump): Moved from regcache.c.
10830
10831 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10832
10833         * regcache.c (regcache::regcache): Update.
10834         (regcache::invalidate): Move it to detached_regcache::invalidate.
10835         (get_thread_arch_aspace_regcache): Update.
10836         (regcache::raw_update): Update.
10837         (regcache::cooked_read): Remove some code.
10838         (regcache::cooked_read_value): Likewise.
10839         (regcache::raw_write): Remove assert on m_readonly_p.
10840         (regcache::raw_supply_integer): Move it to
10841         detached_regcache::raw_supply_integer.
10842         (regcache::raw_supply_zeroed): Likewise.
10843         * regcache.h (detached_regcache) <raw_supply_integer>: New
10844         declaration.
10845         <raw_supply_zeroed, invalidate>: Likewise.
10846         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10847         <invalidate>: Likewise.
10848         <m_readonly_p>: Removed.
10849
10850 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10851
10852         * infcmd.c (get_return_value): Let stop_regs point to
10853         get_current_regcache.
10854         * regcache.c (regcache::regcache): Remove.
10855         (register_dump_reg_buffer): New class.
10856         (regcache_print): Adjust.
10857         * regcache.h (regcache): Remove constructors.
10858
10859 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10860
10861         * regcache.c (class register_dump): New class.
10862         (register_dump_regcache, register_dump_none): New class.
10863         (register_dump_remote, register_dump_groups): New class.
10864         (regcache_print): Update.
10865         * regcache.h (regcache_dump_what): Move it to regcache.c.
10866         (regcache) <dump>: Remove.
10867
10868 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10869
10870         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10871          reg_buffer_rw *.
10872         (jit_unwind_reg_set_impl): Call raw_supply.
10873         (jit_frame_sniffer): Use reg_buffer_rw.
10874         * record-full.c (record_full_core_regbuf): Change its type.
10875         (record_full_core_open_1): Use reg_buffer_rw.
10876         (record_full_close): Likewise.
10877         (record_full_core_fetch_registers): Use regcache->raw_supply.
10878         (record_full_core_store_registers): Likewise.
10879         * regcache.c (regcache::get_register_status): Move it to
10880         reg_buffer.
10881         (regcache_raw_set_cached_value): Remove.
10882         (regcache::raw_set_cached_value): Remove.
10883         (regcache::raw_write): Call raw_supply.
10884         (regcache::raw_supply): Move it to reg_buffer_rw.
10885         * regcache.h (regcache_raw_set_cached_value): Remove.
10886         (reg_buffer_rw): New class.
10887
10888 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10889
10890         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10891         readonly_detached_regcache.
10892         (dummy_frame_prev_register): Use regcache->cooked_read.
10893         * frame.c (frame_save_as_regcache): Change return type.
10894         (frame_pop): Update.
10895         * frame.h (frame_save_as_regcache): Update declaration.
10896         * inferior.h (get_infcall_suspend_state_regcache): Update
10897         declaration.
10898         * infrun.c (infcall_suspend_state) <registers>: use
10899         readonly_detached_regcache.
10900         (save_infcall_suspend_state): Don't use regcache_dup.
10901         (get_infcall_suspend_state_regcache): Change return type.
10902         * linux-fork.c (struct fork_info) <savedregs>: Change to
10903         readonly_detached_regcache.
10904         <pc>: New field.
10905         (fork_save_infrun_state): Don't use regcache_dup.
10906         (info_checkpoints_command): Adjust.
10907         * mi/mi-main.c (register_changed_p): Update declaration.
10908         (mi_cmd_data_list_changed_registers): Use
10909         readonly_detached_regcache.
10910         (register_changed_p): Change parameter type to
10911         readonly_detached_regcache.
10912         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10913         readonly_detached_regcache.
10914         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10915         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10916         New.
10917         (regcache::save): Move it to reg_buffer.
10918         (regcache::restore): Change parameter type.
10919         (regcache_dup): Remove.
10920         * regcache.h (reg_buffer) <save>: New method.
10921         (readonly_detached_regcache): New class.
10922         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10923         readonly_detached_regcache.
10924         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10925
10926 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10927
10928         * frame.c (frame_save_as_regcache): Use regcache method save.
10929         (frame_pop): Use regcache method restore.
10930         * infrun.c (restore_infcall_suspend_state): Likewise.
10931         * linux-fork.c (fork_load_infrun_state): Likewise.
10932         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10933         save.
10934         * regcache.c (regcache_save): Remove.
10935         (regcache::restore): More asserts.
10936         (regcache_cpy): Remove.
10937         * regcache.h (regcache_save): Remove the declaration.
10938         (regcache::restore): Move from private to public.
10939         Remove the friend declaration of regcache_cpy.
10940         (regcache_cpy): Remove declaration.
10941
10942 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10943
10944         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10945         parameter type to 'readable_regcache *'.
10946         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10947         * arm-tdep.c (arm_neon_quad_read): Likewise.
10948         (arm_pseudo_read): Likewise.
10949         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10950         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10951         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10952         * gdbarch.c: Re-generated.
10953         * gdbarch.h: Re-generated.
10954         * gdbarch.sh (pseudo_register_read): Change parameter type to
10955         'readable_regcache *'.
10956         (pseudo_register_read_value): Likewise.
10957         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10958         (h8300_pseudo_register_read): Likewise.
10959         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10960         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10961         (i386_pseudo_register_read_into_value): Likewise.
10962         (i386_pseudo_register_read_value): Likewise.
10963         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10964         declaration.
10965         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10966         * m32c-tdep.c (m32c_raw_read): Likewise.
10967         (m32c_read_flg): Likewise.
10968         (m32c_banked_register): Likewise.
10969         (m32c_banked_read): Likewise.
10970         (m32c_sb_read): Likewise.
10971         (m32c_part_read): Likewise.
10972         (m32c_cat_read): Likewise.
10973         (m32c_r3r2r1r0_read): Likewise.
10974         (m32c_pseudo_register_read): Likewise.
10975         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10976         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10977         (mep_pseudo_cr64_read): Likewise.
10978         (mep_pseudo_register_read): Likewise.
10979         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10980         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10981         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10982         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10983         (regcache::cooked_read): Likewise.
10984         (regcache::cooked_read_value): Likewise.
10985         (regcache_cooked_read_signed):
10986         (regcache::cooked_read): Likewise.
10987         * regcache.h (readable_regcache): New class.
10988         (regcache): Inherit readable_regcache.  Move some methods to
10989         readable_regcache.
10990         * rl78-tdep.c (rl78_pseudo_register_read): Change
10991         parameter type to 'readable_regcache *'.
10992         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10993         (e500_pseudo_register_read): Change parameter type to
10994         'readable_regcache *'.
10995         (dfp_pseudo_register_read): Likewise.
10996         (vsx_pseudo_register_read): Likewise.
10997         (efpr_pseudo_register_read): Likewise.
10998         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10999         * sh-tdep.c (sh_pseudo_register_read): Likewise.
11000         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11001         (sh64_pseudo_register_read): Likewise.
11002         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11003         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11004         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11005         (spu_pseudo_register_read): Likewise.
11006         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11007         (xtensa_pseudo_register_read): Likewise.
11008
11009 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11010
11011         * regcache.c (regcache::regcache): Call reg_buffer ctor.
11012         (regcache::arch): Move it to reg_buffer::arch.
11013         (regcache::register_buffer): Likewise.
11014         (regcache::assert_regnum): Likewise.
11015         (regcache::num_raw_registers): Likewise.
11016         * regcache.h (reg_buffer): New class.
11017         (regcache): Inherit reg_buffer.
11018
11019 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
11020
11021         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11022         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11023
11024 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
11025
11026         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11027
11028 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
11029
11030         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11031         (SFILES): Remove common/*.c files.
11032         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11033         * common/common.host: Add common reference.
11034         * configure.ac: Likewise.
11035         * configure: Regenerate.
11036
11037 2018-02-16  Yao Qi  <yao.qi@linaro.org>
11038
11039         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11040         (block_initialize_namespace): Use new.
11041         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11042         (dwarf2_free_objfile): Use delete.
11043         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11044         (copy_type_recursive): Use new.
11045         * gdb_obstack.h (allocate_on_obstack): New.
11046
11047 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11048
11049         PR gdb/22849
11050         * inferior.c (exit_inferior_1): Reset inf->control.
11051
11052 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11053
11054         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11055         declaration.
11056
11057 2018-02-14  Pedro Alves  <palves@redhat.com>
11058
11059         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11060         frame_cleanup_after_sniffer on exception.
11061
11062 2018-02-14  Tom Tromey  <tom@tromey.com>
11063
11064         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11065         const.
11066         (solib_bfd_open): Make pathname const.
11067         * solib.c (solib_bfd_open): Make pathname const.
11068         * solib-spu.c (spu_bfd_fopen): Make name const.
11069         (spu_bfd_open): Make pathname const.
11070         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11071         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11072
11073 2018-02-14  Tom Tromey  <tom@tromey.com>
11074
11075         * symfile.c (symfile_bfd_open): Update.
11076         * source.h (openp, source_full_path_of, find_and_open_source):
11077         Change argument type to unique_xmalloc_ptr.
11078         * source.c (openp): Take a unique_xmalloc_ptr.
11079         (source_full_path_of, find_and_open_source): Likewise.
11080         (open_source_file, symtab_to_fullname): Update.
11081         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11082         unique_xmalloc_ptr.
11083         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11084         (exec_file_find): Update.
11085         * psymtab.c (psymtab_to_fullname): Update.
11086         * nto-tdep.h (nto_find_and_open_solib): Update.
11087         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11088         unique_xmalloc_ptr.
11089         * exec.c (exec_file_attach): Update.
11090         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11091         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11092
11093 2018-02-14  Tom Tromey  <tom@tromey.com>
11094
11095         * solib.c: Include source.h.
11096         * nto-tdep.c: Include source.h.
11097         * mi/mi-cmd-env.c: Include source.h.
11098         * infcmd.c: Include source.h.
11099         * exec.c: Include source.h.
11100         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11101         (add_path, directory_switch, source_path, init_source_path): Move
11102         declarations...
11103         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11104         (add_path, directory_switch, source_path, init_source_path):
11105         ...here.
11106
11107 2018-02-14  Tom Tromey  <tom@tromey.com>
11108
11109         * solist.h (exec_file_find, solib_find): Return
11110         unique_xmalloc_ptr.
11111         (solib_bfd_fopen): Take a const char *.
11112         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11113         (exec_file_find, solib_find): Likewise.
11114         (solib_bfd_fopen): Do not take ownership of "pathname".
11115         (solib_bfd_open): Use unique_xmalloc_ptr.
11116         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11117         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11118         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11119         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11120
11121 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11122
11123         * ada-lang.c (name_match_type_from_name): Remove reference to
11124         ada_name_for_lookup in function's documentation.
11125         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11126
11127 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11128
11129         * defs.h (enum openp_flags): New enum.
11130         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11131         Move to enum openp_flags.
11132         (openp_flags): New enum flags.
11133         (openp): Change parameter type to openp_flags.
11134         * source.c (openp): Change parameter type to openp_flags.
11135         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11136         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11137
11138 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11139
11140         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11141         per-command.
11142
11143 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11144
11145         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11146         into...
11147         (class dwarf2_queue_guard): ...the destructor of this new class.
11148         (dw2_do_instantiate_symtab): Create instance of the new class
11149         dwarf2_queue_guard, remove cleanup.
11150
11151 2018-02-09  Tom Tromey  <tom@tromey.com>
11152
11153         * source.c (find_source_lines): Don't reference past the end of
11154         the vector.
11155
11156 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11157
11158         * remote.c (remote_btrace_maybe_reopen): Change error message.
11159         * btrace.c (btrace_enable): Likewise.
11160         (parse_xml_btrace): Likewise.
11161         (parse_xml_btrace_conf): Likewise.
11162
11163 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11164
11165         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11166         (linux_enable_pt, linux_enable_bts): Call
11167         diagnose_perf_event_open_fail.
11168
11169 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11170
11171         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11172         Remove parameter and change return type.  Update callers.  Move it.
11173         (linux_enable_bts, linux_enable_pt): Improve error message.
11174         (linux_enable_pt): Remove zero buffer size check.
11175         (linux_enable_btrace): Improve error messages.  Remove NULL return
11176         check.
11177
11178 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11179
11180         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11181         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11182         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11183         (linux_supports_pt, linux_supports_btrace): Remove.
11184         (linux_enable_bts): Call cpu_supports_bts.
11185         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11186         * remote.c (remote_supports_btrace): Remove.
11187         (init_remote_ops): Remove remote_supports_btrace.
11188         * target-delegates.c: Regenerated.
11189         * target.c (target_supports_btrace): Remove.
11190         * target.h (target_ops) <to_supports_btrace>: Remove
11191         (target_supports_btrace): Remove.
11192         * x86-linux-nat.c (x86_linux_create_target): Remove
11193         linux_supports_btrace.
11194
11195 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11196
11197         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11198         btrace failed.
11199         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11200         exception and use message in own exception.
11201
11202 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11203
11204         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11205         (perf_event_pt_event_type): Use gdb_file_up.
11206         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11207         scoped_fd, and scoped_mmap.
11208
11209 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11210
11211         * common/scoped_mmap.h: New.
11212         * unittests/scoped_mmap-selftest.c: New.
11213         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11214         unittests/scoped_mmap-selftest.c.
11215
11216 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11217
11218         * common/scoped_fd.h: New.
11219         * unittests/scoped_fd-selftest.c: New.
11220         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11221         unittests/scoped_fd-selftest.c.
11222
11223 2018-02-09  Tom Tromey  <tom@tromey.com>
11224
11225         * auto-load.c (auto_load_section_scripts): Use
11226         gdb::unique_xmalloc_ptr.
11227
11228 2018-02-09  Tom Tromey  <tom@tromey.com>
11229
11230         * auto-load.c (execute_script_contents): Use std::string.
11231
11232 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11233
11234         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11235         Python function, rather than a new command.
11236
11237 2018-02-08  Tom Tromey  <tom@tromey.com>
11238
11239         * solib.c (solib_find_1): Use std::string.
11240         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11241
11242 2018-02-08  Tom Tromey  <tom@tromey.com>
11243
11244         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11245
11246 2018-02-08  Tom Tromey  <tom@tromey.com>
11247
11248         * source.c (find_source_lines): Use gdb::def_vector.
11249
11250 2018-02-08  Tom Tromey  <tom@tromey.com>
11251
11252         * macrocmd.c (struct temporary_macro_definition): New.
11253         (macro_define_command): Use temporary_macro_definition.  Remove
11254         cleanups.
11255         (free_macro_definition_ptr): Remove.
11256
11257 2018-02-08  Tom Tromey  <tom@tromey.com>
11258
11259         * macroexp.c (maybe_expand): Use std::string.
11260
11261 2018-02-08  Tom Tromey  <tom@tromey.com>
11262
11263         * macroexp.c (struct macro_buffer): Add initializers for some
11264         members.
11265         (init_buffer, init_shared_buffer, free_buffer)
11266         (free_buffer_return_text): Remove.
11267         (macro_buffer): New constructors.
11268         (~macro_buffer): New destructor.
11269         (macro_buffer::set_shared): New method.
11270         (macro_buffer::resize_buffer, macro_buffer::appendc)
11271         (macro_buffer::appendmem): Now methods, not free functions.
11272         (set_token, append_tokens_without_splicing, stringify)
11273         (macro_stringify): Update.
11274         (gather_arguments): Change return type.  Remove argc_p argument,
11275         add args_ptr argument.  Use std::vector.
11276         (substitute_args): Remove argc argument.  Accept std::vector.
11277         (expand): Update.  Use std::vector.
11278         (scan, macro_expand, macro_expand_next): Update.
11279
11280 2018-02-08  Tom Tromey  <tom@tromey.com>
11281
11282         * symtab.c (default_collect_symbol_completion_matches_break_on):
11283         Use unique_xmalloc_ptr.
11284         * macroscope.h: (sal_macro_scope, user_macro_scope)
11285         (default_macro_scope): Return unique_xmalloc_ptr.
11286         * macroscope.c (sal_macro_scope, user_macro_scope)
11287         (default_macro_scope): Return unique_xmalloc_ptr.
11288         * macroexp.h (macro_expand, macro_expand_once): Return
11289         unique_xmalloc_ptr.
11290         * macroexp.c (macro_expand, macro_expand_once): Return
11291         unique_xmalloc_ptr.
11292         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11293         (info_macro_command, info_macros_command): Use
11294         unique_xmalloc_ptr.
11295         * compile/compile-c-support.c (write_macro_definitions): Use
11296         unique_xmalloc_ptr.
11297         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11298
11299 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11300
11301         * value.c (value_static_field): Assign field type instead of
11302         containing type when returning an optimized out value.
11303
11304 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11305
11306         * ft32-tdep.c (ft32_read_pc): Remove.
11307         (ft32_write_pc): Remove.
11308         (ft32_gdbarch_init): Update.
11309         * m32r-tdep.c (m32r_read_pc): Remove.
11310         (m32r_gdbarch_init): Update.
11311         * mep-tdep.c (mep_read_pc): Remove.
11312         (mep_gdbarch_init): Update.
11313         * microblaze-tdep.c (microblaze_write_pc): Remove.
11314         (microblaze_gdbarch_init): Update.
11315         * mn10300-tdep.c (mn10300_read_pc): Remove.
11316         (mn10300_write_pc): Remove.
11317         (mn10300_gdbarch_init): Update.
11318         * moxie-tdep.c (moxie_read_pc): Remove.
11319         (moxie_write_pc): Remove.
11320         (moxie_gdbarch_init): Update.
11321
11322 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11323
11324         * expprint.c (print_subexp_standard): Handle
11325         OP_F77_UNDETERMINED_ARGLIST.
11326         (dump_subexp_body_standard): Likewise.
11327
11328 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11329
11330         * target-descriptions.c (tdesc_element_visitor) Add empty
11331         implementations.
11332         (tdesc_type): Move make_gdb_type from here.
11333         (tdesc_type_builtin): Likewise.
11334         (tdesc_type_vector): Likewise.
11335         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11336         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11337         (make_gdb_type_union): Likewise.
11338         (make_gdb_type_flags): Likewise.
11339         (make_gdb_type_enum): Likewise.
11340         (make_gdb_type): New function.
11341         (tdesc_register_type): Use static make_gdb_type.
11342
11343 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11344
11345         * infcmd.c (default_print_one_register_info): Align natural-format
11346         column values consistently one under another.
11347         (pad_to_column): New function.
11348
11349 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11350
11351         * dwarf2read.c (dwarf2_physname): Move commment.
11352
11353 2018-02-01  Leszek Swirski  <leszeks@google.com>
11354
11355         * varobj.c (varobj_formatted_print_options): Allow recursive
11356         pretty printing if pretty printing is enabled.
11357
11358 2018-02-01  Leszek Swirski  <leszeks@google.com>
11359
11360         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11361         names after a structop as a filename.
11362
11363 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11364
11365         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11366         (arm_record_coproc_data_proc): Likewise.
11367
11368 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11369
11370         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11371
11372 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11373
11374         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11375         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11376
11377 2018-01-31  Pedro Alves  <palves@redhat.com>
11378
11379         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11380         * inflow.c (child_terminal_save_inferior): Wrap reference to
11381         tcgetpgrp in HAVE_TERMIOS_H.
11382         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11383         _WIN32.
11384         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11385         always iterate over all inferiors.
11386         (gdbsim_cntrl_c): Adjust.
11387         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11388
11389 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11390
11391         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11392         index type is objfile-owned if the element type is as well.
11393
11394 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11395
11396         GDB 8.1 released.
11397
11398 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11399
11400         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11401         "features/s390x-linux64.c".
11402         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11403         s390_linux32 and s390x_linux64.
11404         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11405         default tdesc.
11406         * s390-tdep.c: Include "features/s390-linux32.c" and
11407         "features/s390x-linux64.c".
11408         (s390_tdesc_valid): Add check for tdesc_has_registers.
11409         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11410         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11411         tdesc_s390x_linux64.
11412         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11413         tdesc_s390x_linux64 to...
11414         * s390-tdep.h: ...here.
11415
11416 2018-01-30  Pedro Alves  <palves@redhat.com>
11417
11418         PR gdb/13211
11419         * config.in, configure: Regenerate.
11420         * configure.ac: Check for getpgid.
11421         * go32-nat.c (go32_pass_ctrlc): New.
11422         (go32_target): Install it.
11423         * inf-child.c (inf_child_target): Install
11424         child_terminal_save_inferior, child_pass_ctrlc and
11425         child_interrupt.
11426         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11427         (inf_ptrace_target): No longer install it.
11428         * infcmd.c (interrupt_target_1): Adjust.
11429         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11430         (child_interrupt): Declare.
11431         (inferior::terminal_state): New.
11432         * inflow.c (struct terminal_info): Update comments.
11433         (inferior_process_group): Delete.
11434         (terminal_is_ours): Delete.
11435         (gdb_tty_state): New.
11436         (child_terminal_init): Adjust.
11437         (is_gdb_terminal, sharing_input_terminal_1)
11438         (sharing_input_terminal): New functions.
11439         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11440         Set the process's actual process group in the foreground if
11441         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11442         mark terminal as the inferior's if not sharing GDB's terminal.
11443         Don't check attach_flag.
11444         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11445         pass down a target_terminal_state.
11446         (child_terminal_save_inferior): New, factored out from ...
11447         (child_terminal_ours_1): ... this.  Handle
11448         target_terminal_state::is_ours_for_output.
11449         (child_interrupt, child_pass_ctrlc): New.
11450         (inflow_inferior_exit): Clear the inferior's terminal_state.
11451         (copy_terminal_info): Copy the inferior's terminal state.
11452         (_initialize_inflow): Remove reference to terminal_is_ours.
11453         * inflow.h (inferior_process_group): Delete.
11454         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11455         * procfs.c (procfs_target): Don't install procfs_interrupt.
11456         (procfs_interrupt): Delete.
11457         * remote.c (remote_serial_quit_handler): Adjust.
11458         (remote_interrupt): Remove ptid parameter.  Adjust.
11459         * target-delegates.c: Regenerate.
11460         * target.c: Include "terminal.h".
11461         (target_terminal::terminal_state): Rename to ...
11462         (target_terminal::m_terminal_state): ... this.
11463         (target_terminal::init): Adjust.
11464         (target_terminal::inferior): Adjust to per-inferior
11465         terminal_state.
11466         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11467         (target_terminal::ours, target_terminal::ours_for_output): Use
11468         target_terminal_is_ours_kind.
11469         (target_interrupt): Remove ptid parameter.  Adjust.
11470         (default_target_pass_ctrlc): Adjust.
11471         * target.h (target_ops::to_terminal_save_inferior): New field.
11472         (target_ops::to_interrupt): Remove ptid_t parameter.
11473         (target_interrupt): Remove ptid_t parameter.  Update comment.
11474         (target_pass_ctrlc): Update comment.
11475         * target/target.h (target_terminal_state): New scoped enum,
11476         factored out of ...
11477         (target_terminal::terminal_state): ... here.
11478         (target_terminal::inferior): Update comments.
11479         (target_terminal::restore_inferior): New.
11480         (target_terminal::is_inferior, target_terminal::is_ours)
11481         (target_terminal::is_ours_for_output): Adjust.
11482         (target_terminal::scoped_restore_terminal_state): Adjust to
11483         rename, and call restore_inferior() instead of inferior().
11484         (target_terminal::scoped_restore_terminal_state::m_state): Change
11485         type.
11486         (target_terminal::terminal_state): Rename to ...
11487         (target_terminal::m_terminal_state): ... this and change type.
11488
11489 2018-01-30  Pedro Alves  <palves@redhat.com>
11490
11491         * linux-nat.c (wait_for_signal): New function.
11492         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11493         directly.
11494         (async_terminal_is_ours)
11495         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11496         (linux_nat_add_target): Don't override
11497         to_terminal_inferior/to_terminal_ours.
11498
11499 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11500
11501         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11502
11503 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11504
11505         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11506         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11507         dwarf2_per_objfile_free here.
11508         (dwarf2_per_objfile_free): Remove.
11509         (_initialize_dwarf2_read): Don't register
11510         dwarf2_per_objfile_free as a registry cleanup.
11511
11512 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11513
11514         Avoid compilation errors in MinGW native builds
11515
11516         The error is triggered by including python-internal.h, and the
11517         error message is:
11518
11519              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11520                       from build-gnulib/import/math.h:27,
11521                       from d:/usr/Python26/include/pyport.h:235,
11522                       from d:/usr/Python26/include/Python.h:58,
11523                       from python/python-internal.h:94,
11524                       from python/py-arch.c:24:
11525              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11526         using ::hypot;
11527                 ^~~~~
11528
11529         This happens because Python headers define 'hypot' to expand t
11530         '_hypot' in the Windows builds.
11531         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11532         'hypoth'.  This avoids a compilation error.
11533
11534 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11535
11536         * MAINTAINERS (Write After Approval): Fix ordering.
11537
11538 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11539
11540         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11541
11542 2018-01-26  Alan Modra  <amodra@gmail.com>
11543
11544         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11545         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11546         Remove nop.  Make const.  Comment.
11547         (powerpc32_plt_stub_so_2): New.
11548         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11549         Correct count.  Update uses.
11550         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11551         Move common code reading PLT entry word.  Correct
11552         powerpc32_plt_stub PLT address calculation.
11553         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11554         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11555         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11556         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11557         (ppc64_standard_linkage8): Likewise.
11558         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11559         Correct insns description.
11560         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11561
11562 2018-01-24  Pedro Alves  <palves@redhat.com>
11563
11564         GCC PR libstdc++/83906
11565         * gdbtypes.c (operator==(const dynamic_prop &,
11566         const dynamic_prop &)): New.
11567         (operator==(const range_bounds &, const range_bounds &)): New.
11568         (check_types_equal): Use them instead of memcmp.
11569         * gdbtypes.h (operator==(const dynamic_prop &,
11570         const dynamic_prop &)): Declare.
11571         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11572         (operator==(const range_bounds &, const range_bounds &)): Declare.
11573         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11574
11575 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11576
11577         * s390-linux-tdep.c (s390_record_address_mask)
11578         (s390_record_calc_disp_common, s390_record_calc_disp)
11579         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11580         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11581         (s390_process_record): Move to s390-tdep.c.
11582         (s390_linux_init_abi_any): Adjust.
11583         * s390-tdep.c (s390_record_address_mask)
11584         (s390_record_calc_disp_common, s390_record_calc_disp)
11585         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11586         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11587         (s390_process_record): Moved from s390-linux-tdep.c
11588         (s390_gdbarch_init): Adjust.
11589
11590 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11591
11592         * s390-linux-nat.c (s390-tdep.h): New include.
11593         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11594         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11595         (ALLDEPFILES): Add s390-tdep.c.
11596         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11597         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11598         * s390-tdep.h: ...this.  New file.
11599         * s390-linux-tdep.c (s390-tdep.h): New include.
11600         (_initialize_s390_tdep): Rename to...
11601         (_initialize_s390_linux_tdep): ...this and adjust.
11602         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11603         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11604         s390-tdep.h.
11605         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11606         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11607         (s390_is_partial_instruction, s390_software_single_step)
11608         (is_non_branch_ril, s390_displaced_step_copy_insn)
11609         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11610         (s390_prologue_data, s390_addr, s390_store, s390_load)
11611         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11612         (s390_register_call_saved, s390_guess_tracepoint_registers)
11613         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11614         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11615         (s390_pseudo_register_name, s390_pseudo_register_type)
11616         (s390_pseudo_register_read, s390_pseudo_register_write)
11617         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11618         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11619         (s390_addr_bits_remove, s390_address_class_type_flags)
11620         (s390_address_class_type_flags_to_name)
11621         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11622         (s390_function_arg_float, s390_function_arg_vector)
11623         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11624         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11625         (s390_frame_align, s390_register_return_value, s390_return_value)
11626         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11627         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11628         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11629         (s390_trad_frame_prev_register, s390_unwind_cache)
11630         (s390_prologue_frame_unwind_cache)
11631         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11632         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11633         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11634         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11635         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11636         (s390_frame_base_address, s390_local_base_address)
11637         (s390_frame_base, s390_gcc_target_options)
11638         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11639         (s390_validate_reg_range, s390_tdesc_valid)
11640         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11641         * s390-tdep.c: ...this.  New file.
11642
11643 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11644
11645         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11646         (s390_process_record, s390_gdbarch_tdep_alloc)
11647         (s390_linux_init_abi_any): Use/set new hook.
11648
11649 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11650
11651         * s390-linux-tdep.c (osabi.h): New include.
11652         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11653         (s390_linux_init_abi_any): New functions.
11654         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11655
11656 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11657
11658         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11659         tdesc_has_registers check
11660
11661 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11662
11663         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11664         (s390_validate_reg_range): New macro.
11665         (s390_gdbarch_init): Adjust.
11666
11667 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11668
11669         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11670         (s390_gdbarch_tdep_alloc): Adjust.
11671         (s390_gdbarch_init): Adjust.
11672
11673 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11674
11675         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11676         <have_tdb>: Change type to bool.
11677         (s390_gdbarch_tdep_alloc): Adjust.
11678         (s390_gdbarch_init): Adjust.
11679
11680 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11681
11682         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11683         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11684         (s390_gdbarch_tdep_alloc): New function.
11685         (s390_gdbarch_init): Allocate tdep at start and use its fields
11686         instead of separate variables.
11687
11688 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11689
11690         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11691         when looking for cached gdbarch and add comment for remaining.
11692
11693 2018-01-22  Pedro Alves  <palves@redhat.com>
11694             Sergio Durigan Junior  <sergiodj@redhat.com>
11695
11696         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11697         case.
11698
11699 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11700
11701         * MAINTAINERS: Update my company e-mail address.
11702
11703 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11704
11705         * regcache.c (cooked_write_test): New function.
11706         (_initialize_regcache): Register the test.
11707
11708 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11709
11710         * ia64-tdep.c (ia64_pseudo_register_read): Call
11711         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11712         * m32c-tdep.c (m32c_cat_read): Likewise.
11713         (m32c_r3r2r1r0_read): Likewise.
11714         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11715         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11716
11717 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11718
11719         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11720         method raw_read instead of regcache_raw_read.
11721         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11722         * arm-tdep.c (arm_neon_quad_read): Likewise.
11723         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11724         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11725         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11726         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11727         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11728         (i386_pseudo_register_read_into_value): Likewise.
11729         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11730         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11731         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11732         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11733         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11734         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11735         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11736         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11737         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11738
11739 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11740
11741         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11742         * configure.tgt: Remove target mt.
11743         * mt-tdep.c: Remove.
11744         * regcache.c (cooked_read_test): Remove the check for mt.
11745
11746 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11747
11748         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11749         instead of gdbarch_pseudo_register_read_value.
11750
11751 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11752
11753         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11754         language is Ada.
11755
11756 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11757
11758         * linespec.c (create_sals_line_offset): Remove code that preserved
11759         the symtab_and_line's line number.
11760
11761 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11762
11763         * varobj.c (varobj_create): Don't set valid_block when creating a
11764         floating varobj.
11765
11766 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11767
11768         * varobj.c (varobj_create): Remove out of date comment.
11769
11770 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11771
11772         PR mi/20395
11773         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11774         updating innermost block.
11775         * parse.c (innermost_block_tracker::update): Take extra type
11776         parameter, and check types match before updating innermost block.
11777         (write_dollar_variable): Update innermost block for registers.
11778         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11779         (innermost_block_tracker::innermost_block_tracker): Initialise
11780         m_types member.
11781         (innermost_block_tracker::reset): Take type parameter.
11782         (innermost_block_tracker::update): Take type parameter, and pass
11783         type through as needed.
11784         (innermost_block_tracker::m_types): New member.
11785         * varobj.c (varobj_create): Pass type when reseting innermost
11786         block.
11787
11788 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11789
11790         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11791         * ada-lang.c (resolve_subexp): Likewise.
11792         * breakpoint.c (set_breakpoint_condition) Likewise.
11793         (watch_command_1) Likewise.
11794         * c-exp.y (variable): Likewise.
11795         * d-exp.y (PrimaryExpression): Likewise.
11796         * f-exp.y (variable): Likewise.
11797         * go-exp.y (variable): Likewise.
11798         * m2-exp.y (variable): Likewise.
11799         * objfiles.c (objfile::~objfile): Likewise.
11800         * p-exp.y (variable): Likewise.
11801         * parse.c (innermost_block): Change type.
11802         * parser-defs.h (class innermost_block_tracker): New.
11803         (innermost_block): Change to innermost_block_tracker.
11804         * printcmd.c (display_command): Switch to innermost_block API.
11805         (do_one_display): Likewise.
11806         * rust-exp.y (do_one_display): Likewise.
11807         * symfile.c (clear_symtab_users): Likewise.
11808         * varobj.c (varobj_create): Switch to innermost_block API, replace
11809         use of innermost_block with block stored on varobj object.
11810
11811 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11812
11813         * expression.h (innermost_block): Remove declaration.
11814         * varobj.c: Add 'parser-defs.h' include.
11815
11816 2018-01-19  Tom Tromey  <tom@tromey.com>
11817
11818         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11819         symbols in the static and global blocks.
11820
11821 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11822
11823         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11824         gdb_ptrace.h, and move including gdb_wait.h ...
11825         * nat/linux-ptrace.h: ... to here.
11826
11827 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11828
11829         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11830         inf_ptrace_detach_success.
11831         (inf_ptrace_detach_success): Add inferior parameter, use it
11832         instead of inferior_ptid, pass it to detach_inferior.
11833         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11834         parameter.
11835         * inferior.c (detach_inferior): Add overload that takes an
11836         inferior object.
11837         * inferior.h (detach_inferior): Likewise.
11838         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11839         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11840         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11841
11842 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11843
11844         * target.h (struct target_ops) <to_detach>: Add inferior
11845         parameter.
11846         (target_detach): Likewise.
11847         * target.c (dispose_inferior): Pass inferior down.
11848         (target_detach): Pass inferior down.  Assert that it is equal to
11849         the current inferior.
11850         * aix-thread.c (aix_thread_detach): Pass inferior down.
11851         * corefile.c (core_file_command): Pass current_inferior() down.
11852         * corelow.c (core_detach): Add inferior parameter.
11853         * darwin-nat.c (darwin_detach): Likewise.
11854         * gnu-nat.c (gnu_detach): Likewise.
11855         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11856         * infcmd.c (detach_command): Pass current_inferior() down to
11857         target_detach.
11858         * infrun.c (follow_fork_inferior): Pass parent_inf to
11859         target_detach.
11860         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11861         target_detach.
11862         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11863         * linux-thread-db.c (thread_db_detach): Likewise.
11864         * nto-procfs.c (procfs_detach): Likewise.
11865         * procfs.c (procfs_detach): Likewise.
11866         * record.c (record_detach): Likewise.
11867         * record.h (struct inferior): Forward-declare.
11868         (record_detach): Add inferior parameter.
11869         * remote-sim.c (gdbsim_detach): Likewise.
11870         * remote.c (remote_detach_1): Likewise.
11871         (remote_detach): Likewise.
11872         (extended_remote_detach): Likewise.
11873         * sol-thread.c (sol_thread_detach): Likewise.
11874         * target-debug.h (target_debug_print_inferior_p): New macro.
11875         * target-delegates.c: Re-generate.
11876         * top.c (kill_or_detach): Pass inferior down to target_detach.
11877         * windows-nat.c (windows_detach): Add inferior parameter.
11878
11879 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11880
11881         * target.h (struct target_ops) <to_detach>: Remove args
11882         parameter.
11883         (target_detach): Likewise.
11884         * target.c (dispose_inferior): Adjust.
11885         (target_detach): Remove args parameter, adjust.
11886         * aix-thread.c (aix_thread_detach): Adjust.
11887         * corefile.c (core_file_command): Adjust.
11888         * corelow.c (core_detach): Adjust.
11889         * darwin-nat.c (darwin_detach): Adjust.
11890         * gnu-nat.c (gnu_detach): Adjust.
11891         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11892         * infcmd.c (detach_command): Adjust
11893         * infrun.c (follow_fork_inferior): Adjust.
11894         (handle_vfork_child_exec_or_exit): Adjust.
11895         * linux-fork.c (linux_fork_detach): Remove args parameter.
11896         * linux-fork.h (linux_fork_detach): Likewise.
11897         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11898         * linux-thread-db.c (thread_db_detach): Likewise.
11899         * nto-procfs.c (procfs_detach): Likewise.
11900         * procfs.c (procfs_detach): Likewise.
11901         (do_detach): Remove signo parameter.
11902         * record.c (record_detach): Remove args parameter.
11903         * record.h (record_detach): Likewise.
11904         * remote-sim.c (gdbsim_detach): Likewise.
11905         * remote.c (remote_detach_1): Likewise.
11906         (remote_detach): Likewise.
11907         (extended_remote_detach): Likewise.
11908         * sol-thread.c (sol_thread_detach): Likewise.
11909         * target-delegates.c: Re-generate.
11910         * top.c (struct qt_args) <args>: Remove field.
11911         (kill_or_detach): Don't pass args.
11912         (quit_force): Don't set args.
11913         * windows-nat.c (windows_detach): Remove args parameter.
11914
11915 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11916
11917         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11918         (arm_linux_init_abi): Install it.
11919
11920 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11921
11922         * osabi.c (gdb_osabi_names): Extend the regexp for
11923         arm-linux-gnueabihf.
11924
11925 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11926
11927         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11928         m_abbrevs.
11929         (abbrev_table::add_abbrev): Update.
11930         (abbrev_table::lookup_abbrev): Update.
11931
11932 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11933
11934         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11935
11936 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11937
11938         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11939         to "std::string".
11940
11941 2018-01-17  Tom Tromey  <tom@tromey.com>
11942
11943         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11944
11945 2018-01-17  Tom Tromey  <tom@tromey.com>
11946
11947         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11948         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11949         (create_array_type_with_stride): Update.
11950         * dwarf2read.c (set_die_type): Update.
11951
11952 2018-01-17  Tom Tromey  <tom@tromey.com>
11953
11954         * dwarf2read.c (delayed_method_info): Remove typedef.
11955         (dwarf2_cu::method_info): Now a std::vector.
11956         (add_to_method_list): Update.
11957         (free_delayed_list): Remove.
11958         (compute_delayed_physnames): Update.
11959         (process_full_comp_unit, process_full_type_unit): Clear the method
11960         list.  Remove cleanups.
11961         (psymtab_include_file_name): Add name_holder parameter.  Use
11962         unique_xmalloc_ptr.
11963         (dwarf_decode_lines): Update.
11964
11965 2018-01-17  Tom Tromey  <tom@tromey.com>
11966             Simon Marchi  <simon.marchi@ericsson.com>
11967
11968         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11969         (dwarf2_per_objfile::free_cached_comp_units)
11970         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11971         (init_cutu_and_read_dies_no_follow): Update.
11972         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11973         (dwarf2_cu::~dwarf2_cu): New.
11974         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11975         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11976
11977 2018-01-17  Tom Tromey  <tom@tromey.com>
11978             Simon Marchi  <simon.marchi@ericsson.com>
11979
11980         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11981         (struct die_reader_specs) <abbrev_table>: New member.
11982         (struct abbrev_table): Add constructor.
11983         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11984         <abbrev_obstack>: Now an auto_obstack.
11985         (abbrev_table_up): New typedef.
11986         (init_cu_die_reader): Add abbrev_table parameter.
11987         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11988         Add result_dwo_abbrev_table.
11989         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11990         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11991         Update.
11992         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11993         parameter.
11994         (skip_children): Update.
11995         (abbrev_table::alloc_abbrev): Rename from
11996         abbrev_table_alloc_abbrev.
11997         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11998         (abbrev_table::lookup_abbrev): Rename from
11999         abbrev_table_lookup_abbrev.
12000         (abbrev_table_read_table): Return abbrev_table_up.
12001         (abbrev_table_free, abbrev_table_free_cleanup)
12002         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12003         (load_partial_dies): Update.
12004
12005 2018-01-17  Tom Tromey  <tom@tromey.com>
12006
12007         * dwarf2read.c (dwarf2_compute_name): Update comment.
12008         (read_func_scope, read_variable): Update.
12009         (new_symbol): Remove.
12010         (new_symbol_full): Rename to new_symbol.
12011
12012 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
12013
12014         PR gdb/16577
12015         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12016         a warning instead of throwing an error, set section size to 0 and return
12017         NULL.
12018         * gdb_bfd.h (gdb_bfd_map_section): Update description.
12019
12020 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12021
12022         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12023         std::string.
12024         (linux_ptrace_attach_fail_reason_string): Likewise.
12025         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12026         Likewise.
12027         (linux_ptrace_attach_fail_reason_string): Likewise.
12028         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12029
12030 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12031
12032         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12033
12034 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
12035
12036         PR gdb/21559
12037         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12038         checking for fs_base/gs_base fields in struct user_regs_struct.
12039         * configure: Regenerate.
12040
12041 2018-01-17  Yao Qi  <yao.qi@linaro.org>
12042
12043         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12044         function.
12045         (aarch64_linux_init_abi): Install it to gdbarch hook
12046         gcc_target_options.
12047
12048 2018-01-15  Pedro Alves  <palves@redhat.com>
12049
12050         * common/signals-state-save-restore.c
12051         (save_original_signals_state): Fix typos.
12052
12053 2017-01-12  Tom Tromey  <tom@tromey.com>
12054             Sergio Durigan Junior  <sergiodj@redhat.com>
12055
12056         * Makefile.in (install-only): Install gdb-add-index.
12057
12058 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12059
12060         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12061
12062 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12063
12064         * infrun.c (keep_going_pass_signal): Clear step-over info when
12065         insert_breakpoints fails.
12066
12067 2018-01-11  Pedro Alves  <palves@redhat.com>
12068
12069         PR gdb/22583
12070         * infrun.c (resume): Rename to ...
12071         (resume_1): ... this.
12072         (resume): Reimplement as wrapper around resume_1.
12073
12074 2018-01-11  Pedro Alves  <palves@redhat.com>
12075
12076         PR remote/22597
12077         * remote.c (remote_parse_stop_reply): Default to the last-set
12078         general thread instead of to 'magic_null_ptid'.
12079
12080 2018-01-10  Pedro Alves  <palves@redhat.com>
12081
12082         * language.h (language_get_symbol_name_matcher): Rename ...
12083         (get_symbol_name_matcher): ... this.
12084         * language.c (language_get_symbol_name_matcher): Ditto.
12085         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12086         callers adjusted.
12087
12088 2018-01-10  Pedro Alves  <palves@redhat.com>
12089
12090         PR gdb/22670
12091         * dwarf2read.c
12092         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12093         Adjust to use language_get_symbol_name_matcher instead of
12094         language_defn::la_get_symbol_name_matcher.
12095         * language.c (language_get_symbol_name_matcher): If in Ada mode
12096         and the lookup name is a verbatim match, return Ada's matcher.
12097         * language.h (language_get_symbol_name_matcher): Adjust comment.
12098         (ada_lookup_name_info::verbatim_p):: New method.
12099
12100 2018-01-10  Pedro Alves  <palves@redhat.com>
12101
12102         PR gdb/22670
12103         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12104         minsym's language is language_auto or language_cplus, pass down
12105         language_ada instead.
12106         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12107
12108 2018-01-10  Pedro Alves  <palves@redhat.com>
12109
12110         PR gdb/22670
12111         * minsyms.c (linkage_name_str): New function.
12112         (iterate_over_minimal_symbols): Use it.
12113
12114 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12115
12116         * NEWS: Document that 'info proc' now works on FreeBSD.
12117
12118 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12119
12120         * configure.ac: Check for kinfo_getfile in libutil.
12121         * configure: Regenerate.
12122         * config.in: Regenerate.
12123         * fbsd-nat.c: Include "fbsd-tdep.h".
12124         (fbsd_fetch_cmdline): New.
12125         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12126         rather than calling error.
12127         (fbsd_info_proc): New.
12128         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12129         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12130         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12131
12132 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12133
12134         * fbsd-nat.c (struct free_deleter): Remove.
12135         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12136
12137 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12138
12139         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12140         NULL for an empty pathname.
12141
12142 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12143
12144         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12145         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12146         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12147         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12148         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12149         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12150         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12151         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12152         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12153         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12154         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12155         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12156         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12157         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12158         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12159
12160 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12161
12162         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12163         (gnu_xfer_auxv): New function.
12164         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12165         TARGET_OBJECT_AUXV.
12166
12167 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12168             Simon Marchi  <simon.marchi@ericsson.com>
12169
12170         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12171         common/selftest.c.
12172         (COMMON_OBS): Remove selftest.o.
12173         * configure.ac: Append selftest-arch.c and common/selftest.c to
12174         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12175         * configure: Re-generated.
12176         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12177         GDB_SELF_TEST.
12178         (maintenance_info_selftests): Likewise.
12179
12180 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12181
12182         * ada-valprint.c (val_print_packed_array_elements): Use
12183         proper number of elements when printing an array indexed
12184         by an enumeration type.
12185
12186 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12187
12188         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12189         (dw2_get_file_names_reader): Adjust.
12190         (lookup_dwo_signatured_type): Adjust.
12191         (lookup_dwp_signatured_type): Adjust.
12192         (lookup_signatured_type): Adjust.
12193         (create_type_unit_group): Adjust.
12194         (get_type_unit_group): Adjust.
12195         (process_psymtab_comp_unit_reader): Adjust.
12196         (build_type_psymtabs_reader): Adjust.
12197         (scan_partial_symbols): Adjust.
12198         (add_partial_symbol): Adjust.
12199         (add_partial_subprogram): Adjust.
12200         (peek_die_abbrev): Adjust.
12201         (fixup_go_packaging): Adjust.
12202         (process_imported_unit_die): Adjust.
12203         (dwarf2_compute_name): Adjust.
12204         (dwarf2_physname): Adjust.
12205         (read_import_statement): Adjust.
12206         (handle_DW_AT_stmt_list): Adjust.
12207         (read_file_scope): Adjust.
12208         (read_func_scope): Adjust.
12209         (read_lexical_block_scope): Adjust.
12210         (read_call_site_scope): Adjust.
12211         (read_variable): Adjust.
12212         (dwarf2_rnglists_process): Adjust.
12213         (dwarf2_ranges_process): Adjust.
12214         (dwarf2_ranges_read): Adjust.
12215         (dwarf2_get_pc_bounds): Adjust.
12216         (dwarf2_record_block_ranges): Adjust.
12217         (dwarf2_add_field): Adjust.
12218         (dwarf2_add_member_fn): Adjust.
12219         (read_structure_type): Adjust.
12220         (process_structure_scope): Adjust.
12221         (read_enumeration_type): Adjust.
12222         (read_array_type): Adjust.
12223         (mark_common_block_symbol_computed): Adjust.
12224         (read_common_block): Adjust.
12225         (read_namespace_type): Adjust.
12226         (read_namespace): Adjust.
12227         (read_module_type): Adjust.
12228         (read_tag_pointer_type): Adjust.
12229         (read_tag_ptr_to_member_type): Adjust.
12230         (read_tag_string_type): Adjust.
12231         (read_subroutine_type): Adjust.
12232         (read_typedef): Adjust.
12233         (read_base_type): Adjust.
12234         (attr_to_dynamic_prop): Adjust.
12235         (read_subrange_type): Adjust.
12236         (read_unspecified_type): Adjust.
12237         (dwarf2_read_abbrevs): Adjust.
12238         (load_partial_dies): Adjust.
12239         (read_partial_die): Adjust.
12240         (find_partial_die): Adjust.
12241         (guess_partial_die_structure_name): Adjust.
12242         (fixup_partial_die): Adjust.
12243         (read_attribute_value): Adjust.
12244         (read_addr_index): Adjust.
12245         (read_addr_index_from_leb128): Adjust.
12246         (read_str_index): Adjust.
12247         (dwarf2_string_attr): Adjust.
12248         (get_debug_line_section): Adjust.
12249         (dwarf_decode_line_header): Adjust.
12250         (lnp_state_machine::check_line_address): Adjust.
12251         (dwarf_decode_lines_1): Adjust.
12252         (dwarf_decode_lines): Adjust.
12253         (dwarf2_start_symtab): Adjust.
12254         (var_decode_location): Adjust.
12255         (new_symbol_full): Adjust.
12256         (dwarf2_const_value_data): Adjust.
12257         (dwarf2_const_value_attr): Adjust.
12258         (dwarf2_const_value): Adjust.
12259         (die_type): Adjust.
12260         (die_containing_type): Adjust.
12261         (build_error_marker_type): Adjust.
12262         (lookup_die_type): Adjust.
12263         (guess_full_die_structure_name): Adjust.
12264         (anonymous_struct_prefix): Adjust.
12265         (determine_prefix): Adjust.
12266         (dwarf2_name): Adjust.
12267         (follow_die_ref_or_sig): Adjust.
12268         (follow_die_offset): Adjust.
12269         (follow_die_ref): Adjust.
12270         (follow_die_sig_1): Adjust.
12271         (follow_die_sig): Adjust.
12272         (get_signatured_type): Adjust.
12273         (get_DW_AT_signature_type): Adjust.
12274         (decode_locdesc): Adjust.
12275         (dwarf_decode_macros): Adjust.
12276         (cu_debug_loc_section): Adjust.
12277         (fill_in_loclist_baton): Adjust.
12278         (dwarf2_symbol_mark_computed): Adjust.
12279         (init_one_comp_unit): Don't assign
12280         dwarf2_cu::dwarf2_per_objfile.
12281         (set_die_type): Adjust.
12282
12283 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12284
12285         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12286         <dwarf2_per_objfile>: New field.
12287         (dwarf2_per_objfile): Remove global.
12288         (get_dwarf2_per_objfile): New function.
12289         (set_dwarf2_per_objfile): New function.
12290         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12291         dwarf2_per_objfile.
12292         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12293         (read_abbrev_offset): Likewise.
12294         (read_indirect_string): Likewise.
12295         (read_indirect_line_string): Likewise.
12296         (read_indirect_string_at_offset): Likewise.
12297         (read_indirect_string_from_dwz): Likewise.
12298         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12299         dwarf2_per_objfile.
12300         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12301         (create_all_comp_units): Change objfile parameter to
12302         dwarf2_per_objfile.
12303         (create_all_type_units): Likewise.
12304         (process_queue): Add dwarf2_per_objfile parameter.
12305         (read_and_check_comp_unit_head): Likewise.
12306         (lookup_dwo_unit_in_dwp): Likewise.
12307         (get_dwp_file): Likewise.
12308         (process_cu_includes): Likewise.
12309         (struct free_dwo_file_cleanup_data): New struct.
12310         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12311         set_dwarf2_per_objfile.
12312         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12313         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12314         context, adjust calls.
12315         (dw2_instantiate_symtab): Likewise.
12316         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12317         (dw2_get_cu): Likewise.
12318         (create_cu_from_index_list): Change objfile parameter to
12319         dwarf2_per_objfile.
12320         (create_cus_from_index_list): Get dwarf2_per_objfile from
12321         context, adjust calls.
12322         (create_cus_from_index): Likewise.
12323         (create_signatured_type_table_from_index): Change objfile
12324         parameter to dwarf2_per_objfile.
12325         (create_signatured_type_table_from_debug_names): Change objfile
12326         parameter to dwarf2_per_objfile.
12327         (create_addrmap_from_index): Likewise.
12328         (create_addrmap_from_aranges): Likewise.
12329         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12330         (dw2_setup): Remove.
12331         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12332         context.
12333         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12334         get_dwarf2_per_objfile.
12335         (dw2_forget_cached_source_info): Likewise.
12336         (dw2_map_symtabs_matching_filename): Likewise.
12337         (struct dw2_symtab_iterator) <index>: Remove.
12338         <dwarf2_per_objfile>: New field.
12339         (dw2_symtab_iter_init): Replace index parameter with
12340         dwarf2_per_objfile.
12341         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12342         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12343         (dw2_print_stats): Likewise.
12344         (dw2_dump): Likewise.
12345         (dw2_expand_symtabs_for_function): Likewise.
12346         (dw2_expand_all_symtabs): Likewise.
12347         (dw2_expand_symtabs_with_fullname): Likewise.
12348         (dw2_expand_marked_cus): Replace index and objfile parameters
12349         with dwarf2_per_objfile.
12350         (dw_expand_symtabs_matching_file_matcher): Add
12351         dwarf2_per_objfile parameter and adjust calls.
12352         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12353         adjust calls.
12354         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12355         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12356         adjust calls.
12357         (create_cus_from_debug_names_list): Replace objfile parameter
12358         with dwarf2_per_objfile and adjust calls.
12359         (create_cus_from_debug_names): Likewise.
12360         (dwarf2_read_debug_names): Likewise.
12361         (mapped_debug_names::namei_to_name): Adjust call.
12362         (dw2_debug_names_iterator::next): Likewise.
12363         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12364         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12365         (dw2_debug_names_dump): Likewise.
12366         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12367         (dw2_debug_names_expand_symtabs_matching): Likewise.
12368         (dwarf2_initialize_objfile): Likewise.
12369         (dwarf2_build_psymtabs): Likewise.
12370         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12371         this_cu.
12372         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12373         (read_and_check_comp_unit_head): Likewise.
12374         (read_abbrev_offset): Likewise.
12375         (create_debug_type_hash_table): Likewise.
12376         (create_debug_types_hash_table): Likewise.
12377         (create_all_type_units): Replace objfile parameter with
12378         dwarf2_per_objfile.
12379         (add_type_unit): Add dwarf2_per_objfile parameter.
12380         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12381         with dwarf2_per_objfile.
12382         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12383         (lookup_dwp_signatured_type): Likewise.
12384         (lookup_signatured_type): Likewise.
12385         (read_cutu_die_from_dwo): Likewise.
12386         (init_tu_and_read_dwo_dies): Likewise.
12387         (init_cutu_and_read_dies): Likewise.
12388         (init_cutu_and_read_dies_no_follow): Likewise.
12389         (allocate_type_unit_groups_table): Add objfile parameter.
12390         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12391         (get_type_unit_group): Likewise.
12392         (process_psymtab_comp_unit): Update call.
12393         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12394         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12395         (print_tu_stats): Likewise.
12396         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12397         in void* parameter.
12398         (build_type_psymtabs): Change objfile parameter to
12399         dwarf2_per_objfile.
12400         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12401         passed in void* parameter.
12402         (process_skeletonless_type_units): Change objfile parameter to
12403         dwarf2_per_objfile.
12404         (set_partial_user): Likewise.
12405         (dwarf2_build_psymtabs_hard): Likewise.
12406         (read_comp_units_from_section): Likewise.
12407         (create_all_comp_units): Likewise.
12408         (scan_partial_symbols): Update calls.
12409         (add_partial_symbol): Likewise.
12410         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12411         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12412         (process_queue): Add dwarf2_per_objfile parameter.
12413         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12414         (compute_compunit_symtab_includes): Likewise.
12415         (process_cu_includes): Add dwarf2_per_objfile parameter.
12416         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12417         (process_full_type_unit): Likewise.
12418         (process_imported_unit_die): Update call.
12419         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12420         (read_file_scope): Likewise.
12421         (allocate_dwo_file_hash_table): Add objfile parameter.
12422         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12423         (create_cus_hash_table): Likewise.
12424         (create_dwp_hash_table): Likewise.
12425         (create_dwo_unit_in_dwp_v1): Likewise.
12426         (create_dwp_v2_section): Likewise.
12427         (create_dwo_unit_in_dwp_v2): Likewise.
12428         (lookup_dwo_unit_in_dwp): Likewise.
12429         (try_open_dwop_file): Likewise.
12430         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12431         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12432         cleanup to include a reference to dwarf2_per_objfile.
12433         (open_dwp_file): Add dwarf2_per_objfile parameter.
12434         (open_and_init_dwp_file): Likewise.
12435         (get_dwp_file): Likewise.
12436         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12437         (queue_and_load_all_dwo_tus): Update call.
12438         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12439         data.
12440         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12441         (dwarf2_ranges_process): Likewise.
12442         (dwarf2_get_pc_bounds): Likewise.
12443         (mark_common_block_symbol_computed): Likewise.
12444         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12445         (dwarf2_read_abbrevs): Update call.
12446         (read_partial_die): Use dwarf2_per_objfile from cu.
12447         (find_partial_die): Likewise.
12448         (fixup_partial_die): Likewise.
12449         (read_attribute_value): Likewise.
12450         (read_indirect_string_at_offset_from): Add objfile parameter.
12451         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12452         parameter.
12453         (read_indirect_string_from_dwz): Add objfile parameter.
12454         (read_indirect_string): Add objfile parameter.
12455         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12456         (read_addr_index): Use dwarf2_per_objfile from cu.
12457         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12458         call dw2_setup.
12459         (read_str_index): Use dwarf2_per_objfile from cu.
12460         (get_debug_line_section): Likewise.
12461         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12462         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12463         (new_symbol_full): Use dwarf2_per_objfile from cu.
12464         (build_error_marker_type): Likewise.
12465         (lookup_die_type): Likewise.
12466         (determine_prefix): Likewise.
12467         (follow_die_offset): Likewise.
12468         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12469         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12470         (dwarf2_fetch_die_type_sect_off): Likewise.
12471         (dwarf2_get_die_type): Likewise.
12472         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12473         (get_signatured_type): Likewise.
12474         (get_DW_AT_signature_type): Likewise.
12475         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12476         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12477         (cu_debug_loc_section): Likewise.
12478         (fill_in_loclist_baton): Likewise.
12479         (dwarf2_symbol_mark_computed): Likewise.
12480         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12481         dwarf2_per_objfile.
12482         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12483         parameter.
12484         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12485         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12486         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12487         (set_die_type): Use dwarf2_free_objfile from cu.
12488         (get_die_type_at_offset): Likewise.
12489         (dwarf2_per_objfile_free): Don't assign global variable.
12490         (debug_names) <constructor>: Add dwarf2_per_objfile
12491         parameter, update m_debugstrlookup construction.
12492         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12493         parameter.
12494         <m_dwarf2_per_objfile>: New field.
12495         <lookup>: Use m_dwarf2_per_objfile.
12496         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12497         (psyms_seen_size): Likewise.
12498         (write_gdbindex): Replace objfile parameter with
12499         dwarf2_per_objfile.
12500         (write_debug_names): Likewise.
12501         (write_psymtabs_to_index): Likewise.
12502         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12503         calls.
12504
12505 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12506
12507         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12508         <dwarf2_per_objfile>: New field.
12509         (struct dwarf2_per_cu_data) <objfile>: Remove.
12510         <dwarf2_per_objfile>: New field.
12511         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12512         of objfile.
12513         (create_signatured_type_table_from_index): Likewise.
12514         (create_debug_type_hash_table): Likewise.
12515         (fill_in_sig_entry_from_dwo_entry): Likewise.
12516         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12517         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12518         objfile.
12519         (create_partial_symtab): Access objfile through
12520         dwarf2_per_objfile.
12521         (process_psymtab_comp_unit_reader): Likewise.
12522         (read_comp_units_from_section): Likewise.
12523         (scan_partial_symbols): Likewise.
12524         (add_partial_symbol): Likewise.
12525         (add_partial_subprogram): Likewise.
12526         (peek_die_abbrev): Likewise.
12527         (fixup_go_packaging): Likewise.
12528         (process_full_comp_unit): Likewise.
12529         (process_full_type_unit): Likewise.
12530         (process_imported_unit_die): Likewise.
12531         (dwarf2_compute_name): Likewise.
12532         (dwarf2_physname): Likewise.
12533         (read_import_statement): Likewise.
12534         (create_cus_hash_table): Assign dwarf2_physname instead of
12535         objfile.
12536         (read_func_scope): Access objfile through dwarf2_per_objfile.
12537         (read_lexical_block_scope): Likewise.
12538         (read_call_site_scope): Likewise.
12539         (read_variable): Likewise.
12540         (dwarf2_rnglists_process): Likewise.
12541         (dwarf2_ranges_process): Likewise.
12542         (dwarf2_ranges_read): Likewise.
12543         (dwarf2_record_block_ranges): Likewise.
12544         (dwarf2_add_field): Likewise.
12545         (dwarf2_add_member_fn): Likewise.
12546         (read_structure_type): Likewise.
12547         (process_structure_scope): Likewise.
12548         (read_enumeration_type): Likewise.
12549         (read_array_type): Likewise.
12550         (read_common_block): Likewise.
12551         (read_namespace_type): Likewise.
12552         (read_namespace): Likewise.
12553         (read_module_type): Likewise.
12554         (read_tag_pointer_type): Likewise.
12555         (read_tag_ptr_to_member_type): Likewise.
12556         (read_tag_string_type): Likewise.
12557         (read_subroutine_type): Likewise.
12558         (read_typedef): Likewise.
12559         (read_base_type): Likewise.
12560         (attr_to_dynamic_prop): Likewise.
12561         (read_subrange_type): Likewise.
12562         (read_unspecified_type): Likewise.
12563         (load_partial_dies): Likewise.
12564         (read_partial_die): Likewise.
12565         (find_partial_die): Likewise.
12566         (guess_partial_die_structure_name): Likewise.
12567         (fixup_partial_die): Likewise.
12568         (read_attribute_value): Likewise.
12569         (read_addr_index_from_leb128): Likewise.
12570         (dwarf2_read_addr_index): Likewise.
12571         (dwarf2_string_attr): Likewise.
12572         (lnp_state_machine::check_line_address): Likewise.
12573         (dwarf_decode_lines_1): Likewise.
12574         (dwarf_decode_lines): Likewise.
12575         (dwarf2_start_symtab): Likewise.
12576         (var_decode_location): Likewise.
12577         (new_symbol_full): Likewise.
12578         (dwarf2_const_value_data): Likewise.
12579         (dwarf2_const_value_attr): Likewise.
12580         (dwarf2_const_value): Likewise.
12581         (die_type): Likewise.
12582         (die_containing_type): Likewise.
12583         (lookup_die_type): Likewise.
12584         (guess_full_die_structure_name): Likewise.
12585         (anonymous_struct_prefix): Likewise.
12586         (dwarf2_name): Likewise.
12587         (follow_die_ref_or_sig): Likewise.
12588         (follow_die_offset): Likewise.
12589         (follow_die_ref): Likewise.
12590         (dwarf2_fetch_die_loc_sect_off): Likewise.
12591         (dwarf2_fetch_constant_bytes): Likewise.
12592         (dwarf2_fetch_die_type_sect_off): Likewise.
12593         (dwarf2_get_die_type): Likewise.
12594         (follow_die_sig): Likewise.
12595         (decode_locdesc): Likewise.
12596         (dwarf2_per_cu_objfile): Likewise.
12597         (dwarf2_per_cu_text_offset): Likewise.
12598         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12599         objfile.
12600         (set_die_type): Access objfile through
12601         dwarf2_per_objfile.
12602
12603 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12604
12605         * valprint.c (converted_character_d): Remove typedef.
12606         (DEF_VEC_O (converted_character_d)): Remove.
12607         (count_next_character): Use std::vector.
12608         (print_converted_chars_to_obstack): Likewise.
12609         (generic_printstr): Likewise.
12610
12611 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12612
12613         * xml-support.h (struct gdb_xml_value): Add constructor.
12614         <value>: Change type to unique_xmalloc_ptr.
12615         (gdb_xml_value_s): Remove typedef.
12616         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12617         (gdb_xml_element_start_handler): Change parameter type to
12618         std::vector.
12619         (xml_find_attribute): Likewise.
12620         * xml-support.c (xml_find_attribute): Change parameter type to
12621         std::vector and adjust.
12622         (gdb_xml_values_cleanup): Remove.
12623         (gdb_xml_parser::start_element): Adjust to std::vector.
12624         (xinclude_start_include): Change paraeter type to std::vector
12625         and adjust.
12626         * btrace.c (check_xml_btrace_version): Likewise.
12627         (parse_xml_btrace_block): Likewise.
12628         (parse_xml_btrace_pt_config_cpu): Likewise.
12629         (parse_xml_btrace_pt): Likewise.
12630         (parse_xml_btrace_conf_bts): Likewise.
12631         (parse_xml_btrace_conf_pt): Likewise.
12632         * memory-map.c (memory_map_start_memory): Likewise.
12633         (memory_map_start_property): Likewise.
12634         * osdata.c (osdata_start_osdata): Likewise.
12635         (osdata_start_item): Likewise.
12636         (osdata_start_column): Likewise.
12637         * remote.c (start_thread): Likewise.
12638         * solib-aix.c (library_list_start_library): Likewise.
12639         (library_list_start_list): Likewise.
12640         * solib-svr4.c (library_list_start_library): Likewise.
12641         (svr4_library_list_start_list): Likewise.
12642         * solib-target.c (library_list_start_segment): Likewise.
12643         (library_list_start_section): Likewise.
12644         (library_list_start_library): Likewise.
12645         (library_list_start_list): Likewise.
12646         * tracepoint.c (traceframe_info_start_memory): Likewise.
12647         (traceframe_info_start_tvar): Likewise.
12648         * xml-syscall.c (syscall_start_syscall): Likewise.
12649         * xml-tdesc.c (tdesc_start_target): Likewise.
12650         (tdesc_start_feature): Likewise.
12651         (tdesc_start_reg): Likewise.
12652         (tdesc_start_union): Likewise.
12653         (tdesc_start_struct): Likewise.
12654         (tdesc_start_flags): Likewise.
12655         (tdesc_start_enum): Likewise.
12656         (tdesc_start_field): Likewise.
12657         (tdesc_start_enum_value): Likewise.
12658         (tdesc_start_vector): Likewise.
12659
12660 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12661
12662         * extension.h (struct xmethod_worker) <clone>: Remove.
12663         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12664         Remove.
12665         (python_xmethod_worker::clone): Remove.
12666         * valops.c (find_overload_match): Use std::move instead of
12667         clone.
12668
12669 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12670
12671         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12672         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12673         <free_xmethod_worker_data>: Remove.
12674         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12675         <get_xmethod_arg_types>: Remove.
12676         <get_xmethod_result_type>: Remove.
12677         <invoke_xmethod>: Remove.
12678         * extension.c (new_xmethod_worker): Remove.
12679         (clone_xmethod_worker): Remove.
12680         (get_matching_xmethod_workers): Return void, pass std::vector by
12681         pointer.
12682         (get_xmethod_arg_types): Rename to...
12683         (xmethod_worker::get_arg_types): ... this, and adjust.
12684         (get_xmethod_result_type): Rename to...
12685         (xmethod_worker::get_result_type): ... this, and adjust.
12686         (invoke_xmethod): Remove.
12687         (free_xmethod_worker): Remove.
12688         (free_xmethod_worker_vec): Remove.
12689         * extension.h (enum ext_lang_rc): Move here from
12690         extension-priv.h.
12691         (struct xmethod_worker): Add constructor and destructor.
12692         <data>: Remove.
12693         <value>: Remove.
12694         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12695         virtual pure methods.
12696         <get_arg_types, get_result_type>: New methods.
12697         (xmethod_worker_ptr): Remove typedef.
12698         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12699         (xmethod_worker_vec): Remove typedef.
12700         (xmethod_worker_up): New typedef.
12701         (invoke_xmethod): Remove.
12702         (clone_xmethod_worker): Remove.
12703         (free_xmethod_worker): Remove.
12704         (free_xmethod_worker_vec): Remove.
12705         (get_xmethod_arg_types): Remove.
12706         (get_xmethod_result_type): Remove.
12707         * valops.c (find_method_list): Use std::vector, don't use
12708         intermediate vector.
12709         (value_find_oload_method_list): Use std::vector.
12710         (find_overload_match): Use std::vector.
12711         (find_oload_champ): Use std::vector.
12712         * value.c (value_free): Use operator delete.
12713         (value_of_xmethod): Rename to...
12714         (value_from_xmethod): ... this.  Don't assign
12715         xmethod_worker::value, take rvalue-reference.
12716         (result_type_of_xmethod): Adjust.
12717         (call_xmethod): Adjust.
12718         * value.h: Include extension.h.
12719         (struct xmethod_worker): Don't forward-declare.
12720         (value_of_xmethod): Rename to...
12721         (value_from_xmethod): ... this, take rvalue-reference.
12722         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12723         (struct python_xmethod_worker): ... this, add constructor and
12724         destructor.
12725         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12726         (gdbpy_free_xmethod_worker_data): Rename to...
12727         (python_xmethod_worker::~python_xmethod_worker): ... this and
12728         adjust.
12729         (gdbpy_clone_xmethod_worker_data): Rename to...
12730         (python_xmethod_worker::clone): ... this and adjust.
12731         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12732         temporary vector.
12733         (gdbpy_get_xmethod_arg_types): Rename to...
12734         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12735         (gdbpy_get_xmethod_result_type): Rename to...
12736         (python_xmethod_worker::do_get_result_type): ... this and
12737         adjust.
12738         (gdbpy_invoke_xmethod): Rename to...
12739         (python_xmethod_worker::invoke): ... this and adjust.
12740         (new_python_xmethod_worker): Rename to...
12741         (python_xmethod_worker::python_xmethod_worker): ... this and
12742         adjust.
12743         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12744         Remove.
12745         (gdbpy_free_xmethod_worker_data): Remove.
12746         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12747         (gdbpy_get_xmethod_arg_types): Remove.
12748         (gdbpy_get_xmethod_result_type): Remove.
12749         (gdbpy_invoke_xmethod): Remove.
12750         * python/python.c (python_extension_ops): Remove obsolete
12751         callbacks.
12752
12753 2018-01-05  Pedro Alves  <palves@redhat.com>
12754
12755         PR gdb/18653
12756         * common/signals-state-save-restore.c
12757         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12758         find a custom handler preinstalled, instead of internal erroring.
12759         But only warn if !quiet.
12760         * common/signals-state-save-restore.h
12761         (save_original_signals_state): New parameter 'quiet'.
12762         * main.c (captured_main_1): Move save_original_signals_state call
12763         after option handling, and pass QUIET.
12764
12765 2018-01-05  Pedro Alves  <palves@redhat.com>
12766
12767         * spu-tdep.c (spu_catch_start): Pass
12768         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12769
12770 2018-01-05  Pedro Alves  <palves@redhat.com>
12771
12772         PR gdb/22670
12773         * ada-lang.c (literal_symbol_name_matcher): New function.
12774         (ada_get_symbol_name_matcher): Use it for
12775         symbol_name_match_type::SEARCH_NAME.
12776         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12777         it down instead of assuming symbol_name_match_type::FULL.
12778         * block.h (block_lookup_symbol): New parameter 'match_type'.
12779         * c-valprint.c (print_unpacked_pointer): Use
12780         lookup_symbol_search_name instead of lookup_symbol.
12781         * compile/compile-object-load.c (get_out_value_type): Pass down
12782         symbol_name_match_type::SEARCH_NAME.
12783         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12784         symbol_name_match_type::FULL.
12785         * cp-support.c (cp_get_symbol_name_matcher): Handle
12786         symbol_name_match_type::SEARCH_NAME.
12787         * infrun.c (insert_exception_resume_breakpoint): Use
12788         lookup_symbol_search_name.
12789         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12790         * psymtab.c (maintenance_check_psymtabs): Use
12791         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12792         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12793         SYMBOL_SEARCH_NAME.
12794         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12795         if symbol_name_match_type::SEARCH_NAME.
12796         (lookup_symbol_in_language): Pass down
12797         symbol_name_match_type::FULL.
12798         (lookup_symbol_search_name): New.
12799         (lookup_language_this): Pass down
12800         symbol_name_match_type::SEARCH_NAME.
12801         (lookup_symbol_aux, lookup_local_symbol): New parameter
12802         'match_type'.  Pass it down.
12803         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12804         (lookup_symbol_search_name): New declaration.
12805         (lookup_symbol_in_block): New 'match_type' parameter.
12806
12807 2018-01-05  Pedro Alves  <palves@redhat.com>
12808
12809         PR gdb/22670
12810         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12811         ada_lookup_symbol.
12812         (ada_lookup_symbol): Reimplement in terms of
12813         ada_lookup_symbol_list, bits factored out from
12814         ada_lookup_encoded_symbol.
12815
12816 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12817
12818         * ada-exp.y (write_object_renaming): When subscripting an array
12819         using a symbol as the index, pass the block in call to
12820         ada_lookup_encoded_symbol when looking that symbol up.
12821
12822 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12823
12824         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12825         TYPE_INDEX_TYPE.
12826
12827 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12828
12829         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12830         the case where VALUE_LVAL (val0) is not lval_memory.
12831
12832 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12833
12834         * ada-valprint.c (print_optional_low_bound): Handle
12835         character-indexed array printing like boolean-indexed array
12836         printing.
12837
12838 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12839
12840         * NEWS: Create a new section for the next release branch.
12841         Rename the section of the current branch, now that it has
12842         been cut.
12843
12844 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12845
12846         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12847         * version.in: Bump version to 8.1.50.DATE-git.
12848
12849 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12850
12851         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12852         Add field.
12853         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12854         Add field.
12855         (default_exception_support_info) <catch_handlers_sym>: Add field.
12856         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12857         (ada_exception_name_addr_1): Add "catch handlers" handling.
12858         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12859         Update all callers.
12860         (create_excep_cond_exprs) <ex>: Add parameter.
12861         (re_set_exception): Update create_excep_cond_exprs call.
12862         (print_it_exception, print_one_exception, print_mention_exception)
12863         (print_recreate_exception): Add "catch handler" handling.
12864         (allocate_location_catch_handlers, re_set_catch_handlers)
12865         (check_status_catch_handlers, print_it_catch_handlers)
12866         (print_one_catch_handlers, print_mention_catch_handlers)
12867         (print_recreate_catch_handlers): New function.
12868         (catch_handlers_breakpoint_ops): New variable.
12869         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12870         Add parameter.  Add "catch handler" handling.
12871         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12872         Add "catch handler" handling.
12873         (ada_exception_catchpoint_cond_string): Add "catch handler"
12874         handling.
12875         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12876         call.
12877         (catch_ada_handlers_command): New function.
12878         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12879         operations structure.
12880         (_initialize_ada_language): Add "catch handlers" command entry.
12881         * NEWS: Document "catch handlers" feature.
12882
12883 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12884
12885         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12886         account when creating the array type of the slice.
12887         (ada_value_slice): Likewise.
12888
12889 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12890
12891         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12892         New enum value.
12893         (create_array_type_with_stride): Add byte_stride_prop parameter.
12894         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12895         New parameter.  Update all callers in this file.
12896         (array_type_has_dynamic_stride): New function.
12897         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12898         of arrays with dynamic byte strides.
12899         * dwarf2read.c (read_array_type): Add support for dynamic
12900         DW_AT_byte_stride attributes.
12901
12902 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12903
12904         * dwarf2read.c (read_unspecified_type): Treat
12905         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12906
12907 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12908
12909         Update copyright year range in all GDB files.
12910
12911 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12912
12913         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12914         and gdb/testsuite/gdb.base/step-line.c.
12915
12916 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12917
12918         * copyright.py (main): Dump the contents of
12919         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12920         even if BY_HAND is empty.
12921
12922 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12923
12924         * top.c (print_gdb_version): Update Copyright year in version
12925         message.
12926
12927 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12928
12929         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12930
12931 For older changes see ChangeLog-2017.
12932 \f
12933 Local Variables:
12934 mode: change-log
12935 left-margin: 8
12936 fill-column: 74
12937 version-control: never
12938 coding: utf-8
12939 End: