(Ada) Cleanup code by using ada_is_access_to_unconstrained_array call.
[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): Remove static
4         declaration.
5         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
6         * ada-varobj.c (ada_varobj_get_number_of_children,
7         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
8
9 2018-09-10  Xavier Roirand  <roirand@adacore.com>
10
11         * ada-valprint.c (ada_value_print): Use type instead of
12         enclosing type.
13
14 2018-09-10  Xavier Roirand  <roirand@adacore.com>
15
16         * ada-lang.c (ada_value_subscript): Handle case when parameter is
17         an array of access to unconstrained array.
18
19 2018-09-10  Xavier Roirand  <roirand@adacore.com>
20
21         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
22         (ada_check_typedef): Use it.
23
24 2018-09-10  Xavier Roirand  <roirand@adacore.com>
25
26         * ada-varobj.c (ada_varobj_describe_struct_child)
27         (ada_varobj_describe_child): Handle union case like struct one.
28
29 2018-09-10  Tom Tromey  <tom@tromey.com>
30
31         PR python/18380:
32         * python/python.c (_initialize_python): Make example in "python"
33         help work in Python 3.
34
35 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
36
37         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
38         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
39         $(EXEEXT) to the script, as it is not a program.
40
41 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
42
43         * python/py-prettyprint.c (pretty_print_one_value): Return
44         gdbpy_ref<>.
45         (print_string_repr): Adjust.
46         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
47         * python/python-internal.h (apply_varobj_pretty_printer): Return
48         gdbpy_ref<>.
49         * varobj.c (varobj_value_get_print_value): Adjust.
50
51 2018-09-08  Tom Tromey  <tom@tromey.com>
52
53         PR python/16047:
54         * python/py-prettyprint.c (pretty_print_one_value): Check for
55         to_string method.
56
57 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
58
59         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
60         replace_operator_with_call.
61
62 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
63
64         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
65
66 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
67
68         * ada-typeprint.c (print_range): Print the bounds using TYPE
69         rather than its TYPE_TARGET_TYPE.
70
71 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
72
73         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
74         call to ada_to_fixed_value_create.
75
76 2018-09-08  Jerome Guitton  <guitton@adacore.com>
77
78         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
79
80 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
81
82         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
83         by calls to error.
84
85 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
86
87         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
88         Move update of loop variable "fi".
89
90 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
91
92         * ada-lang.c (value_assign_to_component): In the case of
93         big-endian targets, extract the bits of the given VAL
94         using an src_offset of zero if container is not a scalar.
95
96 2018-09-06  Simon Ser  <contact@emersion.fr>
97
98         PR gdb/23105
99         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
100         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
101         * fbsd-tdep.c (fbsd_make_note_desc): New.
102         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
103         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
104         * target.h (enum target_object) Add FreeBSD-specific
105         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
106
107 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
108
109         * compile/compile-c.h (generate_c_for_variable_locations):
110         Change reference to pointer.
111         * compile/compile-c-support.c (compile_program) <compute>:
112         Likewise.
113         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
114         (generate_c_for_for_one_variable): Likewise
115         (generate_c_for_variable_locations): Likewise
116         * compile/compile-c-types.c (compile_c_instance::convert_type):
117         Likewise
118         * compile/compile-cplus-symbols.c (convert_one_symbol):
119         std::move the scope passed to enter_scope.
120         * compile/compile-cplus-types.c
121         (compile_cplus_instance::enter_scope): Make parameter
122         rvalue-reference.
123         (compile_cplus_instance::new_scope): Change reference to
124         pointer.
125         (compile_cplus_instance::convert_type): Likewise
126         (compile_cplus_convert_typedef): std::move the scope passed to
127         enter_scope.
128         (compile_cplus_convert_struct_or_union): Likewise.
129         (compile_cplus_convert_enum): Likewise.
130         (compile_cplus_convert_namespace): Likewise.
131         * compile/compile-cplus.h (compile_cplus_instance)
132         <enter_scope>: Make parameter rvalue-reference.
133         * compile/compile-internal.h (compile_instance)
134         <get_cached_type>: Likewise
135         * compile/compile-loc2c.c (push): Likewise
136         (pushf): Likewise
137         (unary): Likewise
138         (binary): Likewise
139         (print_label): Likewise
140         (pushf_register_address): Likewise
141         (pushf_register): Likewise
142         (do_compile_dwarf_expr_to_c): Likewise
143         (compile_dwarf_expr_to_c): Likewise
144         (compile_dwarf_bounds_to_c): Likewise
145         * compile/compile.c (compile_instance::get_cached_type):
146         Likewise
147         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
148         (compile_dwarf_bounds_to_c): Likewise
149         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
150         (dwarf2_compile_property_to_c): Likewise
151         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
152         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
153         Likewise
154
155 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
156
157         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
158         * tui/tui-data.c (init_content_element): Don't initialize it.
159
160 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
161
162         * tui/tui-data.h (struct tui_win_info)
163         <detail::opaque>: Remove.
164         * tui/tui-data.c (init_win_info): Remove assignment.
165
166 2018-09-05  Tom Tromey  <tom@tromey.com>
167
168         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
169         -Wformat-nonliteral.
170         * target-float.c (host_float_ops<T>::to_string)
171         (host_float_ops<T>::from_string): Use
172         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
173         * configure: Rebuild.
174
175 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
176
177         * printcmd.c (printf_c_string): Use
178         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
179         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
180
181 2018-09-05  Tom Tromey  <tom@tromey.com>
182
183         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
184
185 2018-09-05  Tom de Vries  <tdevries@suse.de>
186
187         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
188         with resolve_abstract_p == true.
189         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
190         defaulting to false. Propagate resolve_abstract_p to
191         dwarf2_fetch_die_loc_sect_off.
192         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
193         parameter, defaulting to false.
194         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
195         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
196         parameter.
197         * dwarf2read.h (struct die_info): Forward-declare.
198         (die_info_ptr): New typedef.
199         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
200
201 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
202
203         GDB 8.2 released.
204
205 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
206             Pedro Alves  <palves@redhat.com>
207
208         * gnulib/Makefile.in (aclocal_m4_deps): Move to
209         "aclocal-m4-deps.mk".  Include file here.
210         $(srcdir)/aclocal.m4: Add "configure.ac".
211         * gnulib/aclocal-m4-deps.mk: New file.
212         * gnulib/update-gnulib.sh: Automatically update
213         "aclocal-m4-deps.mk".
214
215 2018-09-04  Tom Tromey  <tom@tromey.com>
216
217         * configure: Rebuild.
218         * configure.ac: Remove multi-ice code.
219
220 2018-09-04  Tom Tromey  <tom@tromey.com>
221
222         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
223         (ada-exp.o): Update.
224
225 2018-09-04  Tom Tromey  <tom@tromey.com>
226
227         * Makefile.in (printcmd.o, target-float.o): Remove.
228         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
229
230 2018-09-04  Tom Tromey  <tom@tromey.com>
231
232         * gnulib/Makefile.in: Remove obsolete comment.
233         * Makefile.in: Remove obsolete comment.
234
235 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
236
237         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
238         line with '+'.
239
240 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
241
242         * riscv-tdep.c: Add 'prologue-value.h' include.
243         (struct riscv_unwind_cache): New struct.
244         (riscv_debug_unwinder): New global.
245         (riscv_scan_prologue): Update arguments, capture register details
246         from prologue scan.
247         (riscv_skip_prologue): Reformat arguments line, move end of
248         prologue calculation into riscv_scan_prologue.
249         (riscv_frame_cache): Update return type, create
250         riscv_unwind_cache, scan the prologue, and fill in remaining cache
251         details.
252         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
253         (riscv_frame_prev_register): Use the trad_frame within the
254         riscv_unwind_cache.
255         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
256         flag.
257
258 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
259
260         * trad-frame.h (trad_frame_set_realreg): Declare.
261         (trad_frame_set_addr): Declare.
262         * trad-frame.c (trad_frame_set_realreg): Define new function.
263         (trad_frame_set_addr): Define new function.
264         (trad_frame_set_reg_realreg): Use new function.
265         (trad_frame_set_reg_addr): Use new function.
266
267 2018-09-01  Keith Seitz  <keiths@redhat.com>
268
269         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
270         pulongest instead of "%lld".
271         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
272         ATTRIBUTE_UNUSED.
273
274 2018-08-31  Tom Tromey  <tom@tromey.com>
275
276         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
277         variant part type.
278
279 2018-08-31  Pedro Alves  <palves@redhat.com>
280
281         * gdbarch.h: Regenerate.
282
283 2018-08-31  Pedro Alves  <palves@redhat.com>
284
285         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
286         * target.h (Hardware watchpoint interfaces): Describe
287         continuable/steppable/non-steppable watchpoints.
288         * gdbarch.h, gdbarch.c: Regenerate.
289
290 2018-08-31  Pedro Alves  <palves@redhat.com>
291
292         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
293         Delete.
294         * s390-linux-nat.c
295         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
296         * target.h (target_ops::have_continuable_watchpoint): Delete.
297         (target_have_continuable_watchpoint): Delete.
298         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
299         * target-delegates.c: Regenerate.
300
301 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
302
303         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
304         the files present in "gnulib/import/m4/".
305
306 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
307
308         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
309         c.sw, c.swsp, and c.sdsp.
310
311 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
312
313         * riscv-tdep.c (struct riscv_inferior_data): Delete.
314         (riscv_read_misa_reg): Don't cache value read into inferior data.
315         (riscv_new_inferior_data): Delete.
316         (riscv_inferior_data_cleanup): Delete.
317         (riscv_inferior_data): Delete.
318         (riscv_invalidate_inferior_data): Delete.
319         (_initialize_riscv_tdep): Remove initialisation of inferior data.
320
321 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
322
323         * compile/compile-cplus-types.c
324         (compile_cplus_instance::leave_scope): Take the address of scope
325         object.
326         (compile_cplus_instance::convert_qualified_base): Compare quals
327         to 0.
328
329 2018-08-30  Keith Seitz  <keiths@redhat.com>
330
331         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
332         Use "%s" and host_address_to_string instead of "%p" in printf.
333
334 2018-08-29  Keith Seitz  <keiths@redhat.com>
335
336         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
337         and compile-cplus-types.c.
338         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
339         * c-lang.c (cplus_language_defn): Set C++ compile functions.
340         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
341         Declare.
342         * compile/compile-c-support.c: Include compile-cplus.h.
343         (load_libcompile): Templatize.
344         (get_compile_context): "New" function.
345         (c_get_compile_context): Use get_compile_context.
346         (cplus_get_compile_context): New function.
347         (cplus_push_user_expression, cplus_pop_user_expression)
348         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
349         (cplus_compute_program): Define new structs/functions.
350         * compile/compile-cplus-symmbols.c: New file.
351         * compile/compile-cplus-types.c: New file.
352         * compile/compile-cplus.h: New file.
353         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
354         Declare.
355         * compile/compile-object-load.c (get_out_value_type): Use
356         strncmp_iw when comparing symbol names.
357         (compile_object_load): Add mst_bss and mst_data.
358         * compile/compile.c (_initialize_compile): Remove
359         -Wno-implicit-function-declaration from `compile_args'.
360         * compile/gcc-cp-plugin.h: New file.
361         * NEWS: Mention C++ compile support and new debug options.
362
363 2018-08-29  Keith Seitz  <keiths@redhat.com>
364
365         * linespec.c (collect_info::add_symbol): Make virtual.
366         (struct symbol_searcher_collect_info): New struct.
367         (symbol_searcher::find_all_symbols): New method.
368         * symtab.h (class symbol_searcher): New class.
369
370 2018-08-29  Keith Seitz  <keiths@redhat.com>
371
372         * linespec.c (struct linespec) <function_symbols, label_symbols>:
373         Change to vector of block_symbol.  Update all users.
374         (struct collect_info) <symbols>: Likewise.
375         (collect_info::add_symbol): Take block_symbol as argument.
376         Update all callers.
377         (decode_compound_collector) <m_symbols>: Change type to vector
378         of block_symbol.  Update all users.
379         (decode_compound_collector::operator ()): Change parameter type
380         to block_symbol.
381         (find_method, find_function_symbols, find_linespec_symbols)
382         (find_label_symbols_in_block, find_label_symbols): Change symbol
383         vectors to block_symbol vectors.
384         * symtab.h (symbol_found_callback_ftype): Change parameter type to
385         block_symbol.
386
387 2018-08-29  Keith Seitz  <keiths@redhat.com>
388
389         * linespec.c (symbolp): Remove typedef and VEC definitions.
390         (bound_minimal_symbol_d): Likewise.
391
392 2018-08-29  Keith Seitz  <keiths@redhat.com>
393
394         * linespec.c (decode_compound_collector::decode_compound_collector):
395         Remove initialization for `m_symtabs'.
396         (decode_compound_collector::release_symbols): Change return type
397         to std::vector.  Update all callers.
398         (class decode_compound_collector) <m_symbols>: Change type to
399         std::vector.
400         (lookup_prefix_sym): Change return type to std::vector.  Update all
401         callers.
402         (compare_symbols): Remove.
403         (std_compare_symbols): Rename to `compare_symbols'.
404         (find_method): Change `sym_classes' parameter to std::vector.
405         Update all callers.  Use std::sort to sort sym_classes.
406         (find_linespec_symbols): Remove cleanup.
407
408 2018-08-29  Keith Seitz  <keiths@redhat.com>
409
410         * linespec.c (struct linespec) <minimal_symbols>: Change type to
411         std::vector.  Update all users.
412         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
413         (struct collect_info) <minimal_symbols>: Likewise.
414         (compare_msymbols): Return bool.  Change parameters to const
415         bound_minimal_symbol references.
416         (find_method, find_function_symbols, find_linespec_symbols): Change
417         `minsyms' parameter to std::vector.  Update all callers.
418
419 2018-08-29  Keith Seitz  <keiths@redhat.com>
420
421         * linespec.c (struct linespec) <label_symbols>: Change type to
422         std::vector.  Update all users.
423         (find_label_symbols_in_block): Change `result' parameter to
424         std::vector.  Update all callers.
425         (find_label_symbols): Return std::vector.  Update all callers.
426
427 2018-08-29  Keith Seitz  <keiths@redhat.com>
428
429         * linespec.c (struct linespec) <function_symbols>: Change type to
430         std::vector.  Update all users.
431         (struct collect_info) <function_symbols>: Likewise.
432         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
433         (std_compare_symbols): New function.
434         (find_method, find_function_symbols, find_linespec_symbols)
435         (find_label_symbols_in_block): Change `symbols' parameter to
436         std::vector.  Update all callers.
437         (find_label_symbols): Likewise for `function_symbols' and
438         `label_funcs_ret'.
439
440 2018-08-29  Keith Seitz  <keiths@redhat.com>
441
442         * linespec.c (symtab_vector_up): Define.
443         (struct linespec) <file_symtabs>: Change type to std::vector *.
444         Update all uses.
445         (struct collect_info) <file_symtabs>: Likewise.
446         (collect_symtabs_from_filename): Return symtab_vector_up.
447         Update all callers.
448         (decode_objc): Remove cleanup.
449         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
450         (symtab_collector::release_symtabs): Return symtab_vector_up.
451         Update all callers.
452         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
453         Update all users.
454         (collect_symtabs_from_filename, symtabs_from_filename): Return
455         symtab_vector_up.  Update all callers.
456
457 2018-08-29  Tom Tromey  <tom@tromey.com>
458
459         * csky-tdep.c (csky_analyze_prologue): Use
460         core_addr_to_string_nz.
461
462 2018-08-29  Tom Tromey  <tom@tromey.com>
463
464         * windows-nat.c (struct xlate_exception) <them>: Change type to
465         DWORD.
466         (xlate): Fix formatting.  Remove last entry.
467         (struct xlate_exception, xlate): Comment out.
468         (windows_nat_target::resume): Use ranged for.
469
470 2018-08-29  Jim Wilson  <jimw@sifive.com>
471
472         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
473         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
474         of NT_PRFPREG.
475         (riscv_linux_nat_target::store_registers): Likewise.
476
477 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
478
479         PR gdb/23555
480         PR gdb/23558
481         * gnulib/aclocal.m4: Regenerate.
482         * gnulib/config.in: Regenerate.
483         * gnulib/configure: Regenerate.
484         * gnulib/import/Makefile.am: Update.
485         * gnulib/import/Makefile.in: Update.
486         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
487         * gnulib/import/_Noreturn.h: ... this.
488         * gnulib/import/alloca.in.h: Update.
489         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
490         * gnulib/import/arg-nonnull.h: ... this.
491         * gnulib/import/assure.h: Update.
492         * gnulib/import/at-func.c: Update.
493         * gnulib/import/basename-lgpl.c: Update.
494         * gnulib/import/extra/snippet/c++defs.h: Rename to...
495         * gnulib/import/c++defs.h: ... this.
496         * gnulib/import/canonicalize-lgpl.c: Update.
497         * gnulib/import/cdefs.h: Update.
498         * gnulib/import/chdir-long.c: Update.
499         * gnulib/import/chdir-long.h: Update.
500         * gnulib/import/cloexec.c: Update.
501         * gnulib/import/cloexec.h: Update.
502         * gnulib/import/close.c: Update.
503         * gnulib/import/closedir.c: Update.
504         * gnulib/import/config.charset: Update.
505         * gnulib/import/dirent-private.h: Update.
506         * gnulib/import/dirent.in.h: Update.
507         * gnulib/import/dirfd.c: Update.
508         * gnulib/import/dirname-lgpl.c: Update.
509         * gnulib/import/dirname.h: Update.
510         * gnulib/import/dosname.h: Update.
511         * gnulib/import/dup-safer-flag.c: Update.
512         * gnulib/import/dup-safer.c: Update.
513         * gnulib/import/dup.c: Update.
514         * gnulib/import/dup2.c: Update.
515         * gnulib/import/errno.in.h: Update.
516         * gnulib/import/error.c: Update.
517         * gnulib/import/error.h: Update.
518         * gnulib/import/exitfail.c: Update.
519         * gnulib/import/exitfail.h: Update.
520         * gnulib/import/extra/update-copyright: Update.
521         * gnulib/import/fchdir.c: Update.
522         * gnulib/import/fcntl.c: Update.
523         * gnulib/import/fcntl.in.h: Update.
524         * gnulib/import/fd-hook.c: Update.
525         * gnulib/import/fd-hook.h: Update.
526         * gnulib/import/fd-safer-flag.c: Update.
527         * gnulib/import/fd-safer.c: Update.
528         * gnulib/import/fdopendir.c: Update.
529         * gnulib/import/filename.h: Update.
530         * gnulib/import/filenamecat-lgpl.c: Update.
531         * gnulib/import/filenamecat.h: Update.
532         * gnulib/import/flexmember.h: Update.
533         * gnulib/import/float+.h: Update.
534         * gnulib/import/float.c: Update.
535         * gnulib/import/float.in.h: Update.
536         * gnulib/import/fnmatch.c: Update.
537         * gnulib/import/fnmatch.in.h: Update.
538         * gnulib/import/fnmatch_loop.c: Update.
539         * gnulib/import/fpucw.h: Update.
540         * gnulib/import/frexp.c: Update.
541         * gnulib/import/frexpl.c: Update.
542         * gnulib/import/fstat.c: Update.
543         * gnulib/import/fstatat.c: Update.
544         * gnulib/import/getcwd-lgpl.c: Update.
545         * gnulib/import/getcwd.c: Update.
546         * gnulib/import/getdtablesize.c: Update.
547         * gnulib/import/getlogin_r.c: Update.
548         * gnulib/import/getprogname.c: Update.
549         * gnulib/import/getprogname.h: Update.
550         * gnulib/import/gettext.h: Update.
551         * gnulib/import/gettimeofday.c: Update.
552         * gnulib/import/glob-libc.h: Update.
553         * gnulib/import/glob.c: Update.
554         * gnulib/import/glob.in.h: Update.
555         * gnulib/import/glob_internal.h: Update.
556         * gnulib/import/glob_pattern_p.c: Update.
557         * gnulib/import/globfree.c: Update.
558         * gnulib/import/hard-locale.c: Update.
559         * gnulib/import/hard-locale.h: Update.
560         * gnulib/import/intprops.h: Update.
561         * gnulib/import/inttypes.in.h: Update.
562         * gnulib/import/isnan.c: Update.
563         * gnulib/import/isnand-nolibm.h: Update.
564         * gnulib/import/isnand.c: Update.
565         * gnulib/import/isnanl-nolibm.h: Update.
566         * gnulib/import/isnanl.c: Update.
567         * gnulib/import/itold.c: Update.
568         * gnulib/import/libc-config.h: Update.
569         * gnulib/import/limits.in.h: Update.
570         * gnulib/import/localcharset.c: Update.
571         * gnulib/import/localcharset.h: Update.
572         * gnulib/import/localtime-buffer.c: Update.
573         * gnulib/import/localtime-buffer.h: Update.
574         * gnulib/import/lstat.c: Update.
575         * gnulib/import/m4/00gnulib.m4: Update.
576         * gnulib/import/m4/__inline.m4: Update.
577         * gnulib/import/m4/absolute-header.m4: Update.
578         * gnulib/import/m4/alloca.m4: Update.
579         * gnulib/import/m4/builtin-expect.m4: Update.
580         * gnulib/import/m4/canonicalize.m4: Update.
581         * gnulib/import/m4/chdir-long.m4: Update.
582         * gnulib/import/m4/close.m4: Update.
583         * gnulib/import/m4/closedir.m4: Update.
584         * gnulib/import/m4/configmake.m4: Update.
585         * gnulib/import/m4/d-ino.m4: Update.
586         * gnulib/import/m4/d-type.m4: Update.
587         * gnulib/import/m4/dirent_h.m4: Update.
588         * gnulib/import/m4/dirfd.m4: Update.
589         * gnulib/import/m4/dirname.m4: Update.
590         * gnulib/import/m4/double-slash-root.m4: Update.
591         * gnulib/import/m4/dup.m4: Update.
592         * gnulib/import/m4/dup2.m4: Update.
593         * gnulib/import/m4/eealloc.m4: Update.
594         * gnulib/import/m4/environ.m4: Update.
595         * gnulib/import/m4/errno_h.m4: Update.
596         * gnulib/import/m4/error.m4: Update.
597         * gnulib/import/m4/exponentd.m4: Update.
598         * gnulib/import/m4/exponentl.m4: Update.
599         * gnulib/import/m4/extensions.m4: Update.
600         * gnulib/import/m4/extern-inline.m4: Update.
601         * gnulib/import/m4/fchdir.m4: Update.
602         * gnulib/import/m4/fcntl-o.m4: Update.
603         * gnulib/import/m4/fcntl.m4: Update.
604         * gnulib/import/m4/fcntl_h.m4: Update.
605         * gnulib/import/m4/fdopendir.m4: Update.
606         * gnulib/import/m4/filenamecat.m4: Update.
607         * gnulib/import/m4/flexmember.m4: Update.
608         * gnulib/import/m4/float_h.m4: Update.
609         * gnulib/import/m4/fnmatch.m4: Update.
610         * gnulib/import/m4/fnmatch_h.m4: Update.
611         * gnulib/import/m4/fpieee.m4: Update.
612         * gnulib/import/m4/frexp.m4: Update.
613         * gnulib/import/m4/frexpl.m4: Update.
614         * gnulib/import/m4/fstat.m4: Update.
615         * gnulib/import/m4/fstatat.m4: Update.
616         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
617         * gnulib/import/m4/getcwd-path-max.m4: Update.
618         * gnulib/import/m4/getcwd.m4: Update.
619         * gnulib/import/m4/getdtablesize.m4: Update.
620         * gnulib/import/m4/getlogin.m4: Update.
621         * gnulib/import/m4/getlogin_r.m4: Update.
622         * gnulib/import/m4/getpagesize.m4: Update.
623         * gnulib/import/m4/getprogname.m4: Update.
624         * gnulib/import/m4/gettimeofday.m4: Update.
625         * gnulib/import/m4/glibc21.m4: Update.
626         * gnulib/import/m4/glob.m4: Update.
627         * gnulib/import/m4/glob_h.m4: Update.
628         * gnulib/import/m4/gnulib-cache.m4: Update.
629         * gnulib/import/m4/gnulib-common.m4: Update.
630         * gnulib/import/m4/gnulib-comp.m4: Update.
631         * gnulib/import/m4/gnulib-tool.m4: Update.
632         * gnulib/import/m4/hard-locale.m4: Update.
633         * gnulib/import/m4/include_next.m4: Update.
634         * gnulib/import/m4/inttypes-pri.m4: Update.
635         * gnulib/import/m4/inttypes.m4: Update.
636         * gnulib/import/m4/isnand.m4: Update.
637         * gnulib/import/m4/isnanl.m4: Update.
638         * gnulib/import/m4/largefile.m4: Update.
639         * gnulib/import/m4/limits-h.m4: Update.
640         * gnulib/import/m4/localcharset.m4: Update.
641         * gnulib/import/m4/locale-fr.m4: Update.
642         * gnulib/import/m4/locale-ja.m4: Update.
643         * gnulib/import/m4/locale-zh.m4: Update.
644         * gnulib/import/m4/localtime-buffer.m4: Update.
645         * gnulib/import/m4/longlong.m4: Update.
646         * gnulib/import/m4/lstat.m4: Update.
647         * gnulib/import/m4/malloc.m4: Update.
648         * gnulib/import/m4/malloca.m4: Update.
649         * gnulib/import/m4/math_h.m4: Update.
650         * gnulib/import/m4/mbrtowc.m4: Update.
651         * gnulib/import/m4/mbsinit.m4: Update.
652         * gnulib/import/m4/mbsrtowcs.m4: Update.
653         * gnulib/import/m4/mbstate_t.m4: Update.
654         * gnulib/import/m4/memchr.m4: Update.
655         * gnulib/import/m4/memmem.m4: Update.
656         * gnulib/import/m4/mempcpy.m4: Update.
657         * gnulib/import/m4/memrchr.m4: Update.
658         * gnulib/import/m4/mkdir.m4: Update.
659         * gnulib/import/m4/mkstemp.m4: Update.
660         * gnulib/import/m4/mmap-anon.m4: Update.
661         * gnulib/import/m4/mode_t.m4: Update.
662         * gnulib/import/m4/msvc-inval.m4: Update.
663         * gnulib/import/m4/msvc-nothrow.m4: Update.
664         * gnulib/import/m4/multiarch.m4: Update.
665         * gnulib/import/m4/nocrash.m4: Update.
666         * gnulib/import/m4/off_t.m4: Update.
667         * gnulib/import/m4/onceonly.m4: Update.
668         * gnulib/import/m4/open-cloexec.m4: Update.
669         * gnulib/import/m4/open.m4: Update.
670         * gnulib/import/m4/openat.m4: Update.
671         * gnulib/import/m4/opendir.m4: Update.
672         * gnulib/import/m4/pathmax.m4: Update.
673         * gnulib/import/m4/rawmemchr.m4: Update.
674         * gnulib/import/m4/readdir.m4: Update.
675         * gnulib/import/m4/readlink.m4: Update.
676         * gnulib/import/m4/realloc.m4: Update.
677         * gnulib/import/m4/rename.m4: Update.
678         * gnulib/import/m4/rewinddir.m4: Update.
679         * gnulib/import/m4/rmdir.m4: Update.
680         * gnulib/import/m4/save-cwd.m4: Update.
681         * gnulib/import/m4/secure_getenv.m4: Update.
682         * gnulib/import/m4/setenv.m4: Update.
683         * gnulib/import/m4/signal_h.m4: Update.
684         * gnulib/import/m4/ssize_t.m4: Update.
685         * gnulib/import/m4/stat-time.m4: Update.
686         * gnulib/import/m4/stat.m4: Update.
687         * gnulib/import/m4/std-gnu11.m4: Update.
688         * gnulib/import/m4/stdbool.m4: Update.
689         * gnulib/import/m4/stddef_h.m4: Update.
690         * gnulib/import/m4/stdint.m4: Update.
691         * gnulib/import/m4/stdio_h.m4: Update.
692         * gnulib/import/m4/stdlib_h.m4: Update.
693         * gnulib/import/m4/strchrnul.m4: Update.
694         * gnulib/import/m4/strdup.m4: Update.
695         * gnulib/import/m4/strerror.m4: Update.
696         * gnulib/import/m4/string_h.m4: Update.
697         * gnulib/import/m4/strstr.m4: Update.
698         * gnulib/import/m4/strtok_r.m4: Update.
699         * gnulib/import/m4/sys_socket_h.m4: Update.
700         * gnulib/import/m4/sys_stat_h.m4: Update.
701         * gnulib/import/m4/sys_time_h.m4: Update.
702         * gnulib/import/m4/sys_types_h.m4: Update.
703         * gnulib/import/m4/tempname.m4: Update.
704         * gnulib/import/m4/time_h.m4: Update.
705         * gnulib/import/m4/unistd-safer.m4: Update.
706         * gnulib/import/m4/unistd_h.m4: Update.
707         * gnulib/import/m4/warn-on-use.m4: Update.
708         * gnulib/import/m4/wchar_h.m4: Update.
709         * gnulib/import/m4/wchar_t.m4: Update.
710         * gnulib/import/m4/wctype_h.m4: Update.
711         * gnulib/import/m4/wint_t.m4: Update.
712         * gnulib/import/malloc.c: Update.
713         * gnulib/import/malloc/scratch_buffer.h: Update.
714         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
715         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
716         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
717         * gnulib/import/malloca.c: Update.
718         * gnulib/import/malloca.h: Update.
719         * gnulib/import/malloca.valgrind: Update.
720         * gnulib/import/math.in.h: Update.
721         * gnulib/import/mbrtowc.c: Update.
722         * gnulib/import/mbsinit.c: Update.
723         * gnulib/import/mbsrtowcs-impl.h: Update.
724         * gnulib/import/mbsrtowcs-state.c: Update.
725         * gnulib/import/mbsrtowcs.c: Update.
726         * gnulib/import/memchr.c: Update.
727         * gnulib/import/memmem.c: Update.
728         * gnulib/import/mempcpy.c: Update.
729         * gnulib/import/memrchr.c: Update.
730         * gnulib/import/mkdir.c: Update.
731         * gnulib/import/mkstemp.c: Update.
732         * gnulib/import/msvc-inval.c: Update.
733         * gnulib/import/msvc-inval.h: Update.
734         * gnulib/import/msvc-nothrow.c: Update.
735         * gnulib/import/msvc-nothrow.h: Update.
736         * gnulib/import/open.c: Update.
737         * gnulib/import/openat-die.c: Update.
738         * gnulib/import/openat-priv.h: Update.
739         * gnulib/import/openat-proc.c: Update.
740         * gnulib/import/openat.c: Update.
741         * gnulib/import/openat.h: Update.
742         * gnulib/import/opendir.c: Update.
743         * gnulib/import/pathmax.h: Update.
744         * gnulib/import/pipe-safer.c: Update.
745         * gnulib/import/rawmemchr.c: Update.
746         * gnulib/import/readdir.c: Update.
747         * gnulib/import/readlink.c: Update.
748         * gnulib/import/realloc.c: Update.
749         * gnulib/import/ref-add.sin: Update.
750         * gnulib/import/ref-del.sin: Update.
751         * gnulib/import/rename.c: Update.
752         * gnulib/import/rewinddir.c: Update.
753         * gnulib/import/rmdir.c: Update.
754         * gnulib/import/same-inode.h: Update.
755         * gnulib/import/save-cwd.c: Update.
756         * gnulib/import/save-cwd.h: Update.
757         * gnulib/import/scratch_buffer.h: Update.
758         * gnulib/import/secure_getenv.c: Update.
759         * gnulib/import/setenv.c: Update.
760         * gnulib/import/signal.in.h: Update.
761         * gnulib/import/stat-time.c: Update.
762         * gnulib/import/stat-time.h: Update.
763         * gnulib/import/stat-w32.c: Update.
764         * gnulib/import/stat-w32.h: Update.
765         * gnulib/import/stat.c: Update.
766         * gnulib/import/stdbool.in.h: Update.
767         * gnulib/import/stddef.in.h: Update.
768         * gnulib/import/stdint.in.h: Update.
769         * gnulib/import/stdio.in.h: Update.
770         * gnulib/import/stdlib.in.h: Update.
771         * gnulib/import/str-two-way.h: Update.
772         * gnulib/import/strchrnul.c: Update.
773         * gnulib/import/strdup.c: Update.
774         * gnulib/import/streq.h: Update.
775         * gnulib/import/strerror-override.c: Update.
776         * gnulib/import/strerror-override.h: Update.
777         * gnulib/import/strerror.c: Update.
778         * gnulib/import/string.in.h: Update.
779         * gnulib/import/stripslash.c: Update.
780         * gnulib/import/strnlen1.c: Update.
781         * gnulib/import/strnlen1.h: Update.
782         * gnulib/import/strstr.c: Update.
783         * gnulib/import/strtok_r.c: Update.
784         * gnulib/import/sys_stat.in.h: Update.
785         * gnulib/import/sys_time.in.h: Update.
786         * gnulib/import/sys_types.in.h: Update.
787         * gnulib/import/tempname.c: Update.
788         * gnulib/import/tempname.h: Update.
789         * gnulib/import/time.in.h: Update.
790         * gnulib/import/unistd--.h: Update.
791         * gnulib/import/unistd-safer.h: Update.
792         * gnulib/import/unistd.in.h: Update.
793         * gnulib/import/unsetenv.c: Update.
794         * gnulib/import/verify.h: Update.
795         * gnulib/import/extra/snippet/warn-on-use.h: Update.
796         * gnulib/import/wchar.in.h: Update.
797         * gnulib/import/wctype.in.h: Update.
798         * gnulib/import/xalloc-oversized.h: Update.
799         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
800         "53e2c179f26a890fa6685af4b6c1397ee370433b".
801
802 2018-08-16  Gary Benson <gbenson@redhat.com>
803
804         PR gdb/13000:
805         * gdb/main.c (captured_main_1): Exit with nonzero status
806         in batch mode if the last command to be executed failed.
807         * NEWS: Mention the above.
808
809 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
810
811         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
812         end of warning message.
813
814 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
815
816         PR gdb/22943:
817         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
818         (aarch64_extract_return_value): Use
819         aapcs_is_vfp_call_or_return_candidate.
820         (aarch64_return_in_memory): Likewise.
821         (aarch64_store_return_value): Likewise.
822
823 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
824
825         * aarch64-tdep.c
826         (aapcs_is_vfp_call_or_return_candidate): Make static
827         (pass_in_v_or_stack): Remove function.
828         (pass_in_v_vfp_candidate): New function.
829         (aarch64_push_dummy_call): Check for float register candidates.
830
831 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
832
833         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
834         (aapcs_is_vfp_call_or_return_candidate_1): New function.
835         (aapcs_is_vfp_call_or_return_candidate): Likewise.
836
837 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
838
839         PR build/23399
840         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
841         (struct ipa_sym_addresses): Rename to...
842         (struct ipa_sym_addresses_common): ... this.
843         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
844
845 2018-08-28  Tom Tromey  <tom@tromey.com>
846
847         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
848         (token_fifo): Now a std::vector.
849         (yylex, c_parse): Update.
850         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
851         (token_fifo): Now a std::vector.
852         (yylex, d_parse): Update.
853         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
854         (token_fifo): Now a std::vector.
855         (yylex, go_parse): Update.
856
857 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
858
859         * parser-defs.h (struct type_stack) <elements>: Change type to
860         std::vector<union type_stack_elt>.
861         <depth, size>: Remove.
862         * parse.c (parse_exp_in_context_1): Adjust.
863         (type_stack_reserve): Remove.
864         (check_type_stack_depth): Remove.
865         (insert_into_type_stack): Adjust to std::vector.
866         (insert_type): Likewise.
867         (push_type): Likewise.
868         (push_type_int): Likewise.
869         (insert_type_address_space): Likewise.
870         (pop_type): Likewise.
871         (pop_type_int): Likewise.
872         (pop_typelist): Likewise.
873         (pop_type_stack): Likewise.
874         (append_type_stack): Likewise.
875         (push_type_stack): Likewise.
876         (get_type_stack): Likewise.
877         (type_stack_cleanup): Likewise.
878         (push_typelist): Likewise.
879         (follow_types): Likewise.
880         (_initialize_parse): Likewise.
881
882 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
883
884         * NEWS: Mention csky target.
885
886 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
887             Hafiz Abid Qadeer  <abidh@codesourcery.com>
888             Don Breazeal  <donb@codesourcery.com>
889
890         * csky-linux-tdep.c: New file.
891         * csky-tdep.c: Likewise.
892         * csky-tdep.h: Likewise.
893         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
894         csky-tdep.o.
895         (HFILES_NO_SRCDIR): Add csky-tdep.h.
896         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
897         * configure.tgt: Add csky support.
898
899 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
900
901         * python/py-framefilter.c (py_print_frame): Print frame architecture
902         when printing on an MI output.
903
904 2018-08-27  Tom Tromey  <tom@tromey.com>
905
906         PR build/23087:
907         * configure: Rebuild.
908         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
909
910 2018-08-27  Tom Tromey  <tom@tromey.com>
911
912         * aarch64-linux-tdep.c
913         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
914         casts to int.
915
916 2018-08-27  Tom Tromey  <tom@tromey.com>
917
918         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
919         unsigned.
920         (ppc64_standard_linkage1, ppc64_standard_linkage2)
921         (ppc64_standard_linkage3, ppc64_standard_linkage4)
922         (ppc64_standard_linkage5, ppc64_standard_linkage6)
923         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
924         unsigned.
925
926 2018-08-27  Tom Tromey  <tom@tromey.com>
927
928         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
929         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
930
931 2018-08-27  Tom Tromey  <tom@tromey.com>
932
933         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
934         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
935         ULONGEST_MAX.
936         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
937         ULONGEST_MAX.
938         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
939         ULONGEST_MAX.
940         * sparc-linux-tdep.c (sparc32_linux_sigframe)
941         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
942         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
943         ULONGEST_MAX.
944         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
945         (ppc64_linux_sigaction_tramp_frame)
946         (ppc32_linux_sighandler_tramp_frame)
947         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
948         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
949         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
950         * mn10300-linux-tdep.c (am33_linux_sigframe)
951         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
952         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
953         * mips-linux-tdep.c (mips_linux_o32_sigframe)
954         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
955         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
956         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
957         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
958         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
959         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
960         * microblaze-linux-tdep.c
961         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
962         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
963         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
964         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
965         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
966         * common/common-types.h (ULONGEST_MAX): New define.
967         (CORE_ADDR_MAX): Fix formatting.
968         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
969         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
970         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
971         (arm_linux_rt_sigreturn_tramp_frame)
972         (arm_eabi_linux_sigreturn_tramp_frame)
973         (arm_eabi_linux_rt_sigreturn_tramp_frame)
974         (thumb2_eabi_linux_sigreturn_tramp_frame)
975         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
976         (arm_linux_restart_syscall_tramp_frame)
977         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
978         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
979         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
980         ULONGEST_MAX.
981         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
982
983 2018-08-27  Tom Tromey  <tom@tromey.com>
984
985         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
986         CORE_ADDR_MAX.
987         * mips-tdep.c (mips_deal_with_atomic_sequence)
988         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
989         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
990         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
991         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
992         CORE_ADDR_MAX.
993         * aarch64-tdep.c (aarch64_software_single_step): Use
994         CORE_ADDR_MAX.
995
996 2018-08-27  Tom Tromey  <tom@tromey.com>
997
998         * linespec.c (complete_linespec_component): Add cast to "char".
999         * completer.c (completion_tracker::build_completion_result): Add
1000         cast to "char".
1001
1002 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1003
1004         * solist.h (struct solist, struct target_so_ops): Fix
1005         indentation.
1006
1007 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1008
1009         * ada-tasks.c (ada_task_info_s): Remove typedef.
1010         (DEF_VEC_O(ada_task_info_s)): Remove.
1011         (struct ada_tasks_inferior_data): Initialize fields.
1012         <task_list>: Make an std::vector.
1013         (get_ada_tasks_inferior_data): Allocate with new.
1014         (ada_get_task_number): Adjust.
1015         (get_task_number_from_id): Likewise.
1016         (valid_task_id): Likewise.
1017         (ada_get_task_info_from_ptid): Likewise.
1018         (iterate_over_live_ada_tasks): Likewise.
1019         (add_ada_task): Likewise.
1020         (read_known_tasks): Likewise.
1021         (ada_build_task_list): Likewise.
1022         (print_ada_task_info): Likewise.
1023         (info_task): Likewise.
1024         (task_command_1): Likewise.
1025
1026 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1027
1028         * ada-lang.c (add_angle_brackets): Return std::string.
1029
1030 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
1031
1032         * python/py-threadevent.c (py_get_event_thread): Initialize
1033         pythread.
1034
1035 2018-08-24  Pedro Alves  <palves@redhat.com>
1036
1037         * python/py-bpevent.c (create_breakpoint_event_object): Use
1038         copy-initialization.
1039         * python/py-continueevent.c (emit_continue_event): Use
1040         copy-initialization.
1041         * python/py-exitedevent.c (create_exited_event_object): Return a
1042         gdbpy_ref<>.
1043         (emit_exited_event): Use copy-initialization.
1044         * python/py-inferior.c (python_new_inferior)
1045         (python_inferior_deleted, add_thread_object): Use
1046         copy-initialization.
1047         * python/py-infevents.c (create_inferior_call_event_object)
1048         (create_register_changed_event_object)
1049         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1050         (emit_inferior_call_event, emit_memory_changed_event)
1051         (emit_register_changed_event): Use copy-initialization.
1052         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1053         Return a gdbpy_ref<>.
1054         (emit_new_objfile_event): Use copy-initialization.
1055         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1056         (emit_clear_objfiles_event): Use copy-initialization.
1057         * python/py-signalevent.c (create_signal_event_object): Use
1058         copy-initialization.
1059         * python/py-threadevent.c (create_thread_event_object): Use
1060         copy-initialization.
1061
1062 2018-08-24  Pedro Alves  <palves@redhat.com>
1063             Simon Marchi  <simon.marchi@ericsson.com>
1064
1065         PR gdb/23379
1066         * python/py-continueevent.c: Include "gdbthread.h".
1067         (create_continue_event_object): Add intro comment.  Add 'ptid'
1068         parameter.  Use it to find thread to pass to
1069         create_thread_event_object.
1070         (emit_continue_event): Pass PTID down to
1071         create_continue_event_object.
1072         * python/py-event.h (py_get_event_thread): Declare.
1073         (create_thread_event_object): Remove default from 'thread'
1074         parameter.
1075         * python/py-stopevent.c (create_stop_event_object): Use
1076         py_get_event_thread.
1077         * python/py-threadevent.c (get_event_thread): Rename to ...
1078         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1079         and use it to find the thread.
1080         (create_thread_event_object): Assert that THREAD isn't null.
1081         Don't find the event thread here.
1082
1083 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1084
1085         * block.h (blockrange, blockranges): New struct declarations.
1086         (struct block): Add new field named `ranges'.
1087         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1088         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1089         macros for accessing ranges in struct block.
1090         (make_blockranges): New declaration.
1091         block.c (make_blockranges): New function.
1092         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1093         for block.
1094         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1095         * blockframe.c (cache_pc_function_block): New static global.
1096         (clear_pc_function_cache): Clear cache_pc_function_block.
1097         (find_pc_partial_function): Move comment to symtab.h.  Add
1098         support for non-contiguous blocks.
1099         * cli/cli-cmds.c (block.h): Include.
1100         (print_disassembly): Handle printing of non-contiguous blocks.
1101         (disassemble_current_function): Likewise.
1102         (disassemble_command): Likewise.
1103
1104         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1105         BLOCK_START.
1106         * blockframe.c (get_pc_function_start): Likewise.
1107         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1108         (gcc_symbol_address): Likewise.
1109         * compile/compile-object-run.c (compile_object_run): Likewise.
1110         * compile/compile.c (get_expr_block_and_pc): Likewise.
1111         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1112         (func_addr_to_tail_call_list): Likewise.
1113         * findvar.c (default_read_var_value): Likewise.
1114         * inline-frame.c (inline_frame_this_id): Likewise.
1115         (skip-inline_frames): Likewise.
1116         * infcmd.c (until_next_command): Likewise.
1117         * linespec.c (convert_linespec_to_sals): Likewise.
1118         * parse.c (parse_exp_in_context_1): Likewise.
1119         * printcmd.c (build_address_symbolic): likewise.
1120         (info_address_command): Likewise.
1121         symtab.c (find_function_start_sal): Likewise.
1122         (skip_prologue_sal): Likewise.
1123         (find_function_alias_target): Likewise.
1124         (find_gnu_ifunc): Likewise.
1125         * stack.c (find_frame_funname): Likewise.
1126         * symtab.c (fixup_symbol_section): Likewise.
1127         (find_function_start_sal): Likewise.
1128         (skip_prologue_sal): Likewsie.
1129         (find_function_alias_target): Likewise.
1130         (find_gnu_ifunc): Likewise.
1131         * tracepoint.c (info_scope_command): Likewise.
1132         * value.c (value_fn_field): Likewise.
1133
1134         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1135         in place of find_pc_partial_function.
1136         * blockframe.c (find_function_entry_range_from_pc): New function.
1137         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1138         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1139         for each range in a block.
1140
1141
1142 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1143
1144         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1145         incrementation.
1146
1147 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1148
1149         * solib-svr4.c (read_program_headers_from_bfd): Return
1150         gdb::optional<gdb::byte_vector>.
1151         (svr4_exec_displacement): Adjust.
1152
1153 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1154
1155         * solib-svr4.c (read_program_header): Return
1156         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1157         (find_program_interpreter): Return
1158         gdb::optional<gdb::byte_vector>.
1159         (scan_dyntag_auxv): Adjust.
1160         (enable_break): Adjust.
1161         (svr4_exec_displacement): Adjust.
1162
1163 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1164
1165         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1166         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1167
1168 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1169
1170         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1171         string_vprintf.
1172         * guile/scm-utils.c (gdbscm_printf): Likewise.
1173         * serial.c (serial_printf): Likewise.
1174         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1175
1176 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1177
1178         * stack.c (print_frame): Print frame architecture when printing on
1179         an MI output.
1180         * NEWS: Mention new "arch" attribute in frame output.
1181
1182 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1183
1184         * arch/aarch64.h (aarch64_regnum): Update comment.
1185
1186 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1187
1188         * NEWS: Add SVE to 8.2 section.
1189
1190 2018-08-21  Pedro Alves  <palves@redhat.com>
1191
1192         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1193         out from gdbscm_parse_function_args.
1194         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1195         gdbscm_parse_function_args_1.
1196
1197 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1198
1199         PR gdb/17816
1200         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1201         operator.
1202
1203 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1204
1205         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1206
1207 2018-08-19  Michael Spang  <spang@google.com>
1208
1209         PR gdb/11786
1210         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1211         for PT_TLS segments.
1212
1213 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1214
1215         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1216         dwarf_variable_value.
1217         * dwarf2-frame.c (class dwarf_expr_executor):
1218         Add override for dwarf_variable_value.
1219         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1220         (class symbol_needs_eval_context): Likewise.
1221         (indirect_synthetic_pointer): Add forward declaration.
1222         (sect_variable_value): New function.
1223         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1224         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1225         for DW_OP_GNU_variable_value.
1226
1227 2018-08-16  Tom Tromey  <tom@tromey.com>
1228
1229         * top.c (read_command_file): Update.
1230         (command_line_input): Remove "repeat" argument.
1231         * ada-lang.c (get_selections): Update.
1232         * linespec.c (decode_line_2): Update.
1233         * defs.h (command_line_input): Remove argument.
1234         * cli/cli-script.c (read_next_line): Update.
1235         * python/py-gdb-readline.c: Update.
1236
1237 2018-08-17  Tom Tromey  <tom@tromey.com>
1238
1239         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1240         command_line_input.
1241
1242 2018-08-15  Tom Tromey  <tom@tromey.com>
1243
1244         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1245
1246 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1247
1248         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1249         If used, use find_pc_partial_function to find address range
1250         to disassemble.
1251         * mi/mi-main.c (mi_cmd_list_features): Report
1252         "data-disassemble-a-option" feature.
1253         * NEWS: Mention new -data-disassemble option -a.
1254
1255 2018-08-13  Tom Tromey  <tom@tromey.com>
1256
1257         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1258
1259 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1260
1261         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1262         (aarch64_linux_collect_sve_regset): Likewise.
1263         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1264         * regcache.h (regcache_map_entry_size): New function.
1265
1266 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1267
1268         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1269         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1270         (SVE_HEADER_VL_LENGTH): Likewise.
1271         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1272         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1273         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1274         (SVE_HEADER_SIZE_OFFSET): Likewise.
1275         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1276         (SVE_HEADER_VL_OFFSET): Likewise.
1277         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1278         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1279         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1280         (SVE_HEADER_SIZE): Likewise.
1281         (aarch64_linux_core_read_vq): Add function.
1282         (aarch64_linux_core_read_description): Check for SVE section.
1283
1284 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1285
1286         * aarch64-fbsd-tdep.c
1287         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1288         collect_size.
1289         * aarch64-linux-tdep.c
1290         (aarch64_linux_iterate_over_regset_sections): Likewise.
1291         * alpha-linux-tdep.c
1292         (alpha_linux_iterate_over_regset_sections):
1293         * alpha-nbsd-tdep.c
1294         (alphanbsd_iterate_over_regset_sections): Likewise.
1295         * amd64-fbsd-tdep.c
1296         (amd64fbsd_iterate_over_regset_sections): Likewise.
1297         * amd64-linux-tdep.c
1298         (amd64_linux_iterate_over_regset_sections): Likewise.
1299         * arm-bsd-tdep.c
1300         (armbsd_iterate_over_regset_sections): Likewise.
1301         * arm-fbsd-tdep.c
1302         (arm_fbsd_iterate_over_regset_sections): Likewise.
1303         * arm-linux-tdep.c
1304         (arm_linux_iterate_over_regset_sections): Likewise.
1305         * corelow.c (get_core_registers_cb): Likewise.
1306         (core_target::fetch_registers): Likewise.
1307         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1308         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1309         * gdbarch.h (void): Regenerate.
1310         * gdbarch.sh: Add supply_size and collect_size.
1311         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1312         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1313         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1314         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1315         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1316         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1317         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1318         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1319         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1320         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1321         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1322         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1323         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1324         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1325         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1326         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1327         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1328         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1329         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1330         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1331         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1332         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1333         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1334         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1335         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1336         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1337         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1338         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1339         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1340         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1341
1342 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1343
1344         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1345         with string_printf.
1346
1347 2018-08-10  Keith Seitz  <keiths@redhat.com>
1348
1349         * compile/compile-c-support.c (add_code_header, add_code_footer):
1350         Move into policy class.
1351         (c_push_user_expression, pop_user_expression_nop)
1352         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1353         (compile_program): New host class.
1354         (c_compile_program): New typedef.
1355         (c_compute_porgram): Use c_compile_program.
1356
1357 2018-08-10  Keith Seitz  <keiths@redhat.com>
1358
1359         * compile/compile-internal.h (compile_instance::~compile_instance):
1360         Remove calls to htab_delete.
1361         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1362         * compile.c (compile_instance::compile_instance): Initialize
1363         htab unique pointers.
1364         (compile_instance::get_cached_type, compile_instance::insert_type)
1365         (compile_instance::error_symbol_once): Update for unique_ptr.
1366
1367 2018-08-10  Keith Seitz  <keiths@redhat.com>
1368
1369         * compile/compile-c-symbols.c (struct symbol_error)
1370         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1371         (compile_instance::insert_symbol_error)
1372         (compile_instance::error_symbol_once): Move to ...
1373         * compile/compile.c: ... here.
1374
1375 2018-08-10  Keith Seitz  <keiths@redhat.com>
1376
1377         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1378         instead of `new_compile_instance'.
1379         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1380         Update description.
1381         If the symbol error map is not initialized, create it.
1382         (generate_c_for_for_one_symbol): Do not check/initialize
1383         the symbol error map.
1384         * compile/compile-c-types.c (compile_c_instance): Make a class.
1385         Update all callers.
1386         (compile_instance::compile_instance): Initialize the type cache.
1387         (get_cached_type): New function.
1388         (insert_type): Update description.
1389         (compile_c_instance::m_default_cflags): Define.
1390         (convert_type): Update description.  Use get_cached_type.
1391         (delete_instance): Moved to destructor.
1392         (new_compile_instance): Moved to constructor.
1393         * compile/compile-c.h (compile_c_instance): Make class inheriting
1394         from compile_instance.
1395         <base>: Remove field.
1396         <type_map, symbol_err_map>: Move to base class.
1397         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1398         * compile/compile-internal.h (compile_instance): Make class.
1399         <type_map_t, symbol_err_map_t>: Define.
1400         <fe>: Rename to `m_gcc_fe'.
1401         <scope, block, gcc_target_options>: Add `m_' prefix.
1402         <m_type_map, m_symbol_err_map>: New fields, moved from
1403         compile_c_instance.
1404         <destroy>: Remove.
1405         (convert_type, new_compile_instance): Remove.
1406         * compile/compile.c (cleanup_compile_instance): Remove.
1407         (compile_to_object): Use unique_ptr to eliminate cleanups.
1408         (compile_instance::set_print_callback, compile_instance::version)
1409         (compile_instance::set_verbose)
1410         (compile_instance::set_driver_filename)
1411         (compile_instance::set_triplet_regexp)
1412         (compile_instance::set_arguments)
1413         (compile_instance::set_source_file)
1414         (compile_instance::compile): Define.
1415
1416 2018-08-10  Keith Seitz  <keiths@redhat.com>
1417
1418         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1419         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1420         gcc-c-fe.def to define C plugin.
1421         (delete_instance): Delete `c_plugin'.
1422         (new_compile_instance): Initialize `c_plugin'.
1423         * compile/compile-c.h: Include gcc_c_plugin.h.
1424         (struct compile_c_instance) <c_plugin>: New member.
1425         * gcc-c-plugin.h: New file.
1426         Update all callers with API change.
1427
1428 2018-08-10  Keith Seitz  <keiths@redhat.com>
1429
1430         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1431         (HFILES_NO_SRCDIR): ... to here.
1432         Add compile-internal.h and compile-c.h.
1433         * compile/compile-c-support.c: Include compile-c.h.
1434         * compile/compile-c-symbols.c: Include compile-c.h.
1435         (generate_c_for_variable_locations): Update comment.
1436         * compile/compile-c-types.c: Include compile-c.h.
1437         * compile/compile-c.h: New file -- moved C language declarations
1438         from other files here.
1439         * compile/compile-internal.h: Do not include hashtab.h or
1440         common/enum-flags.h.
1441         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1442         (gcc_convert_symbol, gcc_symbol_address)
1443         (generate_c_for_variable_locations, c_get_mode_for_size)
1444         (c_get_range_decl_name): Definitions moved to compile-c.h.
1445         * compile/compile-loc2c.c: Include compile-c.h.
1446
1447 2018-08-10  Keith Seitz  <keiths@redhat.com>
1448
1449         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1450         (c_symbol_substitution_name): ... this.
1451         Update all callers.
1452
1453 2018-08-10  Keith Seitz  <keiths@redhat.com>
1454
1455         * compile/compile-c-support.c (c_compute_program): Use
1456         unique_xmalloc_ptr to eliminate cleanup.
1457         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1458         Return a unique_xmalloc_ptr and eliminate cleanup.
1459         * compile/compile-internal.h (generate_c_for_variable_locations):
1460         Return unique_xmalloc_ptr and update description.
1461
1462 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1463
1464         * corelow.c (core_target::get_core_register_section): Rename
1465         min_size to section_min_size.
1466
1467 2018-08-09  Jim Wilson  <jimw@sifive.com>
1468
1469         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1470         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1471         * NEWS: Mention new GNU/Linux RISC-V target.
1472         * configure.host: Add riscv*-*-linux*.
1473         * configure.nat: Add riscv*.
1474         * configure.tgt: Add riscv*-*-linux*.
1475         * riscv-linux-nat.c: New file.
1476         * riscv-linux-tdep.c: New file.
1477
1478 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1479
1480         * infrun.c (resume): Make static, add forward declaration.
1481         (proceed): Update header comment.
1482         * infrun.h (resume): Delete declaration.
1483
1484 2018-08-09  Tom Tromey  <tom@tromey.com>
1485
1486         * riscv-tdep.h: Minor formatting fixes.
1487
1488 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1489
1490         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1491         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1492         (test_mkdir_recursive): Likewise.
1493         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1494
1495 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1496
1497         * valarith.c (value_subscripted_rvalue): If an array is not in
1498         memory, and we don't know the upper bound, then we can't know that
1499         the requested element exists or not.
1500
1501 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1502
1503         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1504         (target_options_to_string): Add comment.
1505
1506 2018-08-08  Tom Tromey  <tom@tromey.com>
1507
1508         * unittests/scoped_mmap-selftests.c: Check result of "write".
1509
1510 2018-08-08  Jim Wilson  <jimw@sifive.com>
1511
1512         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1513         (decode_register_index_short): New.
1514         (decode_j_type_insn, decode_cj_type_insn): New.
1515         (decode_b_type_insn, decode_cb_type_insn): New.
1516         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1517         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1518         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1519         is_c_sw_insn instead of is_sw_insn.
1520         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1521         (riscv_software_single_step): New.
1522         * riscv-tdep.h (riscv_software_single_step): Declare.
1523
1524         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1525         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1526
1527 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1528
1529         PR gdb/18050:
1530         * target.c (dispose_inferior): Don't dispose of inferiors that are
1531         already killed.
1532
1533 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1534
1535         * remote.c (remote_target::download_tracepoint): Change char* to
1536         const char*.
1537
1538 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1539
1540         * target.h (target_options_to_string): Return an std::string.
1541         * target.c (str_comma_list_concat_elem): Return void, use
1542         std::string.
1543         (do_option): Likewise.
1544         (target_options_to_string): Return an std::string.
1545         * linux-nat.c (linux_nat_target::wait): Adjust.
1546         * target-debug.h (target_debug_print_options): Adjust.
1547
1548 2018-08-07  Tom Tromey  <tom@tromey.com>
1549
1550         * Makefile.in (CPPFLAGS): New variable.
1551         (INTERNAL_CPPFLAGS): Use it.
1552
1553 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1554
1555         * NEWS: Mention the index cache.
1556
1557 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1558
1559         * common/pathstuff.h (get_standard_cache_dir): New.
1560         * common/pathstuff.c (get_standard_cache_dir): New.
1561         * build-id.h (build_id_to_string): New.
1562         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1563         DEBUG_STR_SUFFIX): Move to here.
1564         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1565         DEBUG_STR_SUFFIX): Move from there.
1566         (write_psymtabs_to_index): Make non-static, add basename
1567         parameter.  Write to temporary files, rename when done.
1568         (save_gdb_index_command): Adjust call to
1569         write_psymtabs_to_index.
1570         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1571         field.
1572         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1573         (get_gdb_index_contents_from_cache): New.
1574         (get_gdb_index_contents_from_cache_dwz): New.
1575         (dwarf2_initialize_objfile): Read index from cache.
1576         (dwarf2_build_psymtabs): Save to index.
1577         * dwarf-index-cache.h: New file.
1578         * dwarf-index-cache.c: New file.
1579         * dwarf-index-write.h: New file.
1580
1581 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1582
1583         * gnulib/aclocal.m4: Re-generate.
1584         * gnulib/config.in: Re-generate.
1585         * gnulib/configure: Re-generate.
1586         * gnulib/import/Makefile.am: Re-generate.
1587         * gnulib/import/Makefile.in: Re-generate.
1588         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1589         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1590         * gnulib/import/m4/mkdir.m4: New file.
1591         * gnulib/import/mkdir.c: New file.
1592         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1593         module.
1594
1595 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1596
1597         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1598         * common/scoped_mmap.c: New file.
1599         * common/scoped_mmap.h (destroy): New method.
1600         (~scoped_mmap, reset): Use destroy.
1601         (scoped_mmap): New move constructor.
1602         (mmap_file): New declaration.
1603         * unittests/scoped_mmap-selftests.c (test_normal,
1604         test_invalid_filename, run_tests): New functions.
1605         (_initialize_scoped_mmap_selftests): Register selftest.
1606
1607 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1608
1609         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1610         (read_gdb_index_from_buffer): ... this.  Remove section
1611         parameter, add buffer parameter.
1612         (get_gdb_index_contents_ftype,
1613         get_gdb_index_contents_dwz_ftype): New typedefs.
1614         (dwarf2_read_gdb_index): Add callback parameters to get the
1615         index contents.
1616         (get_gdb_index_contents_from_section): New.
1617         (dwarf2_initialize_objfile): Update call to
1618         dwarf2_read_gdb_index.
1619
1620 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1621
1622         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1623         (gdb_open_cloexec): Likewise.
1624         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1625         (commandline_from_pid): Likewise.
1626         (linux_xfer_osdata_threads): Likewise.
1627         (linux_xfer_osdata_fds): Likewise.
1628         * ada-lang.c (is_package_name): Likewise.
1629         * auxv.c (procfs_xfer_auxv): Likewise.
1630         * breakpoint.c (print_one_breakpoint_location): Use
1631         uiout::field_fmt.
1632         (print_one_catch_solib): Use string_printf.
1633         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1634         (add_pe_forwarded_sym): Likewise.
1635         * dwarf2read.c (create_type_unit_group): Likewise.
1636         (build_error_marker_type): Likewise.
1637         * infcall.c (get_function_name): Likewise.
1638         * valprint.c (print_converted_chars_to_obstack): Likewise.
1639         * xtensa-tdep.c (xtensa_register_type): Likewise.
1640
1641 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1642
1643         * remote.c (remote_target::download_tracepoint): Fix format
1644         string errors.
1645
1646 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1647
1648         * tracefile.c: Include common/byte-vector.h.
1649         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1650         with trace_regblock_size if needed.  Update uses of buf.
1651
1652 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1653
1654         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1655         std::vector<unsigned char>.
1656         * tracepoint.c (collection_list::collection_list): Remove
1657         m_regs_mask initializer from initializer list.  Resize
1658         m_regs_mask using the largest remote register number.
1659         (collection_list::add_remote_register): Remove size check on
1660         m_regs_mask.  Use at to access element.
1661         (collection_list::stringify): Change type of temp_buf to
1662         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1663         stringify the register mask.  Use pack_hex_byte for the register
1664         mask.
1665
1666 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1667
1668         * tracepoint.h (class collection_list) <add_register>: Remove.
1669         <add_remote_register, add_ax_registers, add_local_register>:
1670         Declare.
1671         <add_memrange>: Add scope parameter.
1672         * tracepoint.c (encode_actions_1): Likewise.
1673         (collection_list::add_register): Rename to ...
1674         (collection_list::add_remote_register): ... this.  Update
1675         comment.
1676         (collection_list::add_ax_registers, add_local_register): New
1677         methods.
1678         (collection_list::add_memrange): Add scope parameter.  Call
1679         add_local_register instead of add_register.
1680         (finalize_tracepoint_aexpr): New function.
1681         (collection_list::collect_symbol): Update calls to add_memrange.
1682         Call add_local_register instead of add_register.  Call
1683         add_ax_registers.  Call finalize_tracepoint_aexpr.
1684         (encode_actions_1): Get remote regnos for $reg action.  Call
1685         add_remote_register, add_ax_registers, and add_local_register.
1686         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1687         (validate_actionline): Call finalize_tracepoint_aexpr.
1688
1689 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1690
1691         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1692         Replace array buf with gdb::char_vector buf, of size
1693         get_remote_packet_size ().  Replace references to buf and
1694         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1695         and xsnprintf with snprintf.  Raise errors if the buffer is too
1696         small.
1697
1698 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1699
1700         * remote.c (remote_target::download_tracepoint): Fix the has_more
1701         predicate in the QTDP action list iteration.
1702
1703 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1704
1705         * remote.c (remote_target::download_tracepoint): Fix indentation
1706         in for block.
1707
1708 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1709
1710         * proc-api.c (_initialize_proc_api): Remove c, unused.
1711         * procfs.c (procfs_init_inferior): Remove signals, unused.
1712         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1713         unused.
1714
1715 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1716             Andrew Burgess  <andrew.burgess@embecosm.com>
1717
1718         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1719         'W_STOPCODE (0)' as this could be ambiguous.
1720
1721 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1722
1723         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1724         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1725         "ai_socktype").
1726
1727 2018-08-02  Tom Tromey  <tom@tromey.com>
1728
1729         PR symtab/16842.
1730         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1731         symbols.
1732         (process_structure_scope): Likewise.
1733
1734 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1735
1736         PR gdb/22629:
1737         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1738         kill inferior.
1739
1740 2018-08-02  Tom Tromey  <tom@tromey.com>
1741
1742         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1743         (darwin_suspend_inferior, darwin_resume_inferior)
1744         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1745         (darwin_check_new_threads): Check result of get_darwin_inferior.
1746
1747 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1748
1749         GDB 8.1.1 released.
1750
1751 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1752
1753         * varobj.c (varobj_get_path_expr_parent): Report an error if
1754         parent is a dynamic varobj.
1755
1756 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1757
1758         * gnulib/aclocal.m4: Re-generate.
1759         * gnulib/config.in: Re-generate.
1760         * gnulib/configure: Re-generate.
1761         * gnulib/import/Makefile.in: Re-generate.
1762         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1763         * gnulib/import/m4/onceonly.m4: Re-generate.
1764
1765 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1766
1767         * target-descriptions.c (struct xml_test_tdesc): New.
1768         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1769         (record_xml_tdesc): Update.
1770         (maintenance_check_xml_descriptions): Update.
1771         * target-descriptions.h (record_xml_tdesc): Update comment.
1772
1773 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1774
1775         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1776         checking array bounds are defined.
1777
1778 2018-07-30  Tom Tromey  <tom@tromey.com>
1779
1780         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1781         irreflexivity violation.
1782
1783 2018-07-30  Tom Tromey  <tom@tromey.com>
1784
1785         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1786         * value.c (unpack_long): Remove lint code.
1787         * valops.c (value_ind): Remove lint code.
1788         * valarith.c (value_x_binop, value_x_unop, value_equal)
1789         (value_pos): Remove lint code.
1790
1791 2018-07-28  Tom de Vries  <tdevries@suse.de>
1792
1793         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1794         with undefined upper bound as <optimized out>.
1795
1796 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1797
1798         * gcore.in: Rename variable "name" to "prefix".  Expand
1799         "usage" text.
1800
1801 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1802
1803         * windows-nat.c (windows_nat_target::create_inferior): Update to
1804         call close() in global namespace.
1805
1806 2018-07-26  Tom Tromey  <tom@tromey.com>
1807
1808         * dwarf-index-write.c (add_address_entry): Don't add objfile
1809         offsets.
1810         * dbxread.c (find_stab_function): Rename from
1811         find_stab_function_addr.  Return a bound_minimal_symbol.
1812         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1813         Don't add objfile offsets.
1814         (end_psymtab): Use raw_text_low, raw_text_high,
1815         MSYMBOL_VALUE_RAW_ADDRESS.
1816         (read_ofile_symtab): Update.
1817         (process_one_symbol): Update.
1818         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1819         offsets.
1820         (dw2_relocate): Remove.
1821         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1822         searching addrmap.
1823         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1824         Update.
1825         (process_psymtab_comp_unit_reader, add_partial_symbol)
1826         (add_partial_subprogram, dwarf2_ranges_read): Update.
1827         (load_partial_dies): Update.
1828         (add_address_entry): Don't add objfile offsets.
1829         (dwarf2_build_include_psymtabs): Update.
1830         (create_addrmap_from_aranges): Don't add objfile offsets.
1831         (dw2_find_pc_sect_compunit_symtab): Update.
1832         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1833         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1834         Update.
1835         (parse_partial_symbols): Don't add objfile offsets.  Use
1836         raw_text_low, raw_text_high.  Update.
1837         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1838         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1839         or call 'relocate' quick function.  Clear psymbol_map.
1840         * psympriv.h (struct partial_symbol) <address>: Add section
1841         offset.
1842         <set_unrelocated_address>: Rename from set_address.
1843         <raw_text_low, raw_text_high>: New methods.
1844         <text_low, text_high>: Add objfile parameter.
1845         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1846         set_unrelocated_address.
1847         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1848         (find_pc_psymbol): Update.
1849         (fixup_psymbol_section, relocate_psymtabs): Remove.
1850         (dump_psymtab, psym_functions): Update.
1851         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1852         parameter.
1853         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1854         (start_psymtab_common): Update.
1855         * symfile-debug.c (debug_qf_relocate): Remove.
1856         (debug_sym_quick_functions): Update.
1857         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1858         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1859         Update.
1860
1861 2018-07-26  Tom Tromey  <tromey@redhat.com>
1862
1863         * dbxread.c (end_psymtab): Use text_high_valid and
1864         text_low_valid.
1865         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1866         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1867         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1868         Update comment.
1869         <text_low_valid, text_high_valid>: New fields.
1870         <set_text_low, set_text_high>: Update.
1871         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1872
1873 2018-07-26  Tom Tromey  <tom@tromey.com>
1874
1875         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1876         Update.
1877         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1878         textlow and texthigh fields.
1879         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1880         Update.
1881         * mdebugread.c (parse_lines, parse_partial_symbols)
1882         (psymtab_to_symtab_1): Update.
1883         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1884         Rename fields.  Update comment.  Now private.
1885         <text_low, text_high, set_text_low, set_text_high>: New methods.
1886         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1887         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1888         (start_psymtab_common, maintenance_info_psymtabs)
1889         (maintenance_check_psymtabs): Update.
1890         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1891         texthigh fields.
1892         (scan_xcoff_symtab): Update.
1893
1894 2018-07-26  Tom Tromey  <tromey@redhat.com>
1895
1896         * psympriv.h (struct partial_symbol) <unrelocated_address,
1897         address, set_address>: New methods.
1898         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1899         (fixup_psymbol_section, relocate_psymtabs): Update.
1900         (print_partial_symbols): Add 'objfile' parameter.  Update.
1901         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1902         Update.
1903
1904 2018-07-26  Tom Tromey  <tom@tromey.com>
1905
1906         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1907         (debug_names::write_psymbols): Update.
1908         * psympriv.h (struct partial_symbol): Derive from
1909         general_symbol_info.
1910         <obj_section>: New method.
1911         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1912         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1913         (find_pc_sect_psymbol, fixup_psymbol_section)
1914         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1915         (print_partial_symbols, recursively_search_psymtabs)
1916         (compare_psymbols, psymbol_hash, psymbol_compare)
1917         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1918         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1919
1920 2018-07-26  Tom Tromey  <tromey@redhat.com>
1921
1922         * dbxread.c (end_psymtab): Remove dead code.
1923
1924 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1925
1926         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1927         DWARF unwinders are disabled.
1928         * dwarf2-frame.c: Add dwarf2read.h include.
1929         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1930         disabled.
1931         (dwarf2_frame_unwinders_enabled_p): Define.
1932         (show_dwarf_unwinders_enabled_p): New function.
1933         (_initialize_dwarf2_frame): Register switch to control DWARF
1934         unwinder use.
1935         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1936         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1937         (show_dwarf_cmdlist): Remove static keyword.
1938         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1939         (show_dwarf_cmdlist): Declare.
1940         * NEWS: Document new feature.
1941
1942 2018-07-26  Tom de Vries  <tdevries@suse.de>
1943
1944         PR breakpoints/23366
1945         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1946
1947 2018-07-26  Tom de Vries  <tdevries@suse.de>
1948
1949         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1950         DW_AT_count can't be translated to a dynamic prop.
1951
1952 2018-07-25  Tom de Vries  <tdevries@suse.de>
1953
1954         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1955         try/catch.
1956
1957 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1958
1959         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1960
1961 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1962
1963         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1964
1965 2018-07-24  Keith Seitz  <keiths@redhat.comt
1966
1967         PR symtab/23010
1968         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1969         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1970         instead of add_symbol_to_list.
1971         (read_file_scope): Call prepare_one_comp_unit before reading
1972         any other DIEs.
1973
1974 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1975
1976         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1977
1978 2018-07-24  Tom Tromey  <tom@tromey.com>
1979
1980         * utils.c (malloc, realloc, free): Don't declare.
1981         * configure, config.in: Rebuild.
1982         * configure.ac: Don't check for declarations of free, malloc, or
1983         realloc.
1984
1985 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1986
1987         * aarch64-linux-nat.c
1988         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1989         variable.
1990         * arm-linux-nat.c (fetch_regs): Likewise.
1991         (store_regs): Likewise.
1992         (fetch_vfp_regs): Likewise.
1993         (store_vfp_regs): Likewise.
1994         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1995         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1996         (arm_linux_nat_target::insert_watchpoint): Likewise.
1997         (arm_linux_nat_target::remove_watchpoint): Likewise.
1998         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1999         Likewise.
2000         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2001         Likewise.
2002         * ppc-linux-nat.c (fetch_register): Likewise.
2003         (fetch_all_gp_regs): Likewise.
2004         (fetch_ppc_registers): Likewise.
2005         (store_all_gp_regs): Likewise.
2006         (store_ppc_registers): Likewise.
2007         (hwdebug_insert_point): Likewise.
2008         (can_use_watchpoint_cond_accel): Likewise.
2009         * remote-sim.c (gdb_os_write_stdout): Likewise.
2010
2011 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2012             Tom Tromey  <tom@tromey.com>
2013
2014         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2015         test for it.
2016         * configure: Rebuild.
2017
2018 2018-07-22  Tom Tromey  <tom@tromey.com>
2019
2020         * regformats/regdat.sh: Define xmltarget_${name} inside
2021         #ifndef IN_PROCESS_AGENT.
2022
2023 2018-07-22  Tom Tromey  <tom@tromey.com>
2024
2025         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2026
2027 2018-07-22  Tom Tromey  <tom@tromey.com>
2028
2029         * symfile.c (reread_symbols): Notify iter, not objfile.
2030
2031 2018-07-22  Tom Tromey  <tom@tromey.com>
2032
2033         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2034         Use arch_ops.
2035         (ravenscar_thread_target::prepare_to_store): Likewise.
2036
2037 2018-07-22  Tom Tromey  <tom@tromey.com>
2038
2039         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2040         unused variable.  Call value_fetch_lazy when needed.
2041         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2042         Remove unused variable.  Call value_fetch_lazy when needed.
2043
2044 2018-07-22  Tom Tromey  <tom@tromey.com>
2045
2046         * m32c-tdep.c (mark_dma): Return void.
2047         (make_regs): Remove unused declarations.
2048
2049 2018-07-22  Tom Tromey  <tom@tromey.com>
2050
2051         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2052         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2053         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2054         bkscm_get_valid_block_smob_arg_unsafe for effect.
2055
2056 2018-07-22  Tom Tromey  <tom@tromey.com>
2057
2058         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2059         value_type.
2060
2061 2018-07-22  Tom Tromey  <tom@tromey.com>
2062
2063         * windows-nat.c (saved_context): Conditionally define.
2064         * remote.c (remote_target::remote_btrace_maybe_reopen):
2065         Conditionally declare "warned".
2066         * inflow.c (sigquit_ours): Conditionally define.
2067         (new_tty): Move "tty" declaration inside #if.
2068         * guile/guile.c (guile_datadir): Conditionally define.
2069         * charset.c (set_be_le_names): Move some declarations inside #if.
2070         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2071         #if.
2072         (parse_xml_btrace_conf): Likewise.
2073
2074 2018-07-22  Tom Tromey  <tom@tromey.com>
2075
2076         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2077
2078 2018-07-22  Tom Tromey  <tom@tromey.com>
2079
2080         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2081         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2082         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2083         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2084         * stack.c (frame_apply_level_command): Remove unused variable.
2085         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2086         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2087         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2088         unused variable.
2089         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2090         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2091         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2092         variable.
2093         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2094         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2095         variable.
2096         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2097         Remove unused variable.
2098         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2099         variable.
2100         * common/tdesc.c (print_xml_feature::visit): Remove unused
2101         variable.
2102         * compile/compile-object-load.c (store_regs): Remove unused
2103         variables.
2104         * complaints.c (clear_complaints): Remove unused variable.
2105         * corelow.c (core_target_open): Remove unused variable.
2106         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2107         variable.
2108         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2109         variable.
2110         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2111         variable.
2112         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2113         variable.
2114         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2115         variable.
2116         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2117         variable.
2118         * ia64-tdep.c (examine_prologue): Remove unused variable.
2119         * infcall.c (run_inferior_call): Remove unused variable.
2120         * inferior.c (exit_inferior): Remove unused variable.
2121         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2122         * linespec.c (decode_line_2): Remove unused variable.
2123         * linux-nat.c (super_close): Remove.
2124         * linux-tdep.c (linux_info_proc): Remove unused variable.
2125         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2126         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2127         Remove unused variable.
2128         * parse.c (find_minsym_type_and_address): Remove unused variable.
2129         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2130         variable.
2131         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2132         variable.
2133         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2134         variables.
2135         * record-btrace.c (record_btrace_target::store_registers): Remove
2136         unused variable.
2137         (cmd_show_record_btrace_cpu): Remove unused variable.
2138         * riscv-tdep.c (riscv_register_reggroup_p)
2139         (riscv_push_dummy_call, riscv_return_value): Remove unused
2140         variable.
2141         * rust-exp.y (literal): Remove unused variable.
2142         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2143         unused variable.
2144         <STRUCTOP_ANONYMOUS>: Likewise.
2145         * s390-linux-tdep.c (s390_linux_init_abi_31)
2146         (s390_linux_init_abi_64): Remove unused variable.
2147         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2148         (file_select_thread, net_windows_open, _initialize_ser_windows):
2149         Remove unused variables.
2150         * symtab.c (find_pc_sect_line): Remove unused variable.
2151         * target-memory.c (compute_garbled_blocks): Remove unused
2152         variable.
2153         (target_write_memory_blocks): Remove unused variable.
2154         * target.c (target_stack::unpush): Remove unused variables.
2155         * tracepoint.c (start_tracing, all_tracepoint_actions)
2156         (merge_uploaded_trace_state_variables)
2157         (print_one_static_tracepoint_marker): Remove unused variable.
2158         * unittests/basic_string_view/element_access/char/1.cc (test01):
2159         Remove unused variable.
2160         * windows-nat.c (windows_continue, windows_add_all_dlls)
2161         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2162         Remove unused variables.
2163
2164 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2165
2166         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2167         attr_profile in HAVE_ELF.
2168         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2169         HAVE_ELF.
2170
2171 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2172
2173         * frame.c (frame_register_unwind): Change parameter name.
2174         (frame_unwind_register): Likewise.
2175         (frame_unwind_register_value): Likewise.
2176         (frame_unwind_register_signed): Likewise.
2177         (frame_unwind_register_unsigned): Likewise.
2178         * frame.h (frame_register_unwind): Likewise.
2179         (frame_unwind_register): Likewise.
2180         (frame_unwind_register_value): Likewise.
2181         (frame_unwind_register_signed): Likewise.
2182         (frame_unwind_register_unsigned): Likewise.
2183         (frame_unwind_arch): Likewise.
2184
2185 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2186
2187         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2188         ISA maintenance.
2189
2190 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2191
2192         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2193         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2194         hand.
2195
2196 2018-07-20  Keith Seitz  <keiths@redhat.com>
2197
2198         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2199         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2200         m_compunit_symtab, m_language>: Add "m_" prefix.
2201         Update all uses.
2202         * buildsym.c: Update all uses.
2203
2204 2018-07-20  Tom Tromey  <tom@tromey.com>
2205
2206         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2207         * buildsym.h (record_line_ftype): Remove typedef.
2208
2209 2018-07-20  Tom Tromey  <tom@tromey.com>
2210
2211         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2212         (end_expandable_symtab): Likewise.
2213         (end_symtab_get_static_block): Likewise.
2214         (end_symtab_from_static_block): Likewise.
2215         * buildsym-legacy.c (augment_type_symtab): Remove.
2216         (end_expandable_symtab): Remove.
2217         (end_symtab_get_static_block): Remove.
2218         (end_symtab_from_static_block): Remove.
2219
2220 2018-07-20  Tom Tromey  <tom@tromey.com>
2221
2222         * dwarf2read.c: Include buildsym.h.
2223         (struct dwarf2_cu) <builder>: New method.
2224         (fixup_go_packaging): Update.
2225         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2226         use scoped_free_pendings.
2227         (using_directives): Add "cu" parameter, remove "language".
2228         (read_import_statement, setup_type_unit_groups, )
2229         (read_func_scope, read_lexical_block_scope)
2230         (dwarf2_record_block_ranges, read_namespace): Update.
2231         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2232         (lnp_state_machine::handle_end_sequence): Update.
2233         (class lnp_state_machine) <m_cu>: New member.
2234         <m_record_line_callback>: Remove.
2235         <m_currently_recording_lines>: New member.
2236         (lnp_state_machine::handle_set_file): Update.
2237         (noop_record_line): Remove.
2238         (dwarf_record_line_p): Add cu parameter.
2239         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2240         (lnp_state_machine::record_line)
2241         (lnp_state_machine::lnp_state_machine)
2242         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2243         (dwarf_decode_lines): Update.
2244         (dwarf2_start_subfile): Add cu parameter.
2245         (dwarf2_start_symtab, new_symbol): Update.
2246         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2247         Remove dwarf2_per_objfile parameter.
2248         (dwarf_decode_macros): Update.
2249
2250 2018-07-20  Tom Tromey  <tom@tromey.com>
2251
2252         * stabsread.c (define_symbol): Update.
2253         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2254         * dwarf2read.c (new_symbol): Update.
2255         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2256         * cp-namespace.c: Include buildsym.h.
2257         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2258         * buildsym-legacy.c (get_buildsym_compunit): New function.
2259
2260 2018-07-20  Tom Tromey  <tom@tromey.com>
2261
2262         * xcoffread.c: Include buildsym-legacy.h.
2263         * windows-nat.c: Include buildsym-legacy.h.
2264         * stabsread.c: Include buildsym-legacy.h.
2265         * mdebugread.c: Include buildsym-legacy.h.
2266         * buildsym-legacy.h: New file.
2267         * buildsym-legacy.c: New file, from buildsym.c.
2268         * go32-nat.c: Include buildsym-legacy.h.
2269         * dwarf2read.c: Include buildsym-legacy.h.
2270         * dbxread.c: Include buildsym-legacy.h.
2271         * cp-namespace.c: Include buildsym-legacy.h.
2272         * coffread.c: Include buildsym-legacy.h.
2273         * buildsym.h: Move some contents to buildsym-legacy.h.
2274         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2275         buildsym-legacy.c.
2276         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2277
2278 2018-07-20  Tom Tromey  <tom@tromey.com>
2279
2280         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2281         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2282         (buildsym_compunit::buildsym_compunit)
2283         (buildsym_compunit::~buildsym_compunit)
2284         (buildsym_compunit::get_macro_table): Define.
2285
2286 2018-07-20  Tom Tromey  <tom@tromey.com>
2287
2288         * buildsym.c (reset_symtab_globals): Remove.
2289         (buildsym_compunit::end_symtab_from_static_block): Update.
2290         (buildsym_compunit::augment_type_symtab): Update.
2291         (end_symtab_from_static_block): Call free_buildsym_compunit.
2292         (augment_type_symtab, end_symtab, end_expandable_symtab):
2293         Likewise.
2294
2295 2018-07-20  Tom Tromey  <tom@tromey.com>
2296
2297         * arch-utils.c: Do not include buildsym.h.
2298         * mipsread.c: Do not include buildsym.h.
2299         * machoread.c: Do not include buildsym.h.
2300         * elfread.c: Do not include buildsym.h.
2301
2302 2018-07-20  Tom Tromey  <tom@tromey.com>
2303
2304         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2305         initialization.
2306         (buildsym_compunit): Add new constructor.
2307         (struct buildsym_compunit) <get_last_source_file, finish_block,
2308         record_block_range, start_subfile, patch_subfile_names,
2309         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2310         set_last_source_start_addr, get_last_source_start_addr,
2311         get_local_using_directives, set_local_using_directives,
2312         get_global_using_directives, outermost_context_p,
2313         get_current_context_stack, get_context_stack_depth,
2314         get_current_subfile, get_local_symbols, get_file_symbols,
2315         get_global_symbols, record_debugformat, record_producer,
2316         push_context, pop_context, end_symtab_get_static_block,
2317         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2318         New public methods.
2319         <record_pending_block, finish_block_internal, make_blockvector,
2320         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2321         private methods.
2322         Update all users.
2323
2324 2018-05-22  Tom Tromey  <tom@tromey.com>
2325
2326         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2327         parameter.
2328         (finish_block_internal): Update.
2329
2330 2018-07-20  Tom Tromey  <tom@tromey.com>
2331
2332         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2333         parameter.
2334         (finish_block_internal): Update.
2335
2336 2018-07-20  Tom Tromey  <tom@tromey.com>
2337
2338         * buildsym.h (EXTERN): Don't define or undef.
2339         * buildsym.c (EXTERN): Don't define.
2340
2341 2018-07-20  Tom Tromey  <tom@tromey.com>
2342
2343         * buildsym.c: Remove TODO comment.
2344
2345 2018-07-20  Tom Tromey  <tom@tromey.com>
2346
2347         * coffread.c (coff_symtab_read): Update.
2348         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2349         (xcoff_new_init): Update.
2350         * mipsread.c (mipscoff_new_init): Update.
2351         * mdebugread.c (mdebug_build_psymtabs): Update.
2352         * elfread.c (elf_new_init): Update.
2353         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2354         Update.
2355         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2356         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2357         (stabsect_build_psymtabs): Update.
2358         * buildsym.h (buildsym_init): Don't declare.
2359         * buildsym.c: Update comment.
2360         (prepare_for_building): Remove.
2361         (start_symtab, restart_symtab): Update.
2362         (reset_symtab_globals): Update comment.
2363         (buildsym_init): Remove.
2364
2365 2018-07-20  Tom Tromey  <tom@tromey.com>
2366
2367         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2368         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2369         (read_enum_type, common_block_start, common_block_end)
2370         (cleanup_undefined_types_1, finish_global_stabs): Update.
2371         * mdebugread.c (psymtab_to_symtab_1): Update.
2372         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2373         (read_lexical_block_scope, new_symbol): Update.
2374         * dbxread.c (process_one_symbol): Update.
2375         * coffread.c (coff_symtab_read, process_coff_symbol)
2376         (coff_read_enum_type): Update.
2377         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2378         declare.
2379         (get_local_symbols, get_file_symbols, get_global_symbols): New
2380         functions.
2381         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2382         m_global_symbols.
2383         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2384         (~scoped_free_pendings): Update.
2385         (finish_block, prepare_for_building, reset_symtab_globals)
2386         (end_symtab_get_static_block, end_symtab_with_blockvector)
2387         (augment_type_symtab, push_context): Update.
2388         (get_local_symbols, get_file_symbols, get_global_symbols): New
2389         functions.
2390         (buildsym_init): Update.
2391
2392 2018-07-20  Tom Tromey  <tom@tromey.com>
2393
2394         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2395         (process_full_type_unit): Likewise.
2396         (dwarf2_start_symtab): Set list_in_scope.
2397
2398 2018-07-20  Tom Tromey  <tom@tromey.com>
2399
2400         * dwarf2read.c (process_psymtab_comp_unit_reader)
2401         (build_type_psymtabs_reader): Do not set list_in_scope.
2402
2403 2018-07-20  Tom Tromey  <tom@tromey.com>
2404
2405         * buildsym.c (free_pendings): Remove.
2406         (add_symbol_to_list, scoped_free_pendings)
2407         (finish_block_internal, buildsym_init): Update.
2408
2409 2018-07-20  Tom Tromey  <tom@tromey.com>
2410
2411         * xcoffread.c (read_xcoff_symtab): Update.
2412         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2413         Update.
2414         * dbxread.c (process_one_symbol): Update.
2415         * coffread.c (coff_symtab_read): Update.
2416         * buildsym.h (finish_block): Update.
2417         * buildsym.c (finish_block): Remove "listhead" argument.
2418         (end_symtab_get_static_block): Update.
2419
2420 2018-07-20  Tom Tromey  <tom@tromey.com>
2421
2422         * buildsym.h (class scoped_free_pendings): Remove constructor.
2423         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2424         method.
2425         <m_pending_block_obstack, m_pending_blocks>: New members.
2426         (pending_block_obstack, pending_blocks): Remove.
2427         (scoped_free_pendings::scoped_free_pendings): Default.
2428         (~scoped_free_pendings): Update.
2429         (free_pending_blocks): Remove.
2430         (finish_block_internal, record_pending_block, make_blockvector)
2431         (end_symtab_get_static_block, augment_type_symtab, push_context)
2432         (buildsym_init): Update.
2433
2434 2018-07-20  Tom Tromey  <tom@tromey.com>
2435
2436         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2437         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2438         members.
2439         (pending_addrmap, pending_addrmap_obstack)
2440         (pending_addrmap_interesting): Remove.
2441         (scoped_free_pendings, record_block_range, make_blockvector)
2442         (prepare_for_building, reset_symtab_globals, buildsym_init):
2443         Update.
2444
2445 2018-07-20  Tom Tromey  <tom@tromey.com>
2446
2447         * xcoffread.c (process_linenos): Update.
2448         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2449         * mdebugread.c (psymtab_to_symtab_1): Update.
2450         * dwarf2read.c (setup_type_unit_groups)
2451         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2452         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2453         * dbxread.c (process_one_symbol): Update.
2454         * coffread.c (coff_symtab_read, enter_linenos)
2455         (process_coff_symbol): Update.
2456         * buildsym.h (current_subfile): Don't declare.
2457         (get_current_subfile): Declare.
2458         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2459         member.
2460         (start_subfile, free_buildsym_compunit, push_subfile)
2461         (prepare_for_building, start_symtab): Update.
2462         (get_current_subfile): New function.
2463
2464 2018-07-20  Tom Tromey  <tom@tromey.com>
2465
2466         * coffread.c (coff_symtab_read): Update.
2467         * xcoffread.c (read_xcoff_symtab): Update.
2468         * dwarf2read.c (new_symbol): Update.
2469         (read_func_scope, read_lexical_block_scope): Update.
2470         * dbxread.c (process_one_symbol): Update.
2471         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2472         (outermost_context_p): Remove macro.
2473         (outermost_context_p, get_current_context_stack)
2474         (get_context_stack_depth): Declare.
2475         (pop_context): Return struct context_stack.
2476         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2477         member.
2478         (context_stack_size): Remove.
2479         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2480         (prepare_for_building, end_symtab_get_static_block)
2481         (augment_type_symtab, push_context): Update.
2482         (pop_context): Return struct context_stack.
2483         (outermost_context_p, get_current_context_stack)
2484         (get_context_stack_depth): New functions.
2485         (buildsym_init): Update.
2486
2487 2018-07-20  Tom Tromey  <tom@tromey.com>
2488
2489         * rust-exp.y: Now a pure parser.  Update all rules.
2490         (%union): Move earlier.
2491         (current_parser, work_obstack): Remove globals.
2492         (rust_parser, ~rust_parser): Update.
2493         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2494         lex_character, lex_number, lex_string, lex_identifier,
2495         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2496         convert_name, convert_params_to_expression,
2497         convert_ast_to_expression, ast_basic_type, ast_operation,
2498         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2499         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2500         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2501         ast_array_type, ast_slice_type, ast_reference_type,
2502         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2503         (rust_parse): Update.
2504         (rustyyerror, rustyylex): Add parser parameter.
2505         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2506         (rust_lex_stringish_test, rust_lex_test_sequence)
2507         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2508         (rust_lex_test_push_back, rust_lex_tests): Update.
2509
2510 2018-07-19  Pedro Alves  <palves@redhat.com>
2511
2512         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2513         gdb::unique_xmalloc_ptr.
2514         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2515         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2516         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2517         copy-initialization.
2518         * guile/scm-pretty-print.c (ppscm_print_children): Use
2519         gdb::unique_xmalloc_ptr instead of cleanups.
2520         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2521         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2522         gdb::unique_xmalloc_ptr.
2523         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2524         Adjust to use gdb::unique_xmalloc_ptr.
2525         * guile/scm-utils.c (extract_arg): Adjust.
2526         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2527         gdb::unique_xmalloc_ptr instead of a cleanup.
2528
2529 2018-07-19  Tom Tromey  <tom@tromey.com>
2530
2531         * utils.c (do_value_free_to_mark)
2532         (make_cleanup_value_free_to_mark): Remove.
2533         * utils.h (make_cleanup_value_free_to_mark): Remove.
2534
2535 2018-07-19  Pedro Alves  <palves@redhat.com>
2536
2537         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2538         forwarding reference.
2539
2540 2018-07-18  Pedro Alves  <palves@redhat.com>
2541
2542         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2543         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2544         cleanup.
2545
2546 2018-07-18  Pedro Alves  <palves@redhat.com>
2547
2548         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2549         exceptions.
2550         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2551         (gdbscm_wrap): New.
2552         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2553         directly instead of a cleanup.
2554         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2555         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2556         (vlscm_binop_gdbthrow): New, factored out from ...
2557         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2558         (vlscm_rich_compare): Use gdbscm_wrap.
2559         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2560         instead of a cleanup.
2561         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2562         cleanup.
2563         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2564         Use xfree directly instead of a cleanup.
2565         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2566         Adjust to use gdbscm_wrap and scoped_value_mark.
2567         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2568         (gdbscm_value_address, gdbscm_value_dereference)
2569         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2570         scoped_value_mark.
2571         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2572         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2573         scoped_value_mark.
2574         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2575         gdbscm_wrap and scoped_value_mark.
2576         (gdbscm_value_to_string): Use xfree directly instead of a
2577         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2578         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2579         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2580         scoped_value_mark.
2581         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2582         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2583         scoped_value_mark.
2584         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2585         gdbscm_wrap.
2586
2587 2018-07-18  Tom de Vries  <tdevries@suse.de>
2588
2589         * findvar.c (default_read_var_value): Also resolve dynamic type for
2590         LOC_OPTIMIZED_OUT vars.
2591
2592 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2593
2594         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2595         decoding.
2596
2597 2018-07-17  Tom Tromey  <tom@tromey.com>
2598
2599         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2600         (compute_enum_list, pascm_set_param_value_x)
2601         (gdbscm_parameter_value): Update.
2602         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2603         (gdbscm_scm_to_host_string): Update.
2604         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2605         Update.
2606         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2607         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2608         * guile/scm-string.c (gdbscm_scm_to_string): Return
2609         unique_xmalloc_ptr.
2610         (gdbscm_scm_to_host_string): Likewise.
2611
2612 2018-07-17  Tom Tromey  <tom@tromey.com>
2613
2614         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2615         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2616         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2617         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2618         unique_xmalloc_ptr.
2619
2620 2018-07-17  Tom Tromey  <tom@tromey.com>
2621
2622         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2623         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2624         Update.
2625         * guile/scm-cmd.c (cmdscm_function): Update.
2626         * guile/scm-pretty-print.c
2627         (ppscm_print_exception_unless_memory_error): Update.
2628         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2629         Return unique_xmalloc_ptr.
2630
2631 2018-07-17  Tom Tromey  <tom@tromey.com>
2632
2633         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2634         Use string_printf.
2635
2636 2018-07-17  Jim Wilson  <jimw@sifive.com>
2637
2638         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2639         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2640         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2641         unecessary braces after EF_RISCV_RVC test.  Delete call to
2642         set_gdbarch_decr_pc_after_break.
2643
2644         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2645         RISCV_LAST_FP_REGNUM + 1.
2646         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2647
2648 2018-07-17  Tom Tromey  <tom@tromey.com>
2649
2650         * configure.ac: Remove --disable-gdbcli.
2651         * configure: Rebuild.
2652         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2653         (SUBDIR_CLI_CFLAGS): Remove.
2654         (SFILES): Use SUBDIR_CLI_SRCS.
2655         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2656
2657 2018-07-17  Tom Tromey  <tom@tromey.com>
2658
2659         PR gdb/18624:
2660         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2661
2662 2018-07-16  Jim Wilson  <jimw@sifive.com>
2663
2664         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2665
2666 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2667
2668         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2669         variable.
2670         (libunwind_frame_sniffer): Likewise.
2671         (libunwind_frame_prev_register): Likewise.
2672         (libunwind_sigtramp_frame_sniffer): Likewise.
2673         * ia64-tdep.c (ia64_access_reg): Likewise.
2674         (ia64_access_rse_reg): Likewise.
2675         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2676         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2677
2678 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2679
2680         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2681
2682 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2683
2684         * remote-sim.c (gdbsim_target::close,
2685         gdbsim_target::mourn_inferior): Remove unused variables.
2686
2687 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2688
2689         * ia64-tdep.c (ktab_buf): New global.
2690         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2691         (get_kernel_table): Adjust.
2692
2693 2018-07-16  Tom Tromey  <tom@tromey.com>
2694
2695         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2696         * dwarf2read.c (using_directives, new_symbol): Use
2697         outermost_context_p.
2698         * dbxread.c (process_one_symbol): Use outermost_context_p.
2699         * coffread.c (coff_symtab_read): Use outermost_context_p.
2700
2701 2018-07-16  Tom Tromey  <tom@tromey.com>
2702
2703         * dwarf2read.c (using_directives, read_func_scope)
2704         (read_lexical_block_scope): Update.
2705         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2706         * buildsym.h (local_using_directives, global_using_directives):
2707         Don't declare.
2708         (get_local_using_directives, set_local_using_directives)
2709         (get_global_using_directives): Declare.
2710         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2711         m_global_using_directives>: New members.
2712         (finish_block_internal, prepare_for_building)
2713         (reset_symtab_globals, end_symtab_get_static_block)
2714         (push_context): Update.
2715         (get_local_using_directives, set_local_using_directives)
2716         (get_global_using_directives): New functions.
2717         (buildsym_init): Update.
2718
2719 2018-07-16  Tom Tromey  <tom@tromey.com>
2720
2721         * xcoffread.c (xcoff_initial_scan): Don't call
2722         free_pending_blocks.
2723         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2724         * buildsym.h (class scoped_free_pendings): Add constructor.
2725         (free_pending_blocks): Don't declare.
2726         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2727         (free_pending_blocks): Now static.
2728
2729 2018-07-16  Tom Tromey  <tom@tromey.com>
2730
2731         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2732         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2733         member.
2734         (struct subfile_stack): Remove.
2735         (subfile_stack): Remove.
2736         (push_subfile, pop_subfile, buildsym_init): Update.
2737
2738 2018-07-16  Tom Tromey  <tom@tromey.com>
2739
2740         * buildsym.c (push_subfile): Use gdb_assert.
2741         (pop_subfile): Use gdb_assert.
2742
2743 2018-07-16  Tom Tromey  <tom@tromey.com>
2744
2745         * buildsym.h (merge_symbol_lists): Remove.
2746         * buildsym.c (merge_symbol_lists): Remove.
2747
2748 2018-07-16  Tom Tromey  <tom@tromey.com>
2749
2750         * stabsread.c (scan_file_globals): Update comment.
2751         * stabsread.h (scan_file_globals): Move from buildsym.h.
2752         * buildsym.h (scan_file_globals): Move to stabsread.h.
2753
2754 2018-07-16  Tom Tromey  <tom@tromey.com>
2755
2756         * xcoffread.c (xcoff_new_init): Update.
2757         * mipsread.c (mipscoff_new_init): Update.
2758         * mdebugread.c (mdebug_build_psymtabs): Update.
2759         * elfread.c (elf_new_init): Update.
2760         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2761         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2762         * buildsym.h (buildsym_new_init): Don't declare.
2763         * buildsym.c (buildsym_new_init): Remove.
2764
2765 2018-07-16  Tom Tromey  <tom@tromey.com>
2766
2767         * stabsread.h (within_function): Move from buildsym.h.
2768         * stabsread.c (start_stabs): Clear within_function.
2769         * coffread.c (coff_start_symtab): Clear within_function.
2770         * buildsym.h (within_function): Move to stabsread.h.
2771         * buildsym.c (prepare_for_building): Update.
2772
2773 2018-07-16  Tom Tromey  <tom@tromey.com>
2774
2775         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2776         * dwarf2read.c (dwarf2_start_symtab): Don't set
2777         processing_gcc_compilation.
2778         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2779
2780 2018-07-16  Tom Tromey  <tom@tromey.com>
2781
2782         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2783         (next_symbol_text_func): Move from buildsym.h.
2784         * stabsread.c (hashname): Move from buildsym.c.
2785         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2786         (next_symbol_text_func, hashname): Move to stabsread.h.
2787         * buildsym.c: Don't include bcache.h
2788         (hashname): Move to stasbread.c.
2789
2790 2018-07-16  Tom Tromey  <tom@tromey.com>
2791
2792         * buildsym.h (context_stack_size): Don't declare.
2793         * buildsym.c (context_stack_size): New global.
2794
2795 2018-07-16  Tom Tromey  <tom@tromey.com>
2796
2797         * dbxread.c (processing_acc_compilation): New global.
2798         * buildsym.h (processing_acc_compilation): Don't declare.
2799
2800 2018-07-16  Tom Tromey  <tom@tromey.com>
2801
2802         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2803         * dbxread.c (read_ofile_symtab): Update.
2804         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2805         * buildsym.h (last_source_start_addr): Remove.
2806         (set_last_source_start_addr, get_last_source_start_addr):
2807         Declare.
2808         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2809         parameter.
2810         (struct buildsym_compunit) <m_last_source_start_addr>: New
2811         member.
2812         (prepare_for_building): Remove start_addr parameter.
2813         (start_symtab, restart_symtab, end_symtab_get_static_block)
2814         (end_symtab_with_blockvector): Update.
2815         (set_last_source_start_addr, get_last_source_start_addr): New
2816         functions.
2817
2818 2018-07-16  Tom Tromey  <tom@tromey.com>
2819
2820         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2821         member.
2822         (have_line_numbers): Remove.
2823         (record_line, prepare_for_building, end_symtab_get_static_block)
2824         (augment_type_symtab): Update.
2825
2826 2018-07-16  Tom Tromey  <tom@tromey.com>
2827
2828         * buildsym.c (~buildsym_compunit): Free the macro table.
2829         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2830         methods.
2831         <m_pending_macros>: New member.
2832         (pending_macros): Remove.
2833         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2834         (reset_symtab_globals, end_symtab_get_static_block)
2835         (end_symtab_with_blockvector, augment_type_symtab)
2836         (buildsym_init): Update.
2837
2838 2018-07-16  Tom Tromey  <tom@tromey.com>
2839
2840         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2841         parameter.
2842         (buildsym_compunit::set_last_source_file): New method.
2843         <m_last_source_file>: New member.
2844         (prepare_for_building): Remove "name" parameter.
2845         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2846         (last_source_file): Remove.
2847         (set_last_source_file, get_last_source_file): Update.
2848
2849 2018-07-16  Tom Tromey  <tom@tromey.com>
2850
2851         * buildsym.c (prepare_for_building): Add assert.
2852
2853 2018-07-16  Tom Tromey  <tom@tromey.com>
2854
2855         * buildsym.c (~buildsym_compunit): Update.
2856         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2857         (start_subfile, patch_subfile_names)
2858         (end_symtab_with_blockvector): Update.
2859
2860 2018-07-16  Tom Tromey  <tom@tromey.com>
2861
2862         * buildsym.c (struct buildsym_compunit): Add constructor,
2863         destructor, initializers.
2864         (start_buildsym_compunit): Remove.
2865         (free_buildsym_compunit): Use "delete".
2866         (start_symtab, restart_symtab): Use "new".
2867
2868 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2869
2870         * symfile.c (set_objfile_default_section_offset): Remove struct
2871         keyword.
2872
2873 2018-07-14  Stafford Horne  <shorne@gmail.com>
2874
2875         * (Responsible Maintainers): Add myself as or1k maintainer.
2876
2877 2018-07-13  Tom Tromey  <tom@tromey.com>
2878
2879         * symfile.c (set_objfile_default_section_offset): Use extra braces
2880         around initializer.
2881
2882 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2883
2884         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2885         non-branching basr.
2886
2887 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2888
2889         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2890         unittests/cli-utils-selftests.c
2891         * unittests/cli-utils-selftests.c: New file.
2892
2893 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2894
2895         * NEWS: Mention new commands. Mention change to 'thread apply'.
2896
2897 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2898
2899         * thread.c (thr_try_catch_cmd): New function.
2900         (thread_apply_all_command): Handle qcs flags.
2901         (thread_apply_command): Handle qcs flags.
2902         (taas_command): New function.
2903         (tfaas_command): New function.
2904         (_initialize_thread): Update to setup the new commands 'taas
2905         and 'tfaas'. Change doc string for 'thread apply'.
2906
2907 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2908
2909         * stack.c: (trailing_outermost_frame): New function, mostly
2910         extracted from backtrace_command_1.
2911         (leading_innermost_frame): New function.
2912         (backtrace_command_1): Update to call trailing_outermost_frame.
2913         (frame_apply_command_count): New function.
2914         (frame_apply_level_command): New function.
2915         (frame_apply_all_command): New function.
2916         (frame_apply_command): New function.
2917         (faas_command): New function.
2918         (frame_cmd_list): New variable.
2919         (_initialize_stack): Update to setup the new commands 'frame apply'
2920         and 'faas'.
2921
2922 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2923
2924         * cli-utils.c (number_or_range_parser::get_number): Only handle
2925         numbers or convenience var as numbers.
2926         (parse_flags): New function.
2927         (parse_flags_qcs): New function.
2928         (number_or_range_parser::finished): Ensure parsing end is detected
2929         before end of string.
2930         * cli-utils.h (parse_flags): New function.
2931         (parse_flags_qcs): New function.
2932         (number_or_range_parser): Remove m_finished bool.
2933         (number_or_range_parser::skip_range): Set m_in_range to false.
2934
2935 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2936
2937         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2938         on Windows.
2939
2940 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2941             Jan Kratochvil  <jan.kratochvil@redhat.com>
2942             Paul Fertser  <fercerpav@gmail.com>
2943             Tsutomu Seki  <sekiriki@gmail.com>
2944             Pedro Alves  <palves@redhat.com>
2945
2946         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2947         'unittests/parse-connection-spec-selftests.c'.
2948         (COMMON_SFILES): Add 'common/netstuff.c'.
2949         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2950         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2951         * common/netstuff.c: New file.
2952         * common/netstuff.h: New file.
2953         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2954         (wait_for_connect): Update comment.  New parameter
2955         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2956         Use 'sock' directly instead of 'scb->fd'.
2957         (try_connect): New function, with code from 'net_open'.
2958         (net_open): Rewrite main loop to deal with multiple
2959         sockets/addresses.  Handle IPv6-style hostnames; implement
2960         support for IPv6 connections.
2961         * unittests/parse-connection-spec-selftests.c: New file.
2962
2963 2018-07-11  Pedro Alves  <palves@redhat.com>
2964
2965         PR gdb/23377
2966         * remote.c (remote_target::remote_detach_pid): Call
2967         set_current_process.
2968
2969 2018-07-11  Pedro Alves  <palves@redhat.com>
2970
2971         * h8300-tdep.c (h8300_gdbarch_init): Remove
2972         set_gdbarch_ecoff_reg_to_regnum calls.
2973
2974 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2975
2976         PR c++/23373
2977         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2978         offsets/sizes for static members of a class/struct.
2979
2980 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2981
2982         * target-descriptions.c (tdesc_register_bitsize): Rename.
2983         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2984         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2985         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2986
2987 2018-07-10  Tom Tromey  <tom@tromey.com>
2988
2989         * breakpoint.c (moribund_locations): Now static and a
2990         std::vector.
2991         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2992         (build_bpstat_chain, update_global_location_list)
2993         (breakpoint_retire_moribund): Update.
2994         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2995         VEC.
2996
2997 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2998
2999         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3000         (riscv_register_reggroup_p): Use new function, remove unneeded
3001         parenthesis.
3002         (riscv_push_dummy_call): Extend assert to compare against xlen or
3003         flen based on register type.
3004
3005 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3006
3007         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3008
3009 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3010
3011         * remote.c (show_hardware_watchpoint_limit): New function.
3012         (show_hardware_watchpoint_length_limit): New function.
3013         (show_hardware_breakpoint_limit): New function.
3014         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3015         where appropriate, update help text.
3016
3017 2018-07-09  Tom Tromey  <tom@tromey.com>
3018
3019         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3020         (CLIBS): Don't mention NAT_CLIBS.
3021
3022 2018-07-09  Tom Tromey  <tom@tromey.com>
3023
3024         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3025         (LIBGDB_OBS, clean mostlyclean): Update.
3026         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3027
3028 2018-07-09  Tom Tromey  <tom@tromey.com>
3029
3030         * Makefile.in (%.c: %.y): Use ECHO_YACC.
3031         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
3032         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3033
3034 2018-07-09  Tom Tromey  <tom@tromey.com>
3035
3036         * Makefile.in (ALLDEPFILES): Remove exec.c.
3037         (COMMON_OBS): Remove exec.o.
3038         (COMMON_SFILES): Add exec.c.
3039
3040 2018-07-09  Tom Tromey  <tom@tromey.com>
3041
3042         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3043
3044 2018-07-09  Tom Tromey  <tom@tromey.com>
3045
3046         * Makefile.in (clean mostlyclean): Remove stamp-version.
3047         (version.c): Depend on stamp-version.
3048         (stamp-version): New rule, from version.c rule.
3049
3050 2018-07-09  Tom Tromey  <tom@tromey.com>
3051
3052         * Makefile.in (init.c): Depend on stamp-init.
3053         (stamp-init): New rule, from init.c rule.
3054         (clean mostlyclean): Remove stamp-init.
3055
3056 2018-07-09  Tom Tromey  <tom@tromey.com>
3057
3058         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3059         SUBDIR_GCC_COMPILE_SRCS.
3060
3061 2018-07-09  Tom Tromey  <tom@tromey.com>
3062
3063         * Makefile.in (init.c): Remove some unused sed rules.
3064
3065 2018-07-09  Tom Tromey  <tom@tromey.com>
3066
3067         * Makefile.in (TSOBS): Remove.
3068         (INIT_FILES): Update.
3069         (LIBGDB_OBS): Update.
3070         (COMMON_SFILES): Add inflow.c.
3071         (SFILES): Remove inflow.c.
3072
3073 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3074
3075         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3076
3077 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3078
3079         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3080         get_saveloc_name, is_signal_frame_name, step_name,
3081         init_remote_name, create_addr_space_name,
3082         destroy_addr_space_name, search_unwind_table_name,
3083         find_dyn_list_name): Constify.
3084
3085 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3086
3087         * darwin-nat.c (darwin_pthread_kill): New function.
3088         (darwin_resume_thread): Use darwin_pthread_kill.
3089
3090 2018-07-05  Tom de Vries  <tdevries@suse.de>
3091
3092         * macroexp.c (macro_buffer) <operator=>: New member function.
3093
3094 2018-07-04  Tom Tromey  <tom@tromey.com>
3095
3096         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3097
3098 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3099
3100         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3101         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3102         * maint.c: Likewise.
3103         * top.c: Likewise.
3104
3105 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3106
3107         * NEWS: Create a new section for the next release branch.
3108         Rename the section of the current branch, now that it has
3109         been cut.
3110
3111 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3112
3113         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3114         * version.in: Bump version to 8.2.50.DATE-git.
3115
3116 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3117             Pedro Alves  <palves@redhat.com>
3118
3119         * linux-nat.c (linux_init_ptrace): Rename to ...
3120         (linux_init_ptrace_procfs): ... this.  Call
3121         linux_proc_init_warnings.
3122         (linux_nat_target::post_attach)
3123         (linux_nat_target::post_startup_inferior): Adjust.
3124         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3125         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3126
3127 2018-07-04  Tom de Vries  <tdevries@suse.de>
3128
3129         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3130         check ...
3131         (read_comp_unit_head): ... here.
3132
3133 2018-07-03  Tom Tromey  <tom@tromey.com>
3134
3135         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3136         (stop_tracing, tstatus_command)
3137         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3138         (print_one_static_tracepoint_marker): Update.
3139         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3140         std::vector.
3141         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3142         VEC.
3143         (all_tracepoints, static_tracepoints_here): Return std::vector.
3144
3145 2018-07-03  Tom Tromey  <tom@tromey.com>
3146
3147         * common/ptid.c (ptid_equal): Remove.
3148         * common/ptid.h (ptid_equal): Don't declare.
3149         * ada-tasks.c: Update.
3150         * breakpoint.c: Update.
3151         * common/agent.c: Update.
3152         * corelow.c: Update.
3153         * darwin-nat-info.c: Update.
3154         * darwin-nat.c: Update.
3155         * dcache.c: Update.
3156         * dtrace-probe.c: Update.
3157         * dummy-frame.c: Update.
3158         * fbsd-nat.c: Update.
3159         * frame.c: Update.
3160         * gdbthread.h: Update.
3161         * gnu-nat.c: Update.
3162         * go32-nat.c: Update.
3163         * inf-loop.c: Update.
3164         * inf-ptrace.c: Update.
3165         * infcall.c: Update.
3166         * infcmd.c: Update.
3167         * inflow.c: Update.
3168         * infrun.c: Update.
3169         * linux-fork.c: Update.
3170         * linux-nat.c: Update.
3171         * linux-thread-db.c: Update.
3172         * mi/mi-cmd-var.c: Update.
3173         * mi/mi-interp.c: Update.
3174         * mi/mi-main.c: Update.
3175         * nto-procfs.c: Update.
3176         * ppc-linux-tdep.c: Update.
3177         * procfs.c: Update.
3178         * python/py-inferior.c: Update.
3179         * python/py-record-btrace.c: Update.
3180         * python/py-record.c: Update.
3181         * ravenscar-thread.c: Update.
3182         * regcache.c: Update.
3183         * remote-sim.c: Update.
3184         * remote.c: Update.
3185         * sol-thread.c: Update.
3186         * solib.c: Update.
3187         * target.c: Update.
3188         * tui/tui-stack.c: Update.
3189         * varobj.c: Update.
3190         * windows-nat.c: Update.
3191         * windows-tdep.c: Update.
3192
3193 2018-07-03  Tom Tromey  <tom@tromey.com>
3194
3195         * common/ptid.c (ptid_match): Remove.
3196         * common/ptid.h (ptid_match): Don't declare.
3197         * fbsd-nat.c: Update.
3198         * infcmd.c: Update.
3199         * infrun.c: Update.
3200         * linux-nat.c: Update.
3201         * record-btrace.c: Update.
3202         * regcache.c: Update.
3203         * remote.c: Update.
3204
3205 2018-07-03  Tom Tromey  <tom@tromey.com>
3206
3207         * common/ptid.c (ptid_tid_p): Remove.
3208         * common/ptid.h (ptid_tid_p): Don't declare.
3209         * sol-thread.c: Update.
3210
3211 2018-07-03  Tom Tromey  <tom@tromey.com>
3212
3213         * common/ptid.c (ptid_lwp_p): Remove.
3214         * common/ptid.h (ptid_lwp_p): Don't declare.
3215         * fbsd-nat.c: Update.
3216         * linux-nat.c: Update.
3217         * nat/linux-procfs.c: Update.
3218         * nat/x86-linux-dregs.c: Update.
3219         * sol-thread.c: Update.
3220
3221 2018-07-03  Tom Tromey  <tom@tromey.com>
3222
3223         * common/ptid.c (ptid_is_pid): Remove.
3224         * common/ptid.h (ptid_is_pid): Don't declare.
3225         * infrun.c: Update.
3226         * linux-nat.c: Update.
3227         * mi/mi-interp.c: Update.
3228         * remote.c: Update.
3229         * thread.c: Update.
3230
3231 2018-07-03  Tom Tromey  <tom@tromey.com>
3232
3233         * common/ptid.c (ptid_get_tid): Remove.
3234         * common/ptid.h (ptid_get_tid): Don't declare.
3235         * ada-tasks.c: Update.
3236         * aix-thread.c: Update.
3237         * bsd-uthread.c: Update.
3238         * darwin-nat.c: Update.
3239         * fbsd-nat.c: Update.
3240         * i386-darwin-nat.c: Update.
3241         * infrun.c: Update.
3242         * linux-tdep.c: Update.
3243         * nto-procfs.c: Update.
3244         * ppc-ravenscar-thread.c: Update.
3245         * python/py-infthread.c: Update.
3246         * ravenscar-thread.c: Update.
3247         * sol-thread.c: Update.
3248         * sparc-ravenscar-thread.c: Update.
3249         * windows-nat.c: Update.
3250
3251 2018-07-03  Tom Tromey  <tom@tromey.com>
3252
3253         * common/ptid.c (ptid_get_lwp): Remove.
3254         * common/ptid.h (ptid_get_lwp): Don't declare.
3255         * aarch64-linux-nat.c: Update.
3256         * ada-tasks.c: Update.
3257         * aix-thread.c: Update.
3258         * amd64-linux-nat.c: Update.
3259         * arm-linux-nat.c: Update.
3260         * corelow.c: Update.
3261         * fbsd-nat.c: Update.
3262         * fbsd-tdep.c: Update.
3263         * gnu-nat.c: Update.
3264         * i386-cygwin-tdep.c: Update.
3265         * i386-gnu-nat.c: Update.
3266         * i386-linux-nat.c: Update.
3267         * ia64-linux-nat.c: Update.
3268         * inf-ptrace.c: Update.
3269         * infrun.c: Update.
3270         * linux-fork.c: Update.
3271         * linux-nat.c: Update.
3272         * linux-tdep.c: Update.
3273         * linux-thread-db.c: Update.
3274         * mips-linux-nat.c: Update.
3275         * nat/aarch64-linux-hw-point.c: Update.
3276         * nat/aarch64-linux.c: Update.
3277         * nat/linux-btrace.c: Update.
3278         * nat/linux-osdata.c: Update.
3279         * nat/linux-procfs.c: Update.
3280         * nat/x86-linux-dregs.c: Update.
3281         * obsd-nat.c: Update.
3282         * ppc-fbsd-nat.c: Update.
3283         * ppc-linux-nat.c: Update.
3284         * procfs.c: Update.
3285         * python/py-infthread.c: Update.
3286         * ravenscar-thread.c: Update.
3287         * remote.c: Update.
3288         * s390-linux-nat.c: Update.
3289         * sol-thread.c: Update.
3290         * sol2-tdep.c: Update.
3291         * spu-linux-nat.c: Update.
3292         * x86-linux-nat.c: Update.
3293         * xtensa-linux-nat.c: Update.
3294
3295 2018-07-03  Tom Tromey  <tom@tromey.com>
3296
3297         * common/ptid.c (ptid_get_pid): Remove.
3298         * common/ptid.h (ptid_get_pid): Don't declare.
3299         * aarch64-linux-nat.c: Update.
3300         * ada-lang.c: Update.
3301         * aix-thread.c: Update.
3302         * alpha-bsd-nat.c: Update.
3303         * amd64-fbsd-nat.c: Update.
3304         * amd64-linux-nat.c: Update.
3305         * arm-linux-nat.c: Update.
3306         * arm-nbsd-nat.c: Update.
3307         * auxv.c: Update.
3308         * break-catch-syscall.c: Update.
3309         * breakpoint.c: Update.
3310         * bsd-uthread.c: Update.
3311         * corelow.c: Update.
3312         * ctf.c: Update.
3313         * darwin-nat.c: Update.
3314         * fbsd-nat.c: Update.
3315         * fbsd-tdep.c: Update.
3316         * gcore.c: Update.
3317         * gnu-nat.c: Update.
3318         * hppa-nbsd-nat.c: Update.
3319         * hppa-obsd-nat.c: Update.
3320         * i386-fbsd-nat.c: Update.
3321         * ia64-linux-nat.c: Update.
3322         * inf-ptrace.c: Update.
3323         * infcmd.c: Update.
3324         * inferior.c: Update.
3325         * inferior.h: Update.
3326         * inflow.c: Update.
3327         * infrun.c: Update.
3328         * linux-fork.c: Update.
3329         * linux-nat.c: Update.
3330         * linux-tdep.c: Update.
3331         * linux-thread-db.c: Update.
3332         * m68k-bsd-nat.c: Update.
3333         * mi/mi-interp.c: Update.
3334         * mi/mi-main.c: Update.
3335         * mips-linux-nat.c: Update.
3336         * mips-nbsd-nat.c: Update.
3337         * mips64-obsd-nat.c: Update.
3338         * nat/aarch64-linux-hw-point.c: Update.
3339         * nat/aarch64-linux.c: Update.
3340         * nat/linux-btrace.c: Update.
3341         * nat/linux-osdata.c: Update.
3342         * nat/linux-procfs.c: Update.
3343         * nat/x86-linux-dregs.c: Update.
3344         * nto-procfs.c: Update.
3345         * obsd-nat.c: Update.
3346         * ppc-linux-nat.c: Update.
3347         * ppc-nbsd-nat.c: Update.
3348         * ppc-obsd-nat.c: Update.
3349         * proc-service.c: Update.
3350         * procfs.c: Update.
3351         * python/py-inferior.c: Update.
3352         * python/py-infthread.c: Update.
3353         * ravenscar-thread.c: Update.
3354         * record.c: Update.
3355         * remote-sim.c: Update.
3356         * remote.c: Update.
3357         * rs6000-nat.c: Update.
3358         * s390-linux-nat.c: Update.
3359         * sh-nbsd-nat.c: Update.
3360         * sol-thread.c: Update.
3361         * sparc-nat.c: Update.
3362         * sparc64-tdep.c: Update.
3363         * spu-linux-nat.c: Update.
3364         * spu-tdep.c: Update.
3365         * target-debug.h: Update.
3366         * target.c: Update.
3367         * thread.c: Update.
3368         * tid-parse.c: Update.
3369         * tracefile-tfile.c: Update.
3370         * vax-bsd-nat.c: Update.
3371         * windows-nat.c: Update.
3372         * x86-linux-nat.c: Update.
3373         * x86-nat.c: Update.
3374
3375 2018-07-03  Tom Tromey  <tom@tromey.com>
3376
3377         * common/ptid.c (pid_to_ptid): Remove.
3378         * common/ptid.h (pid_to_ptid): Don't declare.
3379         * aix-thread.c: Update.
3380         * arm-linux-nat.c: Update.
3381         * common/ptid.c: Update.
3382         * common/ptid.h: Update.
3383         * corelow.c: Update.
3384         * ctf.c: Update.
3385         * darwin-nat.c: Update.
3386         * fbsd-nat.c: Update.
3387         * fork-child.c: Update.
3388         * gnu-nat.c: Update.
3389         * go32-nat.c: Update.
3390         * inf-ptrace.c: Update.
3391         * infcmd.c: Update.
3392         * inferior.c: Update.
3393         * infrun.c: Update.
3394         * linux-fork.c: Update.
3395         * linux-nat.c: Update.
3396         * nat/aarch64-linux-hw-point.c: Update.
3397         * nat/fork-inferior.c: Update.
3398         * nat/x86-linux-dregs.c: Update.
3399         * nto-procfs.c: Update.
3400         * obsd-nat.c: Update.
3401         * procfs.c: Update.
3402         * progspace.c: Update.
3403         * remote.c: Update.
3404         * rs6000-nat.c: Update.
3405         * s390-linux-nat.c: Update.
3406         * sol-thread.c: Update.
3407         * spu-linux-nat.c: Update.
3408         * target.c: Update.
3409         * top.c: Update.
3410         * tracefile-tfile.c: Update.
3411         * windows-nat.c: Update.
3412
3413 2018-07-03  Tom Tromey  <tom@tromey.com>
3414
3415         * common/ptid.h (ptid_build): Don't declare.
3416         * common/ptid.c (ptid_build): Remove.
3417         * aix-thread.c: Update.
3418         * bsd-kvm.c: Update.
3419         * bsd-uthread.c: Update.
3420         * common/agent.c: Update.
3421         * common/ptid.c: Update.
3422         * common/ptid.h: Update.
3423         * corelow.c: Update.
3424         * darwin-nat.c: Update.
3425         * fbsd-nat.c: Update.
3426         * gnu-nat.c: Update.
3427         * linux-fork.c: Update.
3428         * linux-nat.c: Update.
3429         * linux-thread-db.c: Update.
3430         * nat/linux-osdata.c: Update.
3431         * nat/linux-procfs.c: Update.
3432         * nto-procfs.c: Update.
3433         * obsd-nat.c: Update.
3434         * proc-service.c: Update.
3435         * procfs.c: Update.
3436         * ravenscar-thread.c: Update.
3437         * remote-sim.c: Update.
3438         * remote.c: Update.
3439         * sol-thread.c: Update.
3440         * target.c: Update.
3441         * windows-nat.c: Update.
3442
3443 2018-07-03  Tom Tromey  <tom@tromey.com>
3444
3445         * infrun.c (follow_exec): Use exit_inferior_silent.
3446         * inferior.c (exit_inferior_num_silent): Remove.
3447         * inferior.h (exit_inferior_num_silent): Don't declare.
3448
3449 2018-07-03  Tom Tromey  <tom@tromey.com>
3450
3451         PR cli/23340:
3452         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3453         inferior_ptid on error.
3454
3455 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3456             Simon Marchi  <simon.marchi@polymtl.ca>
3457
3458         PR tdep/8282
3459         * disasm.h (gdb_disassembler): Add
3460         `m_disassembler_options_holder'. member
3461         * disasm.c (get_all_disassembler_options): New function.
3462         (gdb_disassembler::gdb_disassembler): Use it.
3463         (gdb_buffered_insn_length_init_dis): Likewise.
3464         (gdb_buffered_insn_length): Adjust accordingly.
3465         (set_disassembler_options): Handle options with arguments.
3466         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3467         line if showing options with descriptions.
3468         (disassembler_options_completer): Adapt to using the
3469         `disasm_options_and_args_t' structure.
3470         * mips-tdep.c (mips_disassembler_options): New variable.
3471         (mips_disassembler_options_o32): Likewise.
3472         (mips_disassembler_options_n32): Likewise.
3473         (mips_disassembler_options_n64): Likewise.
3474         (gdb_print_insn_mips): Don't set `disassembler_options'.
3475         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3476         functions.
3477         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3478         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3479         `gdbarch_disassembler_options_implicit' and
3480         `gdbarch_valid_disassembler_options'.
3481         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3482         `disasm_options_and_args_t' structure.
3483         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3484         method.
3485         (valid_disassembler_options): Switch from `disasm_options_t' to
3486         the `disasm_options_and_args_t' structure.
3487         * NEWS: Document `set disassembler-options' support for the MIPS
3488         target.
3489         * gdbarch.h: Regenerate.
3490         * gdbarch.c: Regenerate.
3491
3492 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3493
3494         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3495
3496 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3497
3498         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3499         parameter in call to amd64_target_description.
3500         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3501         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3502         (amd64fbsd_init_abi): Likewise.
3503         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3504         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3505         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3506         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3507
3508 2018-06-29  Pedro Alves  <palves@redhat.com>
3509
3510         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3511         "segments" parameter.
3512         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3513         (_initialize_amd64_tdep): Update call to
3514         amd64_create_target_description.
3515         (amd64_target_description): Add "segments" parameter.  Adjust
3516         the implementation to use it.
3517         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3518         call to amd64_create_target_description.
3519         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3520         * gdb/arch/amd64.h (amd64_create_target_description): Add
3521         "segments" register.
3522         * gdb/arch/amd64.c (amd64_create_target_description): Add
3523         "segments" parameter.  Call create_feature_i386_64bit_segments
3524         only if SEGMENTS is true.
3525         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3526         call to amd64_create_target_description.
3527
3528 2018-06-29  Pedro Alves  <palves@redhat.com>
3529
3530         * thread.c (thread_target_id_str): New, factored out from ...
3531         (print_thread_info_1): ... here.  Use it to compute the max
3532         "Target Id" column width.
3533
3534 2018-06-29  Pedro Alves  <palves@redhat.com>
3535
3536         * remote.c (remote_target::extra_thread_info): Delete
3537         'display_buf' and 'n' locals.  from the cache, regardless of
3538         packet mechanims is in use.  Use cache for qThreadExtra and qP
3539         methods too.
3540
3541 2018-06-29  Pedro Alves  <palves@redhat.com>
3542
3543         * blockframe.c (find_pc_sect_containing_function): New function.
3544         * breakpoint.c (print_breakpoint_location): Don't call
3545         find_pc_sect_function.
3546         * linespec.c (create_sals_line_offset): Record the location's
3547         symbol in the sal.
3548         * linespec.c (convert_address_location_to_sals): Fill in sal's
3549         symbol with find_pc_sect_containing_function.
3550         * symtab.c (find_function_start_sal): Rename to ...
3551         (find_function_start_sal_1): ... this.
3552         (find_function_start_sal): Reimplement as wrapper around
3553         find_function_start_sal_1, and use
3554         find_pc_sect_containing_function to fill in the sal's symbol.
3555         (find_function_start_sal(symbol*, bool)): Adjust.
3556         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3557         comments.
3558         (find_pc_sect_containing_function): Declare.
3559
3560 2018-06-29  Pedro Alves  <palves@redhat.com>
3561
3562         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3563         true if the the location has no symbol.
3564
3565 2018-06-28  Tom Tromey  <tom@tromey.com>
3566
3567         * NEWS: Mention --enable-codesign.
3568         * silent-rules.mk (ECHO_SIGN): New variable.
3569         * configure.ac: Add --enable-codesign.
3570         * configure: Rebuild.
3571         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3572         (gdb$(EXEEXT)): Optionally invoke codesign.
3573
3574 2018-06-28  Pedro Alves  <palves@redhat.com>
3575
3576         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3577         comments.
3578         (switch_to_thread_no_regs): Adjust comment.
3579         * infcmd.c (stop_pc): Delete.
3580         (post_create_inferior, info_program_command): Replace references
3581         to stop_pc with references to thread_info->suspend.stop_pc.
3582         * inferior.h (stop_pc): Delete declaration.
3583         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3584         (handle_inferior_event_1, handle_signal_stop)
3585         (process_event_stop_test, keep_going_stepped_thread)
3586         (handle_step_into_function, handle_step_into_function_backward)
3587         (print_stop_location): Replace references to stop_pc with
3588         references to thread_info->suspend.stop_pc.
3589         (struct infcall_suspend_state) <stop_pc>: Delete field.
3590         (save_infcall_suspend_state, restore_infcall_suspend_state):
3591         Remove references to inf_stat->stop_pc.
3592         * linux-fork.c (fork_load_infrun_state): Likewise.
3593         * record-btrace.c (record_btrace_set_replay): Likewise.
3594         * record-full.c (record_full_goto_entry): Likewise.
3595         * remote.c (print_one_stopped_thread): Likewise.
3596         * target.c (target_resume): Extend comment.
3597         * thread.c (set_executing_thread): New.
3598         (set_executing): Use it.
3599         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3600         Remove references to stop_pc.
3601
3602 2018-06-28  Pedro Alves  <palves@redhat.com>
3603
3604         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3605         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3606
3607 2018-06-28  Tom Tromey  <tom@tromey.com>
3608
3609         * coffread.c (coff_symfile_finish): Update.
3610         * xcoffread.c (xcoff_symfile_finish): Update.
3611         * elfread.c (elf_symfile_finish): Update.
3612         * symfile.h (dwarf2_free_objfile): Don't declare.
3613         * dwarf2read.c (_initialize_dwarf2_read): Use
3614         register_objfile_data_with_cleanup.
3615         (dwarf2_free_objfile): Now static.  Change signature.
3616
3617 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3618
3619         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3620         option "-o" to add-symbol-file-load to add an offset to each
3621         section's load address.
3622         * symfile.c (set_objfile_default_section_offset): New function.
3623
3624 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3625
3626         * symfile.c (add_symbol_file_command): Make sure that sections
3627         with the same name are sorted in the same order.
3628
3629 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3630
3631         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3632         require the second argument.  If omitted, load sections at the
3633         addresses specified in the file.
3634
3635 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3636
3637         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3638         (_initialize_symfile): Add option "-o" to symbol-file to add an
3639         offset to each section of the symbol file.
3640
3641 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3642
3643         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3644
3645 2018-06-27  Tom Tromey  <tom@tromey.com>
3646
3647         * stack.c (_initialize_stack): Update "func" help text.
3648
3649 2018-06-27  Tom Tromey  <tom@tromey.com>
3650
3651         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3652         std::vector.
3653         (unwind_infopy_str, pyuw_create_unwind_info)
3654         (unwind_infopy_add_saved_register, pyuw_sniffer)
3655         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3656         Update.
3657         (struct saved_reg): Add constructor.
3658         <value>: Now a gdbpy_ref<>.
3659
3660 2018-06-27  Tom Tromey  <tom@tromey.com>
3661
3662         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3663
3664 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3665
3666         * gdb-gdb.py.in: Format using autopep8.
3667
3668 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3669
3670         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3671         (type_lookup_function): Recognize CORE_ADDR values.
3672
3673 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3674
3675         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3676         print tag_name.
3677
3678 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3679
3680         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3681         <__lt__>: Add.
3682
3683 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3684
3685         * gdb-gdb.py: Move to...
3686         * gdb-gdb.py.in: ... here.
3687         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3688         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3689         dependencies.
3690         (distclean): Remove gdb-gdb.py when cleaning.
3691         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3692         * configure: Re-generate.
3693
3694 2018-06-27  Pedro Alves  <palves@redhat.com>
3695
3696         * proc-service.c (get_ps_regcache): New.
3697         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3698         (ps_lsetfpregs): Use it.
3699
3700 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3701
3702         PR gdb/21695
3703         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3704         (dwarf_decode_lines_1): Adjust.
3705
3706 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3707
3708         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3709         override.
3710         <info_proc>: Likewise.
3711
3712 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3713
3714         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3715         to windows_fetch_one_register, and only handle the case of
3716         fetching one register.  Move the code that reloads the context
3717         and iterates over all registers if R is negative to...
3718         (windows_nat_target::fetch_registers): ... here.
3719         (do_windows_store_inferior_registers): Rename to
3720         windows_store_one_register, and only handle the case of storing
3721         one register.  Move the code that handles the case where r is
3722         negative to...
3723         (windows_nat_target::store_registers) ... here.
3724
3725 2018-06-26  Tom Tromey  <tom@tromey.com>
3726
3727         PR rust/22574:
3728         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3729         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3730         Update.
3731         (rust_internal_print_type): Add podata parameter.
3732         (rust_print_type): Update.
3733
3734 2018-06-26  Tom Tromey  <tom@tromey.com>
3735
3736         * typeprint.h (struct print_offset_data) <update, finish,
3737         maybe_print_hole>: New methods.
3738         <indentation>: New constant.
3739         * typeprint.c (print_offset_data::indentation): Define.
3740         (print_offset_data::maybe_print_hole, print_offset_data::update)
3741         (print_offset_data::finish): Move from c-typeprint.c and rename.
3742         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3743         (print_spaces_filtered_with_print_options): Update.
3744         (c_print_type_union_field_offset, maybe_print_hole)
3745         (c_print_type_struct_field_offset): Move to typeprint.c and
3746         rename.
3747         (c_type_print_base_struct_union): Update.
3748
3749 2018-06-25  Pedro Alves  <palves@redhat.com>
3750
3751         * gdbthread.h (thread_info_ref, delete_thread)
3752         (delete_thread_silent, first_thread_of_inferior)
3753         (any_thread_of_inferior, switch_to_thread)
3754         (enable_thread_stack_temporaries)
3755         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3756         (get_last_thread_stack_temporary)
3757         (value_in_thread_stack_temporaries, can_access_registers_thread):
3758         Spell out "struct thread_info" instead of just "thread_info".
3759         * inferior.h (notice_new_inferior): Likewise.
3760
3761 2018-06-25  Pedro Alves  <palves@redhat.com>
3762
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         detach_inferior.
3767         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3768         delete_thread.
3769         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3770         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3771         and pass a thread_info pointer to delete_thread.
3772         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3773         pass thread_info pointer to delete_thread.
3774         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3775         delete_thread_silent call.
3776         * procfs.c (procfs_target::detach): Pass inferior pointer to
3777         detach_inferior.
3778         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3779         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3780         delete_thread_silent call.
3781         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3782         pass thread_info pointer to delete_thread.
3783         (windows_nat_target::detach): Pass inferior pointer to
3784         delete_inferior.
3785
3786 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3787
3788         * regcache.c (readable_regcache::read_part): Fix asserts.
3789         (reg_buffer::raw_collect_part): New function.
3790         (regcache::write_part): Fix asserts.
3791         (reg_buffer::raw_supply_part): New function.
3792         (regcache::transfer_regset_register): New helper function.
3793         (regcache::transfer_regset): Call new functions.
3794         (regcache_supply_regset): Use gdb_byte*.
3795         (regcache::supply_regset): Likewise.
3796         (regcache_collect_regset): Likewise.
3797         (regcache::collect_regset): Likewise.
3798         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3799         (reg_buffer::raw_supply_part): Likewise.
3800         (regcache::transfer_regset_register): Likewise.
3801         (regcache::transfer_regset): Use gdb_byte*.
3802
3803 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3804
3805         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3806
3807 2018-06-21  Pedro Alves  <palves@redhat.com>
3808
3809         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3810         instead of a ptid_t.  All callers adjusted.
3811         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3812         adjusted.
3813         (print_ada_task_info, display_current_task_id, task_command_1):
3814         Adjust.
3815         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3816         inferior_thread.
3817         (breakpoint_kind): Adjust.
3818         (remove_breakpoints_pid): Rename to ...
3819         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3820         pointer.  All callers adjusted.
3821         (bpstat_clear_actions): Use inferior_thread.
3822         (get_bpstat_thread): New.
3823         (bpstat_do_actions): Use it.
3824         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3825         to take a thread_info pointer.  All callers adjusted.
3826         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3827         (breakpoint_re_set_thread): Use inferior_thread.
3828         * breakpoint.h (struct inferior): Forward declare.
3829         (bpstat_stop_status): Update.
3830         (remove_breakpoints_pid): Delete.
3831         (remove_breakpoints_inf): New.
3832         * bsd-uthread.c (bsd_uthread_target::wait)
3833         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3834         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3835         (maint_btrace_packet_history_cmd)
3836         (maint_btrace_clear_packet_history_cmd): Adjust.
3837         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3838         inferior_thread.
3839         * cli/cli-interp.c: Include "inferior.h".
3840         * common/refcounted-object.h (struct
3841         refcounted_object_ref_policy): New.
3842         * compile/compile-object-load.c: Include gdbthread.h.
3843         (store_regs): Use inferior_thread.
3844         * corelow.c (core_target::close): Use current_inferior.
3845         (core_target_open): Adjust to use first_thread_of_inferior and use
3846         the current inferior.
3847         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3848         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3849         <thread>: ... this new field.  All references adjusted.
3850         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3851         Take a thread_info pointer instead of a ptid_t.
3852         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3853         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3854         thread_info pointer instead of a ptid_t.
3855         * elfread.c: Include "inferior.h".
3856         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3857         Use inferior_thread.
3858         * eval.c (evaluate_subexp): Likewise.
3859         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3860         inferior_thread.
3861         * gdb_proc_service.h (struct thread_info): Forward declare.
3862         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3863         <thread>: ... this new field.  All references adjusted.
3864         * gdbarch.h, gdbarch.c: Regenerate.
3865         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3866         'thread' parameter.  All implementations and callers adjusted.
3867         * gdbthread.h (thread_info) <set_running>: New method.
3868         (delete_thread, delete_thread_silent): Take a thread_info pointer
3869         instead of a ptid.
3870         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3871         (first_thread_of_process): Delete, replaced by ...
3872         (first_thread_of_inferior): ... this new function.  All callers
3873         adjusted.
3874         (any_live_thread_of_process): Delete, replaced by ...
3875         (any_live_thread_of_inferior): ... this new function.  All callers
3876         adjusted.
3877         (switch_to_thread, switch_to_no_thread): Declare.
3878         (is_executing): Delete.
3879         (enable_thread_stack_temporaries): Update comment.
3880         <enable_thread_stack_temporaries>: Take a thread_info pointer
3881         instead of a ptid_t.  Incref the thread.
3882         <~enable_thread_stack_temporaries>: Decref the thread.
3883         <m_ptid>: Delete
3884         <m_thr>: New.
3885         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3886         (get_last_thread_stack_temporary)
3887         (value_in_thread_stack_temporaries, can_access_registers_thread):
3888         Take a thread_info pointer instead of a ptid_t.  All callers
3889         adjusted.
3890         * infcall.c (get_call_return_value): Use inferior_thread.
3891         (run_inferior_call): Work with thread pointers instead of ptid_t.
3892         (call_function_by_hand_dummy): Work with thread pointers instead
3893         of ptid_t.  Use thread_info_ref.
3894         * infcmd.c (proceed_thread_callback): Access thread's state
3895         directly.
3896         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3897         access thread's state directly.
3898         (continue_command): Use inferior_thread.
3899         (info_program_command): Use find_thread_ptid and access thread
3900         state directly.
3901         (proceed_after_attach_callback): Use thread state directly.
3902         (notice_new_inferior): Take a thread_info pointer instead of a
3903         ptid_t.  All callers adjusted.
3904         (exit_inferior): Take an inferior pointer instead of a pid.  All
3905         callers adjusted.
3906         (exit_inferior_silent): New.
3907         (detach_inferior): Delete.
3908         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3909         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3910         (detach_inferior_command, kill_inferior_command): Use
3911         find_inferior_id instead of valid_gdb_inferior_id and
3912         gdb_inferior_id_to_pid.
3913         (inferior_command): Use inferior and thread pointers.
3914         * inferior.h (struct thread_info): Forward declare.
3915         (notice_new_inferior): Take a thread_info pointer instead of a
3916         ptid_t.  All callers adjusted.
3917         (detach_inferior): Delete declaration.
3918         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3919         instead of a pid.  All callers adjusted.
3920         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3921         (valid_gdb_inferior_id): Delete.
3922         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3923         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3924         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3925         ...
3926         <inf>: ... this new field.
3927         <step_ptid>: Delete, replaced by ...
3928         <step_thread>: ... this new field.
3929         (get_displaced_stepping_state): Take an inferior pointer instead
3930         of a pid.  All callers adjusted.
3931         (displaced_step_in_progress_any_inferior): Adjust.
3932         (displaced_step_in_progress_thread): Take a thread pointer instead
3933         of a ptid_t.  All callers adjusted.
3934         (displaced_step_in_progress, add_displaced_stepping_state): Take
3935         an inferior pointer instead of a pid.  All callers adjusted.
3936         (get_displaced_step_closure_by_addr): Adjust.
3937         (remove_displaced_stepping_state): Take an inferior pointer
3938         instead of a pid.  All callers adjusted.
3939         (displaced_step_prepare_throw, displaced_step_prepare)
3940         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3941         All callers adjusted.
3942         (start_step_over): Adjust.
3943         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3944         displaced step queue.
3945         (do_target_resume): Adjust.
3946         (fetch_inferior_event): Use inferior_thread.
3947         (context_switch, get_inferior_stop_soon): Take an
3948         execution_control_state pointer instead of a ptid_t.  All callers
3949         adjusted.
3950         (switch_to_thread_cleanup): Delete.
3951         (stop_all_threads): Use scoped_restore_current_thread.
3952         * inline-frame.c: Include "gdbthread.h".
3953         (inline_state) <inline_state>: Take a thread pointer instead of a
3954         ptid_t.  All callers adjusted.
3955         <ptid>: Delete, replaced by ...
3956         <thread>: ... this new field.
3957         (find_inline_frame_state): Take a thread pointer instead of a
3958         ptid_t.  All callers adjusted.
3959         (skip_inline_frames, step_into_inline_frame)
3960         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3961         pointer instead of a ptid_t.  All callers adjusted.
3962         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3963         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3964         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3965         pointers directly.
3966         * linux-nat.c (get_detach_signal): Likewise.
3967         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3968         (thread_db_notice_clone): Adjust.
3969         (thread_db_find_new_threads_silently)
3970         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3971         a thread pointer instead of a ptid_t.  All callers adjusted.
3972         * mi/mi-cmd-var.c: Include "inferior.h".
3973         (mi_cmd_var_update_iter): Update to use thread pointers.
3974         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3975         inferior directly.
3976         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3977         out to ...
3978         (mi_output_running): ... this new function.
3979         (mi_on_resume_1): Adjust to use it.
3980         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3981         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3982         directly.
3983         (interrupt_thread_callback): : Adjust to use thread and inferior
3984         pointers.
3985         * proc-service.c: Include "gdbthread.h".
3986         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3987         * progspace-and-thread.c: Include "inferior.h".
3988         * progspace.c: Include "inferior.h".
3989         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3990         hold a reference to an inferior_object.
3991         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3992         inferior_thread.
3993         * python/py-inferior.c (struct inferior_object): Give the type a
3994         tag name instead of a typedef.
3995         (python_on_normal_stop): No need to check if the current thread is
3996         listed.
3997         (inferior_to_inferior_object): Change return type to
3998         inferior_object.  All callers adjusted.
3999         (find_thread_object): Delete, bits factored out to ...
4000         (thread_to_thread_object): ... this new function.
4001         * python/py-infthread.c (create_thread_object): Use
4002         inferior_to_inferior_object.
4003         (thpy_is_stopped): Use thread pointer directly.
4004         (gdbpy_selected_thread): Use inferior_thread.
4005         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4006         field, replaced with ...
4007         <thread>: ... this new field.  All users adjusted.
4008         (btpy_insn_or_gap_new): Drop const.
4009         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
4010         callers adjusted.
4011         * python/py-record.c: Include "gdbthread.h".
4012         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4013         a ptid_t.  All callers adjusted.
4014         (gdbpy_current_recording): Use inferior_thread.
4015         * python/py-record.h (recpy_record_object) <ptid>: Delete
4016         field, replaced with ...
4017         <thread>: ... this new field.  All users adjusted.
4018         (recpy_element_object) <ptid>: Delete
4019         field, replaced with ...
4020         <thread>: ... this new field.  All users adjusted.
4021         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4022         a ptid_t.  All callers adjusted.
4023         * python/py-threadevent.c: Include "gdbthread.h".
4024         (get_event_thread): Use thread_to_thread_object.
4025         * python/python-internal.h (struct inferior_object): Forward
4026         declare.
4027         (find_thread_object, find_inferior_object): Delete declarations.
4028         (thread_to_thread_object, inferior_to_inferior_object): New
4029         declarations.
4030         * record-btrace.c: Include "inferior.h".
4031         (require_btrace_thread): Use inferior_thread.
4032         (record_btrace_frame_sniffer)
4033         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4034         (get_thread_current_frame): Use scoped_restore_current_thread and
4035         switch_to_thread.
4036         (get_thread_current_frame): Use thread pointer directly.
4037         (record_btrace_replay_at_breakpoint): Use thread's inferior
4038         pointer directly.
4039         * record-full.c: Include "inferior.h".
4040         * regcache.c: Include "gdbthread.h".
4041         (get_thread_arch_regcache): Use the inferior's address space
4042         directly.
4043         (get_thread_regcache, registers_changed_thread): New.
4044         * regcache.h (get_thread_regcache(thread_info *thread)): New
4045         overload.
4046         (registers_changed_thread): New.
4047         (remote_target) <remote_detach_1>: Swap order of parameters.
4048         (remote_add_thread): <remote_add_thread>: Return the new thread.
4049         (get_remote_thread_info(ptid_t)): New overload.
4050         (remote_target::remote_notice_new_inferior): Use thread pointers
4051         directly.
4052         (remote_target::process_initial_stop_replies): Use
4053         thread_info::set_running.
4054         (remote_target::remote_detach_1, remote_target::detach)
4055         (extended_remote_target::detach): Adjust.
4056         * stack.c (frame_show_address): Use inferior_thread.
4057         * target-debug.h (target_debug_print_thread_info_pp): New.
4058         * target-delegates.c: Regenerate.
4059         * target.c (default_thread_address_space): Delete.
4060         (memory_xfer_partial_1): Use current_inferior.
4061         (target_detach): Use current_inferior.
4062         (target_thread_address_space): Delete.
4063         (generic_mourn_inferior): Use current_inferior.
4064         * target.h (struct target_ops) <thread_address_space>: Delete.
4065         (target_thread_address_space): Delete.
4066         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4067         pointers directly.
4068         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4069         thread pointer instead of a ptid_t.  Adjust all callers.
4070         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4071         (first_thread_of_process): Delete, replaced by ...
4072         (first_thread_of_inferior): ... this new function.  All callers
4073         adjusted.
4074         (any_thread_of_process): Rename to ...
4075         (any_thread_of_inferior): ... this, and take an inferior pointer.
4076         (any_live_thread_of_process): Rename to ...
4077         (any_live_thread_of_inferior): ... this, and take an inferior
4078         pointer.
4079         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4080         (value_in_thread_stack_temporaries)
4081         (get_last_thread_stack_temporary): Take a thread pointer instead
4082         of a ptid_t.  Adjust all callers.
4083         (thread_info::set_running): New.
4084         (validate_registers_access): Use inferior_thread.
4085         (can_access_registers_ptid): Rename to ...
4086         (can_access_registers_thread): ... this, and take a thread
4087         pointer.
4088         (print_thread_info_1): Adjust to compare thread pointers instead
4089         of ptids.
4090         (switch_to_no_thread, switch_to_thread): Make extern.
4091         (scoped_restore_current_thread::~scoped_restore_current_thread):
4092         Use m_thread pointer directly.
4093         (scoped_restore_current_thread::scoped_restore_current_thread):
4094         Use inferior_thread.
4095         (thread_command): Use thread pointer directly.
4096         (thread_num_make_value_helper): Use inferior_thread.
4097         * top.c (execute_command): Use inferior_thread.
4098         * tui/tui-interp.c: Include "inferior.h".
4099         * varobj.c (varobj_create): Use inferior_thread.
4100         (value_of_root_1): Use find_thread_global_id instead of
4101         global_thread_id_to_ptid.
4102
4103 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4104
4105         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4106         possible.
4107         (regcache::write_part): Likewise.
4108         (readable_regcache::cooked_read_part): Update comment.
4109         (readable_regcache::cooked_write_part): Likewise.
4110         * regcache.h: (readable_regcache::read_part): Likewise.
4111         (regcache::write_part): Likewise.
4112
4113 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4114             Dirk Schubert  <dirk.schubert@arm.com>
4115
4116         * aarch64-linux-nat.c (post_attach): New.
4117         (aarch64_linux_nat_target::post_attach): Override post_attach to
4118         record the number of hardware debug registers.
4119
4120 2018-06-20  Tom Tromey  <tom@tromey.com>
4121
4122         * python/py-param.c (add_setshow_generic): Make parameters const.
4123         (parmpy_init): Update.
4124
4125 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4126
4127         * regcache.h (regcache_cooked_read_ftype): Rename to...
4128         (register_read_ftype): ...this, change type to function_view.
4129         (class reg_buffer) <save>: Remove src parameter.
4130         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4131         parameter non-const in first overload.  Remove src parameter in
4132         second overload.
4133         * regcache.c (do_cooked_read): Remove.
4134         (readonly_detached_regcache::readonly_detached_regcache): Make
4135         parameter non-const, adjust call to other constructor.
4136         (reg_buffer::save): Remove src parameter.
4137         * frame.c (do_frame_register_read): Remove.
4138         (frame_save_as_regcache): Use lambda function.
4139         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4140         parameter to ppu2spu_data *.
4141         (ppu2spu_sniffer): Use lambda function.
4142
4143 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4144
4145         * record-full.c (record_full_target::insert_breakpoint): Remove
4146         "struct" keyword, add const.
4147
4148 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4149
4150         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4151         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4152         * configure.ac: Remove AC_PREREQ, add missing quoting.
4153         * gnulib/configure.ac: Modernize usage of
4154         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4155         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4156         (AUTOMAKE_VERSION): Bump to 1.15.1.
4157         * configure: Re-generate.
4158         * config.in: Re-generate.
4159         * aclocal.m4: Re-generate.
4160         * gnulib/aclocal.m4: Re-generate.
4161         * gnulib/config.in: Re-generate.
4162         * gnulib/configure: Re-generate.
4163         * gnulib/import/Makefile.in: Re-generate.
4164
4165 2018-06-19  Pedro Alves  <palves@redhat.com>
4166
4167         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4168         (lookup_minimal_symbol_by_pc_section): ... here with
4169         gdb_assert_not_reached added.
4170
4171 2018-06-19  Pedro Alves  <palves@redhat.com>
4172
4173         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4174         parameter with a block parameter.  Compare location's block symbol
4175         with the frame's block instead of addresses.
4176         (skip_inline_frames): Pass the current block instead of the
4177         frame's address.  Break out as soon as we determine the frame
4178         should not be skipped.
4179
4180 2018-06-18  Tom Tromey  <tom@tromey.com>
4181
4182         * solib-aix.c (solib_aix_get_section_offsets): Return
4183         unique_xmalloc_ptr.
4184         (solib_aix_solib_create_inferior_hook): Update.
4185
4186 2018-06-18  Tom Tromey  <tom@tromey.com>
4187
4188         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4189
4190 2018-06-18  Tom Tromey  <tom@tromey.com>
4191
4192         * solib-frv.c (frv_relocate_main_executable): Use
4193         unique_xmalloc_ptr.
4194         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4195         unique_xmalloc_ptr.
4196
4197 2018-06-18  Tom Tromey  <tom@tromey.com>
4198
4199         * objfiles.h (inhibit_section_map_updates): Update.
4200         (resume_section_map_updates, resume_section_map_updates_cleanup):
4201         Remove.
4202         * solib-svr4.c (svr4_handle_solib_event): Update.
4203         * objfiles.c (inhibit_section_map_updates): Return
4204         scoped_restore_tmpl<int>.
4205         (resume_section_map_updates, resume_section_map_updates_cleanup):
4206         Remove.
4207
4208 2018-06-18  Tom Tromey  <tom@tromey.com>
4209
4210         * valprint.h (read_string): Update.
4211         * valprint.c (read_string): Change type of "buffer".
4212         (val_print_string): Update.
4213         * python/py-value.c (valpy_string): Update.
4214         * language.h (struct language_defn) <la_get_string>: Change
4215         type of "buffer".
4216         (default_get_string, c_get_string): Update.
4217         * language.c (default_get_string): Change type of "buffer".
4218         * guile/scm-value.c (gdbscm_value_to_string): Update.
4219         * c-lang.c (c_get_string): Change type of "buffer".
4220
4221 2018-06-18  Tom Tromey  <tom@tromey.com>
4222
4223         * ser-mingw.c (struct pipe_state_destroyer): New.
4224         (pipe_state_up): New typedef.
4225         (cleanup_pipe_state): Remove.
4226         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4227
4228 2018-06-18  Tom Tromey  <tom@tromey.com>
4229
4230         * rust-lang.h (rust_yyerror): Don't declare.
4231         * rust-lang.c (rust_language_defn): Update.
4232         * rust-exp.y (yyerror): Now static.
4233         * parse.c (parse_exp_in_context_1): Update.
4234         * p-lang.h (p_yyerror): Don't declare.
4235         * p-lang.c (p_language_defn): Update.
4236         * p-exp.y (yyerror): Now static.
4237         * opencl-lang.c (opencl_language_defn): Update.
4238         * objc-lang.c (objc_language_defn): Update.
4239         * m2-lang.h (m2_yyerror): Don't declare.
4240         * m2-lang.c (m2_language_defn): Update.
4241         * m2-exp.y (yyerror): Now static.
4242         * language.h (struct language_defn) <la_error>: Remove.
4243         * language.c (unk_lang_error): Remove.
4244         (unknown_language_defn, auto_language_defn): Remove.
4245         * go-lang.h (go_yyerror): Don't declare.
4246         * go-lang.c (go_language_defn): Update.
4247         * go-exp.y (yyerror): Now static.
4248         * f-lang.h (f_yyerror): Don't declare.
4249         * f-lang.c (f_language_defn): Update.
4250         * f-exp.y (yyerror): Now static.
4251         * d-lang.h (d_yyerror): Don't declare.
4252         * d-lang.c (d_language_defn): Update.
4253         * d-exp.y (yyerror): Now static.
4254         * c-lang.h (c_yyerror): Don't declare.
4255         * c-lang.c (c_language_defn, cplus_language_defn)
4256         (asm_language_defn, minimal_language_defn): Update.
4257         * c-exp.y (yyerror): Now static.
4258         * ada-lang.h (ada_yyerror): Don't declare.
4259         * ada-lang.c (ada_language_defn): Update.
4260         * ada-exp.y (yyerror): Now static.
4261
4262 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4263
4264         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4265         (store_sveregs_to_thread): Likewise.
4266         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4267         (aarch64_linux_store_inferior_registers): Likewise.
4268         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4269         function.
4270         (aarch64_sve_regs_copy_to_regcache): Likewise.
4271         (aarch64_sve_regs_copy_from_regcache): Likewise.
4272         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4273         declaration.
4274         (aarch64_sve_regs_copy_to_regcache): Likewise.
4275         (aarch64_sve_regs_copy_from_regcache): Likewise.
4276         (sve_context): Structure from Linux headers.
4277         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4278         (SVE_SIG_ZREG_SIZE): Likewise.
4279         (SVE_SIG_PREG_SIZE): Likewise.
4280         (SVE_SIG_FFR_SIZE): Likewise.
4281         (SVE_SIG_REGS_OFFSET): Likewise.
4282         (SVE_SIG_ZREGS_OFFSET): Likewise.
4283         (SVE_SIG_ZREG_OFFSET): Likewise.
4284         (SVE_SIG_ZREGS_SIZE): Likewise.
4285         (SVE_SIG_PREGS_OFFSET): Likewise.
4286         (SVE_SIG_PREG_OFFSET): Likewise.
4287         (SVE_SIG_PREGS_SIZE): Likewise.
4288         (SVE_SIG_FFR_OFFSET): Likewise.
4289         (SVE_SIG_REGS_SIZE): Likewise.
4290         (SVE_SIG_CONTEXT_SIZE): Likewise.
4291         (SVE_PT_REGS_MASK): Likewise.
4292         (SVE_PT_REGS_FPSIMD): Likewise.
4293         (SVE_PT_REGS_SVE): Likewise.
4294         (SVE_PT_VL_INHERIT): Likewise.
4295         (SVE_PT_VL_ONEXEC): Likewise.
4296         (SVE_PT_REGS_OFFSET): Likewise.
4297         (SVE_PT_FPSIMD_OFFSET): Likewise.
4298         (SVE_PT_FPSIMD_SIZE): Likewise.
4299         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4300         (SVE_PT_SVE_PREG_SIZE): Likewise.
4301         (SVE_PT_SVE_FFR_SIZE): Likewise.
4302         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4303         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4304         (__SVE_SIG_TO_PT): Likewise.
4305         (SVE_PT_SVE_OFFSET): Likewise.
4306         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4307         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4308         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4309         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4310         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4311         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4312         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4313         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4314         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4315         (SVE_PT_SVE_SIZE): Likewise.
4316         (SVE_PT_SIZE): Likewise.
4317         (HAS_SVE_STATE): New define.
4318
4319 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4320
4321         * nat/aarch64-sve-linux-sigcontext.h: New file.
4322         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4323         new files.
4324         (SVE_VQ_MIN): Likewise.
4325         (SVE_VQ_MAX): Likewise.
4326         (SVE_VL_MIN): Likewise.
4327         (SVE_VL_MAX): Likewise.
4328         (SVE_NUM_ZREGS): Likewise.
4329         (SVE_NUM_PREGS): Likewise.
4330         (sve_vl_valid): Likewise.
4331         (struct user_sve_header): Likewise.
4332
4333 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4334             Richard Bunt <Richard.Bunt@arm.com>
4335
4336         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4337         was requested by GDB.
4338
4339 2018-06-15  Tom de Vries  <tdevries@suse.de>
4340
4341         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4342
4343 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4344
4345         * gnulib/update-gnulib.sh: Print expected versions of
4346         autoconf/aclocal.
4347
4348 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4349
4350         * arch-utils.c (default_type_align): Use type_length_units.
4351         * gdbtypes.c (type_align): Use type_length_units.
4352
4353 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4354
4355         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4356         of 'define' command.
4357
4358 2018-06-14  Tom de Vries  <tdevries@suse.de>
4359
4360         PR cli/22573
4361         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4362         get_no_prettyformat_print_options.
4363
4364 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4365
4366         * sparc-nat.h: Include target.h.
4367         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4368         <fetch_registers>: Remove this argument in function call.
4369         <store_registers>: Remove this argument in function call, remove
4370         extra semicolon.
4371         <low_forget_process>: Call sparc64_forget_process instead of
4372         sparc_forget_process.
4373
4374 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4375
4376         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4377         (procfs_target::make_corefile_notes): Adjust to new
4378         target_read_alloc return type.
4379
4380 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4381             Stephen Roberts  <stephen.roberts@arm.com>
4382
4383         PR gdb/22882
4384         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4385         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4386         Move should_notify_stop local into more inner scope.
4387
4388 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4389             Stephen Roberts  <stephen.roberts@arm.com>
4390
4391         PR gdb/22882
4392         * infrun.c (resume_1): Add call to mark_async_event_handler.
4393
4394 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4395
4396         * infrun.c (do_target_wait): Change old version of $pc printed.
4397
4398 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4399
4400         * dwarf2read.c (read_index_from_section): Rename to...
4401         (read_gdb_index_from_section): ... this, update all callers.
4402         (dwarf2_read_index): Rename to...
4403         (dwarf2_read_gdb_index): ... this, update all callers.
4404
4405 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4406
4407         * gdb/hppa-linux-nat.c
4408         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4409         hppa_linux_nat_target::fetch_registers.
4410
4411 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4412
4413         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4414         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4415         (AARCH64_DWARF_SVE_FFR): Likewise.
4416         (AARCH64_DWARF_SVE_P0): Likewise.
4417         (AARCH64_DWARF_SVE_Z0): Likewise.
4418
4419 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4420
4421         * common/common-regcache.h (raw_compare): New function.
4422         * regcache.c (regcache::raw_compare): Likewise.
4423         * regcache.h (regcache::raw_compare): New declaration.
4424
4425 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4426
4427         * common/common-regcache.h (reg_buffer_common): New structure.
4428         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4429         (reg_buffer::raw_supply): Likewise.
4430         (reg_buffer::raw_supply_integer): Likewise.
4431         (reg_buffer::raw_supply_zeroed): Likewise.
4432         (reg_buffer::raw_collect): Likewise.
4433         (reg_buffer::raw_collect_integer): Likewise.
4434         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4435         (reg_buffer::raw_supply): Likewise.
4436         (reg_buffer::raw_supply_integer): Likewise.
4437         (reg_buffer::raw_supply_zeroed): Likewise.
4438         (reg_buffer::raw_collect): Likewise.
4439         (reg_buffer::raw_collect_integer): Likewise.
4440
4441 2018-06-10  Tom Tromey  <tom@tromey.com>
4442
4443         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4444         (class remote_state) <stop_reply_queue>: Now std::vector.
4445         (remote_state::~remote_state)
4446         (remote_target::stop_reply_queue_length): Update.
4447         (struct queue_iter_param, remove_child_of_pending_fork)
4448         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4449         (check_pending_event_prevents_wildcard_vcont_callback)
4450         (remove_stop_reply_for_inferior)
4451         (remove_stop_reply_of_remote_state)
4452         (remote_notif_remove_once_on_match)
4453         (stop_reply_match_ptid_and_ws)
4454         (remote_kill_child_of_pending_fork): Remove.
4455         (remote_target::remove_new_fork_children)
4456         (remote_target::check_pending_events_prevent_wildcard_vcont)
4457         (remote_target::discard_pending_stop_replies)
4458         (remote_target::discard_pending_stop_replies_in_queue)
4459         (remote_target::remote_notif_remove_queued_reply)
4460         (remote_target::queued_stop_reply)
4461         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4462         (remote_target::wait, remote_target::kill_new_fork_children)
4463         (remote_target::async): Update.
4464
4465 2018-06-10  Tom Tromey  <tom@tromey.com>
4466
4467         * record-full.c (record_full_arch_list_cleanups): Remove.
4468         (record_full_message): Use try/catch.
4469         (record_full_wait_cleanups): Remove.
4470         (record_full_wait_1): Use try/catch.
4471         (record_full_restore): Likewise.
4472
4473 2018-06-10  Tom Tromey  <tom@tromey.com>
4474
4475         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4476         declare VEC.  Add constructor.
4477         <in_target_beneath>: Now bool.
4478         (record_full_breakpoints): Now a std::vector, static.
4479         (record_full_sync_record_breakpoints)
4480         (record_full_init_record_breakpoints)
4481         (record_full_target::insert_breakpoint)
4482         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4483
4484 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4485
4486         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4487         * serial.c (serial_interface_lookup): Remove struct keyword.
4488
4489 2018-06-10  Tom Tromey  <tom@tromey.com>
4490
4491         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4492         method.
4493         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4494         a method.
4495         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4496         method.
4497         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4498         "beneath" as a method.
4499         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4500         Use "beneath" as a method.
4501
4502 2018-06-10  Tom Tromey  <tom@tromey.com>
4503
4504         * tracefile.c (struct trace_file_writer_deleter): New.
4505         <operator()>: Rename from trace_file_writer_xfree.
4506         (trace_file_writer_up): New typedef.
4507         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4508
4509 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4510
4511         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4512         <m_registers, m_register_status>: Change type to
4513         std::unique_ptr.
4514         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4515         XCNEWVEC.
4516
4517 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4518
4519         * common/common-regcache.h (enum register_status): Add
4520         underlying type "signed char".
4521         * regcache.h (reg_buffer) <m_register_status>: Change type to
4522         register_status *.
4523         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4524         register_status instead of signed char.
4525         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4526         (reg_buffer::get_register_status): Remove cast.
4527         (readable_regcache::raw_read): Remove cast.
4528         (readable_regcache::cooked_read): Remove cast.
4529
4530 2018-06-09  Tom Tromey  <tom@tromey.com>
4531
4532         * source.c (reverse_search_command, forward_search_command): Use
4533         scoped_fd.
4534
4535 2018-06-09  Tom Tromey  <tom@tromey.com>
4536
4537         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4538         (serial_ops_list): Now static, std::vector.
4539         (serial_interface_lookup, serial_add_interface): Update.
4540
4541 2018-06-09  Tom Tromey  <tom@tromey.com>
4542
4543         * dwarf2read.c (process_cu_includes): Update.
4544         (process_full_comp_unit): Update.
4545         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4546         std::vector.
4547
4548 2018-06-08  Paul Koning  <paul_koning@dell.com>
4549
4550         PR gdb/23252
4551
4552         * python/python.c (do_start_initialization):
4553         Avoid call to internal Python API.
4554         (init__gdb_module): New function.
4555
4556 2018-06-08  Gary Benson <gbenson@redhat.com>
4557
4558         * linux-thread-db.c (valprint.h): New include.
4559         (struct check_thread_db_info): New structure.
4560         (check_thread_db_on_load, tdb_testinfo): New static globals.
4561         (check_thread_db, check_thread_db_callback): New functions.
4562         (try_thread_db_load_1): Run integrity checks if requested.
4563         (maintenance_check_libthread_db): New function.
4564         (_initialize_thread_db): Register "maint check libthread-db"
4565         and "maint set/show check-libthread-db".
4566         * NEWS: Mention the above new commands.
4567
4568 2018-06-08  Tom Tromey  <tom@tromey.com>
4569
4570         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4571         now a method.
4572
4573 2018-06-08  Tom Tromey  <tom@tromey.com>
4574
4575         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4576
4577 2018-06-08  Tom Tromey  <tom@tromey.com>
4578
4579         * common/btrace-common.h (struct btrace_data): Add constructor,
4580         destructor, move assignment operator.
4581         <empty, clear, fini>: New methods.
4582         <format>: Initialize.
4583         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4584         (btrace_data_empty): Don't declare.
4585         * common/btrace-common.c (btrace_data_init): Remove.
4586         (btrace_data::fini): Rename from btrace_data_fini.
4587         (btrace_data::empty): Rename from btrace_data_empty.
4588         (btrace_data::clear): Rename from btrace_data_clear.  Return
4589         bool.
4590         * btrace.h (make_cleanup_btrace_data): Don't declare.
4591         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4592         (parse_xml_btrace): Update.
4593         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4594         (maint_btrace_clear_packet_history_cmd): Update.
4595
4596 2018-06-07  Pedro Alves  <palves@redhat.com>
4597
4598         * target.h (target_ops) <beneath>: Now a method.  All references
4599         updated.
4600         (class target_stack): New.
4601         * target.c (g_target_stack): New.
4602         (g_current_top_target): Delete.
4603         (current_top_target): Get the top target out of g_target_stack.
4604         (target_stack::push, target_stack::unpush): New.
4605         (push_target, unpush_target): Reimplement.
4606         (target_is_pushed): Reimplement in terms of g_target_stack.
4607         (target_ops::beneath, target_stack::find_beneath): New.
4608
4609 2018-06-07  Pedro Alves  <palves@redhat.com>
4610
4611         * target.h (find_target_beneath): Delete declaration.
4612         * target.c (find_target_beneath): Delete definition.
4613         * aix-thread.c: All callers of find_target_beneath adjusted to
4614         call target_ops::beneath instead.
4615         * bsd-uthread.c: Likewise.
4616         * linux-thread-db.c: Likewise.
4617         * ravenscar-thread.c: Likewise.
4618         * sol-thread.c: Likewise.
4619         * spu-multiarch.c: Likewise.
4620
4621 2018-06-07  Pedro Alves  <palves@redhat.com>
4622
4623         * target.h (target_ops) <beneath>: Now a method.  All references
4624         updated.
4625         (target_ops) <m_beneath>: New.
4626         * target.c (target_ops::beneath): New.
4627         * corelow.c: Adjust all references to target_ops::beneath.
4628         * linux-thread-db.c: Likewise.
4629         * make-target-delegates: Likewise.
4630         * record-btrace.c: Likewise.
4631         * record-full.c: Likewise.
4632         * remote.c: Likewise.
4633         * target.c: Likewise.
4634         * target-delegates.c: Regenerate.
4635
4636 2018-06-07  Pedro Alves  <palves@redhat.com>
4637
4638         * target.h (target_stack): Delete.
4639         (current_top_target): Declare function.
4640         * target.c (target_stack): Delete.
4641         (g_current_top_target): New.
4642         (current_top_target): New function.
4643         * auxv.c: Use current_top_target instead of target_stack
4644         throughout.
4645         * avr-tdep.c: Likewise.
4646         * breakpoint.c: Likewise.
4647         * corefile.c: Likewise.
4648         * elfread.c: Likewise.
4649         * eval.c: Likewise.
4650         * exceptions.c: Likewise.
4651         * frame.c: Likewise.
4652         * gdbarch-selftests.c: Likewise.
4653         * gnu-v3-abi.c: Likewise.
4654         * ia64-tdep.c: Likewise.
4655         * ia64-vms-tdep.c: Likewise.
4656         * infcall.c: Likewise.
4657         * infcmd.c: Likewise.
4658         * infrun.c: Likewise.
4659         * linespec.c: Likewise.
4660         * linux-tdep.c: Likewise.
4661         * minsyms.c: Likewise.
4662         * ppc-linux-nat.c: Likewise.
4663         * ppc-linux-tdep.c: Likewise.
4664         * procfs.c: Likewise.
4665         * regcache.c: Likewise.
4666         * remote.c: Likewise.
4667         * rs6000-tdep.c: Likewise.
4668         * s390-linux-nat.c: Likewise.
4669         * s390-tdep.c: Likewise.
4670         * solib-aix.c: Likewise.
4671         * solib-darwin.c: Likewise.
4672         * solib-dsbt.c: Likewise.
4673         * solib-spu.c: Likewise.
4674         * solib-svr4.c: Likewise.
4675         * solib-target.c: Likewise.
4676         * sparc-tdep.c: Likewise.
4677         * sparc64-tdep.c: Likewise.
4678         * spu-tdep.c: Likewise.
4679         * symfile.c: Likewise.
4680         * symtab.c: Likewise.
4681         * target-descriptions.c: Likewise.
4682         * target-memory.c: Likewise.
4683         * target.c: Likewise.
4684         * target.h: Likewise.
4685         * tracefile-tfile.c: Likewise.
4686         * tracepoint.c: Likewise.
4687         * valops.c: Likewise.
4688         * valprint.c: Likewise.
4689         * value.c: Likewise.
4690         * windows-tdep.c: Likewise.
4691         * mi/mi-main.c: Likewise.
4692
4693 2018-06-07  Tom Tromey  <tom@tromey.com>
4694
4695         * valprint.h (build_address_symbolic): Declare.
4696         * printcmd.c (print_address_symbolic): Update.
4697         (build_address_symbolic): Change "name" and "filename" to
4698         std::string.
4699         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4700         Update.
4701         * defs.h (build_address_symbolic): Remove declaration.
4702
4703 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4704
4705         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4706         (aarch64_vnv_type): Add function.
4707         (aarch64_pseudo_register_name): Add V regs for SVE.
4708         (aarch64_pseudo_register_type): Likewise.
4709         (aarch64_pseudo_register_reggroup_p): Likewise.
4710         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4711         (aarch64_pseudo_read_value): Add V regs for SVE.
4712         (aarch64_pseudo_write_2): Use V0 offset for SVE
4713         (aarch64_pseudo_write): Add V regs for SVE.
4714         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4715
4716 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4717
4718         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4719         (sve_vl_from_vq): Likewise.
4720
4721 2018-06-05  Tom Tromey  <tom@tromey.com>
4722
4723         * cli/cli-cmds.c (show_version): Update.
4724         * top.c (print_gdb_version): Add "interactive" parameter.
4725         Update.
4726         * main.c (captured_main_1): Update.
4727         * top.h (print_gdb_version): Add "interactive" parameter and a
4728         comment.
4729
4730 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4731
4732         * common/enum-flags.h: Add trailing semicolon to example in
4733         comment.
4734
4735 2018-06-05  Tom Tromey  <tom@tromey.com>
4736
4737         PR cli/12326:
4738         * NEWS: Add entry about pager.
4739         * utils.c (pagination_disabled_for_command): New global.
4740         (prompt_for_continue): Allow "c" response to prompt.
4741         (reinitialize_more_filter): Clear
4742         pagination_disabled_for_command.
4743         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4744
4745 2018-06-04  Tom Tromey  <tom@tromey.com>
4746
4747         * ada-lang.h (ada_lookup_symbol_list): Update.
4748         * ada-lang.c (resolve_subexp): Update.
4749         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4750         parameter.
4751         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4752         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4753         results parameter to std::vector.
4754         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4755         Update.
4756         * ada-exp.y (block_lookup): Update.
4757         (select_possible_type_sym): Change type of syms.  Remove nsyms
4758         parameter.
4759         (write_var_or_type, write_name_assoc): Update.
4760
4761 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4762
4763         * windows-nat.c (windows_nat_target::xfer_partial): Return
4764         TARGET_XFER_E_IO if we need to delegate to the target beneath
4765         but BENEATH is NULL.
4766
4767 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4768
4769         * Makefile.in (config.status): Add configure.nat as a
4770         dependency.
4771
4772 2018-06-04  Tom Tromey  <tom@tromey.com>
4773
4774         * cp-name-parser.y (cpname_state): Add method declarations.
4775         (HANDLE_QUAL): Update.
4776         (cpname_state::d_grab, cpname_state::fill_comp)
4777         (cpname_state::make_operator, cpname_state::make_dtor)
4778         (cpname_state::make_builtin_type, cpname_state::make_name)
4779         (cpname_state::d_qualify, cpname_state::d_int_type)
4780         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4781         (%union): Move earlier.
4782
4783 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4784
4785         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4786
4787 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4788
4789         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4790         (aarch64_pseudo_write_1): Likewise.
4791         (aarch64_pseudo_read_value): Use helper.
4792         (aarch64_pseudo_write): Likewise.
4793
4794 2018-06-04  Pedro Alves  <palves@redhat.com>
4795
4796         * darwin-nat.c (darwin_ops): Delete.
4797         (darwin_attach_pid): Use get_native_target.
4798
4799 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4800
4801         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4802         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4803
4804 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4805
4806         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4807         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4808         (aarch64_gdbarch_init): Check for SVE.
4809         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4810
4811 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4812
4813         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4814         * aarch64-tdep.h (aarch64_read_description): Likewise.
4815         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4816         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4817         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4818         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4819         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4820
4821 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4822
4823         * value.c (value_fetch_lazy_bitfield): New.
4824         (value_fetch_lazy_memory): New.
4825         (value_fetch_lazy_register): New.
4826         (value_fetch_lazy): Factor out to smaller functions.
4827
4828 2018-06-01  Tom Tromey  <tom@tromey.com>
4829
4830         * cp-name-parser.y (backslashable, represented): Now const.
4831
4832 2018-06-01  Tom Tromey  <tom@tromey.com>
4833
4834         * cp-name-parser.y: Include parser-defs.h.
4835         (parser_fprintf): Remove declaration.
4836
4837 2018-06-01  Tom Tromey  <tom@tromey.com>
4838
4839         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4840         %parse-param.
4841         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4842         (global_result): Remove globals.
4843         (struct cpname_state): New.
4844         (yyparse): Don't declare.
4845         (yylex, yyerror): Move declarations after %union.
4846         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4847         (make_name): Add state parameter.
4848         Update all callers.
4849         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4850         parameter.
4851         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4852         Update.
4853         (yylex): Add lvalp, state parameters.
4854         (yyerror): Add state parameter.
4855         (cp_demangled_name_to_comp): Update.
4856
4857 2018-06-01  Tom Tromey  <tom@tromey.com>
4858
4859         * cp-name-parser.y (parser_fprintf): Declare.
4860         (GDB_YY_REMAP_PREFIX): Define.
4861         Include yy-remap.h.  Don't redefine yy* identifiers.
4862
4863 2018-06-01  Tom Tromey  <tom@tromey.com>
4864
4865         * python/py-type.c (typy_legacy_template_argument): Update.
4866         * cp-support.h (cp_demangled_name_to_comp): Update.
4867         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4868         parameter to be a "std::string *".
4869         (main): Update.
4870
4871 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4872
4873         * ada-lex.l: Include "diagnostics.h" instead of
4874         "common/diagnostics.h".
4875         * unittests/environ-selftests.c: Likewise.
4876         * common/diagnostics.h: Moved to ../include.
4877
4878 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4879
4880         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4881         to language_mode_manual while calling breakpoint_re_set_one.
4882
4883 2018-06-01  Tom Tromey  <tom@tromey.com>
4884
4885         * valops.c (value_cast_structs, destructor_name_p): Update.
4886         * symtab.c (gdb_mangle_name): Update.
4887         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4888         Update.
4889         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4890         (pascal_object_print_value_fields, pascal_object_print_value):
4891         Update.
4892         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4893         * linespec.c (find_methods): Update.
4894         * gdbtypes.h (type_name_no_tag): Remove.
4895         (type_name_or_error): Rename from type_name_no_tag_or_error.
4896         * gdbtypes.c (type_name_no_tag): Remove.
4897         (type_name_or_error): Rename from type_name_no_tag_or_error.
4898         (lookup_struct_elt_type, check_typedef): Update.
4899         * expprint.c (print_subexp_standard): Update.
4900         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4901         * d-namespace.c (d_lookup_nested_symbol): Update.
4902         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4903         (cp_print_class_member): Update.
4904         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4905         * completer.c (add_struct_fields): Update.
4906         * c-typeprint.c (cp_type_print_derivation_info)
4907         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4908         Update.
4909         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4910         (ada_prefer_type, ada_is_exception_sym): Update.
4911
4912 2018-06-01  Tom Tromey  <tom@tromey.com>
4913
4914         * valops.c (enum_constant_from_type, value_namespace_elt)
4915         (value_maybe_namespace_elt): Update.
4916         * valarith.c (find_size_for_pointer_math): Update.
4917         * target-descriptions.c (make_gdb_type): Update.
4918         * symmisc.c (print_symbol): Update.
4919         * stabsread.c (define_symbol, read_type)
4920         (complain_about_struct_wipeout, add_undefined_type)
4921         (cleanup_undefined_types_1): Update.
4922         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4923         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4924         (rust_internal_print_type, rust_composite_type)
4925         (rust_evaluate_funcall, rust_evaluate_subexp)
4926         (rust_inclusive_range_type_p): Update.
4927         * python/py-type.c (typy_get_tag): Update.
4928         * p-typeprint.c (pascal_type_print_base): Update.
4929         * mdebugread.c (parse_symbol, parse_type): Update.
4930         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4931         Update.
4932         * guile/scm-type.c (gdbscm_type_tag): Update.
4933         * go-lang.c (sixg_string_p): Update.
4934         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4935         Update.
4936         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4937         (TYPE_TAG_NAME): Remove.
4938         * gdbtypes.c (type_name_no_tag): Simplify.
4939         (check_typedef, check_types_equal, recursive_dump_type)
4940         (copy_type_recursive, arch_composite_type): Update.
4941         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4942         in summary mode when needed.
4943         * eval.c (evaluate_funcall): Update.
4944         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4945         (process_structure_scope, read_enumeration_type)
4946         (read_namespace_type, read_module_type, determine_prefix): Update.
4947         * cp-support.c (inspect_type): Update.
4948         * coffread.c (process_coff_symbol, decode_base_type): Update.
4949         * c-varobj.c (c_is_path_expr_parent): Update.
4950         * c-typeprint.c (c_type_print_base_struct_union): Update.
4951         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4952         summary when using C language.
4953         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4954         (gen_maybe_namespace_elt): Update.
4955         * ada-lang.c (ada_type_name): Simplify.
4956         (empty_record, ada_template_to_fixed_record_type_1)
4957         (template_to_static_fixed_type)
4958         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4959
4960 2018-06-01  Tom Tromey  <tom@tromey.com>
4961
4962         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4963         c_print_type.
4964         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4965         (c_print_type): Update.
4966         (c_print_type): New overload.
4967         (c_type_print_varspec_prefix, c_type_print_args)
4968         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4969         (c_type_print_base_struct_union, c_type_print_base_1)
4970         (cp_type_print_method_args): Add "language" parameter.
4971         (c_type_print_base): Update.
4972         * c-lang.h (c_print_type): Add new overload.
4973
4974 2018-06-01  Tom Tromey  <tom@tromey.com>
4975
4976         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4977         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4978
4979 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4980
4981         * aarch64-tdep.c (aarch64_sve_register_names): New const
4982         var.
4983         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4984         (AARCH64_SVE_Z_REGS_NUM): New define.
4985         (AARCH64_SVE_P_REGS_NUM): Likewise.
4986         (AARCH64_SVE_NUM_REGS): Likewise.
4987
4988 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4989
4990         * nat/linux-ptrace.h [__alpha__]
4991         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4992         definitions.
4993
4994 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4995
4996         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4997         the endianness selected.
4998         * NEWS: Document `set endian auto' mode operation update.
4999
5000 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5001
5002         * Makefile.in: Add new header.
5003         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5004         (sve_vl_from_vg): Likewise.
5005         (sve_vq_from_vl): Likewise.
5006         (sve_vl_from_vq): Likewise.
5007         (sve_vq_from_vg): Likewise.
5008         (sve_vg_from_vq): Likewise.
5009         * configure.nat: Add new c file.
5010         * nat/aarch64-sve-linux-ptrace.c: New file.
5011         * nat/aarch64-sve-linux-ptrace.h: New file.
5012
5013 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5014
5015         * aarch64-linux-nat.c (aarch64_linux_read_description):
5016         Add parmeter zero.
5017         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5018         Likewise.
5019         * aarch64-tdep.c (tdesc_aarch64_list): Add.
5020         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5021         (aarch64_gdbarch_init): Add parmeter zero.
5022         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5023         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5024         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5025         parmeter.
5026         * doc/gdb.texinfo: Describe SVE feature
5027         * features/aarch64-sve.c: New file.
5028
5029 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
5030
5031         PR gdb/23210
5032         * gdbarch.sh (significant_addr_bit): Default to zero when
5033         not set by target architecture.
5034         * gdbarch.c: Re-generated.
5035         * utils.c (address_significant): Update.
5036
5037 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
5038
5039         * stack.c (func_command): Remove trailing newline in call to error.
5040
5041 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5042
5043         * regcache.h (regcache_raw_collect): Remove, update callers to
5044         use regcache::raw_collect.
5045         * regcache.c (regcache_raw_collect): Remove.
5046
5047 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5048
5049         * regcache.h (regcache_raw_supply): Remove, update callers to
5050         use detached_regcache::raw_supply.
5051         * regcache.c (regcache_raw_supply): Remove.
5052
5053 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5054
5055         * regcache.h (regcache_cooked_write_part): Remove, update
5056         callers to use regcache::cooked_write_part.
5057         * regcache.c (regcache_cooked_write_part): Remove.
5058
5059 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5060
5061         * regcache.h (regcache_cooked_read_part): Remove, update callers
5062         to use readable_regcache::cooked_read_part.
5063         * regcache.c (regcache_cooked_read_part): Remove.
5064
5065 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5066
5067         * regcache.h (regcache_cooked_read_value): Remove, update
5068         callers to use readable_regcache::cooked_read_value.
5069         * regcache.c (regcache_cooked_read_value): Remove.
5070
5071 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5072
5073         * regcache.h (regcache_cooked_write): Remove, update callers to
5074         use regcache::cooked_write.
5075         * regcache.c (regcache_cooked_write): Remove.
5076
5077 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5078
5079         * regcache.h (regcache_invalidate): Remove, update callers to
5080         use detached_regcache::invalidate instead.
5081         * regcache.c (regcache_invalidate): Remove.
5082
5083 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5084
5085         * regcache.h (regcache_raw_write_part): Remove, update callers
5086         to use regcache::raw_write_part instead.
5087         * regcache.c (regcache_raw_write_part): Remove.
5088
5089 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5090
5091         * regcache.h (regcache_raw_read_part): Remove, update callers to
5092         use readable_regcache::raw_read_part instead.
5093         * regcache.c (regcache_raw_read_part): Remove.
5094
5095 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5096
5097         * regcache.h (regcache_cooked_read): Remove, update callers to
5098         use readable_regcache::cooked_read instead.
5099         * regcache.c (regcache_cooked_read): Remove.
5100
5101 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5102
5103         * regcache.h (regcache_raw_write): Remove, update callers to use
5104         regcache::raw_write instead.
5105         * regcache.c (regcache_raw_write): Remove.
5106
5107 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5108
5109         * regcache.h (regcache_raw_read): Remove, update callers to use
5110         readable_regcache::raw_read instead.
5111         * regcache.c (regcache_raw_read): Remove.
5112
5113 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5114
5115         * regcache.h (regcache_raw_update): Remove, update callers to
5116         use readable_regcache::raw_update instead.
5117         * regcache.c (regcache_raw_update): Remove.
5118
5119 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5120
5121         * regcache.h (regcache_register_status): Remove, update callers
5122         to use reg_buffer::get_register_status directly instead.
5123         * regcache.c (regcache_register_status): Remove.
5124
5125 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5126
5127         * regcache.h (regcache_get_ptid): Remove, update all callers to
5128         call regcache::ptid instead.
5129         * regcache.c (regcache_get_ptid): Remove.
5130
5131 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5132
5133         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5134
5135 2018-05-30  Pedro Alves  <palves@redhat.com>
5136
5137         * common/common-exceptions.h (exception_rethrow): Use
5138         ATTRIBUTE_NORETURN.
5139
5140 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5141
5142         * breakpoint.c (print_solib_event, check_status_catch_solib):
5143         Remove struct keyword in range-based for loops.
5144         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5145         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5146         Likewise.
5147         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5148         Likewise.
5149         * symfile.c (addr_info_make_relative): Likewise.
5150         * thread.c (value_in_thread_stack_temporaries): Likewise.
5151
5152 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5153
5154         PR gdb/16841
5155         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5156         aggregate type to get its real type before accessing it.
5157
5158 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5159
5160         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5161         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5162         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5163         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5164         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5165         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5166         * printcmd.c (info_address_command): Likewise.
5167
5168 2018-05-29  Tom Tromey  <tom@tromey.com>
5169
5170         * windows-nat.c (handle_exception): Update fall-through comment.
5171
5172 2018-05-29  Tom Tromey  <tom@tromey.com>
5173
5174         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5175         (struct program_space) <added_solibs>: Now a std::vector.
5176         * breakpoint.c (print_solib_event): Update.
5177         (check_status_catch_solib): Update.
5178         * progspace.c (clear_program_space_solib_cache): Update.
5179         * solib.c (update_solib_list): Update.
5180
5181 2018-05-29  Tom Tromey  <tom@tromey.com>
5182
5183         * python/py-type.c (typy_richcompare): Update.
5184         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5185         * gdbtypes.h (types_deeply_equal): Return bool.
5186         (types_equal): Likewise.
5187         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5188         declare VEC.
5189         (check_types_equal): Change worklist to std::vector.  Return
5190         bool.
5191         (struct type_equality_entry): Add constructor.
5192         (compare_maybe_null_strings): Return bool.
5193         (check_types_worklist): Return bool.  Change worklist to
5194         std::vector.
5195         (types_deeply_equal): Use std::vector.
5196         (types_equal): Return bool.
5197         (compare_maybe_null_strings): Simplify.
5198
5199 2018-05-29  Tom Tromey  <tom@tromey.com>
5200
5201         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5202
5203 2018-05-29  Tom Tromey  <tom@tromey.com>
5204
5205         * objc-lang.h: Don't include cp-support.h.
5206         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5207         declare VEC.
5208
5209 2018-05-27  Tom Tromey  <tom@tromey.com>
5210
5211         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5212
5213 2018-05-25  Tom Tromey  <tom@tromey.com>
5214
5215         * value.c (value::location): Initialize.
5216
5217 2018-05-25  Tom Tromey  <tom@tromey.com>
5218
5219         * dbxread.c (init_bincl_list): Remove.
5220         (bincl_list): Now a std::vector.
5221         (bincls_allocated, next_bincl): Remove.
5222         (free_bincl_list, do_free_bincl_list_cleanup)
5223         (make_cleanup_free_bincl_list): Remove.
5224         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5225         unique_xmalloc_ptr.
5226         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5227         (struct header_file_location): Add constructor.
5228         (add_bincl_to_list): Remove.
5229
5230 2018-05-25  Tom Tromey  <tom@tromey.com>
5231
5232         * tui/tui.c (tui_enable): Update.
5233         * mi/mi-interp.c (mi_interp::init): Update.
5234         * interps.h (class interp) <name>: New method.
5235         <m_name>: Rename from name.
5236         (~scoped_restore_interp): Update.
5237         * interps.c (interp::interp): Update.
5238         (interp_add, interp_set, interp_lookup_existing)
5239         (current_interp_named_p): Update.
5240
5241 2018-05-25  Tom Tromey  <tom@tromey.com>
5242
5243         * interps.c (interp_name): Remove.
5244         * mi/mi-interp.c (mi_interp::init): Update.
5245         * interps.h (interp_name): Remove.
5246         (~scoped_restore_interp): Update.
5247         * tui/tui.c (tui_enable): Update.
5248
5249 2018-05-25  Tom Tromey  <tom@tromey.com>
5250
5251         * utils.c (fputs_maybe_filtered): Update.
5252         * linespec.c (decode_line_full): Update.
5253         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5254         (mi_print_breakpoint_for_event, mi_solib_loaded)
5255         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5256         (mi_user_selected_context_changed): Update.
5257         * mi/mi-main.c (mi_execute_command): Update.
5258         * cli/cli-script.c (execute_control_command): Update.
5259         * python/python.c (execute_gdb_command): Update.
5260         * solib.c (info_sharedlibrary_command): Update.
5261         * interps.c (interp_ui_out): Remove.
5262         * interps.h (interp_ui_out): Remove.
5263
5264 2018-05-25  Tom Tromey  <tom@tromey.com>
5265
5266         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5267         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5268         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5269
5270 2018-05-25  Tom Tromey  <tom@tromey.com>
5271
5272         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5273         * interps.c (interp_exec): Use scoped_restore.
5274
5275 2018-05-25  Tom Tromey  <tom@tromey.com>
5276
5277         * remote.c (remote_target::remote_file_get): Use
5278         gdb::byte_vector.
5279         (remote_target::remote_file_put): Likewise.
5280
5281 2018-05-25  Tom Tromey  <tom@tromey.com>
5282
5283         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5284         a std::string.
5285         (get_pe_section_index, add_pe_exported_sym): Update.
5286         (read_pe_exported_syms): Use gdb::def_vector.
5287
5288 2018-05-25  Tom Tromey  <tom@tromey.com>
5289
5290         * frame.c (remove_prev_frame): Remove.
5291         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5292
5293 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5294
5295         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5296         Remove prototypes.
5297         * mips-linux-nat.c (supply_fpregset): Always call
5298         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5299         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5300         `mips_fill_fpregset'.
5301         * mips-linux-tdep.c (mips_supply_fpregset)
5302         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5303         (mips_fill_fpregset_wrapper): Remove functions.
5304         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5305         (mips_linux_fpregset): Remove variable.
5306         (mips_linux_iterate_over_regset_sections): Use
5307         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5308         (mips_linux_o32_sigframe_init): Remove comment.
5309
5310 2018-05-25  Pedro Alves  <palves@redhat.com>
5311
5312         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5313         (struct readahead_cache, struct packet_reg, struct
5314         remote_arch_state, class remote_state): Move higher up in the
5315         file.
5316         (remote_target::m_remote_state): Now an object instead of a pointer.
5317         (remote_target::get_remote_state): Adjust.
5318
5319 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5320
5321         * stack.c (select_and_print_frame): Delete.
5322         (struct function_bounds): Move struct within function.
5323         (func_command): Most content moved into new function
5324         find_frame_for_function, use new function, print result, add
5325         function comment.
5326         (find_frame_for_function): New function, now returns a result.
5327
5328 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5329
5330         * stack.c (iterate_over_block_arg_vars): Fix comment.
5331         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5332
5333 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5334
5335         PR gdb/23203
5336         * frame.c
5337         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5338         Define.
5339         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5340         Define.
5341         * frame.h (class scoped_restore_selected_frame): New class.
5342         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5343         of any exception, use scoped_restore_selected_frame to restore the
5344         frame instead.
5345
5346 2018-05-24  Pedro Alves  <palves@redhat.com>
5347
5348         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5349         override.
5350
5351 2018-05-23  Tom Tromey  <tom@tromey.com>
5352
5353         * complaints.c (struct complaints): Remove.
5354         (symfile_complaint_book): Remove.
5355         (series): New global.
5356         (complaint_internal): Update.
5357         (clear_complaints): Update.
5358
5359 2018-05-23  Tom Tromey  <tom@tromey.com>
5360
5361         * complaints.c (counters): New global.
5362         (struct complain): Remove.
5363         (struct complaints) <root>: Remove.
5364         (complaint_sentinel): Remove.
5365         (symfile_complaint_book): Update.
5366         (find_complaint) Remove.
5367         (complaint_internal, clear_complaints): Update.
5368
5369 2018-05-23  Tom Tromey  <tom@tromey.com>
5370
5371         * complaints.c (struct complain) <file, line>: Remove.
5372         (find_complaint): Remove file, line parameters.
5373         (complaint_internal): Update.
5374
5375 2018-05-23  Tom Tromey  <tom@tromey.com>
5376
5377         * complaints.c (vcomplaint): Remove.
5378         (complaint_internal) Merge in contents of vcomplaint.
5379
5380 2018-05-23  Tom Tromey  <tom@tromey.com>
5381
5382         * complaints.c (struct complaints) <explanation>: Remove.
5383         (symfile_explanations): Remove.
5384         (symfile_complaint_book): Update.
5385         (vcomplaint): Update.
5386         (struct explanation): Remove.
5387
5388 2018-05-23  Tom Tromey  <tom@tromey.com>
5389
5390         * complaints.c (symfile_complaints): Remove.
5391         (complaint_internal): Remove "complaints" parameter.
5392         (clear_complaints, vcomplaint): Remove "c" parameter.
5393         (get_complaints): Remove.
5394         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5395         (dwarf2_debug_line_missing_file_complaint)
5396         (dwarf2_debug_line_missing_end_sequence_complaint)
5397         (dwarf2_complex_location_expr_complaint)
5398         (dwarf2_const_value_length_mismatch_complaint)
5399         (dwarf2_section_buffer_overflow_complaint)
5400         (dwarf2_macro_malformed_definition_complaint)
5401         (dwarf2_invalid_attrib_class_complaint)
5402         (create_addrmap_from_index, dw2_symtab_iter_next)
5403         (dw2_expand_marked_cus)
5404         (dw2_debug_names_iterator::find_vec_in_debug_names)
5405         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5406         (create_debug_type_hash_table, init_cutu_and_read_dies)
5407         (partial_die_parent_scope, add_partial_enumeration)
5408         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5409         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5410         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5411         (create_cus_hash_table, create_dwp_hash_table)
5412         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5413         (dwarf2_rnglists_process, dwarf2_ranges_process)
5414         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5415         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5416         (handle_struct_member_die, process_structure_scope)
5417         (read_array_type, read_common_block, read_module_type)
5418         (read_tag_pointer_type, read_typedef, read_base_type)
5419         (read_subrange_type, load_partial_dies, partial_die_info::read)
5420         (partial_die_info::read, partial_die_info::read)
5421         (partial_die_info::read, read_checked_initial_length_and_offset)
5422         (dwarf2_string_attr, read_formatted_entries)
5423         (dwarf_decode_line_header)
5424         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5425         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5426         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5427         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5428         (get_signatured_type, get_DW_AT_signature_type)
5429         (decode_locdesc, file_file_name, consume_improper_spaces)
5430         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5431         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5432         (dwarf2_symbol_mark_computed, set_die_type)
5433         (read_attribute_value): Update.
5434         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5435         Update.
5436         * dbxread.c (unknown_symtype_complaint)
5437         (lbrac_mismatch_complaint, repeated_header_complaint)
5438         (set_namestring, function_outside_compilation_unit_complaint)
5439         (read_dbx_symtab, process_one_symbol): Update.
5440         * gdbtypes.c (stub_noname_complaint): Update.
5441         * windows-nat.c (handle_unload_dll): Update.
5442         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5443         (decode_base_type): Update.
5444         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5445         (eb_complaint, record_include_begin, record_include_end)
5446         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5447         (process_xcoff_symbol, read_symbol)
5448         (function_outside_compilation_unit_complaint)
5449         (scan_xcoff_symtab): Update.
5450         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5451         * buildsym.c (finish_block_internal, make_blockvector)
5452         (end_symtab_get_static_block, augment_type_symtab): Update.
5453         * dtrace-probe.c (dtrace_process_dof)
5454         (dtrace_static_probe_ops::get_probes): Update.
5455         * complaints.h (struct complaint): Don't declare.
5456         (symfile_complaints): Remove.
5457         (complaint_internal): Remove "complaints" parameter.
5458         (complaint): Likewise.
5459         (clear_complaints): Likewise.
5460         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5461         (reread_symbols): Update.
5462         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5463         (dwarf2_frame_cache, decode_frame_entry): Update.
5464         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5465         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5466         (info_selectors_command): Update.
5467         * macrotab.c (macro_include, check_for_redefinition)
5468         (macro_undef): Update.
5469         * objfiles.c (filter_overlapping_sections): Update.
5470         * stabsread.c (invalid_cpp_abbrev_complaint)
5471         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5472         (define_symbol, error_type, read_type, rs6000_builtin_type)
5473         (stabs_method_name_from_physname, read_member_functions)
5474         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5475         (attach_fields_to_type, complain_about_struct_wipeout)
5476         (read_range_type, read_args, common_block_start)
5477         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5478         Update.
5479         * mdebugread.c (index_complaint, unknown_ext_complaint)
5480         (basic_type_complaint, bad_tag_guess_complaint)
5481         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5482         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5483         (parse_procedure, parse_lines)
5484         (function_outside_compilation_unit_complaint)
5485         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5486         (bad_tag_guess_complaint, reg_value_complaint): Update.
5487         * cp-support.c (demangled_name_complaint): Update.
5488         * macroscope.c (sal_macro_scope): Update.
5489         * dwarf-index-write.c (class debug_names): Update.
5490
5491 2018-05-23  Tom Tromey  <tom@tromey.com>
5492
5493         * complaints.c (clear_complaints): Remove "noisy" parameter.
5494         * complaints.h (clear_complaints): Update.
5495         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5496         (reread_symbols): Update.
5497
5498 2018-05-23  Tom Tromey  <tom@tromey.com>
5499
5500         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5501         SUBSEQUENT_MESSAGE.
5502         (vcomplaint, clear_complaints): Update.
5503         (symfile_explanations): Remove some messages.
5504
5505 2018-05-23  Tom Tromey  <tom@tromey.com>
5506
5507         * complaints.c (internal_complaint): Remove.
5508         * complaints.h (internal_complaint): Remove.
5509
5510 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5511
5512         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5513
5514 2018-05-22  Pedro Alves  <palves@redhat.com>
5515
5516         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5517         (remote_fileio_badfd, remote_fileio_return_errno)
5518         (remote_fileio_return_success, remote_fileio_func_open)
5519         (remote_fileio_func_open, remote_fileio_func_close)
5520         (remote_fileio_func_read, remote_fileio_func_write)
5521         (remote_fileio_func_lseek, remote_fileio_func_rename)
5522         (remote_fileio_func_unlink, remote_fileio_func_stat)
5523         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5524         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5525         remote_target parameter.
5526         (remote_fio_func_map) <func>: Add remote_target parameter.
5527         (do_remote_fileio_request, remote_fileio_request):
5528         * remote-fileio.h (remote_fileio_request):
5529         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5530         remote_target parameter.
5531         (remote_notif_process, handle_notification): Adjust to pass down
5532         the remote.
5533         (remote_notif_state_allocate): Add remote_target parameter.  Save
5534         it.
5535         * remote-notif.h (struct remote_target): Forward declare.
5536         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5537         remote_target parameter.
5538         (struct remote_notif_state) <remote>: New field.
5539         (remote_notif_ack, remote_notif_parse): Add remote_target
5540         parameter.
5541         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5542         remote_target parameter.
5543         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5544         (threads_listing_context, rmt_thread_action, protocol_feature)
5545         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5546         (packet_result, struct threads_listing_context, remote_state):
5547         Move definitions and declarations higher up.
5548         (remote_target) <~remote_target>: Declare.
5549         (remote_download_command_source, remote_file_put, remote_file_get)
5550         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5551         (remote_hostio_pread_vFile, remote_hostio_send_command)
5552         (remote_hostio_set_filesystem, remote_hostio_open)
5553         (remote_hostio_close, remote_hostio_unlink, remote_state)
5554         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5555         (get_memory_write_packet_size, get_memory_read_packet_size)
5556         (append_pending_thread_resumptions, remote_detach_1)
5557         (append_resumption, remote_resume_with_vcont)
5558         (add_current_inferior_and_thread, wait_ns, wait_as)
5559         (process_stop_reply, remote_notice_new_inferior)
5560         (process_initial_stop_replies, remote_add_thread)
5561         (btrace_sync_conf, remote_btrace_maybe_reopen)
5562         (remove_new_fork_children, kill_new_fork_children)
5563         (discard_pending_stop_replies, stop_reply_queue_length)
5564         (check_pending_events_prevent_wildcard_vcont)
5565         (discard_pending_stop_replies_in_queue, stop_reply)
5566         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5567         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5568         (remote_interrupt_as, remote_interrupt_ns)
5569         (remote_get_noisy_reply, remote_query_attached)
5570         (remote_add_inferior, remote_current_thread, get_current_thread)
5571         (set_thread, set_general_thread, set_continue_thread)
5572         (set_general_process, write_ptid)
5573         (remote_unpack_thread_info_response, remote_get_threadinfo)
5574         (parse_threadlist_response, remote_get_threadlist)
5575         (remote_threadlist_iterator, remote_get_threads_with_ql)
5576         (remote_get_threads_with_qxfer)
5577         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5578         (get_offsets, remote_check_symbols, remote_supported_packet)
5579         (remote_query_supported, remote_packet_size)
5580         (remote_serial_quit_handler, remote_detach_pid)
5581         (remote_vcont_probe, remote_resume_with_hc)
5582         (send_interrupt_sequence, interrupt_query)
5583         (remote_notif_get_pending_events, fetch_register_using_p)
5584         (send_g_packet, process_g_packet, fetch_registers_using_g)
5585         (store_register_using_P, store_registers_using_G)
5586         (set_remote_traceframe, check_binary_download)
5587         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5588         (remote_xfer_live_readonly_partial, remote_read_bytes)
5589         (remote_send_printf, remote_flash_write, readchar)
5590         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5591         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5592         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5593         (extended_remote_disable_randomization, extended_remote_run)
5594         (send_environment_packet, extended_remote_environment_support)
5595         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5596         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5597         (packet_command): Now methods of ...
5598         (remote_target): ... this class.
5599         (m_remote_state) <remote_target>: New field.
5600         (struct remote_state) <stop_reply_queue,
5601         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5602         fields.
5603         (remote_state::remote_state): Allocate stop_reply_queue.
5604         (remote_state): Delete global.
5605         (get_remote_state_raw): Delete.
5606         (remote_target::get_remote_state): Allocate m_remote_state on
5607         demand.
5608         (get_current_remote_target): New.
5609         (remote_ops, extended_remote_ops): Delete.
5610         (wait_forever_enabled_p, remote_async_inferior_event_token):
5611         Delete, moved to struct remote_state.
5612         (remote_target::close): Delete self.  Destruction bits split to
5613         ...
5614         (remote_target::~remote_target): ... this.
5615         (show_memory_packet_size): Adjust to use
5616         get_current_remote_target.
5617         (struct protocol_feature) <func>: Add remote_target parameter.
5618         All callers adjusted.
5619         (curr_quit_handler_target): New.
5620         (remote_serial_quit_handler): Reimplement.
5621         (remote_target::open_1): Adjust to use get_current_remote_target.
5622         Heap-allocate remote_target/extended_remote_target instances.
5623         (vcont_builder::vcont_builder): Add remote_target parameter, and
5624         save it in m_remote.  All callers adjusted.
5625         (vcont_builder::m_remote): New field.
5626         (vcont_builder::restart, vcont_builder::flush)
5627         (vcont_builder::push_action): Use it.
5628         (remote_target::commit_resume): Use it.
5629         (struct queue_iter_param) <remote>: New field.
5630         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5631         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5632         (check_pending_event_prevents_wildcard_vcont_callback)
5633         (remote_target::check_pending_events_prevent_wildcard_vcont)
5634         (remote_target::discard_pending_stop_replies)
5635         (remote_target::discard_pending_stop_replies_in_queue)
5636         (remote_target::remote_notif_remove_queued_reply): Fill in
5637         'remote' field.
5638         (remote_notif_get_pending_events): New.
5639         (remote_target::readchar, remote_target::remote_serial_write):
5640         Save/restore curr_quit_handler_target.
5641         (putpkt): New.
5642         (kill_new_fork_children): Fill in 'remote' field.
5643         (packet_command): Use get_current_remote_target, defer to
5644         remote_target method of same name.
5645         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5646         parameter, and save it in m_remote.  All callers adjusted.
5647         (scoped_remote_fd::release): Use m_remote.
5648         (scoped_remote_fd::m_remote): New field.
5649         (remote_file_put, remote_file_get, remote_file_delete): Use
5650         get_current_remote_target, defer to remote_target method of same
5651         name.
5652         (remote_btrace_reset): Add remote_state paremeter.  Update all
5653         callers.
5654         (remote_async_inferior_event_handler). Pass down 'data'.
5655         (remote_new_objfile): Use get_current_remote_target.
5656         (remote_target::vcont_r_supported): New.
5657         (set_range_stepping): Use get_current_remote_target and
5658         remote_target::vcont_r_supported.
5659         (_initialize_remote): Don't allocate 'remote_state' and
5660         'stop_reply_queue' globals.
5661         * remote.h (struct remote_target): Forward declare.
5662         (getpkt, putpkt, remote_notif_get_pending_events): Add
5663         'remote_target' parameter.
5664
5665 2018-05-22  Pedro Alves  <palves@redhat.com>
5666
5667         * remote.c (vcont_builder): Now a class.  Make all data members
5668         private.
5669         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5670         Declare methods.
5671         (vcont_builder_restart): Rename to ...
5672         (vcont_builder::restart): ... this.
5673         (vcont_builder_flush): Rename to ...
5674         (vcont_builder::flush): ... this.
5675         (vcont_builder_push_action): Rename to ...
5676         (vcont_builder::push_action): ... this.
5677         (remote_target::commit_resume): Adjust.
5678
5679 2018-05-22  Pedro Alves  <palves@redhat.com>
5680
5681         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5682         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5683         (get_fixed_memory_packet_size): New.
5684         (get_memory_packet_size): Use it.
5685         (set_memory_packet_size): Don't override the config size with
5686         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5687         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5688         Don't refer to get_memory_packet_size if not connected to a remote
5689         target.  Show "(default)" if configured size is 0.
5690
5691 2018-05-22  Pedro Alves  <palves@redhat.com>
5692
5693         * remote.c (remote_target::mourn_inferior): Move
5694         discard_pending_stop_replies call here from ...
5695         (_initialize_remote): ... here.
5696
5697 2018-05-22  Pedro Alves  <palves@redhat.com>
5698
5699         * remote.c (compare_section_command): Remove set_general_process
5700         call.
5701
5702 2018-05-22  Pedro Alves  <palves@redhat.com>
5703
5704         * remote.c (struct packet_reg, struct remote_arch_state):
5705         Move higher up in the file.
5706         (remote_state) <m_arch_states>: Store remote_arch_state values
5707         instead of remote_arch_state pointers.
5708         (remote_state::get_remote_arch_state): Adjust.
5709
5710 2018-05-22  Pedro Alves  <palves@redhat.com>
5711
5712         * remote.c: Include <unordered_map>.
5713         (remote_state): Now a class.
5714         (remote_state) <get_remote_arch_state>: Declare method.
5715         <get_remote_arch_state>: New field.
5716         (remote_arch_state) <remote_arch_state>: Declare ctor.
5717         <regs>: Now a unique_ptr.
5718         (remote_gdbarch_data_handle): Delete.
5719         (get_remote_arch_state): Delete.
5720         (remote_state::get_remote_arch_state): New.
5721         (get_remote_state): Adjust to call remote_state's
5722         get_remote_arch_state method.
5723         (init_remote_state): Delete, bits factored out to ...
5724         (remote_arch_state::remote_arch_state): ... this new method.
5725         (get_remote_packet_size, get_memory_packet_size)
5726         (process_g_packet, remote_target::fetch_registers)
5727         (remote_target::prepare_to_store, store_registers_using_G)
5728         (remote_target::store_registers, remote_target::get_trace_status):
5729         Adjust to call remote_state's method.
5730         (_initialize_remote): Remove reference to
5731         remote_gdbarch_data_handle.
5732
5733 2018-05-22  Pedro Alves  <palves@redhat.com>
5734
5735         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5736         pread>: New method declarations.
5737         (remote_target::open_1): Adjust.
5738         (readahead_cache_invalidate): Rename to ...
5739         (readahead_cache::invalidate): ... this, and adjust to be a class
5740         method.
5741         (readahead_cache_invalidate_fd): Rename to ...
5742         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5743         class method.
5744         (remote_hostio_pwrite): Adjust.
5745         (remote_hostio_pread_from_cache): Rename to ...
5746         (readahead_cache::pread): ... this, and adjust to be a class
5747         method.
5748         (remote_hostio_close): Adjust.
5749
5750 2018-05-22  Pedro Alves  <palves@redhat.com>
5751
5752         * remote.c (remote_hostio_close_cleanup): Delete.
5753         (class scoped_remote_fd): New.
5754         (remote_file_put, remote_file_get): Use it.
5755
5756 2018-05-22  Pedro Alves  <palves@redhat.com>
5757
5758         (struct vCont_action_support): Use bool and initialize all fields.
5759         (struct readahead_cache): Initialize all fields.
5760         (remote_state): Use bool and initialize all fields.
5761         (remote_state::remote_state, remote_state::~remote_state): New.
5762         (new_remote_state): Delete.
5763         (_initialize_remote): Use new to allocate remote_state.
5764
5765 2018-05-22  Pedro Alves  <palves@redhat.com>
5766             張俊芝  <zjz@zjz.name>
5767
5768         PR gdb/22973
5769         * c-exp.y: Include "c-support.h".
5770         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5771         of tolower.  Use c_ident_is_alpha to scan names.
5772         * c-lang.c: Include "c-support.h".
5773         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5774         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5775         * c-support.h: New file, with bits factored out from ...
5776         * cp-name-parser.y: ... this file.
5777         Include "c-support.h".
5778         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5779         c-support.h and renamed.
5780         (symbol_end, yylex): Adjust.
5781
5782 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5783
5784         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5785         parameter type to CORE_ADDR.
5786         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5787         parameter type in declaration to CORE_ADDR.
5788         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5789         target_auxv_search to get AT_HWCAP and use the result to get the
5790         target description.
5791         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5792         to CORE_ADDR. Remove the cast of the return value to unsigned
5793         long. Fix error predicate of target_auxv_search.
5794         (ppc_linux_nat_target::read_description): Change the type of the
5795         hwcap variable to CORE_ADDR.
5796
5797 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5798
5799         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5800         if the size of fpscr is larger than 32 bits.
5801
5802 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5803
5804         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5805         (ppc32_linux_vsxregmap): New global.
5806         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5807         regcache_supply_regset, and regcache_collect_regset.
5808         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5809         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5810         (fetch_vsx_register, store_vsx_register): Remove.
5811         (fetch_vsx_registers): Add regno parameter. Get regset using
5812         ppc_linux_vsxregset. Use regset to supply registers.
5813         (store_vsx_registers): Add regno parameter. Get regset using
5814         ppc_linux_vsxregset. Use regset to collect registers.
5815         (fetch_register): Call fetch_vsx_registers instead of
5816         fetch_vsx_register.
5817         (store_register): Call store_vsx_registers instead of
5818         store_vsx_register.
5819         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5820         new regno parameter.
5821         (store_ppc_registers): Call store_vsx_registers with -1 for the
5822         new regno parameter.
5823         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5824         (ppc_collect_vsxregset): Remove.
5825
5826 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5827
5828         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5829         offset fields.
5830         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5831         for vector register offset fields.
5832         (ppc64_fbsd_reg_offsets): Likewise.
5833         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5834         to vector register offset fields.
5835         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5836         to vector register offset fields.
5837         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5838         vector register offset fields.
5839         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5840         initializers for vector register offset fields.
5841         (rs6000_aix64_reg_offsets): Likewise.
5842         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5843         (ppc_supply_vrregset): Remove.
5844         (ppc_collect_vrregset): Remove.
5845         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5846         (ppc_linux_vrregset) : New function.
5847         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5848         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5849         (ppc32_linux_vrregset): Remove.
5850         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5851         and use result instead of ppc32_linux_vrregset.
5852         (ppc32_linux_reg_offsets): Remove initializers for vector register
5853         offset fields.
5854         (ppc64_linux_reg_offsets): Likewise.
5855         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5856         * ppc-linux-nat.c: Include regset.h.
5857         (gdb_vrregset_t): Adjust comment to account for little-endian
5858         mode.
5859         (supply_vrregset, fill_vrregset): Remove.
5860         (fetch_altivec_register, store_altivec_register): Remove.
5861         (fetch_altivec_registers): Add regno parameter. Get regset using
5862         ppc_linux_vrregset. Use regset to supply registers.
5863         (store_altivec_registers): Add regno parameter. Get regset using
5864         ppc_linux_vrregset. Use regset to collect registers.
5865         (fetch_register): Call fetch_altivec_registers instead of
5866         fetch_altivec_register.
5867         (store_register): Call store_altivec_registers instead of
5868         store_altivec_register.
5869         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5870         the new regno parameter.
5871         (store_ppc_registers): Call store_altivec_registers with -1 for
5872         the new regno parameter.
5873
5874 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5875
5876         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5877         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5878         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5879         (gdb_vrregset_t): Change array type size to
5880         PPC_LINUX_SIZEOF_VRREGSET.
5881         (gdb_vsxregset_t): Change array type size to
5882         PPC_LINUX_SIZEOF_VSXREGSET.
5883         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5884         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5885         PPC_LINUX_SIZEOF_VSXREGSET.
5886
5887 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5888
5889         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5890         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5891         nat/ppc-linux.c.
5892         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5893         ppc_linux_target_wordsize with tid.
5894         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5895         wordsize with tid.
5896         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5897         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5898         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5899         tid parameter. Remove static specifier.
5900         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5901         (ppc_linux_target_wordsize): New declaration.
5902
5903 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5904
5905         * arch/ppc-linux-common.c: New file.
5906         * arch/ppc-linux-common.h: New file.
5907         * arch/ppc-linux-tdesc.h: New file.
5908         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5909         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5910         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5911         arch/ppc-linux-tdesc.h.
5912         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5913         arch/ppc-linux-tdesc.h.
5914         (ppc_linux_nat_target::read_description): Remove target
5915         description matching code. Fill a ppc_linux_features struct and
5916         call ppc_linux_match_description with it. Move comment about ISA
5917         2.05 to ppc-linux-common.c.
5918         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5919         arch/ppc-linux-tdesc.h.
5920         (ppc_linux_core_read_description): Remove target description
5921         matching code. Fill a ppc_linux_features struct and call
5922         ppc_linux_match_description with it.
5923         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5924         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5925         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5926         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5927         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5928         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5929         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5930         (tdesc_powerpc_e500l): Remove.
5931
5932 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5933
5934         * ada-lang.c (catch_assert_command): Pass empty string instead
5935         of NULL for excep_string argument.
5936
5937 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5938
5939         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5940         the width of the requested register exceeds the width of the
5941         `ptrace' data type.
5942
5943 2018-05-21  Tom Tromey  <tom@tromey.com>
5944
5945         * printcmd.c (output_command): Remove.
5946         (output_command_const): Rename to output_command.
5947         * valprint.h (output_command): Rename from output_command_const.
5948         * tracepoint.c (trace_dump_actions): Call output_command.
5949
5950 2018-05-21  Tom Tromey  <tom@tromey.com>
5951
5952         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5953         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5954         * ada-lang.h (create_ada_exception_catchpoint): Update.
5955         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5956         std::string.
5957         (create_excep_cond_exprs, ~ada_catchpoint)
5958         (should_stop_exception, print_one_exception)
5959         (print_mention_exception, print_recreate_exception): Update.
5960         (ada_get_next_arg): Remove.
5961         (catch_ada_exception_command_split): Use std::string.  Change type
5962         of "excep_string", "cond_string".
5963         (catch_ada_exception_command): Update.
5964         (create_ada_exception_catchpoint): Change type of excep_string.
5965         (ada_exception_sal): Remove excep_string parameter.
5966         (~ada_catchpoint): Remove.
5967
5968 2018-05-21  Tom Tromey  <tom@tromey.com>
5969
5970         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5971         cleanup.
5972
5973 2018-05-21  Tom Tromey  <tom@tromey.com>
5974
5975         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5976         Return unique_xmalloc_ptr.
5977         (print_it_exception): Update.
5978
5979 2018-05-21  Tom Tromey  <tom@tromey.com>
5980
5981         * tracepoint.c (trace_dump_actions): Use std::string.
5982
5983 2018-05-21  Tom Tromey  <tom@tromey.com>
5984
5985         * symfile.c (reread_symbols): Use std::string for original_name.
5986
5987 2018-05-21  Tom Tromey  <tom@tromey.com>
5988
5989         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5990         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5991         constructor.
5992
5993 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5994
5995         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5996         instance to...
5997         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5998         * objfiles.c (get_objfile_bfd_data): Allocate
5999         objfile_per_bfd_storage with obstack_new when allocating on
6000         obstack.
6001
6002 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6003
6004         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6005         OBSTACK_ZALLOC.
6006         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6007         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6008         * mdebugread.c (mdebug_build_psymtabs): Likewise.
6009         (add_pending): Likewise.
6010         (parse_symbol): Likewise.
6011         (parse_partial_symbols): Likewise.
6012         (psymtab_to_symtab_1): Likewise.
6013         (new_psymtab): Likewise.
6014         (elfmdebug_build_psymtabs): Likewise.
6015         * minsyms.c (terminate_minimal_symbol_table): Likewise.
6016         * objfiles.c (get_objfile_bfd_data): Likewise.
6017         (objfile_register_static_link): Likewise.
6018         * psymtab.c (allocate_psymtab): Likewise.
6019         * stabsread.c (read_member_functions): Likewise.
6020         * xcoffread.c (xcoff_end_psymtab): Likewise.
6021
6022 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6023
6024         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6025         compiler supports std::is_trivially_constructible.
6026         * common/poison.h: Include obstack.h.
6027         (IsMallocable): Define to is_trivially_constructible if the
6028         compiler supports it, define to true_type otherwise.
6029         (xobnew): New.
6030         (XOBNEW): Redefine.
6031         (xobnewvec): New.
6032         (XOBNEWVEC): Redefine.
6033         * gdb_obstack.h (obstack_zalloc): New.
6034         (OBSTACK_ZALLOC): Redefine.
6035         (obstack_calloc): New.
6036         (OBSTACK_CALLOC): Redefine.
6037         (obstack_new): New.
6038         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6039         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6040         gdbarch.c.
6041         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6042         obstack_calloc/obstack_zalloc.
6043         (gdbarch_obstack_zalloc): Remove.
6044         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6045
6046 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6047
6048         * stack.c (backtrace_command_1): Remove useless variable int i.
6049
6050 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6051
6052         * stack.c (print_frame_info): Fix comment.
6053
6054 2018-05-18  Tom Tromey  <tom@tromey.com>
6055
6056         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6057         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6058         (~dwarf2_per_objfile): Update
6059         (dwarf2_get_dwz_file): Use new.
6060         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6061         unique_ptr.
6062
6063 2018-05-18  Tom Tromey  <tom@tromey.com>
6064
6065         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6066         unique_ptr.
6067         * dwarf2read.c (struct dwp_file): Add constructor and
6068         initializers.
6069         (open_and_init_dwp_file): Return a unique_ptr.
6070         (dwarf2_per_objfile, create_dwp_hash_table)
6071         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6072         (lookup_dwo_unit_in_dwp): Update.
6073         (open_and_init_dwp_file, get_dwp_file): Update.
6074
6075 2018-05-18  Tom Tromey  <tom@tromey.com>
6076
6077         * dwarf2read.c (dwarf2_per_objfile): Update.
6078         (struct mapped_index): Add initializers.
6079         (dwarf2_read_index): Use new.
6080         (dw2_symtab_iter_init): Update.
6081         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6082         unique_ptr.
6083
6084 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6085
6086         * dwarf2read.c (mapped_index) <total_size>: Remove.
6087
6088 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6089
6090         * unittests/format_pieces-selftests.c (test_format_specifier):
6091         Add ARI comments.
6092
6093 2018-05-18  Tom Tromey  <tom@tromey.com>
6094
6095         * c-typeprint.c (maybe_print_hole): New function.
6096         (c_print_type_struct_field_offset): Update.
6097         (c_type_print_base_struct_union): Call maybe_print_hole.
6098
6099 2018-05-17  Keith Seitz  <keiths@redhat.com>
6100
6101         * breakpoint.c (build_bpstat_chain): New function, moved from
6102         bpstat_stop_status.
6103         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6104         If no stop chain is passed, call build_bpstat_chain to build it.
6105         * breakpoint.h (build_bpstat_chain): Declare.
6106         (bpstat_stop_status): Move documentation here from breakpoint.c.
6107         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6108         build the stop chain and pass it to skip_inline_frames.
6109         Pass this stop chain to bpstat_stop_status.
6110         * inline-frame.c: Include breakpoint.h.
6111         (stopped_by_user_bp_inline_frame): New function.
6112         (skip_inline_frames): Add parameter `stop_chain'.
6113         Move documention to inline-frame.h.
6114         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6115         whether the frame should be elided.
6116         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6117         Add moved documentation and update for new parameter.
6118
6119 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6120
6121         PR cli/14975
6122         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6123         unittests/format_pieces-selftests.c.
6124         * common/format.h (format_piece) <operator==>: New.
6125         (format_pieces) <operator[]>: Remove.
6126         * common/format.c (format_pieces::format_pieces): Handle \e.
6127         * unittests/format_pieces-selftests.c: New.
6128
6129 2018-05-17  Tom Tromey  <tom@tromey.com>
6130
6131         PR symtab/23010:
6132         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6133         (dw2_instantiate_symtab): Add skip_partial parameter.
6134         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6135         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6136         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6137         (dw2_expand_symtabs_matching_one)
6138         (dw2_find_pc_sect_compunit_symtab)
6139         (dw2_debug_names_lookup_symbol)
6140         (dw2_debug_names_expand_symtabs_for_function): Update.
6141         (init_cutu_and_read_dies): Add skip_partial parameter.
6142         (process_psymtab_comp_unit, build_type_psymtabs_1)
6143         (process_skeletonless_type_unit, load_partial_comp_unit)
6144         (psymtab_to_symtab_1): Update.
6145         (load_full_comp_unit): Add skip_partial parameter.
6146         (process_imported_unit_die, dwarf2_read_addr_index)
6147         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6148         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6149         (read_signatured_type): Update.
6150
6151 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6152
6153         * value.c (release_value): Remove unused variable.
6154         (record_latest_value): Likewise.
6155         (access_value_history): Likewise.
6156         (preserve_values): Likewise.
6157
6158 2018-05-17  Tom Tromey  <tom@tromey.com>
6159
6160         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6161         Initialize.
6162
6163 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6164
6165         PR gdb/22286
6166         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6167         Also handle registers whose width is not a multiple of
6168         PTRACE_TYPE_RET.
6169         (linux_nat_trad_target::store_register): Likewise.
6170
6171 2018-05-16  Tom Tromey  <tom@tromey.com>
6172
6173         * gdbcore.h (core_bfd): Redefine.
6174         * corelow.c (core_target::close): Update.
6175         (core_target_open): Update.
6176         * progspace.h (struct program_space) <cbfd>: Now a
6177         gdb_bfd_ref_ptr.
6178
6179 2018-05-16  Tom Tromey  <tom@tromey.com>
6180
6181         PR cli/19551:
6182         * symfile-add-flags.h (enum symfile_add_flags)
6183         <SYMFILE_NOT_FILENAME>: New constant.
6184         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6185         objfile name from BFD.
6186         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6187         * minidebug.c (find_separate_debug_file_in_section): Put
6188         ".gnu_debugdata" into BFD's file name.
6189
6190 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6191
6192         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6193         Remove.
6194
6195 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6196
6197         PR binutils/21446
6198         * aarch64-tdep.c (aarch64_analyze_prologue,
6199         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6200         Indicate not interested in errors.
6201
6202 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6203
6204         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6205         Supply the MIPS_ZERO_REGNUM register.
6206
6207 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6208
6209         * mips-tdep.c (mask_address_var): Make variable static.
6210
6211 2018-05-14  Tom Tromey  <tom@tromey.com>
6212
6213         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6214
6215 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6216
6217         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6218         FXSAVE_ADDR for the mxcsr register.
6219
6220 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6221
6222         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6223
6224 2018-05-11  Pedro Alves  <palves@redhat.com>
6225
6226         * corelow.c (core_target) <core_target>: No longer inline.
6227         Initialize m_core_gdbarch, m_core_vec and build the section table
6228         here.
6229         <~core_target>: New.
6230         <core_gdbarch, get_core_register_section>: New methods.
6231         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6232         factored out from ...
6233         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6234         (core_ops): Delete.
6235         (sniff_core_bfd): Add gdbarch parameter.
6236         (core_close): Delete, merged into ...
6237         (core_target::close): ... here.  Delete self.
6238         (core_close_cleanup): Delete.
6239         (core_target_open): Allocate a core_target on the heap.  Use a
6240         unique_ptr instead of a cleanup.  Bits moved into the core_target
6241         ctor.  Adjust to use core_target methods instead of globals.
6242         (get_core_register_section): Rename to ...
6243         (core_target::get_core_register_section): ... this and adjust.
6244         (struct get_core_registers_cb_data): New.
6245         (get_core_registers_cb): Use it.  Use bool.
6246         (core_target::fetch_registers, core_target::files_info)
6247         (core_target::xfer_partial, core_target::read_description)
6248         (core_target::pid_to, core_target::thread_name): Adjust to
6249         reference class fields instead of globals.
6250         * target.h (struct target_ops_deleter, target_ops_up): New.
6251
6252 2018-05-11  Pedro Alves  <palves@redhat.com>
6253
6254         * corefile.c (core_file_command): Move to corelow.c.
6255         * corelow.c (the_core_target): Delete.
6256         (core_file_command): Moved from corefile.c.  Check exec_bfd
6257         instead of the_core_target.  Use target_detach instead of calling
6258         into the_core_target directly.
6259         (maybe_say_no_core_file_now): New.
6260         (core_target::detach): Use it.
6261         (_initialize_corelow): Remove references to the_core_target.
6262         * gdbcore.h (the_core_target): Delete.
6263
6264 2018-05-11  Tom Tromey  <tromey@redhat.com>
6265             Pedro Alves  <palves@redhat.com>
6266
6267         * corefile.c (core_bfd): Remove.
6268         * gdbcore.h (core_bfd): Now a macro.
6269         * progspace.h (struct program_space) <cbfd>: New field.
6270
6271 2018-05-11  Tom Tromey  <tom@tromey.com>
6272
6273         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6274         gdb::def_vector.
6275
6276 2018-05-10  Tom Tromey  <tom@tromey.com>
6277
6278         * configure: Rebuild.
6279         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6280
6281 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6282
6283         PR server/23158:
6284         * regformats/regdat.sh: Adjust script, following the addition
6285         of the new expedite_regs parameter to init_target_desc.
6286
6287 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6288     
6289         PR gdb/23127
6290         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6291         set_gdbarch_significant_addr_bit.
6292         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6293         set_gdbarch_significant_addr_bit.
6294         * utils.c (address_significant): Update to sign extend addr.
6295
6296 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6297
6298         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6299         (xtensa_linux_init_abi): Limit tdep->num_regs by
6300         tdep->num_nopriv_regs.
6301         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6302         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6303         not initialized.
6304
6305 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6306
6307         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6308
6309 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6310
6311         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6312         (I387_MXCSR_INIT_VAL): New constant.
6313         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6314         buffer if it was supplied by the inferior.
6315         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6316         (i387_xsave_get_clear_bv): New function.
6317         (i387_supply_xsave): Only read x87 control registers from the
6318         xsave buffer if the feature is enabled, and the state will have
6319         been written, otherwise, provide a suitable default.
6320         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6321         including x87 control registers.  Update control registers if they
6322         have changed from the default value, and mark features as enabled
6323         as required.
6324         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6325
6326 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6327
6328         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6329
6330 2018-05-07  Tom Tromey  <tom@tromey.com>
6331
6332         * configure: Rebuild.
6333         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6334
6335 2018-05-07  Tom Tromey  <tom@tromey.com>
6336
6337         PR tdep/20362:
6338         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6339         bit.  Use correct value for VDIV.
6340
6341 2018-05-04  Tom Tromey  <tom@tromey.com>
6342
6343         * configure: Rebuild.
6344         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6345
6346 2018-05-04  Tom Tromey  <tom@tromey.com>
6347
6348         * linux-record.c (record_linux_system_call) <case
6349         RECORD_SYS_RECVFROM>: Add "break".
6350
6351 2018-05-04  Tom Tromey  <tom@tromey.com>
6352
6353         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6354         Add missing "break".
6355         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6356         Add missing "break".
6357
6358 2018-05-04  Tom Tromey  <tom@tromey.com>
6359
6360         * rs6000-tdep.c (ppc_process_record_op4)
6361         (ppc_process_record_op63): Add fall-through comment.
6362
6363 2018-05-04  Tom Tromey  <tom@tromey.com>
6364
6365         * i386-tdep.c (i386_process_record): Add fall-through comment.
6366
6367 2018-05-04  Tom Tromey  <tom@tromey.com>
6368
6369         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6370         comment.
6371
6372 2018-05-04  Tom Tromey  <tom@tromey.com>
6373
6374         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6375         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6376         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6377         comment.
6378         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6379         comment.
6380         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6381         comment.
6382
6383 2018-05-04  Tom Tromey  <tom@tromey.com>
6384
6385         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6386
6387 2018-05-04  Tom Tromey  <tom@tromey.com>
6388
6389         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6390         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6391         * symfile.c (section_is_mapped): Fix fall-through comment.
6392         * stabsread.c (define_symbol, read_member_functions): Fix
6393         fall-through comment.
6394         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6395         comment.
6396         * remote.c (remote_wait_as): Fix fall-through comment.
6397         * p-exp.y (yylex): Fix fall-through comment.
6398         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6399         comment.
6400         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6401         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6402         * jv-exp.y (yylex): Fix fall-through comment.
6403         * go-exp.y (lex_one_token): Fix fall-through comment.
6404         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6405         fall-through comment.
6406         * f-exp.y (yylex): Fix fall-through comment.
6407         * dwarf2read.c (process_die): Fix fall-through comments.
6408         * dbxread.c (process_one_symbol): Fix fall-through comment.
6409         * d-exp.y (lex_one_token): Fix fall-through comment.
6410         * cp-name-parser.y (yylex): Fix fall-through comment.
6411         * coffread.c (coff_symtab_read): Fix fall-through comment.
6412         * c-exp.y (lex_one_token): Fix fall-through comment.
6413         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6414         comment.
6415         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6416         comment.
6417
6418 2018-05-04  Tom Tromey  <tom@tromey.com>
6419
6420         PR python/22730:
6421         * NEWS: Mention gdb.execute change.
6422         * gdbcmd.h (execute_control_command): Don't declare.
6423         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6424         execute_control_commands, execute_control_commands_to_string.
6425         * cli/cli-script.h (execute_control_commands)
6426         (execute_control_commands_to_string): Declare.
6427         (execute_control_command): Add from_tty parameter.
6428         * cli/cli-script.c (execute_control_commands)
6429         (execute_control_commands_to_string): New functions.
6430         (execute_user_command): Use execute_control_commands.
6431         (execute_control_command_1): Add "from_tty" parameter.  Update.
6432         (execute_control_command): Likewise.
6433
6434 2018-05-04  Tom Tromey  <tom@tromey.com>
6435
6436         PR python/22731:
6437         * NEWS: Mention that breakpoint commands are writable.
6438         * python/py-breakpoint.c (bppy_set_commands): New function.
6439         (breakpoint_object_getset) <"commands">: Use it.
6440
6441 2018-05-04  Tom Tromey  <tom@tromey.com>
6442
6443         * tracepoint.c (actions_command): Update.
6444         * mi/mi-cmd-break.c (mi_command_line_array)
6445         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6446         (mi_read_next_line): Remove.
6447         (mi_cmd_break_commands): Update.
6448         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6449         function_view.
6450         * cli/cli-script.c (get_command_line): Update.
6451         (process_next_line): Use function_view.  Constify.
6452         (recurse_read_control_structure, read_command_lines)
6453         (read_command_lines_1): Change argument types to function_view.
6454         (do_define_command, document_command): Update.
6455         * breakpoint.h (check_tracepoint_command): Don't declare.
6456         * breakpoint.c (check_tracepoint_command): Remove.
6457         (commands_command_1, create_tracepoint_from_upload): Update.
6458
6459 2018-05-04  Tom Tromey  <tom@tromey.com>
6460
6461         PR gdb/11750:
6462         * cli/cli-script.h (enum command_control_type) <define_control>:
6463         New constant.
6464         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6465         (build_command_line, execute_control_command_1)
6466         (process_next_line): Likewise.
6467         (do_define_command): New function, extracted from define_command.
6468         (define_command): Use it.
6469
6470 2018-05-04  Tom Tromey  <tom@tromey.com>
6471
6472         * tracepoint.c (actions_command): Update.
6473         * cli/cli-script.h (read_command_lines): Update.
6474         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6475         (MAX_TMPBUF): Remove define.
6476         (define_command): Use string_printf.
6477         (document_command): Likewise.
6478         * breakpoint.c (commands_command_1): Update.
6479
6480 2018-05-04  Tom Tromey  <tom@tromey.com>
6481
6482         * top.c (execute_command): Update.
6483         * cli/cli-script.h (print_command_lines): Now varargs.
6484         * cli/cli-script.c (print_command_lines): Now varargs.
6485         (execute_control_command_1) <case while_control, case if_control>:
6486         Update.
6487
6488 2018-05-04  Tom Tromey  <tom@tromey.com>
6489
6490         * tracepoint.c (all_tracepoint_actions): Rename from
6491         all_tracepoint_actions_and_cleanup.  Change return type.
6492         (actions_command, encode_actions_1, encode_actions)
6493         (trace_dump_actions, tdump_command): Update.
6494         * remote.c (remote_download_command_source): Update.
6495         * python/python.c (gdbpy_eval_from_control_command)
6496         (python_command, python_interactive_command): Update.
6497         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6498         * guile/guile.c (guile_command)
6499         (gdbscm_eval_from_control_command, guile_command): Update.
6500         * compile/compile.c (compile_code_command)
6501         (compile_print_command, compile_to_object): Update.
6502         * cli/cli-script.h (struct command_lines_deleter): New.
6503         (counted_command_line): New typedef.
6504         (struct command_line): Add constructor, destructor.
6505         <body_list>: Remove.
6506         <body_list_0, body_list_1>: New members.
6507         (command_line_up): Remove typedef.
6508         (read_command_lines, read_command_lines_1, get_command_line):
6509         Update.
6510         (copy_command_lines): Don't declare.
6511         * cli/cli-script.c (build_command_line): Use "new".
6512         (get_command_line): Return counted_command_line.
6513         (print_command_lines, execute_user_command)
6514         (execute_control_command_1, while_command, if_command): Update.
6515         (realloc_body_list): Remove.
6516         (process_next_line, recurse_read_control_structure): Update.
6517         (read_command_lines, read_command_lines_1): Return counted_command_line.
6518         (free_command_lines): Use "delete".
6519         (copy_command_lines): Remove.
6520         (define_command, document_command, show_user_1): Update.
6521         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6522         a counted_command_line.
6523         * breakpoint.h (counted_command_line): Remove typedef.
6524         (breakpoint_set_commands): Update.
6525         * breakpoint.c (check_no_tracepoint_commands)
6526         (validate_commands_for_breakpoint): Update.
6527         (breakpoint_set_commands): Change commands to be a
6528         counted_command_line.
6529         (commands_command_1, update_dprintf_command_list)
6530         (create_tracepoint_from_upload): Update.
6531
6532 2018-05-04  Tom Tromey  <tom@tromey.com>
6533
6534         * cli/cli-decode.h (cmd_list_element): New constructor.
6535         (~cmd_list_element): New destructor.
6536         (struct cmd_list_element): Add initializers.
6537         * cli/cli-decode.c (do_add_cmd): Use "new".
6538         (delete_cmd): Use "delete".
6539
6540 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6541             Pedro Alves <palves@redhat.com>
6542
6543         PR breakpoints/19806 and support for PR external/20207.
6544         * NEWS: Mention Aarch64 watchpoint improvements.
6545         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6546         watchpoints and PR external/20207 watchpoints.
6547         * nat/aarch64-linux-hw-point.c
6548         (kernel_supports_any_contiguous_range): New.
6549         (aarch64_watchpoint_offset): New.
6550         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6551         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6552         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6553         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6554         next_addr_orig_p.  Support PR external/20207 watchpoints.
6555         (aarch64_downgrade_regs): New.
6556         (aarch64_dr_state_insert_one_point): New parameters offset and
6557         addr_orig.
6558         (aarch64_dr_state_remove_one_point): Likewise.
6559         (aarch64_handle_breakpoint): Update caller.
6560         (aarch64_handle_aligned_watchpoint): Likewise.
6561         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6562         aligned_offset.
6563         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6564         aarch64_downgrade_regs.
6565         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6566         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6567         (DR_CONTROL_MASK): ... this.
6568         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6569         (unsigned int aarch64_watchpoint_offset): New prototype.
6570         (aarch64_linux_set_debug_regs): Remove const from state.
6571         * utils.c (align_up, align_down): Move to ...
6572         * common/common-utils.c (align_up, align_down): ... here.
6573         * utils.h (align_up, align_down): Move to ...
6574         * common/common-utils.h (align_up, align_down): ... here.
6575
6576 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6577
6578         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6579         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6580         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6581         Re-implement to match the ABI as summarized in GCC's
6582         gcc/config/sparc/sparc.c.  All callers updated.
6583         (sparc32_store_arguments): Remove assertion.
6584
6585 2018-05-04  Tom Tromey  <tom@tromey.com>
6586
6587         * printcmd.c: Don't include tui.h.
6588         (decode_format): Use skip_spaces.
6589
6590 2018-05-04  Tom Tromey  <tom@tromey.com>
6591
6592         PR gdb/22619:
6593         * printcmd.c (last_count): New global.
6594         (x_command): Use saved count when repeating.
6595
6596 2018-05-04  Tom Tromey  <tom@tromey.com>
6597
6598         * nto-procfs.c (do_closedir_cleanup): Remove.
6599         (procfs_pidlist): Use gdb_dir_up.
6600         * procfs.c (do_closedir_cleanup): Remove.
6601         (proc_update_threads): Use gdb_dir_up.
6602         * common/filestuff.h (struct gdb_dir_deleter): New.
6603         (gdb_dir_up): New typedef.
6604
6605 2018-05-04  Tom Tromey  <tom@tromey.com>
6606
6607         * ada-lang.c (print_mention_exception): Use std::string.
6608
6609 2018-05-04  Tom Tromey  <tom@tromey.com>
6610
6611         * ada-lang.c (create_excep_cond_exprs): Update.
6612         (ada_exception_catchpoint_cond_string): Use std::string.
6613
6614 2018-05-04  Tom Tromey  <tom@tromey.com>
6615
6616         * ada-lang.c (xget_renaming_scope): Return std::string.
6617         (old_renaming_is_invisible): Update.
6618
6619 2018-05-04  Tom Tromey  <tom@tromey.com>
6620
6621         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6622         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6623
6624 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6625
6626         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6627
6628 2018-05-04  Tom Tromey  <tom@tromey.com>
6629
6630         * remote.c (remote_query_supported_append): Change type.
6631         (remote_check_symbols): Update.
6632
6633 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6634
6635         PR gdb/11420
6636         * configure.ac: Prepend libpython.
6637         * python/python-config.py: Likewise.
6638         * configure: Regenerate.
6639
6640 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6641
6642         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6643
6644 2018-05-03  Pedro Alves  <palves@redhat.com>
6645
6646         * s390-linux-nat.c
6647         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6648         override.  Write 'true' instead of '1'.
6649         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6650         declaration.
6651
6652 2018-05-02  Pedro Alves  <palves@redhat.com>
6653
6654         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6655         add_inf_child_target.
6656         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6657         add_inf_child_target.
6658         * aix-thread.c (aix_thread_target_info): New.
6659         (aix_thread_target) <shortname, longname, doc>: Delete.
6660         <info>: New.
6661         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6662         add_inf_child_target.
6663         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6664         add_inf_child_target.
6665         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6666         add_inf_child_target.
6667         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6668         add_inf_child_target.
6669         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6670         add_inf_child_target.
6671         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6672         add_inf_child_target.
6673         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6674         add_inf_child_target.
6675         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6676         add_inf_child_target.
6677         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6678         add_inf_child_target.
6679         * bfd-target.c (target_bfd_target_info): New.
6680         (target_bfd) <shortname, longname, doc>: Delete.
6681         <info>: New.
6682         * bsd-kvm.c (bsd_kvm_target_info): New.
6683         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6684         <info>: New.
6685         (bsd_kvm_target::open): Rename to ...
6686         (bsd_kvm_target_open): ... this.  Adjust.
6687         * bsd-uthread.c (bsd_uthread_target_info): New.
6688         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6689         <info>: New.
6690         * corefile.c (core_file_command): Adjust.
6691         * corelow.c (core_target_info): New.
6692         (core_target) <shortname, longname, doc>: Delete.
6693         <info>: New.
6694         (core_target::open): Rename to ...
6695         (core_target_open): ... this.  Adjust.
6696         * ctf.c (ctf_target_info): New.
6697         (ctf_target) <shortname, longname, doc>: Delete.
6698         <info>: New.
6699         (ctf_target::open): Rename to ...
6700         (ctf_target_open): ... this.
6701         (_initialize_ctf): Adjust.
6702         * exec.c (exec_target_info): New.
6703         (exec_target) <shortname, longname, doc>: Delete.
6704         <info>: New.
6705         (exec_target::open): Rename to ...
6706         (exec_target_open): ... this.
6707         * gdbcore.h (core_target_open): Declare.
6708         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6709         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6710         add_inf_child_target.
6711         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6712         add_inf_child_target.
6713         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6714         add_inf_child_target.
6715         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6716         add_inf_child_target.
6717         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6718         add_inf_child_target.
6719         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6720         add_inf_child_target.
6721         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6722         add_inf_child_target.
6723         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6724         add_inf_child_target.
6725         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6726         add_inf_child_target.
6727         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6728         add_inf_child_target.
6729         * inf-child.c (inf_child_target_info): New.
6730         (inf_child_target::info): New.
6731         (inf_child_open_target): Remove 'target' parameter.  Use
6732         get_native_target instead.
6733         (inf_child_target::open): Delete.
6734         (add_inf_child_target): New.
6735         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6736         Delete.
6737         <info>: New.
6738         (add_inf_child_target): Declare.
6739         (inf_child_open_target): Declare.
6740         * linux-thread-db.c (thread_db_target_info): New.
6741         (thread_db_target) <shortname, longname, doc>: Delete.
6742         <info>: New.
6743         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6744         add_inf_child_target.
6745         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6746         add_inf_child_target.
6747         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6748         add_inf_child_target.
6749         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6750         add_inf_child_target.
6751         * make-target-delegates (print_class): Adjust.
6752         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6753         add_inf_child_target.
6754         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6755         add_inf_child_target.
6756         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6757         add_inf_child_target.
6758         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6759         add_inf_child_target.
6760         * nto-procfs.c (nto_native_target_info): New.
6761         (nto_procfs_target_native) <shortname, longname, doc>:
6762         Delete.
6763         <info>: New.
6764         (nto_procfs_target_info): New.
6765         (nto_procfs_target_procfs) <shortname, longname, doc>:
6766         Delete.
6767         <info>: New.
6768         (init_procfs_targets): Adjust.
6769         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6770         add_inf_child_target.
6771         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6772         add_inf_child_target.
6773         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6774         add_inf_child_target.
6775         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6776         add_inf_child_target.
6777         * ravenscar-thread.c (ravenscar_target_info): New.
6778         (ravenscar_thread_target) <shortname, longname, doc>:
6779         Delete.
6780         <info>: New.
6781         * record-btrace.c (record_btrace_target_info):
6782         (record_btrace_target) <shortname, longname, doc>: Delete.
6783         <info>: New.
6784         (record_btrace_target::open): Rename to ...
6785         (record_btrace_target_open): ... this.  Adjust.
6786         * record-full.c (record_longname, record_doc): New.
6787         (record_full_base_target) <shortname, longname, doc>: Delete.
6788         <info>: New.
6789         (record_full_target_info): New.
6790         (record_full_target): <shortname>: Delete.
6791         <info>: New.
6792         (record_full_core_open_1, record_full_open_1): Update comments.
6793         (record_full_base_target::open): Rename to ...
6794         (record_full_open): ... this.
6795         (cmd_record_full_restore): Update.
6796         (_initialize_record_full): Update.
6797         * remote-sim.c (remote_sim_target_info): New.
6798         (gdbsim_target) <shortname, longname, doc>: Delete.
6799         <info>: New.
6800         (gdbsim_target::open): Rename to ...
6801         (gdbsim_target_open): ... this.
6802         (_initialize_remote_sim): Adjust.
6803         * remote.c (remote_doc): New.
6804         (remote_target_info): New.
6805         (remote_target) <shortname, longname, doc>: Delete.
6806         <info>: New.
6807         (extended_remote_target_info): New.
6808         (extended_remote_target) <shortname, longname, doc>: Delete.
6809         <info>: New.
6810         (remote_target::open_1): Make static.  Adjust.
6811         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6812         * s390-linux-nat.c (_initialize_s390_nat): Use
6813         add_inf_child_target.
6814         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6815         add_inf_child_target.
6816         * sol-thread.c (thread_db_target_info): New.
6817         (sol_thread_target) <shortname, longname, doc>: Delete.
6818         <info>: New.
6819         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6820         add_inf_child_target.
6821         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6822         add_inf_child_target.
6823         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6824         add_inf_child_target.
6825         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6826         add_inf_child_target.
6827         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6828         add_inf_child_target.
6829         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6830         add_inf_child_target.
6831         * spu-linux-nat.c (_initialize_spu_nat): Use
6832         add_inf_child_target.
6833         * spu-multiarch.c (spu_multiarch_target_info): New.
6834         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6835         <info>: New.
6836         * target-delegates.c: Regenerate.
6837         * target.c: Include <unordered_map>.
6838         (target_ops_p): Delete.
6839         (DEF_VEC_P(target_ops_p)): Delete.
6840         (target_factories): New.
6841         (test_target_info): New.
6842         (test_target_ops::info): New.
6843         (open_target): Adjust to use target_factories.
6844         (add_target_with_completer): Rename to ...
6845         (add_target): ... this.  Change prototype.  Register target_info
6846         and open callback in target_factories.  Register target_info in
6847         command context instead of target_ops.
6848         (add_target): Delete old implementation.
6849         (add_deprecated_target_alias): Change prototype.  Adjust.
6850         (the_native_target): New.
6851         (set_native_target, get_native_target): New.
6852         (find_default_run_target): Use the_native_target.
6853         (find_attach_target, find_run_target): Simplify.
6854         (target_ops::open): Delete.
6855         (dummy_target_info): New.
6856         (dummy_target::shortname, dummy_target::longname)
6857         (dummy_target::doc): Delete.
6858         (dummy_target::info): New.
6859         (debug_target::shortname, debug_target::longname)
6860         (debug_target::doc): Delete.
6861         (debug_target::info): New.
6862         * target.h (struct target_info): New.
6863         (target_ops::~target_ops): Add comment.
6864         (target_ops::info): New.
6865         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6866         longer virtual.  Implement in terms of target_info.
6867         (set_native_target, get_native_target): Declare.
6868         (target_open_ftype): New.
6869         (add_target, add_target_with_completer)
6870         (add_deprecated_target_alias): Change prototype.
6871         (test_target) <shortname, longname, doc>: Delete.
6872         <info>: New.
6873         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6874         add_inf_child_target.
6875         * tracefile-tfile.c (tfile_target_info): New.
6876         (tfile_target) <shortname, longname, doc>: Delete.
6877         <info>: New.
6878         (tfile_target::open): Rename to ...
6879         (tfile_target_open): ... this.
6880         (_initialize_tracefile_tfile): Adjust.
6881         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6882         add_inf_child_target.
6883         * windows-nat.c (_initialize_windows_nat): Use
6884         add_inf_child_target.
6885         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6886         add_inf_child_target.
6887
6888 2018-05-02  Pedro Alves  <palves@redhat.com>
6889
6890         * linux-nat.h (linux_nat_target) <low_new_thread,
6891         low_delete_thread, low_new_fork, low_forget_process,
6892         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6893         New virtual methods.
6894         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6895         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6896         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6897         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6898         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6899         Delete.
6900         * linux-fork.c (delete_fork): Adjust to call low method.
6901         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6902         (linux_nat_new_fork, linux_nat_forget_process_hook)
6903         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6904         (linux_nat_status_is_event):
6905         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6906         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6907         to call low method.
6908         (sigtrap_is_event): Rename to ...
6909         (linux_nat_target::low_status_is_event): ... this.
6910         (linux_nat_set_status_is_event): Delete.
6911         (save_stop_reason, linux_nat_wait_1)
6912         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6913         low methods.
6914         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6915         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6916         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6917         (linux_nat_set_prepare_to_resume): Delete.
6918         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6919         low virtual methods.
6920         * amd64-linux-nat.c: Likewise.
6921         * arm-linux-nat.c: Likewise.
6922         * i386-linux-nat.c: Likewise.
6923         * ia64-linux-nat.c: Likewise.
6924         * mips-linux-nat.c: Likewise.
6925         * ppc-linux-nat.c: Likewise.
6926         * s390-linux-nat.c: Likewise.
6927         * sparc64-linux-nat.c: Likewise.
6928         * x86-linux-nat.c: Likewise.
6929         * x86-linux-nat.h: Include "nat/x86-linux.h".
6930         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6931         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6932         Override methods.
6933
6934 2018-05-02  Pedro Alves  <palves@redhat.com>
6935
6936         * target.h (target_ops)
6937         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6938         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6939         stopped_by_watchpoint, have_continuable_watchpoint,
6940         stopped_data_address, watchpoint_addr_within_range,
6941         can_accel_watchpoint_condition, can_run, thread_alive,
6942         has_all_memory, has_memory, has_stack, has_registers,
6943         has_execution, can_async_p, is_async_p, supports_non_stop,
6944         always_non_stop_p, can_execute_reverse, supports_multi_process,
6945         supports_enable_disable_tracepoint,
6946         supports_disable_randomization, supports_string_tracing,
6947         supports_evaluation_of_breakpoint_conditions,
6948         can_run_breakpoint_commands, filesystem_is_local,
6949         can_download_tracepoint, get_trace_state_variable_value,
6950         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6951         record_is_replaying, record_will_replay,
6952         augmented_libraries_svr4_read>: Adjust to return bool.
6953         * aarch64-linux-nat.c: All implementations adjusted.
6954         * aix-thread.c: All implementations adjusted.
6955         * arm-linux-nat.c: All implementations adjusted.
6956         * breakpoint.c: All implementations adjusted.
6957         * bsd-kvm.c: All implementations adjusted.
6958         * bsd-uthread.c: All implementations adjusted.
6959         * corelow.c: All implementations adjusted.
6960         * ctf.c: All implementations adjusted.
6961         * darwin-nat.c: All implementations adjusted.
6962         * darwin-nat.h: All implementations adjusted.
6963         * exec.c: All implementations adjusted.
6964         * fbsd-nat.c: All implementations adjusted.
6965         * fbsd-nat.h: All implementations adjusted.
6966         * gnu-nat.c: All implementations adjusted.
6967         * gnu-nat.h: All implementations adjusted.
6968         * go32-nat.c: All implementations adjusted.
6969         * ia64-linux-nat.c: All implementations adjusted.
6970         * inf-child.c: All implementations adjusted.
6971         * inf-child.h: All implementations adjusted.
6972         * inf-ptrace.c: All implementations adjusted.
6973         * inf-ptrace.h: All implementations adjusted.
6974         * linux-nat.c: All implementations adjusted.
6975         * linux-nat.h: All implementations adjusted.
6976         * mips-linux-nat.c: All implementations adjusted.
6977         * nto-procfs.c: All implementations adjusted.
6978         * ppc-linux-nat.c: All implementations adjusted.
6979         * procfs.c: All implementations adjusted.
6980         * ravenscar-thread.c: All implementations adjusted.
6981         * record-btrace.c: All implementations adjusted.
6982         * record-full.c: All implementations adjusted.
6983         * remote-sim.c: All implementations adjusted.
6984         * remote.c: All implementations adjusted.
6985         * s390-linux-nat.c: All implementations adjusted.
6986         * sol-thread.c: All implementations adjusted.
6987         * spu-multiarch.c: All implementations adjusted.
6988         * target-delegates.c: All implementations adjusted.
6989         * target.c: All implementations adjusted.
6990         * target.h: All implementations adjusted.
6991         * tracefile-tfile.c: All implementations adjusted.
6992         * tracefile.c: All implementations adjusted.
6993         * tracefile.h: All implementations adjusted.
6994         * windows-nat.c: All implementations adjusted.
6995         * x86-linux-nat.h: All implementations adjusted.
6996         * x86-nat.h: All implementations adjusted.
6997
6998 2018-05-02  Pedro Alves  <palves@redhat.com>
6999
7000         * make-target-delegates (scan_target_h): Don't trim lines here.
7001         Replace sequences of tabs and/or whitespace with a single
7002         whitespace.
7003         (top level, parsing methods): Trim each line before processing it
7004         here.
7005
7006 2018-05-02  Pedro Alves  <palves@redhat.com>
7007             John Baldwin  <jhb@freebsd.org>
7008
7009         * target.h (enum strata) <debug_stratum>: New.
7010         (struct target_ops) <all delegation methods>: Replace by C++
7011         virtual methods, and drop "to_" prefix.  All references updated
7012         throughout.
7013         <to_shortname, to_longname, to_doc, to_data,
7014         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7015         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7016         virtual methods.  All references updated throughout.
7017         <can_attach, supports_terminal_ours, can_create_inferior,
7018         get_thread_control_capabilities, attach_no_wait>: New
7019         virtual methods.
7020         <insert_breakpoint, remove_breakpoint>: Now
7021         TARGET_DEFAULT_NORETURN methods.
7022         <info_proc>: Now returns bool.
7023         <to_magic>: Delete.
7024         (OPS_MAGIC): Delete.
7025         (current_target): Delete.  All references replaced by references
7026         to ...
7027         (target_stack): ... this.  New.
7028         (target_shortname, target_longname): Adjust.
7029         (target_can_run): Now a function declaration.
7030         (default_child_has_all_memory, default_child_has_memory)
7031         (default_child_has_stack, default_child_has_registers)
7032         (default_child_has_execution): Remove target_ops parameter.
7033         (complete_target_initialization): Delete.
7034         (memory_breakpoint_target): New template class.
7035         (test_target_ops): Refactor as a C++ class with virtual methods.
7036         * make-target-delegates (NAME_PART): Tighten.
7037         (POINTER_PART, CP_SYMBOL): New.
7038         (SIMPLE_RETURN_PART): Reimplement.
7039         (VEC_RETURN_PART): Expect less.
7040         (RETURN_PART, VIRTUAL_PART): New.
7041         (METHOD): Adjust to C++ virtual methods.
7042         (scan_target_h): Remove reference to C99.
7043         (dname): Output "target_ops::" prefix.
7044         (write_function_header): Adjust to output a C++ class method.
7045         (write_declaration): New.
7046         (write_delegator): Adjust to output a C++ class method.
7047         (tdname): Output "dummy_target::" prefix.
7048         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7049         method.
7050         (tdefault_names, debug_names): Delete.
7051         (return_types, tdefaults, styles, argtypes_array): New.
7052         (top level): All methods are delegators.
7053         (print_class): New.
7054         (top level): Print dummy_target and debug_target classes.
7055         * target-delegates.c: Regenerate.
7056         * target-debug.h (target_debug_print_enum_info_proc_what)
7057         (target_debug_print_thread_control_capabilities)
7058         (target_debug_print_thread_info_p): New.
7059         * target.c (dummy_target): Delete.
7060         (the_dummy_target, the_debug_target): New.
7061         (target_stack): Now extern.
7062         (set_targetdebug): Push/unpush debug target.
7063         (default_child_has_all_memory, default_child_has_memory)
7064         (default_child_has_stack, default_child_has_registers)
7065         (default_child_has_execution): Remove target_ops parameter.
7066         (complete_target_initialization): Delete.
7067         (add_target_with_completer): No longer call
7068         complete_target_initialization.
7069         (target_supports_terminal_ours): Use regular delegation.
7070         (update_current_target): Delete.
7071         (push_target): No longer check magic number.  Don't call
7072         update_current_target.
7073         (unpush_target): Don't call update_current_target.
7074         (target_is_pushed): No longer check magic number.
7075         (target_require_runnable): Skip for all stratums over
7076         process_stratum.
7077         (target_ops::info_proc): New.
7078         (target_info_proc): Use find_target_at and
7079         find_default_run_target.
7080         (target_supports_disable_randomization): Use regular delegation.
7081         (target_get_osdata): Use find_target_at.
7082         (target_ops::open, target_ops::close, target_ops::can_attach)
7083         (target_ops::attach, target_ops::can_create_inferior)
7084         (target_ops::create_inferior, target_ops::can_run)
7085         (target_can_run): New.
7086         (default_fileio_target): Use regular delegation.
7087         (target_ops::fileio_open, target_ops::fileio_pwrite)
7088         (target_ops::fileio_pread, target_ops::fileio_fstat)
7089         (target_ops::fileio_close, target_ops::fileio_unlink)
7090         (target_ops::fileio_readlink): New.
7091         (target_fileio_open_1, target_fileio_unlink)
7092         (target_fileio_readlink): Always call the target method.  Handle
7093         FILEIO_ENOSYS.
7094         (return_zero, return_zero_has_execution): Delete.
7095         (init_dummy_target): Delete.
7096         (dummy_target::dummy_target, dummy_target::shortname)
7097         (dummy_target::longname, dummy_target::doc)
7098         (debug_target::debug_target, debug_target::shortname)
7099         (debug_target::longname, debug_target::doc): New.
7100         (target_supports_delete_record): Use regular delegation.
7101         (setup_target_debug): Delete.
7102         (maintenance_print_target_stack): Skip debug_stratum.
7103         (initialize_targets): Instantiate the_dummy_target and
7104         the_debug_target.
7105         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7106         use target_stack.
7107         (target_auxv_search, fprint_target_auxv): Adjust.
7108         (info_auxv_command): Adjust to use target_stack.
7109         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7110         * exceptions.c (print_flush): Handle a NULL target_stack.
7111         * regcache.c (target_ops_no_register): Refactor as class with
7112         virtual methods.
7113
7114         * exec.c (exec_target): New class.
7115         (exec_ops): Now an exec_target.
7116         (exec_open, exec_close_1, exec_get_section_table)
7117         (exec_xfer_partial, exec_files_info, exec_has_memory)
7118         (exec_make_note_section): Refactor as exec_target methods.
7119         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7120         Delete.
7121         (exec_target::find_memory_regions): New.
7122         (_initialize_exec): Don't call init_exec_ops.
7123         * gdbcore.h (exec_file_clear): Delete.
7124
7125         * corefile.c (core_target): Delete.
7126         (core_file_command): Adjust.
7127         * corelow.c (core_target): New class.
7128         (the_core_target): New.
7129         (core_close): Remove target_ops parameter.
7130         (core_close_cleanup): Adjust.
7131         (core_target::close): New.
7132         (core_open, core_detach, get_core_registers, core_files_info)
7133         (core_xfer_partial, core_thread_alive, core_read_description)
7134         (core_pid_to_str, core_thread_name, core_has_memory)
7135         (core_has_stack, core_has_registers, core_info_proc): Rework as
7136         core_target methods.
7137         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7138         (_initialize_corelow): Initialize the_core_target.
7139         * gdbcore.h (core_target): Delete.
7140         (the_core_target): New.
7141
7142         * ctf.c: (ctf_target): New class.
7143         (ctf_ops): Now a ctf_target.
7144         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7145         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7146         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7147         methods.
7148         (init_ctf_ops): Delete.
7149         (_initialize_ctf): Don't call it.
7150         * tracefile-tfile.c (tfile_target): New class.
7151         (tfile_ops): Now a tfile_target.
7152         (tfile_open, tfile_close, tfile_files_info)
7153         (tfile_get_tracepoint_status, tfile_trace_find)
7154         (tfile_fetch_registers, tfile_xfer_partial)
7155         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7156         Refactor as tfile_target methods.
7157         (tfile_xfer_partial_features): Remove target_ops parameter.
7158         (init_tfile_ops): Delete.
7159         (_initialize_tracefile_tfile): Don't call it.
7160         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7161         (tracefile_has_stack, tracefile_has_registers)
7162         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7163         tracefile_target methods.
7164         (init_tracefile_ops): Delete.
7165         (tracefile_target::tracefile_target): New.
7166         * tracefile.h: Include "target.h".
7167         (tracefile_target): New class.
7168         (init_tracefile_ops): Delete.
7169
7170         * spu-multiarch.c (spu_multiarch_target): New class.
7171         (spu_ops): Now a spu_multiarch_target.
7172         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7173         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7174         (spu_search_memory, spu_mourn_inferior): Refactor as
7175         spu_multiarch_target methods.
7176         (init_spu_ops): Delete.
7177         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7178         complete_target_initialization.
7179
7180         * ravenscar-thread.c (ravenscar_thread_target): New class.
7181         (ravenscar_ops): Now a ravenscar_thread_target.
7182         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7183         (ravenscar_thread_alive, ravenscar_pid_to_str)
7184         (ravenscar_fetch_registers, ravenscar_store_registers)
7185         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7186         (ravenscar_stopped_by_hw_breakpoint)
7187         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7188         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7189         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7190         methods.
7191         (init_ravenscar_thread_ops): Delete.
7192         (_initialize_ravenscar): Remove references to
7193         init_ravenscar_thread_ops and complete_target_initialization.
7194
7195         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7196         (bsd_uthread_target): New class.
7197         (bsd_uthread_ops): Now a bsd_uthread_target.
7198         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7199         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7200         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7201         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7202         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7203         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7204         (bsd_uthread_target): Delete function.
7205         (_initialize_bsd_uthread): Remove reference to
7206         complete_target_initialization.
7207
7208         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7209         (target_bfd): ... this new class.
7210         (target_bfd_xfer_partial, target_bfd_get_section_table)
7211         (target_bfd_close): Refactor as target_bfd methods.
7212         (target_bfd::~target_bfd): New.
7213         (target_bfd_reopen): Adjust.
7214         (target_bfd::close): New.
7215
7216         * record-btrace.c (record_btrace_target): New class.
7217         (record_btrace_ops): Now a record_btrace_target.
7218         (record_btrace_open, record_btrace_stop_recording)
7219         (record_btrace_disconnect, record_btrace_close)
7220         (record_btrace_async, record_btrace_info)
7221         (record_btrace_insn_history, record_btrace_insn_history_range)
7222         (record_btrace_insn_history_from, record_btrace_call_history)
7223         (record_btrace_call_history_range)
7224         (record_btrace_call_history_from, record_btrace_record_method)
7225         (record_btrace_is_replaying, record_btrace_will_replay)
7226         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7227         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7228         (record_btrace_store_registers, record_btrace_prepare_to_store)
7229         (record_btrace_to_get_unwinder)
7230         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7231         (record_btrace_commit_resume, record_btrace_wait)
7232         (record_btrace_stop, record_btrace_can_execute_reverse)
7233         (record_btrace_stopped_by_sw_breakpoint)
7234         (record_btrace_supports_stopped_by_sw_breakpoint)
7235         (record_btrace_stopped_by_hw_breakpoint)
7236         (record_btrace_supports_stopped_by_hw_breakpoint)
7237         (record_btrace_update_thread_list, record_btrace_thread_alive)
7238         (record_btrace_goto_begin, record_btrace_goto_end)
7239         (record_btrace_goto, record_btrace_stop_replaying_all)
7240         (record_btrace_execution_direction)
7241         (record_btrace_prepare_to_generate_core)
7242         (record_btrace_done_generating_core): Refactor as
7243         record_btrace_target methods.
7244         (init_record_btrace_ops): Delete.
7245         (_initialize_record_btrace): Remove reference to
7246         init_record_btrace_ops.
7247         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7248         the execution_direction global.
7249         (record_full_base_target, record_full_target)
7250         (record_full_core_target): New classes.
7251         (record_full_ops): Now a record_full_target.
7252         (record_full_core_ops): Now a record_full_core_target.
7253         (record_full_target::detach, record_full_target::disconnect)
7254         (record_full_core_target::disconnect)
7255         (record_full_target::mourn_inferior, record_full_target::kill):
7256         New.
7257         (record_full_open, record_full_close, record_full_async): Refactor
7258         as methods of the record_full_base_target class.
7259         (record_full_resume, record_full_commit_resume): Refactor
7260         as methods of the record_full_target class.
7261         (record_full_wait, record_full_stopped_by_watchpoint)
7262         (record_full_stopped_data_address)
7263         (record_full_stopped_by_sw_breakpoint)
7264         (record_full_supports_stopped_by_sw_breakpoint)
7265         (record_full_stopped_by_hw_breakpoint)
7266         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7267         methods of the record_full_base_target class.
7268         (record_full_store_registers, record_full_xfer_partial)
7269         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7270         Refactor as methods of the record_full_target class.
7271         (record_full_can_execute_reverse, record_full_get_bookmark)
7272         (record_full_goto_bookmark, record_full_execution_direction)
7273         (record_full_record_method, record_full_info, record_full_delete)
7274         (record_full_is_replaying, record_full_will_replay)
7275         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7276         (record_full_stop_replaying): Refactor as methods of the
7277         record_full_base_target class.
7278         (record_full_core_resume, record_full_core_kill)
7279         (record_full_core_fetch_registers)
7280         (record_full_core_prepare_to_store)
7281         (record_full_core_store_registers, record_full_core_xfer_partial)
7282         (record_full_core_insert_breakpoint)
7283         (record_full_core_remove_breakpoint)
7284         (record_full_core_has_execution): Refactor
7285         as methods of the record_full_core_target class.
7286         (record_full_base_target::supports_delete_record): New.
7287         (init_record_full_ops): Delete.
7288         (init_record_full_core_ops): Delete.
7289         (record_full_save): Refactor as method of the
7290         record_full_base_target class.
7291         (_initialize_record_full): Remove references to
7292         init_record_full_ops and init_record_full_core_ops.
7293
7294         * remote.c (remote_target, extended_remote_target): New classes.
7295         (remote_ops): Now a remote_target.
7296         (extended_remote_ops): Now an extended_remote_target.
7297         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7298         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7299         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7300         (remote_pass_signals, remote_set_syscall_catchpoint)
7301         (remote_program_signals, )
7302         (remote_thread_always_alive): Remove target_ops parameter.
7303         (remote_thread_alive, remote_thread_name)
7304         (remote_update_thread_list, remote_threads_extra_info)
7305         (remote_static_tracepoint_marker_at)
7306         (remote_static_tracepoint_markers_by_strid)
7307         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7308         (remote_open): Refactor as methods of remote_target.
7309         (extended_remote_open, extended_remote_detach)
7310         (extended_remote_attach, extended_remote_post_attach):
7311         (extended_remote_supports_disable_randomization)
7312         (extended_remote_create_inferior): : Refactor as method of
7313         extended_remote_target.
7314         (remote_set_permissions, remote_open_1, remote_detach)
7315         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7316         (remote_resume, remote_commit_resume, remote_stop)
7317         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7318         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7319         (remote_prepare_to_store, remote_store_registers)
7320         (remote_flash_erase, remote_flash_done, remote_files_info)
7321         (remote_kill, remote_mourn, remote_insert_breakpoint)
7322         (remote_remove_breakpoint, remote_insert_watchpoint)
7323         (remote_watchpoint_addr_within_range)
7324         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7325         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7326         (remote_supports_stopped_by_sw_breakpoint)
7327         (remote_stopped_by_hw_breakpoint)
7328         (remote_supports_stopped_by_hw_breakpoint)
7329         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7330         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7331         (remote_verify_memory): Refactor as methods of remote_target.
7332         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7333         parameter.
7334         (remote_xfer_partial, remote_get_memory_xfer_limit)
7335         (remote_search_memory, remote_rcmd, remote_memory_map)
7336         (remote_pid_to_str, remote_get_thread_local_address)
7337         (remote_get_tib_address, remote_read_description): Refactor as
7338         methods of remote_target.
7339         (remote_target::fileio_open, remote_target::fileio_pwrite)
7340         (remote_target::fileio_pread, remote_target::fileio_close): New.
7341         (remote_hostio_readlink, remote_hostio_fstat)
7342         (remote_filesystem_is_local, remote_can_execute_reverse)
7343         (remote_supports_non_stop, remote_supports_disable_randomization)
7344         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7345         (remote_supports_enable_disable_tracepoint)
7346         (remote_supports_string_tracing)
7347         (remote_can_run_breakpoint_commands, remote_trace_init)
7348         (remote_download_tracepoint, remote_can_download_tracepoint)
7349         (remote_download_trace_state_variable, remote_enable_tracepoint)
7350         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7351         (remote_trace_start, remote_get_trace_status)
7352         (remote_get_tracepoint_status, remote_trace_stop)
7353         (remote_trace_find, remote_get_trace_state_variable_value)
7354         (remote_save_trace_data, remote_get_raw_trace_data)
7355         (remote_set_disconnected_tracing, remote_core_of_thread)
7356         (remote_set_circular_trace_buffer, remote_traceframe_info)
7357         (remote_get_min_fast_tracepoint_insn_len)
7358         (remote_set_trace_buffer_size, remote_set_trace_notes)
7359         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7360         (remote_disable_btrace, remote_teardown_btrace)
7361         (remote_read_btrace, remote_btrace_conf)
7362         (remote_augmented_libraries_svr4_read, remote_load)
7363         (remote_pid_to_exec_file, remote_can_do_single_step)
7364         (remote_execution_direction, remote_thread_handle_to_thread_info):
7365         Refactor as methods of remote_target.
7366         (init_remote_ops, init_extended_remote_ops): Delete.
7367         (remote_can_async_p, remote_is_async_p, remote_async)
7368         (remote_thread_events, remote_upload_tracepoints)
7369         (remote_upload_trace_state_variables): Refactor as methods of
7370         remote_target.
7371         (_initialize_remote): Remove references to init_remote_ops and
7372         init_extended_remote_ops.
7373
7374         * remote-sim.c (gdbsim_target): New class.
7375         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7376         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7377         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7378         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7379         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7380         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7381         Refactor as methods of gdbsim_target.
7382         (gdbsim_ops): Now a gdbsim_target.
7383         (init_gdbsim_ops): Delete.
7384         (gdbsim_cntrl_c): Adjust.
7385         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7386
7387         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7388         (the_amd64_linux_nat_target): New.
7389         (amd64_linux_fetch_inferior_registers)
7390         (amd64_linux_store_inferior_registers): Refactor as methods of
7391         amd64_linux_nat_target.
7392         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7393         * i386-linux-nat.c: Don't include "linux-nat.h".
7394         (i386_linux_nat_target): New class.
7395         (the_i386_linux_nat_target): New.
7396         (i386_linux_fetch_inferior_registers)
7397         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7398         as methods of i386_linux_nat_target.
7399         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7400         * inf-child.c (inf_child_ops): Delete.
7401         (inf_child_fetch_inferior_registers)
7402         (inf_child_store_inferior_registers): Delete.
7403         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7404         methods of inf_child_target.
7405         (inf_child_target::supports_terminal_ours)
7406         (inf_child_target::terminal_init)
7407         (inf_child_target::terminal_inferior)
7408         (inf_child_target::terminal_ours_for_output)
7409         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7410         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7411         New.
7412         (inf_child_open, inf_child_disconnect, inf_child_close)
7413         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7414         (inf_child_post_startup_inferior, inf_child_can_run)
7415         (inf_child_pid_to_exec_file): Refactor as methods of
7416         inf_child_target.
7417         (inf_child_follow_fork): Delete.
7418         (inf_child_target::can_create_inferior)
7419         (inf_child_target::can_attach): New.
7420         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7421         (inf_child_target::has_stack, inf_child_target::has_registers)
7422         (inf_child_target::has_execution): New.
7423         (inf_child_fileio_open, inf_child_fileio_pwrite)
7424         (inf_child_fileio_pread, inf_child_fileio_fstat)
7425         (inf_child_fileio_close, inf_child_fileio_unlink)
7426         (inf_child_fileio_readlink, inf_child_use_agent)
7427         (inf_child_can_use_agent): Refactor as methods of
7428         inf_child_target.
7429         (return_zero, inf_child_target): Delete.
7430         (inf_child_target::inf_child_target): New.
7431         * inf-child.h: Include "target.h".
7432         (inf_child_target): Delete function prototype.
7433         (inf_child_target): New class.
7434         (inf_child_open_target, inf_child_mourn_inferior)
7435         (inf_child_maybe_unpush_target): Delete.
7436         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7437         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7438         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7439         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7440         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7441         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7442         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7443         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7444         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7445         methods of inf_ptrace_target.
7446         (inf_ptrace_target): Delete function.
7447         * inf-ptrace.h: Include "inf-child.h".
7448         (inf_ptrace_target): Delete function declaration.
7449         (inf_ptrace_target): New class.
7450         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7451         * linux-nat.c (linux_target): New.
7452         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7453         (linux_nat_target::~linux_nat_target): New.
7454         (linux_child_post_attach, linux_child_post_startup_inferior)
7455         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7456         (linux_child_remove_fork_catchpoint)
7457         (linux_child_insert_vfork_catchpoint)
7458         (linux_child_remove_vfork_catchpoint)
7459         (linux_child_insert_exec_catchpoint)
7460         (linux_child_remove_exec_catchpoint)
7461         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7462         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7463         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7464         (linux_nat_stopped_data_address)
7465         (linux_nat_stopped_by_sw_breakpoint)
7466         (linux_nat_supports_stopped_by_sw_breakpoint)
7467         (linux_nat_stopped_by_hw_breakpoint)
7468         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7469         (linux_nat_kill, linux_nat_mourn_inferior)
7470         (linux_nat_xfer_partial, linux_nat_thread_alive)
7471         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7472         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7473         (linux_child_static_tracepoint_markers_by_strid)
7474         (linux_nat_is_async_p, linux_nat_can_async_p)
7475         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7476         (linux_nat_supports_multi_process)
7477         (linux_nat_supports_disable_randomization, linux_nat_async)
7478         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7479         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7480         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7481         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7482         methods of linux_nat_target.
7483         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7484         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7485         parameter.
7486         (check_stopped_by_watchpoint): Adjust.
7487         (linux_xfer_partial): Delete.
7488         (linux_target_install_ops, linux_target, linux_nat_add_target):
7489         Delete.
7490         (linux_nat_target::linux_nat_target): New.
7491         * linux-nat.h: Include "inf-ptrace.h".
7492         (linux_nat_target): New.
7493         (linux_target, linux_target_install_ops, linux_nat_add_target):
7494         Delete function declarations.
7495         (linux_target): Declare global.
7496         * linux-thread-db.c (thread_db_target): New.
7497         (thread_db_target::thread_db_target): New.
7498         (thread_db_ops): Delete.
7499         (the_thread_db_target): New.
7500         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7501         (thread_db_update_thread_list, thread_db_pid_to_str)
7502         (thread_db_extra_thread_info)
7503         (thread_db_thread_handle_to_thread_info)
7504         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7505         (thread_db_resume): Refactor as methods of thread_db_target.
7506         (init_thread_db_ops): Delete.
7507         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7508         * x86-linux-nat.c: Don't include "linux-nat.h".
7509         (super_post_startup_inferior): Delete.
7510         (x86_linux_nat_target::~x86_linux_nat_target): New.
7511         (x86_linux_child_post_startup_inferior)
7512         (x86_linux_read_description, x86_linux_enable_btrace)
7513         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7514         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7515         methods of x86_linux_nat_target.
7516         (x86_linux_create_target): Delete.  Bits folded ...
7517         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7518         pointer.
7519         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7520         (x86_linux_nat_target): New class.
7521         (x86_linux_create_target): Delete.
7522         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7523         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7524         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7525         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7526         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7527         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7528         make extern.
7529         (x86_use_watchpoints): Delete.
7530         * x86-nat.h: Include "breakpoint.h" and "target.h".
7531         (x86_use_watchpoints): Delete.
7532         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7533         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7534         (x86_insert_watchpoint, x86_remove_watchpoint)
7535         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7536         (x86_stopped_by_hw_breakpoint): New declarations.
7537         (x86_nat_target): New template class.
7538
7539         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7540         (the_ppc_linux_nat_target): New.
7541         (ppc_linux_fetch_inferior_registers)
7542         (ppc_linux_can_use_hw_breakpoint)
7543         (ppc_linux_region_ok_for_hw_watchpoint)
7544         (ppc_linux_ranged_break_num_registers)
7545         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7546         (ppc_linux_insert_mask_watchpoint)
7547         (ppc_linux_remove_mask_watchpoint)
7548         (ppc_linux_can_accel_watchpoint_condition)
7549         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7550         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7551         (ppc_linux_watchpoint_addr_within_range)
7552         (ppc_linux_masked_watch_num_registers)
7553         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7554         (ppc_linux_read_description): Refactor as methods of
7555         ppc_linux_nat_target.
7556         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7557
7558         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7559         (procfs_target): New class.
7560         (the_procfs_target): New.
7561         (procfs_target): Delete function.
7562         (procfs_auxv_parse, procfs_attach, procfs_detach)
7563         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7564         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7565         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7566         (procfs_create_inferior, procfs_update_thread_list)
7567         (procfs_thread_alive, procfs_pid_to_str)
7568         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7569         (procfs_stopped_data_address, procfs_insert_watchpoint)
7570         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7571         (proc_find_memory_regions, procfs_info_proc)
7572         (procfs_make_note_section): Refactor as methods of procfs_target.
7573         (_initialize_procfs): Adjust.
7574         * sol-thread.c (sol_thread_target): New class.
7575         (sol_thread_ops): Now a sol_thread_target.
7576         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7577         (sol_thread_fetch_registers, sol_thread_store_registers)
7578         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7579         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7580         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7581         (init_sol_thread_ops): Delete.
7582         (_initialize_sol_thread): Adjust.  Remove references to
7583         init_sol_thread_ops and complete_target_initialization.
7584
7585         * windows-nat.c (windows_nat_target): New class.
7586         (windows_fetch_inferior_registers)
7587         (windows_store_inferior_registers, windows_resume, windows_wait)
7588         (windows_attach, windows_detach, windows_pid_to_exec_file)
7589         (windows_files_info, windows_create_inferior)
7590         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7591         (windows_close, windows_pid_to_str, windows_xfer_partial)
7592         (windows_get_tib_address, windows_get_ada_task_ptid)
7593         (windows_thread_name, windows_thread_alive): Refactor as
7594         windows_nat_target methods.
7595         (do_initial_windows_stuff): Adjust.
7596         (windows_target): Delete function.
7597         (_initialize_windows_nat): Adjust.
7598
7599         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7600         (darwin_mourn_inferior, darwin_kill_inferior)
7601         (darwin_create_inferior, darwin_attach, darwin_detach)
7602         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7603         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7604         (darwin_supports_multi_process): Refactor as darwin_nat_target
7605         methods.
7606         (darwin_resume_to, darwin_files_info): Delete.
7607         (_initialize_darwin_inferior): Rename to ...
7608         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7609         * darwin-nat.h: Include "inf-child.h".
7610         (darwin_nat_target): New class.
7611         (darwin_complete_target): Delete.
7612         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7613         (darwin_target): New.
7614         (i386_darwin_fetch_inferior_registers)
7615         (i386_darwin_store_inferior_registers): Refactor as methods of
7616         darwin_nat_target.
7617         (darwin_complete_target): Delete, with ...
7618         (_initialize_i386_darwin_nat): ... bits factored out here.
7619
7620         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7621         (the_alpha_linux_nat_target): New.
7622         (alpha_linux_register_u_offset): Refactor as
7623         alpha_linux_nat_target method.
7624         (_initialize_alpha_linux_nat): Adjust.
7625         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7626         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7627         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7628         methods of linux_nat_trad_target.
7629         (linux_trad_target): Delete.
7630         * linux-nat-trad.h (linux_trad_target): Delete function.
7631         (linux_nat_trad_target): New class.
7632         * mips-linux-nat.c (mips_linux_nat_target): New class.
7633         (super_fetch_registers, super_store_registers, super_close):
7634         Delete.
7635         (the_mips_linux_nat_target): New.
7636         (mips64_linux_regsets_fetch_registers)
7637         (mips64_linux_regsets_store_registers)
7638         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7639         (mips_linux_register_u_offset, mips_linux_read_description)
7640         (mips_linux_can_use_hw_breakpoint)
7641         (mips_linux_stopped_by_watchpoint)
7642         (mips_linux_stopped_data_address)
7643         (mips_linux_region_ok_for_hw_watchpoint)
7644         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7645         (mips_linux_close): Refactor as methods of mips_linux_nat.
7646         (_initialize_mips_linux_nat): Adjust to C++ification.
7647
7648         * aix-thread.c (aix_thread_target): New class.
7649         (aix_thread_ops): Now an aix_thread_target.
7650         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7651         (aix_thread_fetch_registers, aix_thread_store_registers)
7652         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7653         (aix_thread_thread_alive, aix_thread_pid_to_str)
7654         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7655         Refactor as methods of aix_thread_target.
7656         (init_aix_thread_ops): Delete.
7657         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7658         and complete_target_initialization.
7659         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7660         (rs6000_nat_target): New class.
7661         (the_rs6000_nat_target): New.
7662         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7663         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7664         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7665         (super_create_inferior): Delete.
7666         (_initialize_rs6000_nat): Adjust to C++ification.
7667
7668         * arm-linux-nat.c (arm_linux_nat_target): New class.
7669         (the_arm_linux_nat_target): New.
7670         (arm_linux_fetch_inferior_registers)
7671         (arm_linux_store_inferior_registers, arm_linux_read_description)
7672         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7673         (arm_linux_remove_hw_breakpoint)
7674         (arm_linux_region_ok_for_hw_watchpoint)
7675         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7676         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7677         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7678         arm_linux_nat_target.
7679         (_initialize_arm_linux_nat): Adjust to C++ification.
7680
7681         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7682         (the_aarch64_linux_nat_target): New.
7683         (aarch64_linux_fetch_inferior_registers)
7684         (aarch64_linux_store_inferior_registers)
7685         (aarch64_linux_child_post_startup_inferior)
7686         (aarch64_linux_read_description)
7687         (aarch64_linux_can_use_hw_breakpoint)
7688         (aarch64_linux_insert_hw_breakpoint)
7689         (aarch64_linux_remove_hw_breakpoint)
7690         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7691         (aarch64_linux_region_ok_for_hw_watchpoint)
7692         (aarch64_linux_stopped_data_address)
7693         (aarch64_linux_stopped_by_watchpoint)
7694         (aarch64_linux_watchpoint_addr_within_range)
7695         (aarch64_linux_can_do_single_step): Refactor as methods of
7696         aarch64_linux_nat_target.
7697         (super_post_startup_inferior): Delete.
7698         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7699
7700         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7701         (the_hppa_linux_nat_target): New.
7702         (hppa_linux_fetch_inferior_registers)
7703         (hppa_linux_store_inferior_registers): Refactor as methods of
7704         hppa_linux_nat_target.
7705         (_initialize_hppa_linux_nat): Adjust to C++ification.
7706
7707         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7708         (the_ia64_linux_nat_target): New.
7709         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7710         (ia64_linux_stopped_data_address)
7711         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7712         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7713         ia64_linux_nat_target methods.
7714         (super_xfer_partial): Delete.
7715         (_initialize_ia64_linux_nat): Adjust to C++ification.
7716
7717         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7718         (the_m32r_linux_nat_target): New.
7719         (m32r_linux_fetch_inferior_registers)
7720         (m32r_linux_store_inferior_registers): Refactor as
7721         m32r_linux_nat_target methods.
7722         (_initialize_m32r_linux_nat): Adjust to C++ification.
7723
7724         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7725         (the_m68k_linux_nat_target): New.
7726         (m68k_linux_fetch_inferior_registers)
7727         (m68k_linux_store_inferior_registers): Refactor as
7728         m68k_linux_nat_target methods.
7729         (_initialize_m68k_linux_nat): Adjust to C++ification.
7730
7731         * s390-linux-nat.c (s390_linux_nat_target): New class.
7732         (the_s390_linux_nat_target): New.
7733         (s390_linux_fetch_inferior_registers)
7734         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7735         (s390_insert_watchpoint, s390_remove_watchpoint)
7736         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7737         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7738         (s390_auxv_parse, s390_read_description): Refactor as methods of
7739         s390_linux_nat_target.
7740         (_initialize_s390_nat): Adjust to C++ification.
7741
7742         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7743         (the_sparc_linux_nat_target): New.
7744         (_initialize_sparc_linux_nat): Adjust to C++ification.
7745         * sparc-nat.c (sparc_fetch_inferior_registers)
7746         (sparc_store_inferior_registers): Remove target_ops parameter.
7747         * sparc-nat.h (sparc_fetch_inferior_registers)
7748         (sparc_store_inferior_registers): Remove target_ops parameter.
7749         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7750         (the_sparc64_linux_nat_target): New.
7751         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7752
7753         * spu-linux-nat.c (spu_linux_nat_target): New class.
7754         (the_spu_linux_nat_target): New.
7755         (spu_child_post_startup_inferior, spu_child_post_attach)
7756         (spu_child_wait, spu_fetch_inferior_registers)
7757         (spu_store_inferior_registers, spu_xfer_partial)
7758         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7759         methods.
7760         (_initialize_spu_nat): Adjust to C++ification.
7761
7762         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7763         (the_tilegx_linux_nat_target): New.
7764         (fetch_inferior_registers, store_inferior_registers):
7765         Refactor as methods.
7766         (_initialize_tile_linux_nat): Adjust to C++ification.
7767
7768         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7769         (the_xtensa_linux_nat_target): New.
7770         (xtensa_linux_fetch_inferior_registers)
7771         (xtensa_linux_store_inferior_registers): Refactor as
7772         xtensa_linux_nat_target methods.
7773         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7774
7775         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7776         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7777         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7778         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7779         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7780         (fbsd_stopped_by_sw_breakpoint)
7781         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7782         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7783         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7784         (fbsd_post_startup_inferior, fbsd_post_attach)
7785         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7786         (fbsd_set_syscall_catchpoint)
7787         (super_xfer_partial, super_resume, super_wait)
7788         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7789         (fbsd_handle_debug_trap): Remove target_ops parameter.
7790         (fbsd_nat_add_target): Delete.
7791         * fbsd-nat.h: Include "inf-ptrace.h".
7792         (fbsd_nat_add_target): Delete.
7793         (USE_SIGTRAP_SIGINFO): Define.
7794         (fbsd_nat_target): New class.
7795
7796         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7797         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7798         (amd64bsd_target): Delete.
7799         * amd64-bsd-nat.h: New file.
7800         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7801         "x86-bsd-nat.h".
7802         (amd64_fbsd_nat_target): New class.
7803         (the_amd64_fbsd_nat_target): New.
7804         (amd64fbsd_read_description): Refactor as method of
7805         amd64_fbsd_nat_target.
7806         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7807         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7808         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7809         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7810         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7811         (i386bsd_target): Delete.
7812         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7813         (i386bsd_fetch_inferior_registers)
7814         (i386bsd_store_inferior_registers): Declare.
7815         (i386_bsd_nat_target): New class.
7816         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7817         (the_i386_fbsd_nat_target): New.
7818         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7819         i386_fbsd_nat_target methods.
7820         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7821         (_initialize_i386fbsd_nat): Adjust to C++ification.
7822         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7823         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7824         (_initialize_x86_bsd_nat): Adjust to C++ification.
7825         * x86-bsd-nat.h: Include "x86-nat.h".
7826         (x86bsd_target): Delete declaration.
7827         (x86bsd_nat_target): New class.
7828
7829         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7830         (the_aarch64_fbsd_nat_target): New.
7831         (aarch64_fbsd_fetch_inferior_registers)
7832         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7833         aarch64_fbsd_nat_target.
7834         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7835         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7836         (the_alpha_bsd_nat_target): New.
7837         (alphabsd_fetch_inferior_registers)
7838         (alphabsd_store_inferior_registers): Refactor as
7839         alpha_bsd_nat_target methods.
7840         (_initialize_alphabsd_nat): Refactor as methods of
7841         alpha_bsd_nat_target.
7842         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7843         (the_amd64_nbsd_nat_target): New.
7844         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7845         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7846         (the_amd64_obsd_nat_target): New.
7847         (_initialize_amd64obsd_nat): Adjust to C++ification.
7848         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7849         (the_arm_fbsd_nat_target): New.
7850         (arm_fbsd_fetch_inferior_registers)
7851         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7852         (_initialize_arm_fbsd_nat): Refactor as methods of
7853         arm_fbsd_nat_target.
7854         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7855         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7856         (the_arm_netbsd_nat_target): New.
7857         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7858         arm_netbsd_nat_target.
7859         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7860         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7861         (the_hppa_nbsd_nat_target): New.
7862         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7863         hppa_nbsd_nat_target methods.
7864         (_initialize_hppanbsd_nat): Adjust to C++ification.
7865         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7866         (the_hppa_obsd_nat_target): New.
7867         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7868         methods of hppa_obsd_nat_target.
7869         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7870         add_target.
7871         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7872         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7873         add_target.
7874         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7875         (_initialize_i386obsd_nat): Use add_target.
7876         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7877         (the_m68k_bsd_nat_target): New.
7878         (m68kbsd_fetch_inferior_registers)
7879         (m68kbsd_store_inferior_registers): Refactor as methods of
7880         m68k_bsd_nat_target.
7881         (_initialize_m68kbsd_nat): Adjust to C++ification.
7882         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7883         (the_mips_fbsd_nat_target): New.
7884         (mips_fbsd_fetch_inferior_registers)
7885         (mips_fbsd_store_inferior_registers): Refactor as methods of
7886         mips_fbsd_nat_target.
7887         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7888         add_target.
7889         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7890         (the_mips_nbsd_nat_target): New.
7891         (mipsnbsd_fetch_inferior_registers)
7892         (mipsnbsd_store_inferior_registers): Refactor as methods of
7893         mips_nbsd_nat_target.
7894         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7895         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7896         (the_mips64_obsd_nat_target): New.
7897         (mips64obsd_fetch_inferior_registers)
7898         (mips64obsd_store_inferior_registers): Refactor as methods of
7899         mips64_obsd_nat_target.
7900         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7901         add_target.
7902         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7903         nbsd_nat_target.
7904         * nbsd-nat.h: Include "inf-ptrace.h".
7905         (nbsd_nat_target): New class.
7906         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7907         (obsd_wait): Refactor as methods of obsd_nat_target.
7908         (obsd_add_target): Delete.
7909         * obsd-nat.h: Include "inf-ptrace.h".
7910         (obsd_nat_target): New class.
7911         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7912         (the_ppc_fbsd_nat_target): New.
7913         (ppcfbsd_fetch_inferior_registers)
7914         (ppcfbsd_store_inferior_registers): Refactor as methods of
7915         ppc_fbsd_nat_target.
7916         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7917         add_target.
7918         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7919         (the_ppc_nbsd_nat_target): New.
7920         (ppcnbsd_fetch_inferior_registers)
7921         (ppcnbsd_store_inferior_registers): Refactor as methods of
7922         ppc_nbsd_nat_target.
7923         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7924         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7925         (the_ppc_obsd_nat_target): New.
7926         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7927         methods of ppc_obsd_nat_target.
7928         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7929         add_target.
7930         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7931         (the_sh_nbsd_nat_target): New.
7932         (shnbsd_fetch_inferior_registers)
7933         (shnbsd_store_inferior_registers): Refactor as methods of
7934         sh_nbsd_nat_target.
7935         (_initialize_shnbsd_nat): Adjust to C++ification.
7936         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7937         (inf_ptrace_xfer_partial): Delete.
7938         (sparc_xfer_partial, sparc_target): Delete.
7939         * sparc-nat.h (sparc_fetch_inferior_registers)
7940         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7941         (sparc_target): Delete function declaration.
7942         (sparc_target): New template class.
7943         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7944         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7945         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7946         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7947         add_target.
7948         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7949         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7950         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7951         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7952         add_target.
7953         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7954         (the_vax_bsd_nat_target): New.
7955         (vaxbsd_fetch_inferior_registers)
7956         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7957         methods.
7958         (_initialize_vaxbsd_nat): Adjust to C++ification.
7959
7960         * bsd-kvm.c (bsd_kvm_target): New class.
7961         (bsd_kvm_ops): Now a bsd_kvm_target.
7962         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7963         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7964         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7965         bsd_kvm_target.
7966         (bsd_kvm_return_one): Delete.
7967         (bsd_kvm_add_target): Adjust to C++ification.
7968
7969         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7970         (nto_procfs_target_procfs): New classes.
7971         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7972         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7973         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7974         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7975         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7976         (procfs_remove_hw_breakpoint, procfs_resume)
7977         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7978         (procfs_kill_inferior, procfs_store_registers)
7979         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7980         as methods of nto_procfs_target.
7981         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7982         (nto_native_ops): Delete.
7983         (procfs_open, procfs_native_open): Delete.
7984         (nto_native_ops): Now an nto_procfs_target_native.
7985         (init_procfs_targets): Adjust to C++ification.
7986         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7987         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7988         Refactor as methods of nto_procfs_target.
7989
7990         * go32-nat.c (go32_nat_target): New class.
7991         (the_go32_nat_target): New.
7992         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7993         (go32_store_registers, go32_xfer_partial, go32_files_info)
7994         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7995         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7996         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7997         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7998         (go32_target): Delete.
7999         (_initialize_go32_nat): Adjust to C++ification.
8000
8001         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8002         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8003         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8004         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8005         gnu_nat_target.
8006         (gnu_target): Delete.
8007         * gnu-nat.h (gnu_target): Delete.
8008         (gnu_nat_target): New class.
8009         * i386-gnu-nat.c (gnu_base_target): New.
8010         (i386_gnu_nat_target): New class.
8011         (the_i386_gnu_nat_target): New.
8012         (_initialize_i386gnu_nat): Adjust to C++ification.
8013
8014 2018-05-02  Pedro Alves  <palves@redhat.com>
8015
8016         * bfd-target.c (target_bfd_xclose): Rename to ...
8017         (target_bfd_close): ... this.
8018         (target_bfd_reopen): Adjust.
8019         * target.c (target_close): Remove references to to_xclose.
8020         * target.h (target_ops::to_xclose): Delete.
8021         (target_ops::to_close): Update comments.
8022
8023 2018-05-02  Pedro Alves  <palves@redhat.com>
8024
8025         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8026         "linux-nat.h".
8027         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8028         * inf-ptrace.c (inf_ptrace_register_u_offset)
8029         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8030         (inf_ptrace_store_register, inf_ptrace_store_registers)
8031         (inf_ptrace_trad_target): Move to ...
8032         * linux-nat-trad.c: ... this new file.
8033         * linux-nat-trad.h: New file.
8034         * linux-nat.c (linux_target_install_ops): Make extern.
8035         (linux_trad_target): Delete.
8036         * linux-nat.h (linux_trad_target): Delete declaration.
8037         (linux_target_install_ops): Declare.
8038         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8039         "linux-nat.h".
8040
8041 2018-05-02  Pedro Alves  <palves@redhat.com>
8042
8043         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8044         procfs_target/add_target here.
8045         * procfs.c (procfs_target): Make static.
8046         (_initialize_procfs): Call add_target here.
8047         * procfs.h (struct target_ops): Remove forward declaration.
8048         (procfs_target): Remove declaration.
8049         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8050
8051 2018-05-02  Pedro Alves  <palves@redhat.com>
8052
8053         * procfs.c (procfs_stopped_by_watchpoint)
8054         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8055         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8056         Forward declare.
8057         (procfs_use_watchpoints): Delete, move contents...
8058         (procfs_target): ... here.
8059         * procfs.h (procfs_use_watchpoints): Delete declaration.
8060         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8061         procfs_use_watchpoints.
8062         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8063         procfs_use_watchpoints.
8064
8065 2018-05-02  Tom Tromey  <tom@tromey.com>
8066
8067         PR python/20084:
8068         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8069         and var_zuinteger_unlimited.
8070         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8071         and PARAM_ZUINTEGER_UNLIMITED.
8072         (set_parameter_value): Handle var_zuinteger and
8073         var_zuinteger_unlimited.
8074         (add_setshow_generic): Likewise.
8075         (parmpy_init): Likewise.
8076
8077 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8078
8079         PR rust/23124
8080         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8081         pointer is not null before dereferencing it.
8082
8083 2018-04-30  Tom Tromey  <tom@tromey.com>
8084
8085         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8086         is_mi_like_p.
8087
8088 2018-04-30  Tom Tromey  <tom@tromey.com>
8089
8090         * breakpoint.c (mention): Remove use of is_mi_like_p.
8091         (print_mention_ranged_breakpoint): Likewise.
8092         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8093         of is_mi_like_p.
8094
8095 2018-04-30  Tom Tromey  <tom@tromey.com>
8096
8097         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8098
8099 2018-04-30  Tom Tromey  <tom@tromey.com>
8100
8101         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8102         (info_spu_event_command): Remove some uses of is_mi_like_p.
8103
8104 2018-04-30  Tom Tromey  <tom@tromey.com>
8105
8106         * python/py-framefilter.c (py_print_single_arg)
8107         (enumerate_locals, py_print_args, py_print_frame): Remove some
8108         uses of is_mi_like_p.
8109
8110 2018-04-30  Tom Tromey  <tom@tromey.com>
8111
8112         * ui-out.c: Update.
8113         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8114         * ui-out.h (ui_out::is_mi_like_p): Now const.
8115         (ui_out::do_is_mi_like_p): Now const.
8116         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8117
8118 2018-04-30  Tom Tromey  <tom@tromey.com>
8119
8120         * varobj.c (varobj_set_visualizer): Use new_reference.
8121         * python/python.c (gdbpy_decode_line): Use new_reference.
8122         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8123         new_reference.
8124
8125 2018-04-30  Tom Tromey  <tom@tromey.com>
8126
8127         * varobj.c (install_new_value): Use new_reference.
8128         * value.h (value_incref): Return void.  Swap intro comment with
8129         value_decref.
8130         * value.c (set_value_parent): Use new_reference.
8131         (value_incref): Return void.  Update intro comment.
8132         (release_value): Use new_reference.
8133         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8134
8135 2018-04-30  Tom Tromey  <tom@tromey.com>
8136
8137         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8138         * gdb_bfd.h (new_bfd_ref): Remove.
8139         (gdb_bfd_open): Update comment.
8140         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8141         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8142         (gdb_bfd_fdopenr): Use new_reference.
8143         * exec.c (exec_file_attach): Use new_reference.
8144
8145 2018-04-30  Tom Tromey  <tom@tromey.com>
8146
8147         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8148         method.
8149
8150 2018-04-30  Tom Tromey  <tom@tromey.com>
8151
8152         * jit.c (jit_read_code_entry): Use type_align.
8153         * i386-tdep.c (i386_gdbarch_init): Don't call
8154         set_gdbarch_long_long_align_bit.
8155         * gdbarch.sh: Remove long_long_align_bit.
8156         * gdbarch.c, gdbarch.h: Rebuild.
8157         * arc-tdep.c (arc_type_align): New function.
8158         (arc_gdbarch_init): Use arc_type_align.  Don't call
8159         set_gdbarch_long_long_align_bit.
8160
8161 2018-04-30  Tom Tromey  <tom@tromey.com>
8162
8163         * rust-lang.c (rust_type_alignment): Remove.
8164         (rust_composite_type): Use type_align.
8165
8166 2018-04-30  Tom Tromey  <tom@tromey.com>
8167
8168         * NEWS: Mention Type.align.
8169         * python/py-type.c (typy_get_alignof): New function.
8170         (type_object_getset): Add "alignof".
8171
8172 2018-04-30  Tom Tromey  <tom@tromey.com>
8173
8174         PR exp/17095:
8175         * NEWS: Update.
8176         * std-operator.def (UNOP_ALIGNOF): New operator.
8177         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8178         New.
8179         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8180         * c-lang.c (c_op_print_tab): Add alignof.
8181         * c-exp.y (ALIGNOF): New token.
8182         (exp): Add "ALIGNOF" production.
8183         (ident_tokens): Add _Alignof and alignof.
8184
8185 2018-04-30  Tom Tromey  <tom@tromey.com>
8186
8187         * i386-tdep.c (i386_type_align): New function.
8188         (i386_gdbarch_init): Update.
8189         * gdbarch.sh (type_align): New method.
8190         * gdbarch.c, gdbarch.h: Rebuild.
8191         * arch-utils.h (default_type_align): Declare.
8192         * arch-utils.c (default_type_align): New function.
8193         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8194         (struct type) <align_log2>: New field.
8195         <instance_flags>: Now a bitfield.
8196         (TYPE_RAW_ALIGN): New macro.
8197         (type_align, type_raw_align, set_type_align): Declare.
8198         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8199         functions.
8200         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8201         (get_alignment, maybe_set_alignment): New functions.
8202         (read_structure_type, read_enumeration_type, read_array_type)
8203         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8204         (read_subrange_type, read_base_type): Set type alignment.
8205
8206 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8207
8208         * dwarf2read.c (read_index_from_section): Use bool.
8209
8210 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8211
8212         PR gdb/22950
8213         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8214         with #ifdef.
8215
8216 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8217
8218         PR build/22873
8219         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8220         last step, and do it atomically.
8221
8222 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8223
8224         * compile/compile-c-types.c (convert_int, convert_float):
8225         Update for C FE v1.
8226
8227 2018-04-27  Tom Tromey  <tom@tromey.com>
8228
8229         PR rust/22545:
8230         * rust-lang.c (rust_inclusive_range_type_p): New function.
8231         (rust_range): Handle inclusive ranges.
8232         (rust_compute_range): Likewise.
8233         * rust-exp.y (struct rust_op) <inclusive>: New field.
8234         (DOTDOTEQ): New constant.
8235         (range_expr): Add "..=" productions.
8236         (operator_tokens): Add "..=" token.
8237         (ast_range): Add "inclusive" parameter.
8238         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8239         ranges.
8240         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8241         bounds values.
8242         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8243         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8244         Update comments.
8245         * expprint.c (print_subexp_standard): Handle new bounds values.
8246         (dump_subexp_body_standard): Likewise.
8247
8248 2018-04-27  Tom Tromey  <tom@tromey.com>
8249
8250         * configure: Rebuild.
8251         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8252         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8253         "OVERRIDE".
8254         (class symbol_needs_eval_context): Likewise.
8255         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8256         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8257         "virtual".
8258         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8259         "override".
8260         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8261         * aarch64-tdep.c (instruction_reader::read): Use "override".
8262         (instruction_reader_test::read): Likewise.
8263         * arm-tdep.c (instruction_reader::read): Use "override".
8264         (instruction_reader_thumb::read): Likewise.
8265
8266 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8267
8268         PR remote/9665
8269         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8270         instead of remote_send.
8271         (remote_send): Remove.
8272
8273 2018-04-26  Pedro Alves  <palves@redhat.com>
8274
8275         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8276         find_function_start_sal instead of find_pc_line.
8277
8278 2018-04-26  Pedro Alves  <palves@redhat.com>
8279
8280         * breakpoint.c (set_breakpoint_location_function): Handle
8281         mst_data_gnu_ifunc.
8282         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8283         * elfread.c (elf_symtab_read): Give data symbols with
8284         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8285         (elf_rel_plt_read): Update comment.
8286         * linespec.c (convert_linespec_to_sals): Handle
8287         mst_data_gnu_ifunc.
8288         (minsym_found): Handle mst_data_gnu_ifunc.
8289         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8290         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8291         * parse.c (find_minsym_type_and_address): Handle
8292         mst_data_gnu_ifunc.
8293         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8294         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8295         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8296         comment.
8297         <mst_data_gnu_ifunc>: New enumerator.
8298
8299 2018-04-26  Pedro Alves  <palves@redhat.com>
8300
8301         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8302         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8303         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8304         Handle it.
8305         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8306         (lookup_minimal_symbol_by_pc): Adjust.
8307         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8308         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8309         * minsyms.h (lookup_msym_prefer): New enum.
8310         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8311         parameter by a lookup_msym_prefer parameter.
8312
8313 2018-04-26  Pedro Alves  <palves@redhat.com>
8314
8315         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8316         ends in "@plt" instead of looking at the symbol's section.
8317
8318 2018-04-26  Pedro Alves  <palves@redhat.com>
8319
8320         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8321         all references.
8322         (find_pc_partial_function_gnu_ifunc): Rename to ...
8323         (find_pc_partial_function): ... this, and remove references to
8324         'is_gnu_ifunc_p'.
8325         (find_pc_partial_function): Delete old implementation.
8326         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8327
8328 2018-04-26  Pedro Alves  <palves@redhat.com>
8329
8330         * linespec.c (struct bound_minimal_symbol_search_key): New.
8331         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8332         skip first line if we found a GNU ifunc minimal symbol by name.
8333         (compare_msymbols): Change parameters to work with a destructured
8334         lhs minsym.
8335         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8336         functions.
8337
8338 2018-04-26  Pedro Alves  <palves@redhat.com>
8339
8340         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8341         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8342         address/name.
8343         (add_location_to_breakpoint): Store the minsym and the objfile in
8344         the breakpoint location.
8345         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8346         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8347         Record the minsym in the sal.
8348         * symtab.h (symtab_and_line) <msymbol>: New field.
8349
8350 2018-04-26  Pedro Alves  <palves@redhat.com>
8351
8352         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8353         unless we actually resolved the ifunc.
8354
8355 2018-04-26  Pedro Alves  <palves@redhat.com>
8356
8357         * c-exp.y (variable production): Prefer ifunc minsyms over
8358         regular function symbols.
8359         * symtab.c (find_gnu_ifunc): New function.
8360         * minsyms.h (lookup_msym_prefer): New enum.
8361         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8362         parameter by a lookup_msym_prefer parameter.
8363         * symtab.h (find_gnu_ifunc): New declaration.
8364
8365 2018-04-26  Pedro Alves  <palves@redhat.com>
8366
8367         * blockframe.c (find_gnu_ifunc_target_type): New function.
8368         (find_function_type): New.
8369         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8370         return a value with a memory address.
8371         (eval_call): For calls to GNU ifunc functions, try to find the
8372         type of the target function from the type that the resolver
8373         returns.
8374         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8375         symbols.
8376         * infcall.c (find_function_return_type): Delete.
8377         (find_function_addr): Add 'function_type' parameter.  For calls to
8378         GNU ifunc functions, try to find the type of the target function
8379         from the type that the resolver returns, and return it via
8380         FUNCTION_TYPE.
8381         (call_function_by_hand_dummy): Adjust to use the function type
8382         returned by find_function_addr.
8383         (find_function_addr): Add 'function_type' parameter and move
8384         description here.
8385         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8386         declarations.
8387
8388 2018-04-26  Pedro Alves  <palves@redhat.com>
8389
8390         * c-exp.y (variable production): Skip finding an alias for ifunc
8391         symbols.
8392
8393 2018-04-26  Pedro Alves  <palves@redhat.com>
8394
8395         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8396
8397 2018-04-25  Pedro Alves  <palves@redhat.com>
8398
8399         * infcmd.c (kill_command): Print the pid as string, not the whole
8400         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8401         message.
8402         * remote.c (remote_detach_1): Print the pid as string, not the
8403         whole thread's ptid.
8404
8405 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8406             Sergio Durigan Junior  <sergiodj@redhat.com>
8407             Pedro Alves  <palves@redhat.com>
8408
8409         * infcmd.c (kill_command): Print message when inferior has
8410         been killed.
8411         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8412         '1'.
8413         (add_inferior): Improve message printed when
8414         'print_inferior_events' is on.
8415         (exit_inferior): Remove message printed when
8416         'print_inferior_events' is on.
8417         (detach_inferior): Improve message printed when
8418         'print_inferior_events' is on.
8419         (initialize_inferiors): Use 'add_inferior_silent' to set
8420         'current_inferior_'.
8421         * inferior.h (print_inferior_events): Declare here as
8422         'extern'.
8423         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8424         '[Detaching...]' messages when 'print_inferior_events' is on.
8425         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8426         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8427         'Detaching after fork from child...', replace it by '... from
8428         parent...'.
8429         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8430         prefix/suffix when printing 'Detaching...' messages.  Print
8431         them when 'print_inferior_events' is on.
8432         * remote.c (remote_detach_1): Print message when detaching
8433         from inferior and '!is_fork_parent'.
8434
8435 2018-04-24  Tom Tromey  <tom@tromey.com>
8436
8437         * cli-out.h: Reindent.
8438
8439 2018-04-24  Tom Tromey  <tom@tromey.com>
8440
8441         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8442         (cli_ui_out::do_field_string): Use fputs_filtered.
8443         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8444
8445 2018-04-23  Tom Tromey  <tom@tromey.com>
8446
8447         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8448         gdb::unique_xmalloc_ptr.
8449
8450 2018-04-23  Tom Tromey  <tom@tromey.com>
8451
8452         * configure: Rebuild.
8453
8454 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8455
8456         PR gdb/23095
8457         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8458         prepare_for_testing.  Set normal_bp to r_debug_state if target
8459         is bsd.
8460
8461 2018-04-21  Pedro Alves  <palves@redhat.com>
8462             Rajendra SY  <rajendra.sy@gmail.com>
8463
8464         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8465         * remote.c (extended_remote_attach): In all-stop mode, mark the
8466         thread as executing.
8467
8468 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8469
8470         * thread.c (thread_apply_all_command): Fix comment.
8471         (thread_command): Fix comment.
8472
8473 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8474
8475         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8476         parameter.
8477         * features/aarch64-core.c (create_feature_aarch64_core):
8478         Regenerate.
8479         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8480         Likewise.
8481         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8482         Likewise.
8483         * features/i386/32bit-avx512.c
8484         (create_feature_i386_32bit_avx512): Likewise.
8485         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8486         Likewise.
8487         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8488         Likewise.
8489         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8490         Likewise.
8491         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8492         Likewise.
8493         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8494         Likewise.
8495         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8496         Likewise.
8497         * features/i386/64bit-avx512.c
8498         (create_feature_i386_64bit_avx512): Likewise.
8499         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8500         Likewise.
8501         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8502         Likewise.
8503         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8504         Likewise.
8505         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8506         Likewise.
8507         * features/i386/64bit-segments.c
8508         (create_feature_i386_64bit_segments): Likewise.
8509         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8510         Likewise.
8511         * features/i386/x32-core.c
8512         (create_feature_i386_x32_core): Likewise.
8513         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8514         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8515         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8516         * target-descriptions.c: In generated code, don't pass xml
8517         filename.
8518
8519 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8520
8521         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8522         (print_xml_feature::visit_post): Likewise.
8523         (print_xml_feature::visit): Likewise.
8524         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8525         (print_xml_feature): Add new class.
8526         * regformats/regdat.sh: Null xmltarget on feature targets.
8527         * target-descriptions.c (struct target_desc): Add xmltarget.
8528         (maintenance_check_tdesc_xml_convert): Add unittest function.
8529         (tdesc_get_features_xml): Add function to get xml.
8530         (maintenance_check_xml_descriptions): Test xml generation.
8531         * xml-tdesc.c (string_read_description_xml): Add function.
8532         * xml-tdesc.h (string_read_description_xml): Add declaration.
8533
8534 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8535
8536         * features/Makefile: Add feature marker to targets with new style
8537         target descriptions.
8538         * regformats/aarch64.dat: Regenerate.
8539         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8540         * regformats/i386/amd64-avx-linux.dat: Likewise.
8541         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8542         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8543         * regformats/i386/amd64-linux.dat: Likewise.
8544         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8545         * regformats/i386/amd64.dat: Likewise.
8546         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8547         * regformats/i386/i386-avx-linux.dat: Likewise.
8548         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8549         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8550         * regformats/i386/i386-linux.dat: Likewise.
8551         * regformats/i386/i386-mmx-linux.dat: Likewise.
8552         * regformats/i386/i386-mpx-linux.dat: Likewise.
8553         * regformats/i386/i386.dat: Likewise.
8554         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8555         * regformats/i386/x32-avx-linux.dat: Likewise.
8556         * regformats/i386/x32-linux.dat: Likewise.
8557         * regformats/tic6x-c62x-linux.dat: Likewise.
8558         * regformats/tic6x-c64x-linux.dat: Likewise.
8559         * regformats/tic6x-c64xp-linux.dat: Likewise.
8560         * regformats/regdat.sh: Parse feature marker.
8561
8562 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8563
8564         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8565         (tdesc_osabi_name): Likewise.
8566         * target-descriptions.c (tdesc_architecture_name): Add new
8567         function.
8568         (tdesc_osabi_name): Likewise.
8569
8570 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8571
8572         * common/tdesc.c (tdesc_predefined_type): Move to here.
8573         (tdesc_named_type): Likewise.
8574         (tdesc_create_vector): Likewise.
8575         (tdesc_create_struct): Likewise.
8576         (tdesc_set_struct_size): Likewise.
8577         (tdesc_create_union): Likewise.
8578         (tdesc_create_flags): Likewise.
8579         (tdesc_create_enum): Likewise.
8580         (tdesc_add_field): Likewise.
8581         (tdesc_add_typed_bitfield): Likewise.
8582         (tdesc_add_bitfield): Likewise.
8583         (tdesc_add_flag): Likewise.
8584         (tdesc_add_enum_value): Likewise.
8585         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8586         (struct tdesc_type_vector): Likewise.
8587         (struct tdesc_type_field): Likewise.
8588         (struct tdesc_type_with_fields): Likewise.
8589         (tdesc_create_enum): Add declaration.
8590         (tdesc_add_typed_bitfield): Likewise.
8591         (tdesc_add_enum_value): Likewise.
8592         * target-descriptions.c (tdesc_type_field): Move from here.
8593         (tdesc_type_builtin): Likewise.
8594         (tdesc_type_vector): Likewise.
8595         (tdesc_type_with_fields): Likewise.
8596         (tdesc_predefined_types): Likewise.
8597         (tdesc_named_type): Likewise.
8598         (tdesc_create_vector): Likewise.
8599         (tdesc_create_struct): Likewise.
8600         (tdesc_set_struct_size): Likewise.
8601         (tdesc_create_union): Likewise.
8602         (tdesc_create_flags): Likewise.
8603         (tdesc_create_enum): Likewise.
8604         (tdesc_add_field): Likewise.
8605         (tdesc_add_typed_bitfield): Likewise.
8606         (tdesc_add_bitfield): Likewise.
8607         (tdesc_add_flag): Likewise.
8608         (tdesc_add_enum_value): Likewise.
8609         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8610         (tdesc_add_typed_bitfield): Likewise.
8611         (tdesc_add_enum_value): Likewise.
8612
8613 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8614
8615         * common/tdesc.c (tdesc_feature::accept): Move to here.
8616         (tdesc_feature::operator==): Likewise.
8617         (tdesc_create_reg): Likewise.
8618         * common/tdesc.h (tdesc_type_kind): Likewise.
8619         (struct tdesc_type): Likewise.
8620         (struct tdesc_feature): Likewise.
8621         * regformats/regdat.sh: Create a feature.
8622         * target-descriptions.c (tdesc_type_kind): Move from here.
8623         (tdesc_type): Likewise.
8624         (tdesc_type_up): Likewise.
8625         (tdesc_feature): Likewise.
8626         (tdesc_create_reg): Likewise.
8627
8628 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8629
8630         * Makefile.in: Add arch/tdesc.c
8631         * common/tdesc.c: New file.
8632         * common/tdesc.h (tdesc_element_visitor): Move to here.
8633         (tdesc_element): Likewise.
8634         (tdesc_reg): Likewise.
8635         (tdesc_reg_up): Likewise.
8636         * regformats/regdef.h (reg): Add offset to constructors.
8637         * target-descriptions.c (tdesc_element_visitor): Move from here.
8638         (tdesc_element): Likewise.
8639         (tdesc_reg): Likewise.
8640         (tdesc_reg_up): Likewise.
8641
8642 2018-04-17  Tom Tromey  <tom@tromey.com>
8643
8644         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8645         discriminant field.
8646
8647 2018-04-17  Tom Tromey  <tom@tromey.com>
8648
8649         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8650
8651 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8652
8653         * symtab.c (print_symbol_info): Skip printing filename and line
8654         number when `last' is NULL.
8655         (symtab_symbol_info): Use empty string instead of NULL for first
8656         invocation of print_symbol_info.
8657         (rbreak_command): Pass NULL to `last' parameter of
8658         print_symbol_info.
8659
8660 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8661
8662         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8663         instead of nullptr.
8664
8665 2018-04-16  Pedro Alves  <palves@redhat.com>
8666
8667         * MAINTAINERS (sh): Remove.
8668         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8669         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8670         (ALLDEPFILES): Remove sh64-tdep.c.
8671         * NEWS: Mentions that support for SH-5/SH64 is removed.
8672         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8673         (sh*-*-openbsd*): Ditto.
8674         (sh64-*-elf*): Remove.
8675         (sh*): Remove.
8676         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8677         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8678         * sh-tdep.c: No longer include "sh64-tdep.h".
8679         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8680         * sh64-tdep.c, sh64-tdep.h: Remove files.
8681
8682 2018-04-16  Pedro Alves  <palves@redhat.com>
8683
8684         * MAINTAINERS: Remove m88k.
8685         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8686         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8687         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8688         * NEWS: Mention that support for m88k was removed.
8689         * configure.host (m88*-*-*): Remove support.
8690         * configure.nat (m88k-*-*): Remove support.
8691         * configure.tgt (m88*-*-openbsd*): Remove.
8692         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8693
8694 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8695
8696         * configure.tgt (x86_tobjs): New variable.
8697         (amd64_tobjs, i386_tobjs): Use it.
8698
8699 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8700
8701         * symtab.c (print_symbol_info): Precede the symbol definition by
8702         the line number when available.
8703         * NEWS: Advertise this enhancement.
8704
8705 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8706
8707         * NEWS (New options): announce set/show record btrace cpu.
8708         * btrace.c: Include record-btrace.h.
8709         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8710         the vendor is unknown.
8711         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8712         Maybe overwrite the btrace configuration's cpu.
8713         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8714         (btrace_fetch): Add cpu parameter.  Update callers.
8715         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8716         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8717         errata workarounds if the vendor is unknown.
8718         * python/py-record-btrace.c: Include record-btrace.h.
8719         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8720         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8721         * record-btrace.c (record_btrace_cpu_state_kind): New.
8722         (record_btrace_cpu): New.
8723         (set_record_btrace_cpu_cmdlist): New.
8724         (record_btrace_get_cpu): New.
8725         (require_btrace_thread, record_btrace_info)
8726         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8727         (cmd_set_record_btrace_cpu_none): New.
8728         (cmd_set_record_btrace_cpu_auto): New.
8729         (cmd_set_record_btrace_cpu): New.
8730         (cmd_show_record_btrace_cpu): New.
8731         (_initialize_record_btrace): Initialize set/show record btrace cpu
8732         commands.
8733         * record-btrace.h (record_btrace_get_cpu): New.
8734
8735 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8736
8737         * record.c (set_record_command): Fix typo in message.
8738
8739 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8740
8741         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8742
8743 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8744
8745         * infrun.c (process_event_stop_test): Call
8746         gdbarch_in_indirect_branch_thunk.
8747         * gdbarch.sh (in_indirect_branch_thunk): New.
8748         * gdbarch.c: Regenerated.
8749         * gdbarch.h: Regenerated.
8750         * x86-tdep.h: New.
8751         * x86-tdep.c: New.
8752         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8753         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8754         (ALLDEPFILES): Add x86-tdep.c.
8755         * arch-utils.h (default_in_indirect_branch_thunk): New.
8756         * arch-utils.c (default_in_indirect_branch_thunk): New.
8757         * i386-tdep: Include x86-tdep.h.
8758         (i386_in_indirect_branch_thunk): New.
8759         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8760         function.
8761         * amd64-tdep: Include x86-tdep.h.
8762         (amd64_in_indirect_branch_thunk): New.
8763         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8764
8765 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8766
8767         PR gdb/23053
8768         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8769         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8770         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8771         regression.
8772
8773 2018-04-12  Tom Tromey  <tom@tromey.com>
8774
8775         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8776         (rust_evaluate_subexp): Likewise.
8777
8778 2018-04-12  Pedro Alves  <palves@redhat.com>
8779
8780         * procfs.c (procfs_detach): Make forward declaration's prototype
8781         match definition's protototype.
8782         (proc_get_LDT_entry): Remove stale do_cleanups call.
8783
8784 2018-04-12  Pedro Alves  <palves@redhat.com>
8785
8786         * target.h (target_ops::to_has_exited): Delete.
8787         (target_has_exited): Delete.
8788         * target-delegates.c: Regenerate.
8789
8790 2018-04-11  Pedro Alves  <palves@redhat.com>
8791
8792         * target.c (fileio_fh_t::t): Add comment.
8793         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8794         (target_fileio_close): Handle a NULL target.
8795         (invalidate_fileio_fh): New.
8796         (target_close): Call it.
8797         * remote.c (remote_hostio_send_command): No longer check whether
8798         remote_desc is open.
8799
8800 2018-04-11  Pedro Alves  <palves@redhat.com>
8801
8802         * target.c (fileio_fh_t): Make it a named struct instead of a
8803         typedef.
8804         (fileio_fh_t::is_closed): New method.
8805         (DEF_VEC_O (fileio_fh_t)): Remove.
8806         (fileio_fhandles): Now a std::vector.
8807         (is_closed_fileio_fh): Delete.
8808         (acquire_fileio_fd): Adjust.  Rename parameters.
8809         (release_fileio_fd): Adjust.
8810         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8811         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8812         (target_fileio_close): Adjust.
8813
8814 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8815
8816         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8817         index.
8818
8819 2018-04-10  Pedro Alves  <palves@redhat.com>
8820
8821         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8822         (scoped_finish_thread_state): New class.
8823         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8824         cleanup.
8825         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8826         (fetch_inferior_event, normal_stop): Likewise.
8827         * thread.c (finish_thread_state_cleanup): Delete.
8828
8829 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8830             Pedro Alves  <palves@redhat.com>
8831
8832         * value.c: Include "selftest.h" and "common/array-view.h".
8833         (struct range) <operator ==>: New.
8834         (test_ranges_contain): New.
8835         (check_ranges_vector): New.
8836         (test_insert_into_bit_range_vector): New.
8837         (_initialize_values): Register selftests.
8838         * common/array-view.h (operator==, operator!=): New.
8839
8840 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8841
8842         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8843         an iterator.
8844         * inline-frame.c: Include <algorithm>.
8845         (struct inline_state): Add constructor.
8846         (inline_state_s): Remove.
8847         (DEF_VEC_O(inline_state_s)): Remove.
8848         (inline_states): Change type to std::vector.
8849         (find_inline_frame_state): Adjust to std::vector.
8850         (allocate_inline_frame_state): Remove.
8851         (clear_inline_frame_state): Adjust to std::vector.
8852         (skip_inline_frames): Adjust to std::vector.
8853
8854 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8855
8856         * tracepoint.h (struct trace_state_variable): Add constructor.
8857         <name>: Change type to std::string.
8858         * tracepoint.c (tsv_s): Remove.
8859         (DEF_VEC_O(tsv_s)): Remove.
8860         (tvariables): Change to std::vector.
8861         (create_trace_state_variable): Adjust to std::vector.
8862         (find_trace_state_variable): Likewise.
8863         (find_trace_state_variable_by_number): Likewise.
8864         (delete_trace_state_variable): Likewise.
8865         (trace_variable_command): Adjust to std::string.
8866         (delete_trace_variable_command): Likewise.
8867         (tvariables_info_1): Adjust to std::vector.
8868         (save_trace_state_variables): Likewise.
8869         (start_tracing): Likewise.
8870         (merge_uploaded_trace_state_variables): Adjust to std::vector
8871         and std::string.
8872         * target.h (struct target_ops)
8873         <to_download_trace_state_variable>: Pass reference to
8874         trace_state_variable.
8875         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8876         * target-delegates.c: Re-generate.
8877         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8878         (mi_tsv_deleted): Likewise.
8879         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8880         * remote.c (remote_download_trace_state_variable): Change
8881         pointer to reference and adjust.
8882         * make-target-delegates (parse_argtypes): Handle references.
8883         (write_function_header): Likewise.
8884         (munge_type): Likewise.
8885
8886 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8887
8888         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8889         string_view-selftests.c.
8890         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8891         testsuite.
8892         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8893         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8894         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8895         * unittests/basic_string_view/element_access/char/1.cc:
8896         Likewise.
8897         * unittests/basic_string_view/element_access/char/empty.cc:
8898         Likewise.
8899         * unittests/basic_string_view/element_access/char/front_back.cc:
8900         Likewise.
8901         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8902         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8903         Likewise.
8904         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8905         Likewise.
8906         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8907         Likewise.
8908         * unittests/basic_string_view/operations/compare/char/1.cc:
8909         Likewise.
8910         * unittests/basic_string_view/operations/compare/char/13650.cc:
8911         Likewise.
8912         * unittests/basic_string_view/operations/copy/char/1.cc:
8913         Likewise.
8914         * unittests/basic_string_view/operations/data/char/1.cc:
8915         Likewise.
8916         * unittests/basic_string_view/operations/find/char/1.cc:
8917         Likewise.
8918         * unittests/basic_string_view/operations/find/char/2.cc:
8919         Likewise.
8920         * unittests/basic_string_view/operations/find/char/3.cc:
8921         Likewise.
8922         * unittests/basic_string_view/operations/find/char/4.cc:
8923         Likewise.
8924         * unittests/basic_string_view/operations/rfind/char/1.cc:
8925         Likewise.
8926         * unittests/basic_string_view/operations/rfind/char/2.cc:
8927         Likewise.
8928         * unittests/basic_string_view/operations/rfind/char/3.cc:
8929         Likewise.
8930         * unittests/basic_string_view/operations/substr/char/1.cc:
8931         Likewise.
8932         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8933         * unittests/string_view-selftests.c: New file.
8934
8935 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8936
8937         * unittests/basic_string_view/capacity/1.cc: New file.
8938         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8939         * unittests/basic_string_view/cons/char/1.cc: New file.
8940         * unittests/basic_string_view/cons/char/2.cc: New file.
8941         * unittests/basic_string_view/cons/char/3.cc: New file.
8942         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8943         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8944         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8945         * unittests/basic_string_view/element_access/char/1.cc: New file.
8946         * unittests/basic_string_view/element_access/char/2.cc: New file.
8947         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8948         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8949         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8950         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8951         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8952         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8953         * unittests/basic_string_view/include.cc: New file.
8954         * unittests/basic_string_view/inserters/char/1.cc: New file.
8955         * unittests/basic_string_view/inserters/char/2.cc: New file.
8956         * unittests/basic_string_view/inserters/char/3.cc: New file.
8957         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8958         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8959         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8960         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8961         * unittests/basic_string_view/literals/types.cc: New file.
8962         * unittests/basic_string_view/literals/values.cc: New file.
8963         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8964         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8965         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8966         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8967         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8968         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8969         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8970         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8971         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8972         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8973         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8974         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8975         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8976         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8977         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8978         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8979         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8980         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8981         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8982         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8983         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8984         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8985         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8986         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8987         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8988         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8989         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8990         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8991         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8992         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8993         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8994         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8995         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8996         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8997         * unittests/basic_string_view/operators/char/2.cc: New file.
8998         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8999         * unittests/basic_string_view/range_access/char/1.cc: New file.
9000         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9001         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9002         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9003         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9004         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9005         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9006         * unittests/basic_string_view/requirements/typedefs.cc: New file.
9007         * unittests/basic_string_view/typedefs.cc: New file.
9008         * unittests/basic_string_view/types/1.cc: New file.
9009
9010 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9011
9012         * common/gdb_string_view.h: Remove libstdc++ implementation
9013         details, adjust to gdb reality.
9014         * common/gdb_string_view.tcc: Likewise.
9015         * cli/cli-script.c (struct string_view): Remove.
9016         (user_args) <m_args>: Change element type to gdb::string_view.
9017         (user_args::insert_args): Adjust.
9018
9019 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9020
9021         * common/gdb_string_view.h: New file.
9022         * common/gdb_string_view.tcc: New file.
9023
9024 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9025
9026         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9027         * configure: Re-generate.
9028
9029 2018-04-09  Pedro Alves  <palves@redhat.com>
9030
9031         * gdbarch.sh: Include "observable.h" instead of "observer.h".
9032         (set_target_gdbarch): Call
9033         gdb::observers::architecture_changed.notify instead of
9034         observer_notify_architecture_changed.
9035
9036 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9037
9038         * tracepoint.c (struct current_traceframe_cleanup): Remove.
9039         (do_restore_current_traceframe_cleanup): Remove.
9040         (restore_current_traceframe_cleanup_dtor): Remove.
9041         (make_cleanup_restore_current_traceframe): Remove.
9042         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9043         New.
9044         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9045         * infrun.c (fetch_inferior_event): Use
9046         scoped_restore_current_traceframe.
9047
9048 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9049
9050         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9051         Remove.
9052         <n_allocated_type_units>: Remove.
9053         <all_type_units>: Change to std::vector.
9054         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9055         to std::vector change.
9056         (dwarf2_per_objfile::get_cutu): Likewise.
9057         (dwarf2_per_objfile::get_tu): Likewise.
9058         (create_signatured_type_table_from_index): Likewise.
9059         (create_signatured_type_table_from_debug_names): Likewise.
9060         (dw2_symtab_iter_next): Likewise.
9061         (dw2_print_stats): Likewise.
9062         (dw2_expand_all_symtabs): Likewise.
9063         (dw2_expand_marked_cus): Likewise.
9064         (dw2_debug_names_iterator::next): Likewise.
9065         (dwarf2_initialize_objfile): Likewise.
9066         (add_signatured_type_cu_to_table): Likewise.
9067         (create_all_type_units): Likewise.
9068         (add_type_unit): Likewise.
9069         (struct tu_abbrev_offset): Add constructor.
9070         (build_type_psymtabs_1): Adjust to std::vector change.
9071         (print_tu_stats): Likewise.
9072         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9073         (write_debug_names): Likewise.
9074
9075 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9076
9077         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9078         Make an std::vector.
9079         <n_comp_units>: Remove.
9080         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9081         to std::vector change.
9082         (dwarf2_per_objfile::get_cutu): Likewise.
9083         (dwarf2_per_objfile::get_cu): Likewise.
9084         (create_cus_from_index): Likewise.
9085         (create_addrmap_from_index): Likewise.
9086         (create_addrmap_from_aranges): Likewise.
9087         (dwarf2_read_index): Likewise.
9088         (dw2_find_last_source_symtab): Likewise.
9089         (dw2_map_symtabs_matching_filename): Likewise.
9090         (dw2_symtab_iter_next): Likewise.
9091         (dw2_print_stats): Likewise.
9092         (dw2_expand_all_symtabs): Likewise.
9093         (dw2_expand_symtabs_with_fullname): Likewise.
9094         (dw2_expand_marked_cus): Likewise.
9095         (dw2_map_symbol_filenames): Likewise.
9096         (create_cus_from_debug_names): Likewise.
9097         (dwarf2_read_debug_names): Likewise.
9098         (dw2_debug_names_iterator::next): Likewise.
9099         (dwarf2_initialize_objfile): Likewise.
9100         (set_partial_user): Likewise.
9101         (dwarf2_build_psymtabs_hard): Likewise.
9102         (read_comp_units_from_section): Remove arguments, adjust to
9103         std::vector change.
9104         (create_all_comp_units): Adjust to std::vector and
9105         read_comp_units_from_section changes.
9106         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9107         change.
9108         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9109         (psyms_seen_size): Likewise.
9110         (write_gdbindex): Likewise.
9111         (write_debug_names): Likewise.
9112
9113 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9114
9115         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9116         with dwarf2_per_objfile.
9117         (create_cus_from_index): Likewise.
9118         (create_signatured_type_table_from_index): Likewise.
9119         (dwarf2_read_index): Likewise.
9120         (dwarf2_initialize_objfile): Likewise.
9121         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9122         per_cu rather than get_dwarf2_per_objfile.
9123
9124 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9125
9126         * dwarf2read.h (struct signatured_type): Forward declare.
9127         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9128         New methods.
9129         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9130         (dw2_get_cutu): ...this.
9131         (dwarf2_per_objfile::get_cu): Rename from...
9132         (dw2_get_cu): ...this.
9133         (dwarf2_per_objfile::get_tu): New.
9134         (create_addrmap_from_index): Adjust.
9135         (create_addrmap_from_aranges): Adjust.
9136         (dw2_find_last_source_symtab): Adjust.
9137         (dw2_map_symtabs_matching_filename): Adjust.
9138         (dw2_symtab_iter_next): Adjust.
9139         (dw2_print_stats): Adjust.
9140         (dw2_expand_all_symtabs): Adjust.
9141         (dw2_expand_symtabs_with_fullname): Adjust.
9142         (dw2_expand_marked_cus): Adjust.
9143         (dw_expand_symtabs_matching_file_matcher): Adjust.
9144         (dw2_map_symbol_filenames): Adjust.
9145         (dw2_debug_names_iterator::next): Adjust.
9146         (dwarf2_initialize_objfile): Adjust.
9147         (set_partial_user): Adjust.
9148         (dwarf2_build_psymtabs_hard): Adjust.
9149
9150 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9151
9152         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9153         Remove unused variables.
9154         (dw2_map_symtabs_matching_filename): Likewise.
9155         (dwarf2_record_block_ranges): Likewise.
9156         (dwarf2_read_addr_index): Likewise.
9157         (follow_die_offset): Likewise.
9158
9159 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9160
9161         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9162         to symbol_file_add_main.
9163
9164 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9165
9166         PR mi/22299
9167         * mi/mi-console.c (do_fputc_async_safe): New.
9168         (mi_console_file::write_async_safe): New.
9169         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9170         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9171         New.
9172         * ui-file.c (ui_file::putstrn): Adjust call to
9173         fputstrn_unfiltered.
9174         * utils.c (printchar): Replace do_fputs and do_fprintf
9175         parameters by do_fputc.
9176         (fputstr_filtered): Adjust call to printchar.
9177         (fputstr_unfiltered): Likewise.
9178         (fputstrn_filtered): Likewise.
9179         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9180         printchar.
9181         * utils.h (do_fputc_ftype): New typedef.
9182         (fputstrn_unfiltered): Add do_fputc parameter.
9183
9184 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9185
9186         * regformats/i386/i386-avx.dat: Remove.
9187
9188 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9189
9190         PR gdb/22979
9191         * amd64-tdep.c (amd64_none_init_abi): New function.
9192         (amd64_x32_none_init_abi): New function.
9193         (_initialize_amd64_tdep): Register handlers for x86-64 and
9194         x64_32 with GDB_OSABI_NONE.
9195         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9196         GDB_OSABI_NONE osabi.
9197
9198 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9199
9200         PR gdb/22980
9201         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9202         GDB_OSABI_NONE.
9203         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9204         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9205
9206 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9207
9208         * common/byte-vector.h (char_vector): New type.
9209         * target.h (target_read_alloc): Return
9210         gdb::optional<byte_vector>.
9211         (target_read_stralloc): Return gdb::optional<char_vector>.
9212         (target_get_osdata): Return gdb::optional<char_vector>.
9213         * target.c (target_read_alloc_1): Templatize.  Replacement
9214         manual memory management with vector.
9215         (target_read_alloc): Change return type, adjust.
9216         (target_read_stralloc): Change return type, adjust.
9217         (target_get_osdata): Change return type, adjust.
9218         * auxv.c (struct auxv_info) <length>: Remove.
9219         <data>: Change type to gdb::optional<byte_vector>.
9220         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9221         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9222         (target_auxv_search): Adjust.
9223         (fprint_target_auxv): Adjust.
9224         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9225         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9226         (linux_make_corefile_notes): Adjust.
9227         * osdata.c (get_osdata): Adjust.
9228         * remote.c (remote_get_threads_with_qxfer): Adjust.
9229         (remote_memory_map): Adjust.
9230         (remote_traceframe_info): Adjust.
9231         (btrace_read_config): Adjust.
9232         (remote_read_btrace): Adjust.
9233         (remote_pid_to_exec_file): Adjust.
9234         * solib-aix.c (solib_aix_get_library_list): Adjust.
9235         * solib-dsbt.c (decode_loadmap): Don't free buf.
9236         (dsbt_get_initial_loadmaps): Adjust.
9237         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9238         * solib-target.c (solib_target_current_sos): Adjust.
9239         * tracepoint.c (sdata_make_value): Adjust.
9240         * xml-support.c (xinclude_start_include): Adjust.
9241         (xml_fetch_content_from_file): Adjust.
9242         * xml-support.h (xml_fetch_another): Change return type.
9243         (xml_fetch_content_from_file): Change return type.
9244         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9245         * xml-tdesc.c (file_read_description_xml): Adjust.
9246         (fetch_available_features_from_target): Change return type.
9247         (target_fetch_description_xml): Adjust.
9248         (target_read_description_xml): Adjust.
9249
9250 2018-04-06  Tom Tromey  <tom@tromey.com>
9251
9252         * value.c (~value): Update.
9253         (struct value) <contents>: Now unique_xmalloc_ptr.
9254         (value_contents_bits_eq, allocate_value_contents)
9255         (value_contents_raw, value_contents_all_raw)
9256         (value_contents_for_printing, value_contents_for_printing_const)
9257         (set_value_enclosing_type): Update.
9258
9259 2018-04-06  Tom Tromey  <tom@tromey.com>
9260
9261         * value.c (range_s): Remove typedef, VEC.
9262         (struct range): Add operator<.
9263         (range_lessthan): Remove.
9264         (ranges_contain): Change type.
9265         (~value): Update.
9266         (struct value) <unavailable, optimized_out>: Now std::vector.
9267         (value_entirely_available)
9268         (value_entirely_covered_by_range_vector)
9269         (value_entirely_unavailable, value_entirely_optimized_out):
9270         Update.
9271         (insert_into_bit_range_vector): Change argument type.
9272         (find_first_range_overlap): Likewise.
9273         (struct ranges_and_idx, value_contents_bits_eq)
9274         (require_not_optimized_out, require_available): Update.
9275         (ranges_copy_adjusted): Change argument types.
9276         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9277
9278 2018-04-06  Tom Tromey  <tom@tromey.com>
9279
9280         * value.c (~value): Update.
9281         (struct value) <parent>: Now a value_ref_ptr.
9282         (value_parent, set_value_parent, value_address, value_copy):
9283         Update.
9284
9285 2018-04-06  Tom Tromey  <tom@tromey.com>
9286
9287         * value.c (struct value): Add constructor, destructor, and member
9288         initializers.
9289         (allocate_value_lazy, value_decref): Update.
9290
9291 2018-04-06  Tom Tromey  <tom@tromey.com>
9292
9293         * value.c (struct value) <released, next>: Remove.
9294         (all_values): Now a std::vector.
9295         (allocate_value_lazy): Update.
9296         (value_next): Remove.
9297         (value_mark, value_free_to_mark, release_value)
9298         (value_release_to_mark): Update.
9299
9300 2018-04-06  Tom Tromey  <tom@tromey.com>
9301
9302         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9303         (free_value_chain): Remove.
9304         * value.c (free_value_chain): Remove.
9305         (value_release_to_mark): Return a std::vector.
9306         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9307         std::vector.
9308         (check_condition): Update.
9309         * eval.c (fetch_subexp_value): Change "val_chain" to a
9310         std::vector.
9311         * breakpoint.c (update_watchpoint): Update.
9312         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9313
9314 2018-04-06  Tom Tromey  <tom@tromey.com>
9315
9316         * value.h (free_all_values): Remove.
9317         * value.c (free_all_values): Remove.
9318
9319 2018-04-06  Tom Tromey  <tom@tromey.com>
9320
9321         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9322         (value_history_chain, value_history_count): Remove.
9323         (value_history): New global.
9324         (record_latest_value, access_value_history, show_values)
9325         (preserve_values): Update.
9326
9327 2018-04-06  Tom Tromey  <tom@tromey.com>
9328
9329         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9330         * varobj.c (varobj_set_display_format, varobj_set_value)
9331         (install_default_visualizer, construct_visualizer)
9332         (install_new_value, ~varobj, varobj_get_value_type)
9333         (my_value_of_variable, varobj_editable_p): Update.
9334         * c-varobj.c (c_describe_child, c_value_of_variable)
9335         (cplus_number_of_children, cplus_describe_child): Update.
9336         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9337         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9338         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9339
9340 2018-04-06  Tom Tromey  <tom@tromey.com>
9341
9342         * printcmd.c (last_examine_address): Change type to
9343         value_ref_ptr.
9344         (do_examine, x_command): Update.
9345
9346 2018-04-06  Tom Tromey  <tom@tromey.com>
9347
9348         * value.c (release_value): Update.
9349         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9350         (struct bpstats) <val>: Now a value_ref_ptr.
9351         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9352         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9353         (~watchpoint, print_it_watchpoint, watch_command_1)
9354         (invalidate_bp_value_on_memory_change): Update.
9355
9356 2018-04-06  Tom Tromey  <tom@tromey.com>
9357
9358         * varobj.c (varobj_clear_saved_item)
9359         (update_dynamic_varobj_children, install_new_value, ~varobj):
9360         Update.
9361         * value.h (value_incref): Move declaration earlier.
9362         (value_decref): Rename from value_free.
9363         (struct value_ref_policy): New.
9364         (value_ref_ptr): New typedef.
9365         (struct value_deleter): Remove.
9366         (gdb_value_up): Remove typedef.
9367         (release_value): Change return type.
9368         (release_value_or_incref): Remove.
9369         * value.c (set_value_parent): Update.
9370         (value_incref): Change return type.
9371         (value_decref): Rename from value_free.
9372         (value_free_to_mark, free_all_values, free_value_chain): Update.
9373         (release_value): Return value_ref_ptr.
9374         (release_value_or_incref): Remove.
9375         (record_latest_value, set_internalvar, clear_internalvar):
9376         Update.
9377         * stack.c (info_frame_command): Don't call value_free.
9378         * python/py-value.c (valpy_dealloc, valpy_new)
9379         (value_to_value_object): Update.
9380         * printcmd.c (do_examine): Update.
9381         * opencl-lang.c (lval_func_free_closure): Update.
9382         * mi/mi-main.c (register_changed_p): Don't call value_free.
9383         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9384         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9385         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9386         value_free.
9387         * guile/scm-value.c (vlscm_free_value_smob)
9388         (vlscm_scm_from_value): Update.
9389         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9390         (frame_unwind_register_unsigned, get_frame_register_bytes)
9391         (put_frame_register_bytes): Don't call value_free.
9392         * findvar.c (address_from_register): Don't call value_free.
9393         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9394         * dwarf2loc.c (entry_data_value_free_closure)
9395         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9396         (dwarf2_evaluate_loc_desc_full): Update.
9397         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9398         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9399         (~watchpoint, watch_command_1)
9400         (invalidate_bp_value_on_memory_change): Update.
9401         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9402
9403 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9404
9405         PR gdb/23022
9406         * warning.m4: Add -Wno-error=deprecated-register.
9407         * configure: Re-generate.
9408
9409 2018-04-05  Tom Tromey  <tom@tromey.com>
9410
9411         * linespec.h: Remove include of "vec.h".
9412
9413 2018-04-05  Tom Tromey  <tom@tromey.com>
9414
9415         * linespec.c (typep): Remove typedef.
9416         (find_methods, find_superclass_methods): Take a std::vector.
9417         (find_method): Use std::vector.
9418
9419 2018-04-05  Tom Tromey  <tom@tromey.com>
9420
9421         * utils.c (compare_strings): Remove.
9422         * utils.h (compare_strings): Remove.
9423         * objc-lang.h (find_imps): Update.
9424         * objc-lang.c (find_methods): Take a std::vector.
9425         (uniquify_strings, find_imps): Likewise.
9426         * linespec.c (find_methods): Take a std::vector.
9427         (decode_objc): Use std::vector.
9428         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9429         a std::vector.
9430         (find_method, find_function_symbols): Use std::vector.
9431
9432 2018-04-05  Tom Tromey  <tom@tromey.com>
9433
9434         * completer.c (completion_tracker::completion_tracker): Remove
9435         cast.
9436         (completion_tracker::discard_completions): Likewise.
9437         * breakpoint.c (ambiguous_names_p): Remove cast.
9438         * ada-lang.c (_initialize_ada_language): Remove cast.
9439         * utils.h (streq): Update.
9440         (streq_hash): Add new declaration.
9441         * utils.c (streq): Return bool.
9442         (streq_hash): New function.
9443
9444 2018-04-05  Tom Tromey  <tom@tromey.com>
9445
9446         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9447         Remove a string copy.
9448
9449 2018-04-05  Tom Tromey  <tom@tromey.com>
9450
9451         * linespec.c (filter_results): Use std::vector.
9452         (decode_line_2, decode_line_full): Update.
9453
9454 2018-04-05  Tom Tromey  <tom@tromey.com>
9455
9456         * linespec.c (canonical_to_fullform): Return std::string.
9457         (filter_results): Update.
9458         (struct decode_line_2_item): Add constructor.
9459         <fullform, displayform>: Now std::string.
9460         (decode_line_2_compare_items): Now a std::sort comparator.
9461         (decode_line_2): Update.
9462
9463 2018-04-05  Tom Tromey  <tom@tromey.com>
9464
9465         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9466         (unexpected_linespec_error): Update.
9467         (linespec_parse_basic, parse_linespec): Update.
9468
9469 2018-04-05  Tom Tromey  <tom@tromey.com>
9470
9471         * linespec.c (linespec_parse_basic): Reindent.
9472
9473 2018-04-05  Tom Tromey  <tom@tromey.com>
9474
9475         * minsyms.h (iterate_over_minimal_symbols): Update.
9476         * minsyms.c (iterate_over_minimal_symbols): Take a
9477         gdb::function_view.
9478         * linespec.c (struct collect_minsyms): Remove.
9479         (compare_msyms): Now a std::sort comparator.
9480         (add_minsym): Add parameters.
9481         (search_minsyms_for_name): Update.  Use std::vector.
9482
9483 2018-04-03  Tom Tromey  <tom@tromey.com>
9484
9485         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9486         gdb::byte_vector.
9487
9488 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9489
9490         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9491
9492 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9493
9494         PR gdb/16959
9495         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9496         printing static type.
9497
9498 2018-04-01  Tom Tromey  <tom@tromey.com>
9499
9500         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9501         (rs6000_xfer_shared_libraries): Update.
9502
9503 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9504
9505         * common/gdb_vecs.h (char_ptr): Remove.
9506         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9507
9508 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9509
9510         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9511         with std::vector.
9512         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9513
9514 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9515
9516         * tracepoint.h (struct uploaded_tp): Initialize fields.
9517         <actions, step_actions, cmd_strings>: Change type to
9518         std::vector<char *>.
9519         * tracepoint.c (get_uploaded_tp): Allocate with new.
9520         (free_uploaded_tps): Free with delete.
9521         (parse_tracepoint_definition): Adjust to std::vector change.
9522         * breakpoint.c (read_uploaded_action): Likewise.
9523         (create_tracepoint_from_upload): Likewise.
9524         * ctf.c (ctf_write_uploaded_tp): Likewise.
9525         (SET_ARRAY_FIELD): Likewise.
9526         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9527
9528 2018-03-30  Tom Tromey  <tom@tromey.com>
9529
9530         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9531         std::unique_ptr.
9532         (svr4_keep_data_in_core): Update.
9533         (svr4_read_so_list): Update.
9534
9535 2018-03-30  Tom Tromey  <tom@tromey.com>
9536
9537         * windows-nat.c (handle_output_debug_string, handle_exception):
9538         Update.
9539         * target.h (target_read_string): Update.
9540         * target.c (target_read_string): Change "string" to
9541         unique_xmalloc_ptr.
9542         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9543         Update.
9544         * solib-frv.c (frv_current_sos): Update.
9545         * solib-dsbt.c (dsbt_current_sos): Update.
9546         * solib-darwin.c (darwin_current_sos): Update.
9547         * linux-thread-db.c (inferior_has_bug): Update.
9548         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9549         Update.  Remove alloca.
9550         * ada-lang.c (ada_main_name): Update.
9551
9552 2018-03-30  Tom Tromey  <tom@tromey.com>
9553
9554         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9555         (struct dwo_file_deleter): New.
9556         (dwo_file_up): New typedef.
9557         (open_and_init_dwo_file): Use dwo_file_up.
9558         (free_dwo_file_cleanup): Remove.
9559
9560 2018-03-30  Tom Tromey  <tom@tromey.com>
9561
9562         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9563         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9564
9565 2018-03-30  Tom Tromey  <tom@tromey.com>
9566
9567         * dwarf2read.c (class free_cached_comp_units): New class.
9568         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9569         (free_cached_comp_units): Remove function.
9570
9571 2018-03-30  Tom Tromey  <tom@tromey.com>
9572
9573         * utils.h (make_cleanup_unpush_target): Remove.
9574         * inf-ptrace.c (struct target_unpusher): New.
9575         (target_unpush_up) New typedef.
9576         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9577         target_unpush_up.
9578         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9579
9580 2018-03-27  Tom Tromey  <tom@tromey.com>
9581
9582         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9583
9584 2018-03-27  Pedro Alves  <palves@redhat.com>
9585             Tom Tromey  <tom@tromey.com>
9586
9587         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9588         destructor.  Now a class.
9589         (gdb_readline_wrapper_cleanup): Remove function.
9590         (gdb_readline_wrapper): Remove cleanups.
9591
9592 2018-03-27  Tom Tromey  <tom@tromey.com>
9593
9594         * typeprint.h (struct type_print_options) <local_typedefs,
9595         global_typedefs>: Remove "struct" keyword.
9596         (class typedef_hash_table): New class.
9597         (recursively_update_typedef_hash, add_template_parameters)
9598         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9599         (find_typedef_in_hash): Don't declare.
9600         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9601         (typedef_hash_table::recursively_update): Rename from
9602         recursively_update_typedef_hash.  Now a member.
9603         (typedef_hash_table::add_template_parameters): Rename from
9604         add_template_parameters.  Now a member.
9605         (typedef_hash_table::typedef_hash_table): Now a constructor;
9606         rename from create_typedef_hash.
9607         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9608         rename from free_typedef_hash.
9609         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9610         (do_free_global_table): Remove.
9611         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9612         from copy_type_recursive.
9613         (create_global_typedef_table): Remove.
9614         (typedef_hash_table::find_global_typedef): Now a member of
9615         typedef_hash_table.
9616         (typedef_hash_table::find_typedef): Rename from
9617         find_typedef_in_hash; now a member.
9618         (whatis_exp): Update.
9619         * extension.h (struct ext_lang_type_printers): Add constructor and
9620         destructor.
9621         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9622         declare.
9623         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9624         Now a constructor; rename from start_ext_lang_type_printers.
9625         (ext_lang_type_printers): Now a destructor; rename from
9626         free_ext_lang_type_printers.
9627         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9628         Update.
9629         (c_type_print_base_struct_union): Update.  Remove cleanups.
9630
9631 2018-03-27  Tom Tromey  <tom@tromey.com>
9632
9633         * dwarf-index-write.c: Include <cmath>.
9634
9635 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9636
9637         * NEWS: Add entry describing new "set|show varsize-limit" command.
9638         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9639         command.
9640         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9641         "set variable".
9642
9643 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9644
9645         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9646         dwarf-index-write.c
9647         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9648         * dwarf-index-common.c: New file.
9649         * dwarf-index-common.h: New file.
9650         * dwarf-index-write.c: New file.
9651         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9652         (struct dwarf2_section_info): Move from here.
9653         (dwarf2_section_info_def): Likewise.
9654         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9655         (offset_type): Likewise.
9656         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9657         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9658         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9659         (byte_swap): Likewise.
9660         (MAYBE_SWAP): Likewise.
9661         (dwarf2_per_cu_ptr): Likewise.
9662         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9663         (struct tu_stats): Likewise.
9664         (struct dwarf2_per_objfile): Likewise.
9665         (struct dwarf2_per_cu_data): Likewise.
9666         (struct signatured_type): Likewise.
9667         (sig_type_ptr): Likewise.
9668         (DEF_VEC_P (sig_type_ptr)): Likewise.
9669         (INDEX4_SUFFIX): Likewise.
9670         (INDEX5_SUFFIX): Likewise.
9671         (DEBUG_STR_SUFFIX): Likewise.
9672         (dwarf2_read_section): Make non-static.
9673         (mapped_index_string_hash): Move from here.
9674         (dwarf5_djb_hash): Likewise.
9675         (file_write): Likewise.
9676         (class data_buf): Likewise.
9677         (struct symtab_index_entry): Likewise.
9678         (struct mapped_symtab): Likewise.
9679         (find_slot): Likewise.
9680         (hash_expand): Likewise.
9681         (add_index_entry): Likewise.
9682         (uniquify_cu_indices): Likewise.
9683         (class c_str_view): Likewise.
9684         (class c_str_view_hasher): Likewise.
9685         (class vector_hasher): Likewise.
9686         (write_hash_table): Likewise.
9687         (psym_index_map): Likewise.
9688         (struct addrmap_index_data): Likewise.
9689         (add_address_entry): Likewise.
9690         (add_address_entry_worker): Likewise.
9691         (write_address_map): Likewise.
9692         (symbol_kind): Likewise.
9693         (write_psymbols): Likewise.
9694         (struct signatured_type_index_data): Likewise.
9695         (write_one_signatured_type): Likewise.
9696         (recursively_count_psymbols): Likewise.
9697         (recursively_write_psymbols): Likewise.
9698         (class debug_names): Likewise.
9699         (check_dwarf64_offsets): Likewise.
9700         (psyms_seen_size): Likewise.
9701         (write_gdbindex): Likewise.
9702         (write_debug_names): Likewise.
9703         (assert_file_size): Likewise.
9704         (write_psymtabs_to_index): Likewise.
9705         (save_gdb_index_command): Likewise.
9706         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9707         command.
9708         * dwarf2read.h: New file.
9709
9710 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9711
9712         PR gdb/22670
9713         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9714         symbol name if the CU's language stores symbol names in linkage
9715         format.
9716         * language.h (struct language_defn)
9717         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9718         all instances of this struct.
9719
9720 2018-03-26  Tom Tromey  <tom@tromey.com>
9721
9722         * stack.c (backtrace_command_1): Remove verbose code.
9723
9724 2018-03-26  Tom Tromey  <tom@tromey.com>
9725
9726         * python/py-framefilter.c (py_print_type): Don't catch
9727         exceptions.  Return void.
9728         (py_print_value): Likewise.
9729         (py_print_single_arg): Likewise.
9730         (enumerate_args): Don't catch exceptions.
9731         (py_print_args): Likewise.
9732         (py_print_frame): Likewise.
9733         (gdbpy_apply_frame_filter): Catch exceptions here.
9734
9735 2018-03-26  Tom Tromey  <tom@tromey.com>
9736
9737         * stack.c (_initialize_stack): Remove trailing newlines from help
9738         text.  Add "Usage" line to "backtrace" help.
9739
9740 2018-03-26  Tom Tromey  <tom@tromey.com>
9741
9742         PR python/16486:
9743         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9744
9745 2018-03-26  Tom Tromey  <tom@tromey.com>
9746
9747         * python/py-framefilter.c (py_print_single_arg): Return
9748         EXT_LANG_BT_ERROR from catch.
9749
9750 2018-03-26  Tom Tromey  <tom@tromey.com>
9751
9752         PR backtrace/15584:
9753         * stack.c (backtrace_command_1): Move some code into no-filters
9754         "if".
9755
9756 2018-03-26  Tom Tromey  <tom@tromey.com>
9757
9758         * python/py-framefilter.c (throw_quit_or_print_exception): New
9759         function.
9760         (gdbpy_apply_frame_filter): Use it.
9761
9762 2018-03-26  Tom Tromey  <tom@tromey.com>
9763
9764         PR cli/17716:
9765         * python/py-framefilter.c (py_print_type, py_print_value)
9766         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9767         RETURN_MASK_ERROR.
9768
9769 2018-03-26  Tom Tromey  <tom@tromey.com>
9770
9771         * python/py-framefilter.c (enumerate_args): Use
9772         gdb::unique_xmalloc_ptr.
9773
9774 2018-03-26  Tom Tromey  <tom@tromey.com>
9775
9776         * python/py-framefilter.c (py_print_frame): Return
9777         EXT_LANG_BT_OK.
9778         (gdbpy_apply_frame_filter): Update comment.
9779         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9780         Remove.
9781         <EXT_LANG_BT_NO_FILTERS>: Change value.
9782
9783 2018-03-26  Tom Tromey  <tom@tromey.com>
9784
9785         PR backtrace/15582:
9786         * stack.c (backtrace_command): Parse "hide" argument.
9787         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9788         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9789         constant.
9790
9791 2018-03-26  Tom Tromey  <tom@tromey.com>
9792
9793         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9794         add "flags".
9795         (backtrace_command): Remove "fulltrace", add "flags".
9796
9797 2018-03-26  Tom Tromey  <tom@tromey.com>
9798
9799         * stack.c (backtrace_command): Rewrite command line parsing.
9800
9801 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9802
9803         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9804
9805 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9806
9807         * filename-seen-cache.h: Add include guard.
9808
9809 2018-03-26  Keith Seitz  <keiths@redhat.com>
9810
9811         * symfile.c (place_section): Remove "struct" from section_addr_info
9812         in comment.
9813         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9814         "struct" keyword from section_addr_info.
9815
9816 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9817
9818         * regformats/regdef.h (reg): Add constructors.
9819
9820 2018-03-25  Pedro Alves  <palves@redhat.com>
9821
9822         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9823         if then/else bodies in var_func_name extraction.
9824
9825 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9826
9827         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9828         lookup_minimal_symbol() to find symbol entry.
9829         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9830
9831 2018-03-23  Keith Seitz  <keiths@redhat.com>
9832
9833         PR c++/22968
9834         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9835         nested type definitions for C++, too.
9836
9837 2018-03-23  Tom Tromey  <tom@tromey.com>
9838
9839         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9840         a typedef.
9841         (macho_register_oso): Remove.
9842         (macho_symtab_read): Take a std::vector.
9843         (oso_el_compare_name): Now a std::sort comparator.
9844         (macho_symfile_read_all_oso): Take a std::vector.
9845         (macho_symfile_read): Use std::vector.  Remove cleanups.
9846
9847 2018-03-22  Tom Tromey  <tom@tromey.com>
9848
9849         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9850         (record_full_goto_bookmark): Use std::string.
9851
9852 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9853
9854         PR tdep/18295
9855         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9856         a single mask.
9857
9858 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9859
9860         * rs6000-tdep.c (store_insn_p): New function.
9861         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9862         and cr_reg to their unshifted values. Use store_insn_p to
9863         match LR saves using either R1 or fdata->alloca_reg. Use
9864         store_insn_p to match CR saves. Set alloca_reg_offset
9865         when alloca_reg and framep are set. Remove lr_reg shift
9866         when assigning to fdata->lr_register.
9867
9868 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9869
9870         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9871         command line args instead of emitting a warning.
9872
9873 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9874
9875         * tracepoint.h (struct static_tracepoint_marker): Initialize
9876         fields, define default constructor, move constructor and move
9877         assignment, disable the rest.
9878         <str_id, extra>: Make std::string.
9879         (release_static_tracepoint_marker): Remove.
9880         (free_current_marker): Remove.
9881         * tracepoint.c (free_current_marker): Remove.
9882         (parse_static_tracepoint_marker_definition): Adjust to
9883         std::string, use new hex2str overload.
9884         (release_static_tracepoint_marker): Remove.
9885         (print_one_static_tracepoint_marker): Get marker by reference
9886         and adjust to std::string.
9887         (info_static_tracepoint_markers_command): Adjust to std::vector
9888         changes
9889         * target.h (static_tracepoint_marker_p): Remove typedef.
9890         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9891         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9892         bool.
9893         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9894         * target-debug.h
9895         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9896         (target_debug_print_std_vector_static_tracepoint_marker): New.
9897         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9898         to...
9899         (target_debug_print_static_tracepoint_marker_p): ... this.
9900         * target-delegates.c: Re-generate.
9901         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9902         Make std::string.
9903         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9904         (decode_static_tracepoint_spec): Adjust to std::vector.
9905         (tracepoint_print_one_detail): Adjust to std::string.
9906         (strace_marker_decode_location): Adjust to std::string.
9907         (update_static_tracepoint): Adjust to std::string, remove call
9908         to release_static_tracepoint_marker.
9909         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9910         Adjust to std::vector.
9911         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9912         (remote_static_tracepoint_markers_by_strid): Adjust to
9913         std::vector.
9914         * common/rsp-low.h (hex2str): New overload with explicit count
9915         of bytes.
9916         * common/rsp-low.c (hex2str): New overload with explicit count
9917         of bytes.
9918         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9919         (_initialize_rsp_low_selftests): Add test_hex2str test.
9920         * unittests/tracepoint-selftests.c
9921         (test_parse_static_tracepoint_marker_definition): Adjust to
9922         std::string.
9923
9924 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9925
9926         * tracepoint.c (parse_static_tracepoint_marker_definition):
9927         Consider case where the definition is followed by more
9928         definitions.
9929         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9930         tracepoint-selftests.c.
9931         * unittests/tracepoint-selftests.c: New.
9932
9933 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9934
9935         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9936         Carvalho.
9937
9938 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9939
9940         * symtab.c (find_pc_sect_line): fixed indentation.
9941
9942 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9943
9944         * symtab.c (find_pc_sect_line): now uses binary search.
9945
9946 2018-03-19  Tom Tromey  <tom@tromey.com>
9947
9948         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9949         "IDENT" production.
9950
9951 2018-03-19  Pedro Alves  <palves@redhat.com>
9952             Tom Tromey  <tom@tromey.com>
9953
9954         * unittests/observable-selftests.c: New file.
9955         * common/observable.h: New file.
9956         * observable.h: New file.
9957         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9958         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9959         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9960         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9961         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9962         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9963         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9964         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9965         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9966         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9967         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9968         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9969         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9970         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9971         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9972         tui/tui-interp.c, valops.c: Update all users.
9973         * tui/tui-hooks.c (tui_bp_created_observer)
9974         (tui_bp_deleted_observer, tui_bp_modified_observer)
9975         (tui_inferior_exit_observer, tui_before_prompt_observer)
9976         (tui_normal_stop_observer, tui_register_changed_observer):
9977         Remove.
9978         (tui_observers_token): New global.
9979         (attach_or_detach, tui_attach_detach_observers): New functions.
9980         (tui_install_hooks, tui_remove_hooks): Use
9981         tui_attach_detach_observers.
9982         * record-btrace.c (record_btrace_thread_observer): Remove.
9983         (record_btrace_thread_observer_token): New global.
9984         * observer.sh: Remove.
9985         * observer.c: Rename to observable.c.
9986         * observable.c (namespace gdb_observers): Define new objects.
9987         (observer_debug): Move into gdb_observers namespace.
9988         (struct observer, struct observer_list, xalloc_observer_list_node)
9989         (xfree_observer_list_node, generic_observer_attach)
9990         (generic_observer_detach, generic_observer_notify): Remove.
9991         (_initialize_observer): Update.
9992         Don't include observer.inc.
9993         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9994         (clean mostlyclean): Likewise.
9995         (observer.h, observer.inc): Remove targets.
9996         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9997         (COMMON_SFILES): Use observable.c, not observer.c.
9998         * .gitignore: Remove observer.h.
9999
10000 2018-03-18  Tom Tromey  <tom@tromey.com>
10001
10002         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10003         gdb::def_vector.
10004         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10005
10006 2018-03-17  Tom Tromey  <tom@tromey.com>
10007
10008         * auto-load.c (auto_load_objfile_script_1): Use std::string.
10009
10010 2018-03-17  Tom Tromey  <tom@tromey.com>
10011
10012         * target.c (class scoped_target_fd): New.
10013         (target_fileio_close_cleanup): Remove.
10014         (target_fileio_read_alloc_1): Use scoped_target_fd.
10015
10016 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
10017
10018         * silent-rules.mk: New.
10019         * Makefile.in: Include silent-rules.mk
10020         (srcdir, VPATH, top_srcdir): Move up.
10021         (COMPILE): Add ECHO_CXX.
10022         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10023         (init.c): Add ECHO_INIT_C.
10024         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10025         (version.c): Add ECHO_GEN.
10026         (printcmd.o): Add ECHO_CXX.
10027         (target-float.o): Add ECHO_CXX.
10028         (ada-exp.o): Add ECHO_CXX.
10029         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10030         (insight$(EXEEXT)): Add ECHO_CXXLD.
10031         * gnulib/configure.ac: Add AM_SILENT_RULES.
10032         * gnulib/aclocal.m4: Re-generate.
10033         * gnulib/configure: Re-generate.
10034         * gnulib/import/Makefile.in: Re-generate.
10035
10036 2018-03-16  Tom Tromey  <tom@tromey.com>
10037
10038         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10039         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10040         * utils.c (do_free_section_addr_info)
10041         (make_cleanup_free_section_addr_info): Remove.
10042         * symfile.h (struct other_sections): Add constructor.
10043         (struct section_addr_info): Remove.
10044         (section_addr_info): New typedef.
10045         (struct sym_fns) <sym_offsets>: Change type of parameter.
10046         (build_section_addr_info_from_objfile)
10047         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10048         (default_symfile_offsets, symbol_file_add)
10049         (symbol_file_add_from_bfd)
10050         (build_section_addr_info_from_section_table): Update.
10051         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10052         * symfile.c (alloc_section_addr_info): Remove.
10053         (build_section_addr_info_from_section_table): Change return type.
10054         Update.
10055         (build_section_addr_info_from_bfd)
10056         (build_section_addr_info_from_objfile): Likewise.
10057         (free_section_addr_info): Remove.
10058         (relative_addr_info_to_section_offsets): Change type of "addrs".
10059         (addrs_section_compar): Now a std::sort comparator.
10060         (addrs_section_sort): Change return type.
10061         (addr_info_make_relative): Change type of "addrs".  Update.
10062         (default_symfile_offsets, syms_from_objfile_1)
10063         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10064         (symbol_file_add_separate): Update.
10065         (symbol_file_add): Change type of "addrs".  Update.
10066         (add_symbol_file_command): Update.  Remove cleanups.
10067         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10068         cleanups.
10069         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10070         * solib.c (solib_read_symbols): Update.
10071         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10072         * machoread.c (macho_symfile_offsets): Update.
10073         * jit.c (jit_bfd_try_read_symtab): Update.
10074
10075 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10076
10077         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10078         unittests/utils-selftests.c.
10079         * unittests/utils-selftests.c: New file.
10080
10081 2018-03-14  Tom Tromey  <tom@tromey.com>
10082
10083         PR cli/14977:
10084         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10085         for NULL.
10086
10087 2018-03-14  Tom Tromey  <tom@tromey.com>
10088
10089         PR cli/19918:
10090         * printcmd.c (printf_pointer): Allow "-" in format.
10091
10092 2018-03-14  Tom Tromey  <tom@tromey.com>
10093
10094         * printcmd.c (_initialize_printcmd): Add usage to printf.
10095
10096 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10097
10098         * MAINTAINERS: Update my email address.
10099
10100 2018-03-13  Tom Tromey  <tom@tromey.com>
10101
10102         * machoread.c (macho_check_dsym): Change filenamep to a
10103         std::string*.
10104         (macho_symfile_read): Update.
10105         * symfile.c (load_command): Use std::string.
10106
10107 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10108
10109         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10110         to error message string.
10111         (riscv_register_name): Use xsnprintf instead of sprintf.
10112         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10113         internal_error.
10114         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10115         error.
10116         (riscv_push_dummy_call): Likewise.
10117
10118 2018-03-12  Tom Tromey  <tom@tromey.com>
10119
10120         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10121         Use gdb::byte_vector.
10122         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10123
10124 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10125
10126         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10127         parameter type to readable_regcache.
10128         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10129         the declaration.
10130
10131 2018-03-11  Tom Tromey  <tom@tromey.com>
10132
10133         * dwarf2read.c (struct nextfield): Add initializers.
10134         (struct nextfnfield): Remove.
10135         (struct fnfieldlist): Add initializers.  Remove "length" and
10136         "head", use std::vector.
10137         (struct decl_field_list): Remove.
10138         (struct field_info): Add initializers.
10139         <fields, baseclasses>: Now std::vector.
10140         <nbaseclasses, nfnfields, typedef_field_list_count,
10141         nested_types_list_count>: Remove.
10142         (dwarf2_add_field, dwarf2_add_type_defn)
10143         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10144         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10145         (process_structure_scope): Update.
10146
10147 2018-03-11  Tom Tromey  <tom@tromey.com>
10148
10149         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10150         for use by std::sort.
10151         (build_type_psymtabs_1): Use std::vector.
10152
10153 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10154
10155         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10156         and LIBMPFR in the printed configuration.
10157
10158 2018-03-08  Tom Tromey  <tom@tromey.com>
10159
10160         * source.c (get_filename_and_charpos): Use scoped_fd.
10161         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10162         (procfs_pidlist): Likewise.
10163         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10164         (iterate_over_mappings): Likewise.
10165
10166 2018-03-08  Tom Tromey  <tom@tromey.com>
10167
10168         * infcall.c (struct call_return_meta_info)
10169         <stack_temporaries_enabled>: Remove.
10170         (get_call_return_value, call_function_by_hand_dummy): Update.
10171         * thread.c (disable_thread_stack_temporaries): Remove.
10172         (enable_thread_stack_temporaries): Remove.
10173         (thread_stack_temporaries_enabled_p): Return bool.
10174         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10175         (get_last_thread_stack_temporary): Update.
10176         * eval.c (evaluate_subexp): Update.
10177         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10178         class, not a function.
10179         (value_ptr, value_vec): Remove typedefs.
10180         (class thread_info) <stack_temporaries_enabled>: Now bool.
10181         <stack_temporaries>: Now a std::vector.
10182         (thread_stack_temporaries_enabled_p)
10183         (value_in_thread_stack_temporaries): Return bool.
10184
10185 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10186
10187         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10188         (getpkt_or_notif_sane_1): Likewise.
10189
10190 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10191
10192         * build-id.c (build_id_to_debug_bfd): Use std::string.
10193
10194 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10195
10196         * build-id.c (find_separate_debug_file_by_buildid): Return
10197         std::string.
10198         * build-id.h (find_separate_debug_file_by_buildid): Return
10199         std::string.
10200         * coffread.c (coff_symfile_read): Adjust to std::string.
10201         * elfread.c (elf_symfile_read): Adjust to std::string.
10202         * symfile.c (separate_debug_file_exists): Change parameter to
10203         std::string.
10204         (find_separate_debug_file): Return std::string.
10205         (find_separate_debug_file_by_debuglink): Return std::string.
10206         * symfile.h (find_separate_debug_file_by_debuglink): Return
10207         std::string.
10208
10209 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10210
10211         * common/xml-utils.c (xml_escape_text): Move code to...
10212         (xml_escape_text_append): ... this new function.
10213         * common/xml-utils.h (xml_escape_text_append): New declaration.
10214         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10215         New function.
10216         (_initialize_xml_utils): register test_xml_escape_text_append as
10217         a selftest.
10218
10219 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10220
10221         * defs.h: Remove MAX_REGISTER_SIZE.
10222         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10223         asserts.
10224         * python/py-unwind.c (pyuw_sniffer): Likewise.
10225
10226 2018-03-07  Tom Tromey  <tom@tromey.com>
10227
10228         * linux-tdep.c (linux_info_proc): Update.
10229         * target.h (struct target_ops) <to_fileio_readlink>: Return
10230         optional<string>.
10231         (target_fileio_readlink): Return optional<string>.
10232         * remote.c (remote_hostio_readlink): Return optional<string>.
10233         * inf-child.c (inf_child_fileio_readlink): Return
10234         optional<string>.
10235         * target.c (target_fileio_readlink): Return optional<string>.
10236
10237 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10238
10239         * regcache.c (cooked_read_test): Add riscv to the list of
10240         architectures that have a save_reggroup.
10241
10242 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10243
10244         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10245         value is not a dynamic class object.
10246
10247 2018-03-06  Tom Tromey  <tom@tromey.com>
10248
10249         * rust-exp.y: Formatting fixes.
10250
10251 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10252
10253         * riscv-tdep.c (riscv_register_name): Remove target description
10254         support.
10255         (riscv_gdbarch_init): Remove target description check.
10256
10257 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10258
10259         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10260         comment.
10261         * riscv-tdep.h: Likewise.
10262
10263 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10264
10265         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10266         (riscv_pseudo_register_write): Delete.
10267         (riscv_gdbarch_init): Remove all use of pseudo registers.
10268
10269 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10270
10271         * record-btrace.c (btrace_print_lines): Replace cleanup
10272         parameter with RAII equivalents.
10273         (btrace_insn_history): Replace cleanup with RAII equivalents.
10274         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10275         make_cleanup_ui_out_tuple_begin_end): Remove.
10276         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10277         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10278         make_cleanup_ui_out_list_begin_end): Remove.
10279
10280 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10281
10282         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10283         parameter types to std::vector.  Use bool.
10284         (record_btrace_wait): Replace VEC(tp_t) with
10285         std::vector<thread_info *>.
10286         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10287
10288 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10289
10290         * record-btrace.c (record_btrace_disable_callback): Remove.
10291         (struct scoped_btrace_disable): New.
10292         (record_btrace_open): Use scoped_btrace_disable.
10293
10294 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10295
10296         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10297         reading values from registers.
10298
10299 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10300
10301         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10302         where appropriate.
10303
10304 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10305
10306         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10307         change parameter type.  Use GDB's print functions, and use
10308         core_addr_to_string where appropriate.
10309         (riscv_push_dummy_call): Use core_addr_to_string where
10310         appropriate, update call to riscv_print_arg_location, and reindent
10311         a few lines.
10312         (riscv_return_value): Update call to riscv_print_arg_location.
10313
10314 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10315             Tim Newsome <tim@sifive.com>
10316             Albert Ou <a0u@eecs.berkeley.edu>
10317             Darius Rad <darius@bluespec.com>
10318
10319         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10320         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10321         (ALLDEPFILES): Add riscv-tdep.c
10322         * configure.tgt: Add riscv support.
10323         * riscv-tdep.c: New file.
10324         * riscv-tdep.h: New file.
10325         * NEWS: Mention new target.
10326         * MAINTAINERS: Add entry for riscv.
10327
10328 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10329
10330         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10331         fields within aggregates.
10332
10333 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10334
10335         * record-btrace.c (btrace_print_lines): Change type of flags to
10336         gdb_disassembly_flags.
10337
10338 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10339
10340         * fbsd-nat.c: Include "inf-ptrace.h".
10341         (USE_SIGTRAP_SIGINFO): Conditionally define.
10342         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10343         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10344         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10345         function.
10346         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10347         Likewise.
10348         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10349         Likewise.
10350         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10351         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10352         "supports_stopped_by_hw_breakpoint" target methods.
10353
10354 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10355
10356         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10357         * fbsd-nat.c (debug_fbsd_nat): New variable.
10358         (show_fbsd_nat_debug): New function.
10359         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10360         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10361
10362 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10363
10364         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10365         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10366         prototype.
10367         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10368         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10369         method.
10370
10371 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10372
10373         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10374         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10375
10376 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10377
10378         * charset.c (struct charset_vector): New.
10379         (charsets): Change type to charset_vector.
10380         (find_charset_names): Adjust.
10381         (add_one): Adjust.
10382         (_initialize_charset): Adjust.
10383
10384 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10385
10386         * progspace.h (struct program_space) <deleted_solibs>: Change
10387         type to std::vector<std::string>.
10388         * progspace.c (clear_program_space_solib_cache): Adjust.
10389         * breakpoint.c (print_solib_event): Adjust.
10390         (check_status_catch_solib): Adjust.
10391         * solib.c (update_solib_list): Adjust.
10392         * ui-out.h (class ui_out) <field_string>: New overload.
10393         * ui-out.c (ui_out::field_string): New overload.
10394
10395 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10396
10397         * progspace.h (struct program_space): Add constructor and
10398         destructor, initialize fields.
10399         (add_program_space): Remove.
10400         * progspace.c (add_program_space): Rename to...
10401         (program_space::program_space): ... this.
10402         (release_program_space): Rename to...
10403         (program_space::~program_space): ... this.
10404         (delete_program_space): Use delete to delete program_space.
10405         (initialize_progspace): Use new to allocate program_space.
10406         * inferior.c (add_inferior_with_spaces): Likewise.
10407         (clone_inferior_command): Likewise.
10408         * infrun.c (follow_fork_inferior): Likewise.
10409         (handle_vfork_child_exec_or_exit): Likewise.
10410
10411 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10412
10413         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10414         (delim_string_to_char_ptr_vec): Return std::vector of
10415         gdb::unique_xmalloc_ptr.
10416         (dirnames_to_char_ptr_vec_append): Take std::vector of
10417         gdb::unique_xmalloc_ptr.
10418         (dirnames_to_char_ptr_vec): Return std::vector of
10419         gdb::unique_xmalloc_ptr.
10420         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10421         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10422         (delim_string_to_char_ptr_vec): Return an std::vector of
10423         gdb::unique_xmalloc_ptr, adjust the code.
10424         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10425         gdb::unique_xmalloc_ptr, adjust the code.
10426         (dirnames_to_char_ptr_vec): Return an std::vector of
10427         gdb::unique_xmalloc_ptr, adjust the code.
10428         * auto-load.c (auto_load_safe_path_vec): Change type to
10429         std::vector of gdb::unique_xmalloc_ptr.
10430         (auto_load_expand_dir_vars): Return an std::vector of
10431         gdb::unique_xmalloc_ptr, adjust the code.
10432         (auto_load_safe_path_vec_update): Adjust.
10433         (filename_is_in_auto_load_safe_path_vec): Adjust.
10434         (auto_load_objfile_script_1): Adjust.
10435         * build-id.c (build_id_to_debug_bfd): Adjust.
10436         * linux-thread-db.c (thread_db_load_search): Adjust.
10437         * source.c (add_path): Adjust.
10438         (openp): Adjust.
10439         * symfile.c (find_separate_debug_file): Adjust.
10440         * utils.c (do_free_char_ptr_vec): Remove.
10441         (make_cleanup_free_char_ptr_vec): Remove.
10442
10443 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10444
10445         PR gdb/22907
10446         * common/pathstuff.c: Conditionally include "<windows.h>".
10447
10448 2018-03-01  Georg Sauthoff  <mail@georg.so>
10449
10450         PR gdb/22888
10451         * gcore.in: Quote variables and switch interpreter to bash.
10452
10453 2018-03-01  Tom Tromey  <tom@tromey.com>
10454
10455         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10456         assertion.  Add assertion for discriminant_index.
10457         (quirk_rust_enum): Use correct base type name in univariant case.
10458
10459 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10460
10461         * record.c (get_call_history_modifiers): Return a
10462         record_print_flags.
10463         (cmd_record_call_history): Adjust.
10464         * record-btrace.c (record_btrace_call_history): Adjust.
10465         (record_btrace_call_history_range): Adjust.
10466         (record_btrace_call_history_from): Adjust.
10467         * target-debug.h (target_debug_print_record_print_flags): New.
10468         * target-delegates.c: Re-generate.
10469         * target.c (target_call_history): Change flags type.
10470         (target_call_history_from): Likewise.
10471         (target_call_history_range): Likewise.
10472         * target.h (struct target_ops) <target_call_history>: Likewise.
10473         (target_call_history_from): Likewise.
10474         (target_call_history_range): Likewise.
10475
10476 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10477             Simon Marchi  <simon.marchi@polymtl.ca>
10478
10479         * common/common-utils.c: Include "sys/stat.h".
10480         (is_regular_file): Move here from "source.c"; change return
10481         type to "bool".
10482         * common/common-utils.h (is_regular_file): New prototype.
10483         * common/pathstuff.c (contains_dir_separator): New function.
10484         * common/pathstuff.h (contains_dir_separator): New prototype.
10485         * source.c: Don't include "sys/stat.h".
10486         (is_regular_file): Move to "common/common-utils.c".
10487
10488 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10489
10490         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10491         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10492         * auto-load.c: Include "common/pathstuff.h".
10493         * common/common-def.h (current_directory): Move here.
10494         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10495         function.
10496         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10497         prototype.
10498         * common/pathstuff.c: New file.
10499         * common/pathstuff.h: New file.
10500         * compile/compile.c: Include "common/pathstuff.h".
10501         * defs.h (current_directory): Move to "common/common-defs.h".
10502         * dwarf2read.c: Include "common/pathstuff.h".
10503         * exec.c: Likewise.
10504         * guile/scm-safe-call.c: Likewise.
10505         * linux-thread-db.c: Likewise.
10506         * main.c: Likewise.
10507         * nto-tdep.c: Likewise.
10508         * objfiles.c: Likewise.
10509         * source.c: Likewise.
10510         * symtab.c: Likewise.
10511         * utils.c: Include "common/pathstuff.h".
10512         (gdb_realpath): Move to "common/pathstuff.c".
10513         (gdb_realpath_keepfile): Likewise.
10514         (gdb_abspath): Likewise.
10515         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10516         (gdb_realpath_keepfile): Likewise.
10517         (gdb_abspath): Likewise.
10518
10519 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10520
10521         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10522         wildcard process pid for super_resume for kernels with a
10523         specific bug.
10524
10525 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10526
10527         * compile/compile.c (get_args): Add additional comments
10528         explaining function.
10529
10530 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10531             Tom Tromey  <tom@tromey.com>
10532
10533         * target.h (memory_write_request_s): Remove typedef.  Don't define
10534         VEC.
10535         (target_write_memory_blocks): Change argument to std::vector.
10536         (struct memory_write_request): Add constructor.
10537         * target-memory.c (compare_block_starting_address): Return bool.
10538         Change argument types.
10539         (claim_memory): Change arguments to use std::vector.
10540         (split_regular_and_flash_blocks, blocks_to_erase)
10541         (compute_garbled_blocks): Likewise.
10542         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10543         (target_write_memory_blocks): Change argument to std::vector.
10544         * symfile.c (struct load_section_data): Add constructor and
10545         destructor.  Use std::vector for "requests".
10546         (struct load_progress_data): Add initializers.
10547         (load_section_callback): Update.  Use "new".
10548         (clear_memory_write_data): Remove.
10549         (generic_load): Update.
10550
10551 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10552
10553         * arch/aarch64.h: Use common/tdesc.h.
10554
10555 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10556
10557         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10558         architecture with a 64-bit ABI.
10559
10560 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10561
10562         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10563         ahead of target description loading.
10564
10565 2018-02-26  Tom Tromey  <tom@tromey.com>
10566
10567         * stack.c (backtrace_command_1): Update.
10568         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10569         of "flags".
10570         * python/py-framefilter.c (py_print_frame)
10571         (gdbpy_apply_frame_filter): Change type of "flags".
10572         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10573         of "flags".
10574         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10575         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10576         * extension.h (enum frame_filter_flag): Rename from
10577         frame_filter_flags.
10578         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10579         (apply_ext_lang_frame_filter): Change type of "flags".
10580         * extension.c (apply_ext_lang_frame_filter): Change type of
10581         "flags".
10582         * extension-priv.h (struct extension_language_ops)
10583         <apply_frame_filter>: Change type of "flags".
10584
10585 2018-02-26  Tom Tromey  <tom@tromey.com>
10586
10587         PR python/16497:
10588         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10589         off-by-one in py_end computation.
10590         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10591         PRINT_MORE_FRAMES.
10592         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10593         constant.
10594
10595 2018-02-26  Tom Tromey  <tom@tromey.com>
10596
10597         * dwarf2read.c (struct variant_field): New.
10598         (struct nextfield) <variant>: New field.
10599         (dwarf2_add_field): Handle DW_TAG_variant_part.
10600         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10601         discriminated union.
10602         (read_structure_type): Handle DW_TAG_variant_part.
10603         (handle_struct_member_die): New function, extracted from
10604         process_structure_scope.  Handle DW_TAG_variant.
10605         (process_structure_scope): Handle discriminated unions.  Call
10606         handle_struct_member_die.
10607
10608 2018-02-26  Tom Tromey  <tom@tromey.com>
10609
10610         * rust-lang.h (rust_last_path_segment): Declare.
10611         * rust-lang.c (rust_last_path_segment): Now public.  Change
10612         contract.
10613         (struct disr_info): Remove.
10614         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10615         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10616         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10617         (rust_enum_p, rust_enum_variant): New function.
10618         (rust_underscore_fields): Remove "offset" parameter.
10619         (rust_print_enum): New function.
10620         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10621         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10622         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10623         enums.
10624         (rust_internal_print_type): New function, from rust_print_type.
10625         Remove enum code.
10626         (rust_print_type): Call rust_internal_print_type.
10627         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10628         Update enum handling.
10629         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10630         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10631         (rust_union_quirks): New functions.
10632         (process_full_comp_unit, process_full_type_unit): Call
10633         rust_union_quirks.
10634         (process_structure_scope): Update rust_unions if necessary.
10635
10636 2018-02-26  Tom Tromey  <tom@tromey.com>
10637
10638         * value.h (value_union_variant): Declare.
10639         * valops.c (value_union_variant): New function.
10640         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10641         (struct discriminant_info): New.
10642         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10643         enumerator.
10644         (struct main_type) <flag_discriminated_union>: New field.
10645
10646 2018-02-26  Tom Tromey  <tom@tromey.com>
10647
10648         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10649         unittests/unpack-selftests.c.
10650         * unittests/unpack-selftests.c: New file.
10651         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10652
10653 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10654
10655         * dwarf2read.c (struct partial_die_info) <read>: New method.
10656         (read_partial_die): Remove the declaration.
10657         (load_partial_dies): Update.
10658         (partial_die_info::partial_die_info):
10659         (read_partial_die): Change it to partial_die_info::read.
10660
10661 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10662
10663         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10664         (fixup_partial_die): Remove declaration.
10665         (scan_partial_symbols): Update.
10666         (partial_die_parent_scope): Likewise.
10667         (partial_die_full_name): Likewise.
10668         (fixup_partial_die): Change it to partial_die_info::fixup.
10669
10670 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10671
10672         * dwarf2read.c (read_partial_die): Update the declaration.
10673         (load_partial_dies): Caller update.
10674         (read_partial_die): Remove one argument abbrev_len.
10675
10676 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10677
10678         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10679         assignment operator.
10680         (load_partial_dies): Use ctor and copy ctor.
10681         (read_partial_die): Update.
10682         (dwarf2_cu::find_partial_die): Use ctor.
10683
10684 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10685
10686         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10687         (find_partial_die_in_comp_unit): Change it to
10688         dwarf2_cu::find_partial_die.
10689         (find_partial_die): Update.
10690
10691 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10692
10693         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10694         is NULL.
10695
10696 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10697
10698         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10699
10700 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10701
10702         * arch/amd64.h: Use common/tdesc.h.
10703         * arch/i386.c: Likewise.
10704         * arch/i386.h: Likewise.
10705         * arch/tic6x.c: Likewise.
10706         * arch/tdesc.h: Move file from here...
10707         * common/tdesc.h: ...to here.
10708         * features/aarch64-core.c: Regenerate.
10709         * features/aarch64-fpu.c: Regenerate.
10710         * features/i386/32bit-avx.c: Regenerate.
10711         * features/i386/32bit-avx512.c: Regenerate.
10712         * features/i386/32bit-core.c: Regenerate.
10713         * features/i386/32bit-linux.c: Regenerate.
10714         * features/i386/32bit-mpx.c: Regenerate.
10715         * features/i386/32bit-pkeys.c: Regenerate.
10716         * features/i386/32bit-sse.c: Regenerate.
10717         * features/i386/64bit-avx.c: Regenerate.
10718         * features/i386/64bit-avx512.c: Regenerate.
10719         * features/i386/64bit-core.c: Regenerate.
10720         * features/i386/64bit-linux.c: Regenerate.
10721         * features/i386/64bit-mpx.c: Regenerate.
10722         * features/i386/64bit-pkeys.c: Regenerate.
10723         * features/i386/64bit-segments.c: Regenerate.
10724         * features/i386/64bit-sse.c: Regenerate.
10725         * features/i386/x32-core.c: Regenerate.
10726         * features/tic6x-c6xp.c: Regenerate.
10727         * features/tic6x-core.c: Regenerate.
10728         * features/tic6x-gp.c: Regenerate.
10729         * target-descriptions.c: Use common/tdesc.h.
10730         * target-descriptions.h: Likewise.
10731
10732 2018-02-24  Tom Tromey  <tom@tromey.com>
10733
10734         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10735         (try_thread_db_load_from_dir, thread_db_load_search): Use
10736         std::string.
10737         (info_auto_load_libthread_db_compare): Return bool.  Change
10738         argument types.
10739         (info_auto_load_libthread_db): Use std::vector, std::string.
10740         Remove cleanups.
10741
10742 2018-02-24  Tom Tromey  <tom@tromey.com>
10743
10744         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10745         std::string.
10746         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10747         std::string*.
10748         * gdbarch.c: Rebuild.
10749         * gdbarch.h: Rebuild.
10750         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10751         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10752         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10753         std::string*.
10754
10755 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10756
10757         * gdbtypes.h (sect_offset): Change type to uint64_t.
10758         (sect_offset_str): New function.
10759         * dwarf2read.c (create_addrmap_from_aranges): Use
10760         sect_offset_str.
10761         (error_check_comp_unit_head): Likewise.
10762         (create_debug_type_hash_table): Likewise.
10763         (read_cutu_die_from_dwo): Likewise.
10764         (init_cutu_and_read_dies): Likewise.
10765         (init_cutu_and_read_dies_no_follow): Likewise.
10766         (process_psymtab_comp_unit_reader): Likewise.
10767         (partial_die_parent_scope): Likewise.
10768         (peek_die_abbrev): Likewise.
10769         (process_queue): Likewise.
10770         (dwarf2_physname): Likewise.
10771         (read_namespace_alias): Likewise.
10772         (read_import_statement): Likewise.
10773         (create_dwo_cu_reader): Likewise.
10774         (create_cus_hash_table): Likewise.
10775         (lookup_dwo_cutu): Likewise.
10776         (inherit_abstract_dies): Likewise.
10777         (read_func_scope): Likewise.
10778         (read_call_site_scope): Likewise.
10779         (dwarf2_add_member_fn): Likewise.
10780         (read_common_block): Likewise.
10781         (read_module_type): Likewise.
10782         (read_typedef): Likewise.
10783         (read_subrange_type): Likewise.
10784         (load_partial_dies): Likewise.
10785         (read_partial_die): Likewise.
10786         (find_partial_die): Likewise.
10787         (read_str_index): Likewise.
10788         (dwarf2_string_attr): Likewise.
10789         (build_error_marker_type): Likewise.
10790         (lookup_die_type): Likewise.
10791         (dump_die_shallow): Likewise.
10792         (follow_die_ref): Likewise.
10793         (dwarf2_fetch_die_loc_sect_off): Likewise.
10794         (dwarf2_fetch_constant_bytes): Likewise.
10795         (follow_die_sig): Likewise.
10796         (get_signatured_type): Likewise.
10797         (get_DW_AT_signature_type): Likewise.
10798         (dwarf2_find_containing_comp_unit): Likewise.
10799         (set_die_type): Likewise.
10800
10801 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10802
10803         * arch/aarch64.c: Include "common-defs.h".
10804         * arch/amd64.c: Likewise.
10805         * arch/i386.c: Likewise.
10806
10807 2018-02-21  Tom Tromey  <tom@tromey.com>
10808
10809         * value.h: (extract_field_op): Update.
10810         * eval.c (extract_field_op): Return a const char *.
10811         * expression.h (parse_expression_for_completion): Update.
10812         * completer.c (complete_expression): Update.
10813         (add_struct_fields): Make fieldname const.
10814         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10815         (mark_completion_tag, parse_exp_in_context_1): Update.
10816         (parse_expression_for_completion): Change "name" to
10817         unique_xmalloc_ptr*.
10818
10819 2018-02-21  Tom Tromey  <tom@tromey.com>
10820
10821         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10822
10823 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10824
10825         * avr-tdep.c (avr_read_pc): Change parameter type to
10826         readable_regcache.
10827         * gdbarch.sh (read_pc): Likewise.
10828         * gdbarch.c: Re-generated.
10829         * gdbarch.h: Re-generated.
10830         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10831         readable_regcache.
10832         * ia64-tdep.c (ia64_read_pc): Likewise.
10833         * mips-tdep.c (mips_read_pc): Likewise.
10834         * spu-tdep.c (spu_read_pc): Likewise.
10835
10836 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10837
10838         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10839         * regcache-dump.c: New file.
10840         * regcache.c: Move register_dump to regcache-dump.c.
10841         (maintenance_print_registers): Likewise.
10842         (maintenance_print_raw_registers): Likewise.
10843         (maintenance_print_cooked_registers): Likewise.
10844         (maintenance_print_register_groups): Likewise.
10845         (maintenance_print_remote_registers): Likewise.
10846         (_initialize_regcache): Likewise.
10847         * regcache.h (register_dump): Moved from regcache.c.
10848
10849 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10850
10851         * regcache.c (regcache::regcache): Update.
10852         (regcache::invalidate): Move it to detached_regcache::invalidate.
10853         (get_thread_arch_aspace_regcache): Update.
10854         (regcache::raw_update): Update.
10855         (regcache::cooked_read): Remove some code.
10856         (regcache::cooked_read_value): Likewise.
10857         (regcache::raw_write): Remove assert on m_readonly_p.
10858         (regcache::raw_supply_integer): Move it to
10859         detached_regcache::raw_supply_integer.
10860         (regcache::raw_supply_zeroed): Likewise.
10861         * regcache.h (detached_regcache) <raw_supply_integer>: New
10862         declaration.
10863         <raw_supply_zeroed, invalidate>: Likewise.
10864         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10865         <invalidate>: Likewise.
10866         <m_readonly_p>: Removed.
10867
10868 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10869
10870         * infcmd.c (get_return_value): Let stop_regs point to
10871         get_current_regcache.
10872         * regcache.c (regcache::regcache): Remove.
10873         (register_dump_reg_buffer): New class.
10874         (regcache_print): Adjust.
10875         * regcache.h (regcache): Remove constructors.
10876
10877 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10878
10879         * regcache.c (class register_dump): New class.
10880         (register_dump_regcache, register_dump_none): New class.
10881         (register_dump_remote, register_dump_groups): New class.
10882         (regcache_print): Update.
10883         * regcache.h (regcache_dump_what): Move it to regcache.c.
10884         (regcache) <dump>: Remove.
10885
10886 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10887
10888         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10889          reg_buffer_rw *.
10890         (jit_unwind_reg_set_impl): Call raw_supply.
10891         (jit_frame_sniffer): Use reg_buffer_rw.
10892         * record-full.c (record_full_core_regbuf): Change its type.
10893         (record_full_core_open_1): Use reg_buffer_rw.
10894         (record_full_close): Likewise.
10895         (record_full_core_fetch_registers): Use regcache->raw_supply.
10896         (record_full_core_store_registers): Likewise.
10897         * regcache.c (regcache::get_register_status): Move it to
10898         reg_buffer.
10899         (regcache_raw_set_cached_value): Remove.
10900         (regcache::raw_set_cached_value): Remove.
10901         (regcache::raw_write): Call raw_supply.
10902         (regcache::raw_supply): Move it to reg_buffer_rw.
10903         * regcache.h (regcache_raw_set_cached_value): Remove.
10904         (reg_buffer_rw): New class.
10905
10906 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10907
10908         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10909         readonly_detached_regcache.
10910         (dummy_frame_prev_register): Use regcache->cooked_read.
10911         * frame.c (frame_save_as_regcache): Change return type.
10912         (frame_pop): Update.
10913         * frame.h (frame_save_as_regcache): Update declaration.
10914         * inferior.h (get_infcall_suspend_state_regcache): Update
10915         declaration.
10916         * infrun.c (infcall_suspend_state) <registers>: use
10917         readonly_detached_regcache.
10918         (save_infcall_suspend_state): Don't use regcache_dup.
10919         (get_infcall_suspend_state_regcache): Change return type.
10920         * linux-fork.c (struct fork_info) <savedregs>: Change to
10921         readonly_detached_regcache.
10922         <pc>: New field.
10923         (fork_save_infrun_state): Don't use regcache_dup.
10924         (info_checkpoints_command): Adjust.
10925         * mi/mi-main.c (register_changed_p): Update declaration.
10926         (mi_cmd_data_list_changed_registers): Use
10927         readonly_detached_regcache.
10928         (register_changed_p): Change parameter type to
10929         readonly_detached_regcache.
10930         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10931         readonly_detached_regcache.
10932         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10933         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10934         New.
10935         (regcache::save): Move it to reg_buffer.
10936         (regcache::restore): Change parameter type.
10937         (regcache_dup): Remove.
10938         * regcache.h (reg_buffer) <save>: New method.
10939         (readonly_detached_regcache): New class.
10940         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10941         readonly_detached_regcache.
10942         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10943
10944 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10945
10946         * frame.c (frame_save_as_regcache): Use regcache method save.
10947         (frame_pop): Use regcache method restore.
10948         * infrun.c (restore_infcall_suspend_state): Likewise.
10949         * linux-fork.c (fork_load_infrun_state): Likewise.
10950         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10951         save.
10952         * regcache.c (regcache_save): Remove.
10953         (regcache::restore): More asserts.
10954         (regcache_cpy): Remove.
10955         * regcache.h (regcache_save): Remove the declaration.
10956         (regcache::restore): Move from private to public.
10957         Remove the friend declaration of regcache_cpy.
10958         (regcache_cpy): Remove declaration.
10959
10960 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10961
10962         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10963         parameter type to 'readable_regcache *'.
10964         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10965         * arm-tdep.c (arm_neon_quad_read): Likewise.
10966         (arm_pseudo_read): Likewise.
10967         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10968         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10969         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10970         * gdbarch.c: Re-generated.
10971         * gdbarch.h: Re-generated.
10972         * gdbarch.sh (pseudo_register_read): Change parameter type to
10973         'readable_regcache *'.
10974         (pseudo_register_read_value): Likewise.
10975         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10976         (h8300_pseudo_register_read): Likewise.
10977         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10978         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10979         (i386_pseudo_register_read_into_value): Likewise.
10980         (i386_pseudo_register_read_value): Likewise.
10981         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10982         declaration.
10983         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10984         * m32c-tdep.c (m32c_raw_read): Likewise.
10985         (m32c_read_flg): Likewise.
10986         (m32c_banked_register): Likewise.
10987         (m32c_banked_read): Likewise.
10988         (m32c_sb_read): Likewise.
10989         (m32c_part_read): Likewise.
10990         (m32c_cat_read): Likewise.
10991         (m32c_r3r2r1r0_read): Likewise.
10992         (m32c_pseudo_register_read): Likewise.
10993         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10994         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10995         (mep_pseudo_cr64_read): Likewise.
10996         (mep_pseudo_register_read): Likewise.
10997         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10998         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10999         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11000         * regcache.c (regcache::raw_read): Move it to readable_regcache.
11001         (regcache::cooked_read): Likewise.
11002         (regcache::cooked_read_value): Likewise.
11003         (regcache_cooked_read_signed):
11004         (regcache::cooked_read): Likewise.
11005         * regcache.h (readable_regcache): New class.
11006         (regcache): Inherit readable_regcache.  Move some methods to
11007         readable_regcache.
11008         * rl78-tdep.c (rl78_pseudo_register_read): Change
11009         parameter type to 'readable_regcache *'.
11010         * rs6000-tdep.c (do_regcache_raw_read): Remove.
11011         (e500_pseudo_register_read): Change parameter type to
11012         'readable_regcache *'.
11013         (dfp_pseudo_register_read): Likewise.
11014         (vsx_pseudo_register_read): Likewise.
11015         (efpr_pseudo_register_read): Likewise.
11016         * s390-tdep.c (s390_pseudo_register_read): Likewise.
11017         * sh-tdep.c (sh_pseudo_register_read): Likewise.
11018         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11019         (sh64_pseudo_register_read): Likewise.
11020         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11021         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11022         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11023         (spu_pseudo_register_read): Likewise.
11024         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11025         (xtensa_pseudo_register_read): Likewise.
11026
11027 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11028
11029         * regcache.c (regcache::regcache): Call reg_buffer ctor.
11030         (regcache::arch): Move it to reg_buffer::arch.
11031         (regcache::register_buffer): Likewise.
11032         (regcache::assert_regnum): Likewise.
11033         (regcache::num_raw_registers): Likewise.
11034         * regcache.h (reg_buffer): New class.
11035         (regcache): Inherit reg_buffer.
11036
11037 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
11038
11039         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11040         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11041
11042 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
11043
11044         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11045
11046 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
11047
11048         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11049         (SFILES): Remove common/*.c files.
11050         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11051         * common/common.host: Add common reference.
11052         * configure.ac: Likewise.
11053         * configure: Regenerate.
11054
11055 2018-02-16  Yao Qi  <yao.qi@linaro.org>
11056
11057         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11058         (block_initialize_namespace): Use new.
11059         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11060         (dwarf2_free_objfile): Use delete.
11061         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11062         (copy_type_recursive): Use new.
11063         * gdb_obstack.h (allocate_on_obstack): New.
11064
11065 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11066
11067         PR gdb/22849
11068         * inferior.c (exit_inferior_1): Reset inf->control.
11069
11070 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11071
11072         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11073         declaration.
11074
11075 2018-02-14  Pedro Alves  <palves@redhat.com>
11076
11077         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11078         frame_cleanup_after_sniffer on exception.
11079
11080 2018-02-14  Tom Tromey  <tom@tromey.com>
11081
11082         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11083         const.
11084         (solib_bfd_open): Make pathname const.
11085         * solib.c (solib_bfd_open): Make pathname const.
11086         * solib-spu.c (spu_bfd_fopen): Make name const.
11087         (spu_bfd_open): Make pathname const.
11088         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11089         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11090
11091 2018-02-14  Tom Tromey  <tom@tromey.com>
11092
11093         * symfile.c (symfile_bfd_open): Update.
11094         * source.h (openp, source_full_path_of, find_and_open_source):
11095         Change argument type to unique_xmalloc_ptr.
11096         * source.c (openp): Take a unique_xmalloc_ptr.
11097         (source_full_path_of, find_and_open_source): Likewise.
11098         (open_source_file, symtab_to_fullname): Update.
11099         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11100         unique_xmalloc_ptr.
11101         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11102         (exec_file_find): Update.
11103         * psymtab.c (psymtab_to_fullname): Update.
11104         * nto-tdep.h (nto_find_and_open_solib): Update.
11105         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11106         unique_xmalloc_ptr.
11107         * exec.c (exec_file_attach): Update.
11108         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11109         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11110
11111 2018-02-14  Tom Tromey  <tom@tromey.com>
11112
11113         * solib.c: Include source.h.
11114         * nto-tdep.c: Include source.h.
11115         * mi/mi-cmd-env.c: Include source.h.
11116         * infcmd.c: Include source.h.
11117         * exec.c: Include source.h.
11118         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11119         (add_path, directory_switch, source_path, init_source_path): Move
11120         declarations...
11121         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11122         (add_path, directory_switch, source_path, init_source_path):
11123         ...here.
11124
11125 2018-02-14  Tom Tromey  <tom@tromey.com>
11126
11127         * solist.h (exec_file_find, solib_find): Return
11128         unique_xmalloc_ptr.
11129         (solib_bfd_fopen): Take a const char *.
11130         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11131         (exec_file_find, solib_find): Likewise.
11132         (solib_bfd_fopen): Do not take ownership of "pathname".
11133         (solib_bfd_open): Use unique_xmalloc_ptr.
11134         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11135         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11136         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11137         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11138
11139 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11140
11141         * ada-lang.c (name_match_type_from_name): Remove reference to
11142         ada_name_for_lookup in function's documentation.
11143         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11144
11145 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11146
11147         * defs.h (enum openp_flags): New enum.
11148         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11149         Move to enum openp_flags.
11150         (openp_flags): New enum flags.
11151         (openp): Change parameter type to openp_flags.
11152         * source.c (openp): Change parameter type to openp_flags.
11153         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11154         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11155
11156 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11157
11158         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11159         per-command.
11160
11161 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11162
11163         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11164         into...
11165         (class dwarf2_queue_guard): ...the destructor of this new class.
11166         (dw2_do_instantiate_symtab): Create instance of the new class
11167         dwarf2_queue_guard, remove cleanup.
11168
11169 2018-02-09  Tom Tromey  <tom@tromey.com>
11170
11171         * source.c (find_source_lines): Don't reference past the end of
11172         the vector.
11173
11174 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11175
11176         * remote.c (remote_btrace_maybe_reopen): Change error message.
11177         * btrace.c (btrace_enable): Likewise.
11178         (parse_xml_btrace): Likewise.
11179         (parse_xml_btrace_conf): Likewise.
11180
11181 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11182
11183         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11184         (linux_enable_pt, linux_enable_bts): Call
11185         diagnose_perf_event_open_fail.
11186
11187 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11188
11189         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11190         Remove parameter and change return type.  Update callers.  Move it.
11191         (linux_enable_bts, linux_enable_pt): Improve error message.
11192         (linux_enable_pt): Remove zero buffer size check.
11193         (linux_enable_btrace): Improve error messages.  Remove NULL return
11194         check.
11195
11196 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11197
11198         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11199         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11200         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11201         (linux_supports_pt, linux_supports_btrace): Remove.
11202         (linux_enable_bts): Call cpu_supports_bts.
11203         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11204         * remote.c (remote_supports_btrace): Remove.
11205         (init_remote_ops): Remove remote_supports_btrace.
11206         * target-delegates.c: Regenerated.
11207         * target.c (target_supports_btrace): Remove.
11208         * target.h (target_ops) <to_supports_btrace>: Remove
11209         (target_supports_btrace): Remove.
11210         * x86-linux-nat.c (x86_linux_create_target): Remove
11211         linux_supports_btrace.
11212
11213 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11214
11215         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11216         btrace failed.
11217         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11218         exception and use message in own exception.
11219
11220 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11221
11222         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11223         (perf_event_pt_event_type): Use gdb_file_up.
11224         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11225         scoped_fd, and scoped_mmap.
11226
11227 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11228
11229         * common/scoped_mmap.h: New.
11230         * unittests/scoped_mmap-selftest.c: New.
11231         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11232         unittests/scoped_mmap-selftest.c.
11233
11234 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11235
11236         * common/scoped_fd.h: New.
11237         * unittests/scoped_fd-selftest.c: New.
11238         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11239         unittests/scoped_fd-selftest.c.
11240
11241 2018-02-09  Tom Tromey  <tom@tromey.com>
11242
11243         * auto-load.c (auto_load_section_scripts): Use
11244         gdb::unique_xmalloc_ptr.
11245
11246 2018-02-09  Tom Tromey  <tom@tromey.com>
11247
11248         * auto-load.c (execute_script_contents): Use std::string.
11249
11250 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11251
11252         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11253         Python function, rather than a new command.
11254
11255 2018-02-08  Tom Tromey  <tom@tromey.com>
11256
11257         * solib.c (solib_find_1): Use std::string.
11258         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11259
11260 2018-02-08  Tom Tromey  <tom@tromey.com>
11261
11262         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11263
11264 2018-02-08  Tom Tromey  <tom@tromey.com>
11265
11266         * source.c (find_source_lines): Use gdb::def_vector.
11267
11268 2018-02-08  Tom Tromey  <tom@tromey.com>
11269
11270         * macrocmd.c (struct temporary_macro_definition): New.
11271         (macro_define_command): Use temporary_macro_definition.  Remove
11272         cleanups.
11273         (free_macro_definition_ptr): Remove.
11274
11275 2018-02-08  Tom Tromey  <tom@tromey.com>
11276
11277         * macroexp.c (maybe_expand): Use std::string.
11278
11279 2018-02-08  Tom Tromey  <tom@tromey.com>
11280
11281         * macroexp.c (struct macro_buffer): Add initializers for some
11282         members.
11283         (init_buffer, init_shared_buffer, free_buffer)
11284         (free_buffer_return_text): Remove.
11285         (macro_buffer): New constructors.
11286         (~macro_buffer): New destructor.
11287         (macro_buffer::set_shared): New method.
11288         (macro_buffer::resize_buffer, macro_buffer::appendc)
11289         (macro_buffer::appendmem): Now methods, not free functions.
11290         (set_token, append_tokens_without_splicing, stringify)
11291         (macro_stringify): Update.
11292         (gather_arguments): Change return type.  Remove argc_p argument,
11293         add args_ptr argument.  Use std::vector.
11294         (substitute_args): Remove argc argument.  Accept std::vector.
11295         (expand): Update.  Use std::vector.
11296         (scan, macro_expand, macro_expand_next): Update.
11297
11298 2018-02-08  Tom Tromey  <tom@tromey.com>
11299
11300         * symtab.c (default_collect_symbol_completion_matches_break_on):
11301         Use unique_xmalloc_ptr.
11302         * macroscope.h: (sal_macro_scope, user_macro_scope)
11303         (default_macro_scope): Return unique_xmalloc_ptr.
11304         * macroscope.c (sal_macro_scope, user_macro_scope)
11305         (default_macro_scope): Return unique_xmalloc_ptr.
11306         * macroexp.h (macro_expand, macro_expand_once): Return
11307         unique_xmalloc_ptr.
11308         * macroexp.c (macro_expand, macro_expand_once): Return
11309         unique_xmalloc_ptr.
11310         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11311         (info_macro_command, info_macros_command): Use
11312         unique_xmalloc_ptr.
11313         * compile/compile-c-support.c (write_macro_definitions): Use
11314         unique_xmalloc_ptr.
11315         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11316
11317 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11318
11319         * value.c (value_static_field): Assign field type instead of
11320         containing type when returning an optimized out value.
11321
11322 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11323
11324         * ft32-tdep.c (ft32_read_pc): Remove.
11325         (ft32_write_pc): Remove.
11326         (ft32_gdbarch_init): Update.
11327         * m32r-tdep.c (m32r_read_pc): Remove.
11328         (m32r_gdbarch_init): Update.
11329         * mep-tdep.c (mep_read_pc): Remove.
11330         (mep_gdbarch_init): Update.
11331         * microblaze-tdep.c (microblaze_write_pc): Remove.
11332         (microblaze_gdbarch_init): Update.
11333         * mn10300-tdep.c (mn10300_read_pc): Remove.
11334         (mn10300_write_pc): Remove.
11335         (mn10300_gdbarch_init): Update.
11336         * moxie-tdep.c (moxie_read_pc): Remove.
11337         (moxie_write_pc): Remove.
11338         (moxie_gdbarch_init): Update.
11339
11340 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11341
11342         * expprint.c (print_subexp_standard): Handle
11343         OP_F77_UNDETERMINED_ARGLIST.
11344         (dump_subexp_body_standard): Likewise.
11345
11346 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11347
11348         * target-descriptions.c (tdesc_element_visitor) Add empty
11349         implementations.
11350         (tdesc_type): Move make_gdb_type from here.
11351         (tdesc_type_builtin): Likewise.
11352         (tdesc_type_vector): Likewise.
11353         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11354         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11355         (make_gdb_type_union): Likewise.
11356         (make_gdb_type_flags): Likewise.
11357         (make_gdb_type_enum): Likewise.
11358         (make_gdb_type): New function.
11359         (tdesc_register_type): Use static make_gdb_type.
11360
11361 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11362
11363         * infcmd.c (default_print_one_register_info): Align natural-format
11364         column values consistently one under another.
11365         (pad_to_column): New function.
11366
11367 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11368
11369         * dwarf2read.c (dwarf2_physname): Move commment.
11370
11371 2018-02-01  Leszek Swirski  <leszeks@google.com>
11372
11373         * varobj.c (varobj_formatted_print_options): Allow recursive
11374         pretty printing if pretty printing is enabled.
11375
11376 2018-02-01  Leszek Swirski  <leszeks@google.com>
11377
11378         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11379         names after a structop as a filename.
11380
11381 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11382
11383         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11384         (arm_record_coproc_data_proc): Likewise.
11385
11386 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11387
11388         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11389
11390 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11391
11392         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11393         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11394
11395 2018-01-31  Pedro Alves  <palves@redhat.com>
11396
11397         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11398         * inflow.c (child_terminal_save_inferior): Wrap reference to
11399         tcgetpgrp in HAVE_TERMIOS_H.
11400         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11401         _WIN32.
11402         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11403         always iterate over all inferiors.
11404         (gdbsim_cntrl_c): Adjust.
11405         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11406
11407 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11408
11409         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11410         index type is objfile-owned if the element type is as well.
11411
11412 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11413
11414         GDB 8.1 released.
11415
11416 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11417
11418         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11419         "features/s390x-linux64.c".
11420         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11421         s390_linux32 and s390x_linux64.
11422         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11423         default tdesc.
11424         * s390-tdep.c: Include "features/s390-linux32.c" and
11425         "features/s390x-linux64.c".
11426         (s390_tdesc_valid): Add check for tdesc_has_registers.
11427         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11428         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11429         tdesc_s390x_linux64.
11430         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11431         tdesc_s390x_linux64 to...
11432         * s390-tdep.h: ...here.
11433
11434 2018-01-30  Pedro Alves  <palves@redhat.com>
11435
11436         PR gdb/13211
11437         * config.in, configure: Regenerate.
11438         * configure.ac: Check for getpgid.
11439         * go32-nat.c (go32_pass_ctrlc): New.
11440         (go32_target): Install it.
11441         * inf-child.c (inf_child_target): Install
11442         child_terminal_save_inferior, child_pass_ctrlc and
11443         child_interrupt.
11444         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11445         (inf_ptrace_target): No longer install it.
11446         * infcmd.c (interrupt_target_1): Adjust.
11447         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11448         (child_interrupt): Declare.
11449         (inferior::terminal_state): New.
11450         * inflow.c (struct terminal_info): Update comments.
11451         (inferior_process_group): Delete.
11452         (terminal_is_ours): Delete.
11453         (gdb_tty_state): New.
11454         (child_terminal_init): Adjust.
11455         (is_gdb_terminal, sharing_input_terminal_1)
11456         (sharing_input_terminal): New functions.
11457         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11458         Set the process's actual process group in the foreground if
11459         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11460         mark terminal as the inferior's if not sharing GDB's terminal.
11461         Don't check attach_flag.
11462         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11463         pass down a target_terminal_state.
11464         (child_terminal_save_inferior): New, factored out from ...
11465         (child_terminal_ours_1): ... this.  Handle
11466         target_terminal_state::is_ours_for_output.
11467         (child_interrupt, child_pass_ctrlc): New.
11468         (inflow_inferior_exit): Clear the inferior's terminal_state.
11469         (copy_terminal_info): Copy the inferior's terminal state.
11470         (_initialize_inflow): Remove reference to terminal_is_ours.
11471         * inflow.h (inferior_process_group): Delete.
11472         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11473         * procfs.c (procfs_target): Don't install procfs_interrupt.
11474         (procfs_interrupt): Delete.
11475         * remote.c (remote_serial_quit_handler): Adjust.
11476         (remote_interrupt): Remove ptid parameter.  Adjust.
11477         * target-delegates.c: Regenerate.
11478         * target.c: Include "terminal.h".
11479         (target_terminal::terminal_state): Rename to ...
11480         (target_terminal::m_terminal_state): ... this.
11481         (target_terminal::init): Adjust.
11482         (target_terminal::inferior): Adjust to per-inferior
11483         terminal_state.
11484         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11485         (target_terminal::ours, target_terminal::ours_for_output): Use
11486         target_terminal_is_ours_kind.
11487         (target_interrupt): Remove ptid parameter.  Adjust.
11488         (default_target_pass_ctrlc): Adjust.
11489         * target.h (target_ops::to_terminal_save_inferior): New field.
11490         (target_ops::to_interrupt): Remove ptid_t parameter.
11491         (target_interrupt): Remove ptid_t parameter.  Update comment.
11492         (target_pass_ctrlc): Update comment.
11493         * target/target.h (target_terminal_state): New scoped enum,
11494         factored out of ...
11495         (target_terminal::terminal_state): ... here.
11496         (target_terminal::inferior): Update comments.
11497         (target_terminal::restore_inferior): New.
11498         (target_terminal::is_inferior, target_terminal::is_ours)
11499         (target_terminal::is_ours_for_output): Adjust.
11500         (target_terminal::scoped_restore_terminal_state): Adjust to
11501         rename, and call restore_inferior() instead of inferior().
11502         (target_terminal::scoped_restore_terminal_state::m_state): Change
11503         type.
11504         (target_terminal::terminal_state): Rename to ...
11505         (target_terminal::m_terminal_state): ... this and change type.
11506
11507 2018-01-30  Pedro Alves  <palves@redhat.com>
11508
11509         * linux-nat.c (wait_for_signal): New function.
11510         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11511         directly.
11512         (async_terminal_is_ours)
11513         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11514         (linux_nat_add_target): Don't override
11515         to_terminal_inferior/to_terminal_ours.
11516
11517 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11518
11519         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11520
11521 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11522
11523         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11524         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11525         dwarf2_per_objfile_free here.
11526         (dwarf2_per_objfile_free): Remove.
11527         (_initialize_dwarf2_read): Don't register
11528         dwarf2_per_objfile_free as a registry cleanup.
11529
11530 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11531
11532         Avoid compilation errors in MinGW native builds
11533
11534         The error is triggered by including python-internal.h, and the
11535         error message is:
11536
11537              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11538                       from build-gnulib/import/math.h:27,
11539                       from d:/usr/Python26/include/pyport.h:235,
11540                       from d:/usr/Python26/include/Python.h:58,
11541                       from python/python-internal.h:94,
11542                       from python/py-arch.c:24:
11543              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11544         using ::hypot;
11545                 ^~~~~
11546
11547         This happens because Python headers define 'hypot' to expand t
11548         '_hypot' in the Windows builds.
11549         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11550         'hypoth'.  This avoids a compilation error.
11551
11552 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11553
11554         * MAINTAINERS (Write After Approval): Fix ordering.
11555
11556 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11557
11558         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11559
11560 2018-01-26  Alan Modra  <amodra@gmail.com>
11561
11562         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11563         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11564         Remove nop.  Make const.  Comment.
11565         (powerpc32_plt_stub_so_2): New.
11566         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11567         Correct count.  Update uses.
11568         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11569         Move common code reading PLT entry word.  Correct
11570         powerpc32_plt_stub PLT address calculation.
11571         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11572         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11573         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11574         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11575         (ppc64_standard_linkage8): Likewise.
11576         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11577         Correct insns description.
11578         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11579
11580 2018-01-24  Pedro Alves  <palves@redhat.com>
11581
11582         GCC PR libstdc++/83906
11583         * gdbtypes.c (operator==(const dynamic_prop &,
11584         const dynamic_prop &)): New.
11585         (operator==(const range_bounds &, const range_bounds &)): New.
11586         (check_types_equal): Use them instead of memcmp.
11587         * gdbtypes.h (operator==(const dynamic_prop &,
11588         const dynamic_prop &)): Declare.
11589         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11590         (operator==(const range_bounds &, const range_bounds &)): Declare.
11591         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11592
11593 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11594
11595         * s390-linux-tdep.c (s390_record_address_mask)
11596         (s390_record_calc_disp_common, s390_record_calc_disp)
11597         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11598         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11599         (s390_process_record): Move to s390-tdep.c.
11600         (s390_linux_init_abi_any): Adjust.
11601         * s390-tdep.c (s390_record_address_mask)
11602         (s390_record_calc_disp_common, s390_record_calc_disp)
11603         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11604         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11605         (s390_process_record): Moved from s390-linux-tdep.c
11606         (s390_gdbarch_init): Adjust.
11607
11608 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11609
11610         * s390-linux-nat.c (s390-tdep.h): New include.
11611         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11612         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11613         (ALLDEPFILES): Add s390-tdep.c.
11614         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11615         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11616         * s390-tdep.h: ...this.  New file.
11617         * s390-linux-tdep.c (s390-tdep.h): New include.
11618         (_initialize_s390_tdep): Rename to...
11619         (_initialize_s390_linux_tdep): ...this and adjust.
11620         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11621         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11622         s390-tdep.h.
11623         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11624         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11625         (s390_is_partial_instruction, s390_software_single_step)
11626         (is_non_branch_ril, s390_displaced_step_copy_insn)
11627         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11628         (s390_prologue_data, s390_addr, s390_store, s390_load)
11629         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11630         (s390_register_call_saved, s390_guess_tracepoint_registers)
11631         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11632         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11633         (s390_pseudo_register_name, s390_pseudo_register_type)
11634         (s390_pseudo_register_read, s390_pseudo_register_write)
11635         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11636         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11637         (s390_addr_bits_remove, s390_address_class_type_flags)
11638         (s390_address_class_type_flags_to_name)
11639         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11640         (s390_function_arg_float, s390_function_arg_vector)
11641         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11642         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11643         (s390_frame_align, s390_register_return_value, s390_return_value)
11644         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11645         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11646         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11647         (s390_trad_frame_prev_register, s390_unwind_cache)
11648         (s390_prologue_frame_unwind_cache)
11649         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11650         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11651         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11652         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11653         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11654         (s390_frame_base_address, s390_local_base_address)
11655         (s390_frame_base, s390_gcc_target_options)
11656         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11657         (s390_validate_reg_range, s390_tdesc_valid)
11658         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11659         * s390-tdep.c: ...this.  New file.
11660
11661 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11662
11663         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11664         (s390_process_record, s390_gdbarch_tdep_alloc)
11665         (s390_linux_init_abi_any): Use/set new hook.
11666
11667 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11668
11669         * s390-linux-tdep.c (osabi.h): New include.
11670         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11671         (s390_linux_init_abi_any): New functions.
11672         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11673
11674 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11675
11676         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11677         tdesc_has_registers check
11678
11679 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11680
11681         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11682         (s390_validate_reg_range): New macro.
11683         (s390_gdbarch_init): Adjust.
11684
11685 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11686
11687         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11688         (s390_gdbarch_tdep_alloc): Adjust.
11689         (s390_gdbarch_init): Adjust.
11690
11691 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11692
11693         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11694         <have_tdb>: Change type to bool.
11695         (s390_gdbarch_tdep_alloc): Adjust.
11696         (s390_gdbarch_init): Adjust.
11697
11698 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11699
11700         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11701         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11702         (s390_gdbarch_tdep_alloc): New function.
11703         (s390_gdbarch_init): Allocate tdep at start and use its fields
11704         instead of separate variables.
11705
11706 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11707
11708         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11709         when looking for cached gdbarch and add comment for remaining.
11710
11711 2018-01-22  Pedro Alves  <palves@redhat.com>
11712             Sergio Durigan Junior  <sergiodj@redhat.com>
11713
11714         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11715         case.
11716
11717 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11718
11719         * MAINTAINERS: Update my company e-mail address.
11720
11721 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11722
11723         * regcache.c (cooked_write_test): New function.
11724         (_initialize_regcache): Register the test.
11725
11726 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11727
11728         * ia64-tdep.c (ia64_pseudo_register_read): Call
11729         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11730         * m32c-tdep.c (m32c_cat_read): Likewise.
11731         (m32c_r3r2r1r0_read): Likewise.
11732         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11733         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11734
11735 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11736
11737         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11738         method raw_read instead of regcache_raw_read.
11739         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11740         * arm-tdep.c (arm_neon_quad_read): Likewise.
11741         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11742         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11743         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11744         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11745         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11746         (i386_pseudo_register_read_into_value): Likewise.
11747         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11748         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11749         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11750         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11751         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11752         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11753         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11754         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11755         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11756
11757 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11758
11759         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11760         * configure.tgt: Remove target mt.
11761         * mt-tdep.c: Remove.
11762         * regcache.c (cooked_read_test): Remove the check for mt.
11763
11764 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11765
11766         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11767         instead of gdbarch_pseudo_register_read_value.
11768
11769 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11770
11771         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11772         language is Ada.
11773
11774 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11775
11776         * linespec.c (create_sals_line_offset): Remove code that preserved
11777         the symtab_and_line's line number.
11778
11779 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11780
11781         * varobj.c (varobj_create): Don't set valid_block when creating a
11782         floating varobj.
11783
11784 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11785
11786         * varobj.c (varobj_create): Remove out of date comment.
11787
11788 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11789
11790         PR mi/20395
11791         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11792         updating innermost block.
11793         * parse.c (innermost_block_tracker::update): Take extra type
11794         parameter, and check types match before updating innermost block.
11795         (write_dollar_variable): Update innermost block for registers.
11796         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11797         (innermost_block_tracker::innermost_block_tracker): Initialise
11798         m_types member.
11799         (innermost_block_tracker::reset): Take type parameter.
11800         (innermost_block_tracker::update): Take type parameter, and pass
11801         type through as needed.
11802         (innermost_block_tracker::m_types): New member.
11803         * varobj.c (varobj_create): Pass type when reseting innermost
11804         block.
11805
11806 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11807
11808         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11809         * ada-lang.c (resolve_subexp): Likewise.
11810         * breakpoint.c (set_breakpoint_condition) Likewise.
11811         (watch_command_1) Likewise.
11812         * c-exp.y (variable): Likewise.
11813         * d-exp.y (PrimaryExpression): Likewise.
11814         * f-exp.y (variable): Likewise.
11815         * go-exp.y (variable): Likewise.
11816         * m2-exp.y (variable): Likewise.
11817         * objfiles.c (objfile::~objfile): Likewise.
11818         * p-exp.y (variable): Likewise.
11819         * parse.c (innermost_block): Change type.
11820         * parser-defs.h (class innermost_block_tracker): New.
11821         (innermost_block): Change to innermost_block_tracker.
11822         * printcmd.c (display_command): Switch to innermost_block API.
11823         (do_one_display): Likewise.
11824         * rust-exp.y (do_one_display): Likewise.
11825         * symfile.c (clear_symtab_users): Likewise.
11826         * varobj.c (varobj_create): Switch to innermost_block API, replace
11827         use of innermost_block with block stored on varobj object.
11828
11829 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11830
11831         * expression.h (innermost_block): Remove declaration.
11832         * varobj.c: Add 'parser-defs.h' include.
11833
11834 2018-01-19  Tom Tromey  <tom@tromey.com>
11835
11836         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11837         symbols in the static and global blocks.
11838
11839 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11840
11841         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11842         gdb_ptrace.h, and move including gdb_wait.h ...
11843         * nat/linux-ptrace.h: ... to here.
11844
11845 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11846
11847         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11848         inf_ptrace_detach_success.
11849         (inf_ptrace_detach_success): Add inferior parameter, use it
11850         instead of inferior_ptid, pass it to detach_inferior.
11851         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11852         parameter.
11853         * inferior.c (detach_inferior): Add overload that takes an
11854         inferior object.
11855         * inferior.h (detach_inferior): Likewise.
11856         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11857         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11858         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11859
11860 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11861
11862         * target.h (struct target_ops) <to_detach>: Add inferior
11863         parameter.
11864         (target_detach): Likewise.
11865         * target.c (dispose_inferior): Pass inferior down.
11866         (target_detach): Pass inferior down.  Assert that it is equal to
11867         the current inferior.
11868         * aix-thread.c (aix_thread_detach): Pass inferior down.
11869         * corefile.c (core_file_command): Pass current_inferior() down.
11870         * corelow.c (core_detach): Add inferior parameter.
11871         * darwin-nat.c (darwin_detach): Likewise.
11872         * gnu-nat.c (gnu_detach): Likewise.
11873         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11874         * infcmd.c (detach_command): Pass current_inferior() down to
11875         target_detach.
11876         * infrun.c (follow_fork_inferior): Pass parent_inf to
11877         target_detach.
11878         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11879         target_detach.
11880         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11881         * linux-thread-db.c (thread_db_detach): Likewise.
11882         * nto-procfs.c (procfs_detach): Likewise.
11883         * procfs.c (procfs_detach): Likewise.
11884         * record.c (record_detach): Likewise.
11885         * record.h (struct inferior): Forward-declare.
11886         (record_detach): Add inferior parameter.
11887         * remote-sim.c (gdbsim_detach): Likewise.
11888         * remote.c (remote_detach_1): Likewise.
11889         (remote_detach): Likewise.
11890         (extended_remote_detach): Likewise.
11891         * sol-thread.c (sol_thread_detach): Likewise.
11892         * target-debug.h (target_debug_print_inferior_p): New macro.
11893         * target-delegates.c: Re-generate.
11894         * top.c (kill_or_detach): Pass inferior down to target_detach.
11895         * windows-nat.c (windows_detach): Add inferior parameter.
11896
11897 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11898
11899         * target.h (struct target_ops) <to_detach>: Remove args
11900         parameter.
11901         (target_detach): Likewise.
11902         * target.c (dispose_inferior): Adjust.
11903         (target_detach): Remove args parameter, adjust.
11904         * aix-thread.c (aix_thread_detach): Adjust.
11905         * corefile.c (core_file_command): Adjust.
11906         * corelow.c (core_detach): Adjust.
11907         * darwin-nat.c (darwin_detach): Adjust.
11908         * gnu-nat.c (gnu_detach): Adjust.
11909         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11910         * infcmd.c (detach_command): Adjust
11911         * infrun.c (follow_fork_inferior): Adjust.
11912         (handle_vfork_child_exec_or_exit): Adjust.
11913         * linux-fork.c (linux_fork_detach): Remove args parameter.
11914         * linux-fork.h (linux_fork_detach): Likewise.
11915         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11916         * linux-thread-db.c (thread_db_detach): Likewise.
11917         * nto-procfs.c (procfs_detach): Likewise.
11918         * procfs.c (procfs_detach): Likewise.
11919         (do_detach): Remove signo parameter.
11920         * record.c (record_detach): Remove args parameter.
11921         * record.h (record_detach): Likewise.
11922         * remote-sim.c (gdbsim_detach): Likewise.
11923         * remote.c (remote_detach_1): Likewise.
11924         (remote_detach): Likewise.
11925         (extended_remote_detach): Likewise.
11926         * sol-thread.c (sol_thread_detach): Likewise.
11927         * target-delegates.c: Re-generate.
11928         * top.c (struct qt_args) <args>: Remove field.
11929         (kill_or_detach): Don't pass args.
11930         (quit_force): Don't set args.
11931         * windows-nat.c (windows_detach): Remove args parameter.
11932
11933 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11934
11935         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11936         (arm_linux_init_abi): Install it.
11937
11938 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11939
11940         * osabi.c (gdb_osabi_names): Extend the regexp for
11941         arm-linux-gnueabihf.
11942
11943 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11944
11945         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11946         m_abbrevs.
11947         (abbrev_table::add_abbrev): Update.
11948         (abbrev_table::lookup_abbrev): Update.
11949
11950 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11951
11952         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11953
11954 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11955
11956         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11957         to "std::string".
11958
11959 2018-01-17  Tom Tromey  <tom@tromey.com>
11960
11961         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11962
11963 2018-01-17  Tom Tromey  <tom@tromey.com>
11964
11965         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11966         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11967         (create_array_type_with_stride): Update.
11968         * dwarf2read.c (set_die_type): Update.
11969
11970 2018-01-17  Tom Tromey  <tom@tromey.com>
11971
11972         * dwarf2read.c (delayed_method_info): Remove typedef.
11973         (dwarf2_cu::method_info): Now a std::vector.
11974         (add_to_method_list): Update.
11975         (free_delayed_list): Remove.
11976         (compute_delayed_physnames): Update.
11977         (process_full_comp_unit, process_full_type_unit): Clear the method
11978         list.  Remove cleanups.
11979         (psymtab_include_file_name): Add name_holder parameter.  Use
11980         unique_xmalloc_ptr.
11981         (dwarf_decode_lines): Update.
11982
11983 2018-01-17  Tom Tromey  <tom@tromey.com>
11984             Simon Marchi  <simon.marchi@ericsson.com>
11985
11986         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11987         (dwarf2_per_objfile::free_cached_comp_units)
11988         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11989         (init_cutu_and_read_dies_no_follow): Update.
11990         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11991         (dwarf2_cu::~dwarf2_cu): New.
11992         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11993         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11994
11995 2018-01-17  Tom Tromey  <tom@tromey.com>
11996             Simon Marchi  <simon.marchi@ericsson.com>
11997
11998         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11999         (struct die_reader_specs) <abbrev_table>: New member.
12000         (struct abbrev_table): Add constructor.
12001         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12002         <abbrev_obstack>: Now an auto_obstack.
12003         (abbrev_table_up): New typedef.
12004         (init_cu_die_reader): Add abbrev_table parameter.
12005         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12006         Add result_dwo_abbrev_table.
12007         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12008         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12009         Update.
12010         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12011         parameter.
12012         (skip_children): Update.
12013         (abbrev_table::alloc_abbrev): Rename from
12014         abbrev_table_alloc_abbrev.
12015         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12016         (abbrev_table::lookup_abbrev): Rename from
12017         abbrev_table_lookup_abbrev.
12018         (abbrev_table_read_table): Return abbrev_table_up.
12019         (abbrev_table_free, abbrev_table_free_cleanup)
12020         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12021         (load_partial_dies): Update.
12022
12023 2018-01-17  Tom Tromey  <tom@tromey.com>
12024
12025         * dwarf2read.c (dwarf2_compute_name): Update comment.
12026         (read_func_scope, read_variable): Update.
12027         (new_symbol): Remove.
12028         (new_symbol_full): Rename to new_symbol.
12029
12030 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
12031
12032         PR gdb/16577
12033         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12034         a warning instead of throwing an error, set section size to 0 and return
12035         NULL.
12036         * gdb_bfd.h (gdb_bfd_map_section): Update description.
12037
12038 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12039
12040         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12041         std::string.
12042         (linux_ptrace_attach_fail_reason_string): Likewise.
12043         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12044         Likewise.
12045         (linux_ptrace_attach_fail_reason_string): Likewise.
12046         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12047
12048 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12049
12050         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12051
12052 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
12053
12054         PR gdb/21559
12055         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12056         checking for fs_base/gs_base fields in struct user_regs_struct.
12057         * configure: Regenerate.
12058
12059 2018-01-17  Yao Qi  <yao.qi@linaro.org>
12060
12061         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12062         function.
12063         (aarch64_linux_init_abi): Install it to gdbarch hook
12064         gcc_target_options.
12065
12066 2018-01-15  Pedro Alves  <palves@redhat.com>
12067
12068         * common/signals-state-save-restore.c
12069         (save_original_signals_state): Fix typos.
12070
12071 2017-01-12  Tom Tromey  <tom@tromey.com>
12072             Sergio Durigan Junior  <sergiodj@redhat.com>
12073
12074         * Makefile.in (install-only): Install gdb-add-index.
12075
12076 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12077
12078         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12079
12080 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12081
12082         * infrun.c (keep_going_pass_signal): Clear step-over info when
12083         insert_breakpoints fails.
12084
12085 2018-01-11  Pedro Alves  <palves@redhat.com>
12086
12087         PR gdb/22583
12088         * infrun.c (resume): Rename to ...
12089         (resume_1): ... this.
12090         (resume): Reimplement as wrapper around resume_1.
12091
12092 2018-01-11  Pedro Alves  <palves@redhat.com>
12093
12094         PR remote/22597
12095         * remote.c (remote_parse_stop_reply): Default to the last-set
12096         general thread instead of to 'magic_null_ptid'.
12097
12098 2018-01-10  Pedro Alves  <palves@redhat.com>
12099
12100         * language.h (language_get_symbol_name_matcher): Rename ...
12101         (get_symbol_name_matcher): ... this.
12102         * language.c (language_get_symbol_name_matcher): Ditto.
12103         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12104         callers adjusted.
12105
12106 2018-01-10  Pedro Alves  <palves@redhat.com>
12107
12108         PR gdb/22670
12109         * dwarf2read.c
12110         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12111         Adjust to use language_get_symbol_name_matcher instead of
12112         language_defn::la_get_symbol_name_matcher.
12113         * language.c (language_get_symbol_name_matcher): If in Ada mode
12114         and the lookup name is a verbatim match, return Ada's matcher.
12115         * language.h (language_get_symbol_name_matcher): Adjust comment.
12116         (ada_lookup_name_info::verbatim_p):: New method.
12117
12118 2018-01-10  Pedro Alves  <palves@redhat.com>
12119
12120         PR gdb/22670
12121         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12122         minsym's language is language_auto or language_cplus, pass down
12123         language_ada instead.
12124         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12125
12126 2018-01-10  Pedro Alves  <palves@redhat.com>
12127
12128         PR gdb/22670
12129         * minsyms.c (linkage_name_str): New function.
12130         (iterate_over_minimal_symbols): Use it.
12131
12132 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12133
12134         * NEWS: Document that 'info proc' now works on FreeBSD.
12135
12136 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12137
12138         * configure.ac: Check for kinfo_getfile in libutil.
12139         * configure: Regenerate.
12140         * config.in: Regenerate.
12141         * fbsd-nat.c: Include "fbsd-tdep.h".
12142         (fbsd_fetch_cmdline): New.
12143         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12144         rather than calling error.
12145         (fbsd_info_proc): New.
12146         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12147         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12148         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12149
12150 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12151
12152         * fbsd-nat.c (struct free_deleter): Remove.
12153         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12154
12155 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12156
12157         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12158         NULL for an empty pathname.
12159
12160 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12161
12162         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12163         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12164         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12165         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12166         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12167         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12168         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12169         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12170         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12171         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12172         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12173         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12174         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12175         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12176         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12177
12178 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12179
12180         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12181         (gnu_xfer_auxv): New function.
12182         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12183         TARGET_OBJECT_AUXV.
12184
12185 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12186             Simon Marchi  <simon.marchi@ericsson.com>
12187
12188         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12189         common/selftest.c.
12190         (COMMON_OBS): Remove selftest.o.
12191         * configure.ac: Append selftest-arch.c and common/selftest.c to
12192         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12193         * configure: Re-generated.
12194         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12195         GDB_SELF_TEST.
12196         (maintenance_info_selftests): Likewise.
12197
12198 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12199
12200         * ada-valprint.c (val_print_packed_array_elements): Use
12201         proper number of elements when printing an array indexed
12202         by an enumeration type.
12203
12204 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12205
12206         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12207         (dw2_get_file_names_reader): Adjust.
12208         (lookup_dwo_signatured_type): Adjust.
12209         (lookup_dwp_signatured_type): Adjust.
12210         (lookup_signatured_type): Adjust.
12211         (create_type_unit_group): Adjust.
12212         (get_type_unit_group): Adjust.
12213         (process_psymtab_comp_unit_reader): Adjust.
12214         (build_type_psymtabs_reader): Adjust.
12215         (scan_partial_symbols): Adjust.
12216         (add_partial_symbol): Adjust.
12217         (add_partial_subprogram): Adjust.
12218         (peek_die_abbrev): Adjust.
12219         (fixup_go_packaging): Adjust.
12220         (process_imported_unit_die): Adjust.
12221         (dwarf2_compute_name): Adjust.
12222         (dwarf2_physname): Adjust.
12223         (read_import_statement): Adjust.
12224         (handle_DW_AT_stmt_list): Adjust.
12225         (read_file_scope): Adjust.
12226         (read_func_scope): Adjust.
12227         (read_lexical_block_scope): Adjust.
12228         (read_call_site_scope): Adjust.
12229         (read_variable): Adjust.
12230         (dwarf2_rnglists_process): Adjust.
12231         (dwarf2_ranges_process): Adjust.
12232         (dwarf2_ranges_read): Adjust.
12233         (dwarf2_get_pc_bounds): Adjust.
12234         (dwarf2_record_block_ranges): Adjust.
12235         (dwarf2_add_field): Adjust.
12236         (dwarf2_add_member_fn): Adjust.
12237         (read_structure_type): Adjust.
12238         (process_structure_scope): Adjust.
12239         (read_enumeration_type): Adjust.
12240         (read_array_type): Adjust.
12241         (mark_common_block_symbol_computed): Adjust.
12242         (read_common_block): Adjust.
12243         (read_namespace_type): Adjust.
12244         (read_namespace): Adjust.
12245         (read_module_type): Adjust.
12246         (read_tag_pointer_type): Adjust.
12247         (read_tag_ptr_to_member_type): Adjust.
12248         (read_tag_string_type): Adjust.
12249         (read_subroutine_type): Adjust.
12250         (read_typedef): Adjust.
12251         (read_base_type): Adjust.
12252         (attr_to_dynamic_prop): Adjust.
12253         (read_subrange_type): Adjust.
12254         (read_unspecified_type): Adjust.
12255         (dwarf2_read_abbrevs): Adjust.
12256         (load_partial_dies): Adjust.
12257         (read_partial_die): Adjust.
12258         (find_partial_die): Adjust.
12259         (guess_partial_die_structure_name): Adjust.
12260         (fixup_partial_die): Adjust.
12261         (read_attribute_value): Adjust.
12262         (read_addr_index): Adjust.
12263         (read_addr_index_from_leb128): Adjust.
12264         (read_str_index): Adjust.
12265         (dwarf2_string_attr): Adjust.
12266         (get_debug_line_section): Adjust.
12267         (dwarf_decode_line_header): Adjust.
12268         (lnp_state_machine::check_line_address): Adjust.
12269         (dwarf_decode_lines_1): Adjust.
12270         (dwarf_decode_lines): Adjust.
12271         (dwarf2_start_symtab): Adjust.
12272         (var_decode_location): Adjust.
12273         (new_symbol_full): Adjust.
12274         (dwarf2_const_value_data): Adjust.
12275         (dwarf2_const_value_attr): Adjust.
12276         (dwarf2_const_value): Adjust.
12277         (die_type): Adjust.
12278         (die_containing_type): Adjust.
12279         (build_error_marker_type): Adjust.
12280         (lookup_die_type): Adjust.
12281         (guess_full_die_structure_name): Adjust.
12282         (anonymous_struct_prefix): Adjust.
12283         (determine_prefix): Adjust.
12284         (dwarf2_name): Adjust.
12285         (follow_die_ref_or_sig): Adjust.
12286         (follow_die_offset): Adjust.
12287         (follow_die_ref): Adjust.
12288         (follow_die_sig_1): Adjust.
12289         (follow_die_sig): Adjust.
12290         (get_signatured_type): Adjust.
12291         (get_DW_AT_signature_type): Adjust.
12292         (decode_locdesc): Adjust.
12293         (dwarf_decode_macros): Adjust.
12294         (cu_debug_loc_section): Adjust.
12295         (fill_in_loclist_baton): Adjust.
12296         (dwarf2_symbol_mark_computed): Adjust.
12297         (init_one_comp_unit): Don't assign
12298         dwarf2_cu::dwarf2_per_objfile.
12299         (set_die_type): Adjust.
12300
12301 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12302
12303         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12304         <dwarf2_per_objfile>: New field.
12305         (dwarf2_per_objfile): Remove global.
12306         (get_dwarf2_per_objfile): New function.
12307         (set_dwarf2_per_objfile): New function.
12308         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12309         dwarf2_per_objfile.
12310         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12311         (read_abbrev_offset): Likewise.
12312         (read_indirect_string): Likewise.
12313         (read_indirect_line_string): Likewise.
12314         (read_indirect_string_at_offset): Likewise.
12315         (read_indirect_string_from_dwz): Likewise.
12316         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12317         dwarf2_per_objfile.
12318         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12319         (create_all_comp_units): Change objfile parameter to
12320         dwarf2_per_objfile.
12321         (create_all_type_units): Likewise.
12322         (process_queue): Add dwarf2_per_objfile parameter.
12323         (read_and_check_comp_unit_head): Likewise.
12324         (lookup_dwo_unit_in_dwp): Likewise.
12325         (get_dwp_file): Likewise.
12326         (process_cu_includes): Likewise.
12327         (struct free_dwo_file_cleanup_data): New struct.
12328         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12329         set_dwarf2_per_objfile.
12330         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12331         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12332         context, adjust calls.
12333         (dw2_instantiate_symtab): Likewise.
12334         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12335         (dw2_get_cu): Likewise.
12336         (create_cu_from_index_list): Change objfile parameter to
12337         dwarf2_per_objfile.
12338         (create_cus_from_index_list): Get dwarf2_per_objfile from
12339         context, adjust calls.
12340         (create_cus_from_index): Likewise.
12341         (create_signatured_type_table_from_index): Change objfile
12342         parameter to dwarf2_per_objfile.
12343         (create_signatured_type_table_from_debug_names): Change objfile
12344         parameter to dwarf2_per_objfile.
12345         (create_addrmap_from_index): Likewise.
12346         (create_addrmap_from_aranges): Likewise.
12347         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12348         (dw2_setup): Remove.
12349         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12350         context.
12351         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12352         get_dwarf2_per_objfile.
12353         (dw2_forget_cached_source_info): Likewise.
12354         (dw2_map_symtabs_matching_filename): Likewise.
12355         (struct dw2_symtab_iterator) <index>: Remove.
12356         <dwarf2_per_objfile>: New field.
12357         (dw2_symtab_iter_init): Replace index parameter with
12358         dwarf2_per_objfile.
12359         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12360         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12361         (dw2_print_stats): Likewise.
12362         (dw2_dump): Likewise.
12363         (dw2_expand_symtabs_for_function): Likewise.
12364         (dw2_expand_all_symtabs): Likewise.
12365         (dw2_expand_symtabs_with_fullname): Likewise.
12366         (dw2_expand_marked_cus): Replace index and objfile parameters
12367         with dwarf2_per_objfile.
12368         (dw_expand_symtabs_matching_file_matcher): Add
12369         dwarf2_per_objfile parameter and adjust calls.
12370         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12371         adjust calls.
12372         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12373         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12374         adjust calls.
12375         (create_cus_from_debug_names_list): Replace objfile parameter
12376         with dwarf2_per_objfile and adjust calls.
12377         (create_cus_from_debug_names): Likewise.
12378         (dwarf2_read_debug_names): Likewise.
12379         (mapped_debug_names::namei_to_name): Adjust call.
12380         (dw2_debug_names_iterator::next): Likewise.
12381         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12382         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12383         (dw2_debug_names_dump): Likewise.
12384         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12385         (dw2_debug_names_expand_symtabs_matching): Likewise.
12386         (dwarf2_initialize_objfile): Likewise.
12387         (dwarf2_build_psymtabs): Likewise.
12388         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12389         this_cu.
12390         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12391         (read_and_check_comp_unit_head): Likewise.
12392         (read_abbrev_offset): Likewise.
12393         (create_debug_type_hash_table): Likewise.
12394         (create_debug_types_hash_table): Likewise.
12395         (create_all_type_units): Replace objfile parameter with
12396         dwarf2_per_objfile.
12397         (add_type_unit): Add dwarf2_per_objfile parameter.
12398         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12399         with dwarf2_per_objfile.
12400         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12401         (lookup_dwp_signatured_type): Likewise.
12402         (lookup_signatured_type): Likewise.
12403         (read_cutu_die_from_dwo): Likewise.
12404         (init_tu_and_read_dwo_dies): Likewise.
12405         (init_cutu_and_read_dies): Likewise.
12406         (init_cutu_and_read_dies_no_follow): Likewise.
12407         (allocate_type_unit_groups_table): Add objfile parameter.
12408         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12409         (get_type_unit_group): Likewise.
12410         (process_psymtab_comp_unit): Update call.
12411         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12412         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12413         (print_tu_stats): Likewise.
12414         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12415         in void* parameter.
12416         (build_type_psymtabs): Change objfile parameter to
12417         dwarf2_per_objfile.
12418         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12419         passed in void* parameter.
12420         (process_skeletonless_type_units): Change objfile parameter to
12421         dwarf2_per_objfile.
12422         (set_partial_user): Likewise.
12423         (dwarf2_build_psymtabs_hard): Likewise.
12424         (read_comp_units_from_section): Likewise.
12425         (create_all_comp_units): Likewise.
12426         (scan_partial_symbols): Update calls.
12427         (add_partial_symbol): Likewise.
12428         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12429         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12430         (process_queue): Add dwarf2_per_objfile parameter.
12431         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12432         (compute_compunit_symtab_includes): Likewise.
12433         (process_cu_includes): Add dwarf2_per_objfile parameter.
12434         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12435         (process_full_type_unit): Likewise.
12436         (process_imported_unit_die): Update call.
12437         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12438         (read_file_scope): Likewise.
12439         (allocate_dwo_file_hash_table): Add objfile parameter.
12440         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12441         (create_cus_hash_table): Likewise.
12442         (create_dwp_hash_table): Likewise.
12443         (create_dwo_unit_in_dwp_v1): Likewise.
12444         (create_dwp_v2_section): Likewise.
12445         (create_dwo_unit_in_dwp_v2): Likewise.
12446         (lookup_dwo_unit_in_dwp): Likewise.
12447         (try_open_dwop_file): Likewise.
12448         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12449         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12450         cleanup to include a reference to dwarf2_per_objfile.
12451         (open_dwp_file): Add dwarf2_per_objfile parameter.
12452         (open_and_init_dwp_file): Likewise.
12453         (get_dwp_file): Likewise.
12454         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12455         (queue_and_load_all_dwo_tus): Update call.
12456         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12457         data.
12458         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12459         (dwarf2_ranges_process): Likewise.
12460         (dwarf2_get_pc_bounds): Likewise.
12461         (mark_common_block_symbol_computed): Likewise.
12462         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12463         (dwarf2_read_abbrevs): Update call.
12464         (read_partial_die): Use dwarf2_per_objfile from cu.
12465         (find_partial_die): Likewise.
12466         (fixup_partial_die): Likewise.
12467         (read_attribute_value): Likewise.
12468         (read_indirect_string_at_offset_from): Add objfile parameter.
12469         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12470         parameter.
12471         (read_indirect_string_from_dwz): Add objfile parameter.
12472         (read_indirect_string): Add objfile parameter.
12473         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12474         (read_addr_index): Use dwarf2_per_objfile from cu.
12475         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12476         call dw2_setup.
12477         (read_str_index): Use dwarf2_per_objfile from cu.
12478         (get_debug_line_section): Likewise.
12479         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12480         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12481         (new_symbol_full): Use dwarf2_per_objfile from cu.
12482         (build_error_marker_type): Likewise.
12483         (lookup_die_type): Likewise.
12484         (determine_prefix): Likewise.
12485         (follow_die_offset): Likewise.
12486         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12487         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12488         (dwarf2_fetch_die_type_sect_off): Likewise.
12489         (dwarf2_get_die_type): Likewise.
12490         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12491         (get_signatured_type): Likewise.
12492         (get_DW_AT_signature_type): Likewise.
12493         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12494         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12495         (cu_debug_loc_section): Likewise.
12496         (fill_in_loclist_baton): Likewise.
12497         (dwarf2_symbol_mark_computed): Likewise.
12498         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12499         dwarf2_per_objfile.
12500         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12501         parameter.
12502         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12503         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12504         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12505         (set_die_type): Use dwarf2_free_objfile from cu.
12506         (get_die_type_at_offset): Likewise.
12507         (dwarf2_per_objfile_free): Don't assign global variable.
12508         (debug_names) <constructor>: Add dwarf2_per_objfile
12509         parameter, update m_debugstrlookup construction.
12510         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12511         parameter.
12512         <m_dwarf2_per_objfile>: New field.
12513         <lookup>: Use m_dwarf2_per_objfile.
12514         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12515         (psyms_seen_size): Likewise.
12516         (write_gdbindex): Replace objfile parameter with
12517         dwarf2_per_objfile.
12518         (write_debug_names): Likewise.
12519         (write_psymtabs_to_index): Likewise.
12520         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12521         calls.
12522
12523 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12524
12525         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12526         <dwarf2_per_objfile>: New field.
12527         (struct dwarf2_per_cu_data) <objfile>: Remove.
12528         <dwarf2_per_objfile>: New field.
12529         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12530         of objfile.
12531         (create_signatured_type_table_from_index): Likewise.
12532         (create_debug_type_hash_table): Likewise.
12533         (fill_in_sig_entry_from_dwo_entry): Likewise.
12534         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12535         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12536         objfile.
12537         (create_partial_symtab): Access objfile through
12538         dwarf2_per_objfile.
12539         (process_psymtab_comp_unit_reader): Likewise.
12540         (read_comp_units_from_section): Likewise.
12541         (scan_partial_symbols): Likewise.
12542         (add_partial_symbol): Likewise.
12543         (add_partial_subprogram): Likewise.
12544         (peek_die_abbrev): Likewise.
12545         (fixup_go_packaging): Likewise.
12546         (process_full_comp_unit): Likewise.
12547         (process_full_type_unit): Likewise.
12548         (process_imported_unit_die): Likewise.
12549         (dwarf2_compute_name): Likewise.
12550         (dwarf2_physname): Likewise.
12551         (read_import_statement): Likewise.
12552         (create_cus_hash_table): Assign dwarf2_physname instead of
12553         objfile.
12554         (read_func_scope): Access objfile through dwarf2_per_objfile.
12555         (read_lexical_block_scope): Likewise.
12556         (read_call_site_scope): Likewise.
12557         (read_variable): Likewise.
12558         (dwarf2_rnglists_process): Likewise.
12559         (dwarf2_ranges_process): Likewise.
12560         (dwarf2_ranges_read): Likewise.
12561         (dwarf2_record_block_ranges): Likewise.
12562         (dwarf2_add_field): Likewise.
12563         (dwarf2_add_member_fn): Likewise.
12564         (read_structure_type): Likewise.
12565         (process_structure_scope): Likewise.
12566         (read_enumeration_type): Likewise.
12567         (read_array_type): Likewise.
12568         (read_common_block): Likewise.
12569         (read_namespace_type): Likewise.
12570         (read_namespace): Likewise.
12571         (read_module_type): Likewise.
12572         (read_tag_pointer_type): Likewise.
12573         (read_tag_ptr_to_member_type): Likewise.
12574         (read_tag_string_type): Likewise.
12575         (read_subroutine_type): Likewise.
12576         (read_typedef): Likewise.
12577         (read_base_type): Likewise.
12578         (attr_to_dynamic_prop): Likewise.
12579         (read_subrange_type): Likewise.
12580         (read_unspecified_type): Likewise.
12581         (load_partial_dies): Likewise.
12582         (read_partial_die): Likewise.
12583         (find_partial_die): Likewise.
12584         (guess_partial_die_structure_name): Likewise.
12585         (fixup_partial_die): Likewise.
12586         (read_attribute_value): Likewise.
12587         (read_addr_index_from_leb128): Likewise.
12588         (dwarf2_read_addr_index): Likewise.
12589         (dwarf2_string_attr): Likewise.
12590         (lnp_state_machine::check_line_address): Likewise.
12591         (dwarf_decode_lines_1): Likewise.
12592         (dwarf_decode_lines): Likewise.
12593         (dwarf2_start_symtab): Likewise.
12594         (var_decode_location): Likewise.
12595         (new_symbol_full): Likewise.
12596         (dwarf2_const_value_data): Likewise.
12597         (dwarf2_const_value_attr): Likewise.
12598         (dwarf2_const_value): Likewise.
12599         (die_type): Likewise.
12600         (die_containing_type): Likewise.
12601         (lookup_die_type): Likewise.
12602         (guess_full_die_structure_name): Likewise.
12603         (anonymous_struct_prefix): Likewise.
12604         (dwarf2_name): Likewise.
12605         (follow_die_ref_or_sig): Likewise.
12606         (follow_die_offset): Likewise.
12607         (follow_die_ref): Likewise.
12608         (dwarf2_fetch_die_loc_sect_off): Likewise.
12609         (dwarf2_fetch_constant_bytes): Likewise.
12610         (dwarf2_fetch_die_type_sect_off): Likewise.
12611         (dwarf2_get_die_type): Likewise.
12612         (follow_die_sig): Likewise.
12613         (decode_locdesc): Likewise.
12614         (dwarf2_per_cu_objfile): Likewise.
12615         (dwarf2_per_cu_text_offset): Likewise.
12616         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12617         objfile.
12618         (set_die_type): Access objfile through
12619         dwarf2_per_objfile.
12620
12621 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12622
12623         * valprint.c (converted_character_d): Remove typedef.
12624         (DEF_VEC_O (converted_character_d)): Remove.
12625         (count_next_character): Use std::vector.
12626         (print_converted_chars_to_obstack): Likewise.
12627         (generic_printstr): Likewise.
12628
12629 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12630
12631         * xml-support.h (struct gdb_xml_value): Add constructor.
12632         <value>: Change type to unique_xmalloc_ptr.
12633         (gdb_xml_value_s): Remove typedef.
12634         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12635         (gdb_xml_element_start_handler): Change parameter type to
12636         std::vector.
12637         (xml_find_attribute): Likewise.
12638         * xml-support.c (xml_find_attribute): Change parameter type to
12639         std::vector and adjust.
12640         (gdb_xml_values_cleanup): Remove.
12641         (gdb_xml_parser::start_element): Adjust to std::vector.
12642         (xinclude_start_include): Change paraeter type to std::vector
12643         and adjust.
12644         * btrace.c (check_xml_btrace_version): Likewise.
12645         (parse_xml_btrace_block): Likewise.
12646         (parse_xml_btrace_pt_config_cpu): Likewise.
12647         (parse_xml_btrace_pt): Likewise.
12648         (parse_xml_btrace_conf_bts): Likewise.
12649         (parse_xml_btrace_conf_pt): Likewise.
12650         * memory-map.c (memory_map_start_memory): Likewise.
12651         (memory_map_start_property): Likewise.
12652         * osdata.c (osdata_start_osdata): Likewise.
12653         (osdata_start_item): Likewise.
12654         (osdata_start_column): Likewise.
12655         * remote.c (start_thread): Likewise.
12656         * solib-aix.c (library_list_start_library): Likewise.
12657         (library_list_start_list): Likewise.
12658         * solib-svr4.c (library_list_start_library): Likewise.
12659         (svr4_library_list_start_list): Likewise.
12660         * solib-target.c (library_list_start_segment): Likewise.
12661         (library_list_start_section): Likewise.
12662         (library_list_start_library): Likewise.
12663         (library_list_start_list): Likewise.
12664         * tracepoint.c (traceframe_info_start_memory): Likewise.
12665         (traceframe_info_start_tvar): Likewise.
12666         * xml-syscall.c (syscall_start_syscall): Likewise.
12667         * xml-tdesc.c (tdesc_start_target): Likewise.
12668         (tdesc_start_feature): Likewise.
12669         (tdesc_start_reg): Likewise.
12670         (tdesc_start_union): Likewise.
12671         (tdesc_start_struct): Likewise.
12672         (tdesc_start_flags): Likewise.
12673         (tdesc_start_enum): Likewise.
12674         (tdesc_start_field): Likewise.
12675         (tdesc_start_enum_value): Likewise.
12676         (tdesc_start_vector): Likewise.
12677
12678 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12679
12680         * extension.h (struct xmethod_worker) <clone>: Remove.
12681         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12682         Remove.
12683         (python_xmethod_worker::clone): Remove.
12684         * valops.c (find_overload_match): Use std::move instead of
12685         clone.
12686
12687 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12688
12689         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12690         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12691         <free_xmethod_worker_data>: Remove.
12692         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12693         <get_xmethod_arg_types>: Remove.
12694         <get_xmethod_result_type>: Remove.
12695         <invoke_xmethod>: Remove.
12696         * extension.c (new_xmethod_worker): Remove.
12697         (clone_xmethod_worker): Remove.
12698         (get_matching_xmethod_workers): Return void, pass std::vector by
12699         pointer.
12700         (get_xmethod_arg_types): Rename to...
12701         (xmethod_worker::get_arg_types): ... this, and adjust.
12702         (get_xmethod_result_type): Rename to...
12703         (xmethod_worker::get_result_type): ... this, and adjust.
12704         (invoke_xmethod): Remove.
12705         (free_xmethod_worker): Remove.
12706         (free_xmethod_worker_vec): Remove.
12707         * extension.h (enum ext_lang_rc): Move here from
12708         extension-priv.h.
12709         (struct xmethod_worker): Add constructor and destructor.
12710         <data>: Remove.
12711         <value>: Remove.
12712         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12713         virtual pure methods.
12714         <get_arg_types, get_result_type>: New methods.
12715         (xmethod_worker_ptr): Remove typedef.
12716         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12717         (xmethod_worker_vec): Remove typedef.
12718         (xmethod_worker_up): New typedef.
12719         (invoke_xmethod): Remove.
12720         (clone_xmethod_worker): Remove.
12721         (free_xmethod_worker): Remove.
12722         (free_xmethod_worker_vec): Remove.
12723         (get_xmethod_arg_types): Remove.
12724         (get_xmethod_result_type): Remove.
12725         * valops.c (find_method_list): Use std::vector, don't use
12726         intermediate vector.
12727         (value_find_oload_method_list): Use std::vector.
12728         (find_overload_match): Use std::vector.
12729         (find_oload_champ): Use std::vector.
12730         * value.c (value_free): Use operator delete.
12731         (value_of_xmethod): Rename to...
12732         (value_from_xmethod): ... this.  Don't assign
12733         xmethod_worker::value, take rvalue-reference.
12734         (result_type_of_xmethod): Adjust.
12735         (call_xmethod): Adjust.
12736         * value.h: Include extension.h.
12737         (struct xmethod_worker): Don't forward-declare.
12738         (value_of_xmethod): Rename to...
12739         (value_from_xmethod): ... this, take rvalue-reference.
12740         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12741         (struct python_xmethod_worker): ... this, add constructor and
12742         destructor.
12743         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12744         (gdbpy_free_xmethod_worker_data): Rename to...
12745         (python_xmethod_worker::~python_xmethod_worker): ... this and
12746         adjust.
12747         (gdbpy_clone_xmethod_worker_data): Rename to...
12748         (python_xmethod_worker::clone): ... this and adjust.
12749         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12750         temporary vector.
12751         (gdbpy_get_xmethod_arg_types): Rename to...
12752         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12753         (gdbpy_get_xmethod_result_type): Rename to...
12754         (python_xmethod_worker::do_get_result_type): ... this and
12755         adjust.
12756         (gdbpy_invoke_xmethod): Rename to...
12757         (python_xmethod_worker::invoke): ... this and adjust.
12758         (new_python_xmethod_worker): Rename to...
12759         (python_xmethod_worker::python_xmethod_worker): ... this and
12760         adjust.
12761         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12762         Remove.
12763         (gdbpy_free_xmethod_worker_data): Remove.
12764         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12765         (gdbpy_get_xmethod_arg_types): Remove.
12766         (gdbpy_get_xmethod_result_type): Remove.
12767         (gdbpy_invoke_xmethod): Remove.
12768         * python/python.c (python_extension_ops): Remove obsolete
12769         callbacks.
12770
12771 2018-01-05  Pedro Alves  <palves@redhat.com>
12772
12773         PR gdb/18653
12774         * common/signals-state-save-restore.c
12775         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12776         find a custom handler preinstalled, instead of internal erroring.
12777         But only warn if !quiet.
12778         * common/signals-state-save-restore.h
12779         (save_original_signals_state): New parameter 'quiet'.
12780         * main.c (captured_main_1): Move save_original_signals_state call
12781         after option handling, and pass QUIET.
12782
12783 2018-01-05  Pedro Alves  <palves@redhat.com>
12784
12785         * spu-tdep.c (spu_catch_start): Pass
12786         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12787
12788 2018-01-05  Pedro Alves  <palves@redhat.com>
12789
12790         PR gdb/22670
12791         * ada-lang.c (literal_symbol_name_matcher): New function.
12792         (ada_get_symbol_name_matcher): Use it for
12793         symbol_name_match_type::SEARCH_NAME.
12794         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12795         it down instead of assuming symbol_name_match_type::FULL.
12796         * block.h (block_lookup_symbol): New parameter 'match_type'.
12797         * c-valprint.c (print_unpacked_pointer): Use
12798         lookup_symbol_search_name instead of lookup_symbol.
12799         * compile/compile-object-load.c (get_out_value_type): Pass down
12800         symbol_name_match_type::SEARCH_NAME.
12801         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12802         symbol_name_match_type::FULL.
12803         * cp-support.c (cp_get_symbol_name_matcher): Handle
12804         symbol_name_match_type::SEARCH_NAME.
12805         * infrun.c (insert_exception_resume_breakpoint): Use
12806         lookup_symbol_search_name.
12807         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12808         * psymtab.c (maintenance_check_psymtabs): Use
12809         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12810         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12811         SYMBOL_SEARCH_NAME.
12812         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12813         if symbol_name_match_type::SEARCH_NAME.
12814         (lookup_symbol_in_language): Pass down
12815         symbol_name_match_type::FULL.
12816         (lookup_symbol_search_name): New.
12817         (lookup_language_this): Pass down
12818         symbol_name_match_type::SEARCH_NAME.
12819         (lookup_symbol_aux, lookup_local_symbol): New parameter
12820         'match_type'.  Pass it down.
12821         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12822         (lookup_symbol_search_name): New declaration.
12823         (lookup_symbol_in_block): New 'match_type' parameter.
12824
12825 2018-01-05  Pedro Alves  <palves@redhat.com>
12826
12827         PR gdb/22670
12828         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12829         ada_lookup_symbol.
12830         (ada_lookup_symbol): Reimplement in terms of
12831         ada_lookup_symbol_list, bits factored out from
12832         ada_lookup_encoded_symbol.
12833
12834 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12835
12836         * ada-exp.y (write_object_renaming): When subscripting an array
12837         using a symbol as the index, pass the block in call to
12838         ada_lookup_encoded_symbol when looking that symbol up.
12839
12840 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12841
12842         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12843         TYPE_INDEX_TYPE.
12844
12845 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12846
12847         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12848         the case where VALUE_LVAL (val0) is not lval_memory.
12849
12850 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12851
12852         * ada-valprint.c (print_optional_low_bound): Handle
12853         character-indexed array printing like boolean-indexed array
12854         printing.
12855
12856 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12857
12858         * NEWS: Create a new section for the next release branch.
12859         Rename the section of the current branch, now that it has
12860         been cut.
12861
12862 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12863
12864         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12865         * version.in: Bump version to 8.1.50.DATE-git.
12866
12867 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12868
12869         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12870         Add field.
12871         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12872         Add field.
12873         (default_exception_support_info) <catch_handlers_sym>: Add field.
12874         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12875         (ada_exception_name_addr_1): Add "catch handlers" handling.
12876         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12877         Update all callers.
12878         (create_excep_cond_exprs) <ex>: Add parameter.
12879         (re_set_exception): Update create_excep_cond_exprs call.
12880         (print_it_exception, print_one_exception, print_mention_exception)
12881         (print_recreate_exception): Add "catch handler" handling.
12882         (allocate_location_catch_handlers, re_set_catch_handlers)
12883         (check_status_catch_handlers, print_it_catch_handlers)
12884         (print_one_catch_handlers, print_mention_catch_handlers)
12885         (print_recreate_catch_handlers): New function.
12886         (catch_handlers_breakpoint_ops): New variable.
12887         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12888         Add parameter.  Add "catch handler" handling.
12889         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12890         Add "catch handler" handling.
12891         (ada_exception_catchpoint_cond_string): Add "catch handler"
12892         handling.
12893         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12894         call.
12895         (catch_ada_handlers_command): New function.
12896         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12897         operations structure.
12898         (_initialize_ada_language): Add "catch handlers" command entry.
12899         * NEWS: Document "catch handlers" feature.
12900
12901 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12902
12903         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12904         account when creating the array type of the slice.
12905         (ada_value_slice): Likewise.
12906
12907 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12908
12909         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12910         New enum value.
12911         (create_array_type_with_stride): Add byte_stride_prop parameter.
12912         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12913         New parameter.  Update all callers in this file.
12914         (array_type_has_dynamic_stride): New function.
12915         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12916         of arrays with dynamic byte strides.
12917         * dwarf2read.c (read_array_type): Add support for dynamic
12918         DW_AT_byte_stride attributes.
12919
12920 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12921
12922         * dwarf2read.c (read_unspecified_type): Treat
12923         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12924
12925 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12926
12927         Update copyright year range in all GDB files.
12928
12929 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12930
12931         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12932         and gdb/testsuite/gdb.base/step-line.c.
12933
12934 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12935
12936         * copyright.py (main): Dump the contents of
12937         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12938         even if BY_HAND is empty.
12939
12940 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12941
12942         * top.c (print_gdb_version): Update Copyright year in version
12943         message.
12944
12945 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12946
12947         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12948
12949 For older changes see ChangeLog-2017.
12950 \f
12951 Local Variables:
12952 mode: change-log
12953 left-margin: 8
12954 fill-column: 74
12955 version-control: never
12956 coding: utf-8
12957 End: