(Ada/MI) Fix -var-evaluate-expression for access to unconstrained arrays
[external/binutils.git] / gdb / ChangeLog
1 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2
3         * ada-lang.c (ada_value_subscript): Handle case when parameter is
4         an array of access to unconstrained array.
5
6 2018-09-10  Xavier Roirand  <roirand@adacore.com>
7
8         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
9         (ada_check_typedef): Use it.
10
11 2018-09-10  Xavier Roirand  <roirand@adacore.com>
12
13         * ada-varobj.c (ada_varobj_describe_struct_child)
14         (ada_varobj_describe_child): Handle union case like struct one.
15
16 2018-09-10  Tom Tromey  <tom@tromey.com>
17
18         PR python/18380:
19         * python/python.c (_initialize_python): Make example in "python"
20         help work in Python 3.
21
22 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
23
24         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
25         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
26         $(EXEEXT) to the script, as it is not a program.
27
28 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
29
30         * python/py-prettyprint.c (pretty_print_one_value): Return
31         gdbpy_ref<>.
32         (print_string_repr): Adjust.
33         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
34         * python/python-internal.h (apply_varobj_pretty_printer): Return
35         gdbpy_ref<>.
36         * varobj.c (varobj_value_get_print_value): Adjust.
37
38 2018-09-08  Tom Tromey  <tom@tromey.com>
39
40         PR python/16047:
41         * python/py-prettyprint.c (pretty_print_one_value): Check for
42         to_string method.
43
44 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
45
46         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
47         replace_operator_with_call.
48
49 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
50
51         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
52
53 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
54
55         * ada-typeprint.c (print_range): Print the bounds using TYPE
56         rather than its TYPE_TARGET_TYPE.
57
58 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
59
60         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
61         call to ada_to_fixed_value_create.
62
63 2018-09-08  Jerome Guitton  <guitton@adacore.com>
64
65         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
66
67 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
68
69         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
70         by calls to error.
71
72 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
73
74         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
75         Move update of loop variable "fi".
76
77 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
78
79         * ada-lang.c (value_assign_to_component): In the case of
80         big-endian targets, extract the bits of the given VAL
81         using an src_offset of zero if container is not a scalar.
82
83 2018-09-06  Simon Ser  <contact@emersion.fr>
84
85         PR gdb/23105
86         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
87         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
88         * fbsd-tdep.c (fbsd_make_note_desc): New.
89         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
90         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
91         * target.h (enum target_object) Add FreeBSD-specific
92         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
93
94 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
95
96         * compile/compile-c.h (generate_c_for_variable_locations):
97         Change reference to pointer.
98         * compile/compile-c-support.c (compile_program) <compute>:
99         Likewise.
100         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
101         (generate_c_for_for_one_variable): Likewise
102         (generate_c_for_variable_locations): Likewise
103         * compile/compile-c-types.c (compile_c_instance::convert_type):
104         Likewise
105         * compile/compile-cplus-symbols.c (convert_one_symbol):
106         std::move the scope passed to enter_scope.
107         * compile/compile-cplus-types.c
108         (compile_cplus_instance::enter_scope): Make parameter
109         rvalue-reference.
110         (compile_cplus_instance::new_scope): Change reference to
111         pointer.
112         (compile_cplus_instance::convert_type): Likewise
113         (compile_cplus_convert_typedef): std::move the scope passed to
114         enter_scope.
115         (compile_cplus_convert_struct_or_union): Likewise.
116         (compile_cplus_convert_enum): Likewise.
117         (compile_cplus_convert_namespace): Likewise.
118         * compile/compile-cplus.h (compile_cplus_instance)
119         <enter_scope>: Make parameter rvalue-reference.
120         * compile/compile-internal.h (compile_instance)
121         <get_cached_type>: Likewise
122         * compile/compile-loc2c.c (push): Likewise
123         (pushf): Likewise
124         (unary): Likewise
125         (binary): Likewise
126         (print_label): Likewise
127         (pushf_register_address): Likewise
128         (pushf_register): Likewise
129         (do_compile_dwarf_expr_to_c): Likewise
130         (compile_dwarf_expr_to_c): Likewise
131         (compile_dwarf_bounds_to_c): Likewise
132         * compile/compile.c (compile_instance::get_cached_type):
133         Likewise
134         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
135         (compile_dwarf_bounds_to_c): Likewise
136         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
137         (dwarf2_compile_property_to_c): Likewise
138         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
139         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
140         Likewise
141
142 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
143
144         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
145         * tui/tui-data.c (init_content_element): Don't initialize it.
146
147 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
148
149         * tui/tui-data.h (struct tui_win_info)
150         <detail::opaque>: Remove.
151         * tui/tui-data.c (init_win_info): Remove assignment.
152
153 2018-09-05  Tom Tromey  <tom@tromey.com>
154
155         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
156         -Wformat-nonliteral.
157         * target-float.c (host_float_ops<T>::to_string)
158         (host_float_ops<T>::from_string): Use
159         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
160         * configure: Rebuild.
161
162 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
163
164         * printcmd.c (printf_c_string): Use
165         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
166         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
167
168 2018-09-05  Tom Tromey  <tom@tromey.com>
169
170         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
171
172 2018-09-05  Tom de Vries  <tdevries@suse.de>
173
174         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
175         with resolve_abstract_p == true.
176         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
177         defaulting to false. Propagate resolve_abstract_p to
178         dwarf2_fetch_die_loc_sect_off.
179         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
180         parameter, defaulting to false.
181         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
182         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
183         parameter.
184         * dwarf2read.h (struct die_info): Forward-declare.
185         (die_info_ptr): New typedef.
186         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
187
188 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
189
190         GDB 8.2 released.
191
192 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
193             Pedro Alves  <palves@redhat.com>
194
195         * gnulib/Makefile.in (aclocal_m4_deps): Move to
196         "aclocal-m4-deps.mk".  Include file here.
197         $(srcdir)/aclocal.m4: Add "configure.ac".
198         * gnulib/aclocal-m4-deps.mk: New file.
199         * gnulib/update-gnulib.sh: Automatically update
200         "aclocal-m4-deps.mk".
201
202 2018-09-04  Tom Tromey  <tom@tromey.com>
203
204         * configure: Rebuild.
205         * configure.ac: Remove multi-ice code.
206
207 2018-09-04  Tom Tromey  <tom@tromey.com>
208
209         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
210         (ada-exp.o): Update.
211
212 2018-09-04  Tom Tromey  <tom@tromey.com>
213
214         * Makefile.in (printcmd.o, target-float.o): Remove.
215         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
216
217 2018-09-04  Tom Tromey  <tom@tromey.com>
218
219         * gnulib/Makefile.in: Remove obsolete comment.
220         * Makefile.in: Remove obsolete comment.
221
222 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
223
224         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
225         line with '+'.
226
227 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
228
229         * riscv-tdep.c: Add 'prologue-value.h' include.
230         (struct riscv_unwind_cache): New struct.
231         (riscv_debug_unwinder): New global.
232         (riscv_scan_prologue): Update arguments, capture register details
233         from prologue scan.
234         (riscv_skip_prologue): Reformat arguments line, move end of
235         prologue calculation into riscv_scan_prologue.
236         (riscv_frame_cache): Update return type, create
237         riscv_unwind_cache, scan the prologue, and fill in remaining cache
238         details.
239         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
240         (riscv_frame_prev_register): Use the trad_frame within the
241         riscv_unwind_cache.
242         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
243         flag.
244
245 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
246
247         * trad-frame.h (trad_frame_set_realreg): Declare.
248         (trad_frame_set_addr): Declare.
249         * trad-frame.c (trad_frame_set_realreg): Define new function.
250         (trad_frame_set_addr): Define new function.
251         (trad_frame_set_reg_realreg): Use new function.
252         (trad_frame_set_reg_addr): Use new function.
253
254 2018-09-01  Keith Seitz  <keiths@redhat.com>
255
256         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
257         pulongest instead of "%lld".
258         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
259         ATTRIBUTE_UNUSED.
260
261 2018-08-31  Tom Tromey  <tom@tromey.com>
262
263         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
264         variant part type.
265
266 2018-08-31  Pedro Alves  <palves@redhat.com>
267
268         * gdbarch.h: Regenerate.
269
270 2018-08-31  Pedro Alves  <palves@redhat.com>
271
272         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
273         * target.h (Hardware watchpoint interfaces): Describe
274         continuable/steppable/non-steppable watchpoints.
275         * gdbarch.h, gdbarch.c: Regenerate.
276
277 2018-08-31  Pedro Alves  <palves@redhat.com>
278
279         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
280         Delete.
281         * s390-linux-nat.c
282         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
283         * target.h (target_ops::have_continuable_watchpoint): Delete.
284         (target_have_continuable_watchpoint): Delete.
285         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
286         * target-delegates.c: Regenerate.
287
288 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
289
290         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
291         the files present in "gnulib/import/m4/".
292
293 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
294
295         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
296         c.sw, c.swsp, and c.sdsp.
297
298 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
299
300         * riscv-tdep.c (struct riscv_inferior_data): Delete.
301         (riscv_read_misa_reg): Don't cache value read into inferior data.
302         (riscv_new_inferior_data): Delete.
303         (riscv_inferior_data_cleanup): Delete.
304         (riscv_inferior_data): Delete.
305         (riscv_invalidate_inferior_data): Delete.
306         (_initialize_riscv_tdep): Remove initialisation of inferior data.
307
308 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
309
310         * compile/compile-cplus-types.c
311         (compile_cplus_instance::leave_scope): Take the address of scope
312         object.
313         (compile_cplus_instance::convert_qualified_base): Compare quals
314         to 0.
315
316 2018-08-30  Keith Seitz  <keiths@redhat.com>
317
318         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
319         Use "%s" and host_address_to_string instead of "%p" in printf.
320
321 2018-08-29  Keith Seitz  <keiths@redhat.com>
322
323         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
324         and compile-cplus-types.c.
325         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
326         * c-lang.c (cplus_language_defn): Set C++ compile functions.
327         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
328         Declare.
329         * compile/compile-c-support.c: Include compile-cplus.h.
330         (load_libcompile): Templatize.
331         (get_compile_context): "New" function.
332         (c_get_compile_context): Use get_compile_context.
333         (cplus_get_compile_context): New function.
334         (cplus_push_user_expression, cplus_pop_user_expression)
335         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
336         (cplus_compute_program): Define new structs/functions.
337         * compile/compile-cplus-symmbols.c: New file.
338         * compile/compile-cplus-types.c: New file.
339         * compile/compile-cplus.h: New file.
340         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
341         Declare.
342         * compile/compile-object-load.c (get_out_value_type): Use
343         strncmp_iw when comparing symbol names.
344         (compile_object_load): Add mst_bss and mst_data.
345         * compile/compile.c (_initialize_compile): Remove
346         -Wno-implicit-function-declaration from `compile_args'.
347         * compile/gcc-cp-plugin.h: New file.
348         * NEWS: Mention C++ compile support and new debug options.
349
350 2018-08-29  Keith Seitz  <keiths@redhat.com>
351
352         * linespec.c (collect_info::add_symbol): Make virtual.
353         (struct symbol_searcher_collect_info): New struct.
354         (symbol_searcher::find_all_symbols): New method.
355         * symtab.h (class symbol_searcher): New class.
356
357 2018-08-29  Keith Seitz  <keiths@redhat.com>
358
359         * linespec.c (struct linespec) <function_symbols, label_symbols>:
360         Change to vector of block_symbol.  Update all users.
361         (struct collect_info) <symbols>: Likewise.
362         (collect_info::add_symbol): Take block_symbol as argument.
363         Update all callers.
364         (decode_compound_collector) <m_symbols>: Change type to vector
365         of block_symbol.  Update all users.
366         (decode_compound_collector::operator ()): Change parameter type
367         to block_symbol.
368         (find_method, find_function_symbols, find_linespec_symbols)
369         (find_label_symbols_in_block, find_label_symbols): Change symbol
370         vectors to block_symbol vectors.
371         * symtab.h (symbol_found_callback_ftype): Change parameter type to
372         block_symbol.
373
374 2018-08-29  Keith Seitz  <keiths@redhat.com>
375
376         * linespec.c (symbolp): Remove typedef and VEC definitions.
377         (bound_minimal_symbol_d): Likewise.
378
379 2018-08-29  Keith Seitz  <keiths@redhat.com>
380
381         * linespec.c (decode_compound_collector::decode_compound_collector):
382         Remove initialization for `m_symtabs'.
383         (decode_compound_collector::release_symbols): Change return type
384         to std::vector.  Update all callers.
385         (class decode_compound_collector) <m_symbols>: Change type to
386         std::vector.
387         (lookup_prefix_sym): Change return type to std::vector.  Update all
388         callers.
389         (compare_symbols): Remove.
390         (std_compare_symbols): Rename to `compare_symbols'.
391         (find_method): Change `sym_classes' parameter to std::vector.
392         Update all callers.  Use std::sort to sort sym_classes.
393         (find_linespec_symbols): Remove cleanup.
394
395 2018-08-29  Keith Seitz  <keiths@redhat.com>
396
397         * linespec.c (struct linespec) <minimal_symbols>: Change type to
398         std::vector.  Update all users.
399         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
400         (struct collect_info) <minimal_symbols>: Likewise.
401         (compare_msymbols): Return bool.  Change parameters to const
402         bound_minimal_symbol references.
403         (find_method, find_function_symbols, find_linespec_symbols): Change
404         `minsyms' parameter to std::vector.  Update all callers.
405
406 2018-08-29  Keith Seitz  <keiths@redhat.com>
407
408         * linespec.c (struct linespec) <label_symbols>: Change type to
409         std::vector.  Update all users.
410         (find_label_symbols_in_block): Change `result' parameter to
411         std::vector.  Update all callers.
412         (find_label_symbols): Return std::vector.  Update all callers.
413
414 2018-08-29  Keith Seitz  <keiths@redhat.com>
415
416         * linespec.c (struct linespec) <function_symbols>: Change type to
417         std::vector.  Update all users.
418         (struct collect_info) <function_symbols>: Likewise.
419         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
420         (std_compare_symbols): New function.
421         (find_method, find_function_symbols, find_linespec_symbols)
422         (find_label_symbols_in_block): Change `symbols' parameter to
423         std::vector.  Update all callers.
424         (find_label_symbols): Likewise for `function_symbols' and
425         `label_funcs_ret'.
426
427 2018-08-29  Keith Seitz  <keiths@redhat.com>
428
429         * linespec.c (symtab_vector_up): Define.
430         (struct linespec) <file_symtabs>: Change type to std::vector *.
431         Update all uses.
432         (struct collect_info) <file_symtabs>: Likewise.
433         (collect_symtabs_from_filename): Return symtab_vector_up.
434         Update all callers.
435         (decode_objc): Remove cleanup.
436         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
437         (symtab_collector::release_symtabs): Return symtab_vector_up.
438         Update all callers.
439         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
440         Update all users.
441         (collect_symtabs_from_filename, symtabs_from_filename): Return
442         symtab_vector_up.  Update all callers.
443
444 2018-08-29  Tom Tromey  <tom@tromey.com>
445
446         * csky-tdep.c (csky_analyze_prologue): Use
447         core_addr_to_string_nz.
448
449 2018-08-29  Tom Tromey  <tom@tromey.com>
450
451         * windows-nat.c (struct xlate_exception) <them>: Change type to
452         DWORD.
453         (xlate): Fix formatting.  Remove last entry.
454         (struct xlate_exception, xlate): Comment out.
455         (windows_nat_target::resume): Use ranged for.
456
457 2018-08-29  Jim Wilson  <jimw@sifive.com>
458
459         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
460         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
461         of NT_PRFPREG.
462         (riscv_linux_nat_target::store_registers): Likewise.
463
464 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
465
466         PR gdb/23555
467         PR gdb/23558
468         * gnulib/aclocal.m4: Regenerate.
469         * gnulib/config.in: Regenerate.
470         * gnulib/configure: Regenerate.
471         * gnulib/import/Makefile.am: Update.
472         * gnulib/import/Makefile.in: Update.
473         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
474         * gnulib/import/_Noreturn.h: ... this.
475         * gnulib/import/alloca.in.h: Update.
476         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
477         * gnulib/import/arg-nonnull.h: ... this.
478         * gnulib/import/assure.h: Update.
479         * gnulib/import/at-func.c: Update.
480         * gnulib/import/basename-lgpl.c: Update.
481         * gnulib/import/extra/snippet/c++defs.h: Rename to...
482         * gnulib/import/c++defs.h: ... this.
483         * gnulib/import/canonicalize-lgpl.c: Update.
484         * gnulib/import/cdefs.h: Update.
485         * gnulib/import/chdir-long.c: Update.
486         * gnulib/import/chdir-long.h: Update.
487         * gnulib/import/cloexec.c: Update.
488         * gnulib/import/cloexec.h: Update.
489         * gnulib/import/close.c: Update.
490         * gnulib/import/closedir.c: Update.
491         * gnulib/import/config.charset: Update.
492         * gnulib/import/dirent-private.h: Update.
493         * gnulib/import/dirent.in.h: Update.
494         * gnulib/import/dirfd.c: Update.
495         * gnulib/import/dirname-lgpl.c: Update.
496         * gnulib/import/dirname.h: Update.
497         * gnulib/import/dosname.h: Update.
498         * gnulib/import/dup-safer-flag.c: Update.
499         * gnulib/import/dup-safer.c: Update.
500         * gnulib/import/dup.c: Update.
501         * gnulib/import/dup2.c: Update.
502         * gnulib/import/errno.in.h: Update.
503         * gnulib/import/error.c: Update.
504         * gnulib/import/error.h: Update.
505         * gnulib/import/exitfail.c: Update.
506         * gnulib/import/exitfail.h: Update.
507         * gnulib/import/extra/update-copyright: Update.
508         * gnulib/import/fchdir.c: Update.
509         * gnulib/import/fcntl.c: Update.
510         * gnulib/import/fcntl.in.h: Update.
511         * gnulib/import/fd-hook.c: Update.
512         * gnulib/import/fd-hook.h: Update.
513         * gnulib/import/fd-safer-flag.c: Update.
514         * gnulib/import/fd-safer.c: Update.
515         * gnulib/import/fdopendir.c: Update.
516         * gnulib/import/filename.h: Update.
517         * gnulib/import/filenamecat-lgpl.c: Update.
518         * gnulib/import/filenamecat.h: Update.
519         * gnulib/import/flexmember.h: Update.
520         * gnulib/import/float+.h: Update.
521         * gnulib/import/float.c: Update.
522         * gnulib/import/float.in.h: Update.
523         * gnulib/import/fnmatch.c: Update.
524         * gnulib/import/fnmatch.in.h: Update.
525         * gnulib/import/fnmatch_loop.c: Update.
526         * gnulib/import/fpucw.h: Update.
527         * gnulib/import/frexp.c: Update.
528         * gnulib/import/frexpl.c: Update.
529         * gnulib/import/fstat.c: Update.
530         * gnulib/import/fstatat.c: Update.
531         * gnulib/import/getcwd-lgpl.c: Update.
532         * gnulib/import/getcwd.c: Update.
533         * gnulib/import/getdtablesize.c: Update.
534         * gnulib/import/getlogin_r.c: Update.
535         * gnulib/import/getprogname.c: Update.
536         * gnulib/import/getprogname.h: Update.
537         * gnulib/import/gettext.h: Update.
538         * gnulib/import/gettimeofday.c: Update.
539         * gnulib/import/glob-libc.h: Update.
540         * gnulib/import/glob.c: Update.
541         * gnulib/import/glob.in.h: Update.
542         * gnulib/import/glob_internal.h: Update.
543         * gnulib/import/glob_pattern_p.c: Update.
544         * gnulib/import/globfree.c: Update.
545         * gnulib/import/hard-locale.c: Update.
546         * gnulib/import/hard-locale.h: Update.
547         * gnulib/import/intprops.h: Update.
548         * gnulib/import/inttypes.in.h: Update.
549         * gnulib/import/isnan.c: Update.
550         * gnulib/import/isnand-nolibm.h: Update.
551         * gnulib/import/isnand.c: Update.
552         * gnulib/import/isnanl-nolibm.h: Update.
553         * gnulib/import/isnanl.c: Update.
554         * gnulib/import/itold.c: Update.
555         * gnulib/import/libc-config.h: Update.
556         * gnulib/import/limits.in.h: Update.
557         * gnulib/import/localcharset.c: Update.
558         * gnulib/import/localcharset.h: Update.
559         * gnulib/import/localtime-buffer.c: Update.
560         * gnulib/import/localtime-buffer.h: Update.
561         * gnulib/import/lstat.c: Update.
562         * gnulib/import/m4/00gnulib.m4: Update.
563         * gnulib/import/m4/__inline.m4: Update.
564         * gnulib/import/m4/absolute-header.m4: Update.
565         * gnulib/import/m4/alloca.m4: Update.
566         * gnulib/import/m4/builtin-expect.m4: Update.
567         * gnulib/import/m4/canonicalize.m4: Update.
568         * gnulib/import/m4/chdir-long.m4: Update.
569         * gnulib/import/m4/close.m4: Update.
570         * gnulib/import/m4/closedir.m4: Update.
571         * gnulib/import/m4/configmake.m4: Update.
572         * gnulib/import/m4/d-ino.m4: Update.
573         * gnulib/import/m4/d-type.m4: Update.
574         * gnulib/import/m4/dirent_h.m4: Update.
575         * gnulib/import/m4/dirfd.m4: Update.
576         * gnulib/import/m4/dirname.m4: Update.
577         * gnulib/import/m4/double-slash-root.m4: Update.
578         * gnulib/import/m4/dup.m4: Update.
579         * gnulib/import/m4/dup2.m4: Update.
580         * gnulib/import/m4/eealloc.m4: Update.
581         * gnulib/import/m4/environ.m4: Update.
582         * gnulib/import/m4/errno_h.m4: Update.
583         * gnulib/import/m4/error.m4: Update.
584         * gnulib/import/m4/exponentd.m4: Update.
585         * gnulib/import/m4/exponentl.m4: Update.
586         * gnulib/import/m4/extensions.m4: Update.
587         * gnulib/import/m4/extern-inline.m4: Update.
588         * gnulib/import/m4/fchdir.m4: Update.
589         * gnulib/import/m4/fcntl-o.m4: Update.
590         * gnulib/import/m4/fcntl.m4: Update.
591         * gnulib/import/m4/fcntl_h.m4: Update.
592         * gnulib/import/m4/fdopendir.m4: Update.
593         * gnulib/import/m4/filenamecat.m4: Update.
594         * gnulib/import/m4/flexmember.m4: Update.
595         * gnulib/import/m4/float_h.m4: Update.
596         * gnulib/import/m4/fnmatch.m4: Update.
597         * gnulib/import/m4/fnmatch_h.m4: Update.
598         * gnulib/import/m4/fpieee.m4: Update.
599         * gnulib/import/m4/frexp.m4: Update.
600         * gnulib/import/m4/frexpl.m4: Update.
601         * gnulib/import/m4/fstat.m4: Update.
602         * gnulib/import/m4/fstatat.m4: Update.
603         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
604         * gnulib/import/m4/getcwd-path-max.m4: Update.
605         * gnulib/import/m4/getcwd.m4: Update.
606         * gnulib/import/m4/getdtablesize.m4: Update.
607         * gnulib/import/m4/getlogin.m4: Update.
608         * gnulib/import/m4/getlogin_r.m4: Update.
609         * gnulib/import/m4/getpagesize.m4: Update.
610         * gnulib/import/m4/getprogname.m4: Update.
611         * gnulib/import/m4/gettimeofday.m4: Update.
612         * gnulib/import/m4/glibc21.m4: Update.
613         * gnulib/import/m4/glob.m4: Update.
614         * gnulib/import/m4/glob_h.m4: Update.
615         * gnulib/import/m4/gnulib-cache.m4: Update.
616         * gnulib/import/m4/gnulib-common.m4: Update.
617         * gnulib/import/m4/gnulib-comp.m4: Update.
618         * gnulib/import/m4/gnulib-tool.m4: Update.
619         * gnulib/import/m4/hard-locale.m4: Update.
620         * gnulib/import/m4/include_next.m4: Update.
621         * gnulib/import/m4/inttypes-pri.m4: Update.
622         * gnulib/import/m4/inttypes.m4: Update.
623         * gnulib/import/m4/isnand.m4: Update.
624         * gnulib/import/m4/isnanl.m4: Update.
625         * gnulib/import/m4/largefile.m4: Update.
626         * gnulib/import/m4/limits-h.m4: Update.
627         * gnulib/import/m4/localcharset.m4: Update.
628         * gnulib/import/m4/locale-fr.m4: Update.
629         * gnulib/import/m4/locale-ja.m4: Update.
630         * gnulib/import/m4/locale-zh.m4: Update.
631         * gnulib/import/m4/localtime-buffer.m4: Update.
632         * gnulib/import/m4/longlong.m4: Update.
633         * gnulib/import/m4/lstat.m4: Update.
634         * gnulib/import/m4/malloc.m4: Update.
635         * gnulib/import/m4/malloca.m4: Update.
636         * gnulib/import/m4/math_h.m4: Update.
637         * gnulib/import/m4/mbrtowc.m4: Update.
638         * gnulib/import/m4/mbsinit.m4: Update.
639         * gnulib/import/m4/mbsrtowcs.m4: Update.
640         * gnulib/import/m4/mbstate_t.m4: Update.
641         * gnulib/import/m4/memchr.m4: Update.
642         * gnulib/import/m4/memmem.m4: Update.
643         * gnulib/import/m4/mempcpy.m4: Update.
644         * gnulib/import/m4/memrchr.m4: Update.
645         * gnulib/import/m4/mkdir.m4: Update.
646         * gnulib/import/m4/mkstemp.m4: Update.
647         * gnulib/import/m4/mmap-anon.m4: Update.
648         * gnulib/import/m4/mode_t.m4: Update.
649         * gnulib/import/m4/msvc-inval.m4: Update.
650         * gnulib/import/m4/msvc-nothrow.m4: Update.
651         * gnulib/import/m4/multiarch.m4: Update.
652         * gnulib/import/m4/nocrash.m4: Update.
653         * gnulib/import/m4/off_t.m4: Update.
654         * gnulib/import/m4/onceonly.m4: Update.
655         * gnulib/import/m4/open-cloexec.m4: Update.
656         * gnulib/import/m4/open.m4: Update.
657         * gnulib/import/m4/openat.m4: Update.
658         * gnulib/import/m4/opendir.m4: Update.
659         * gnulib/import/m4/pathmax.m4: Update.
660         * gnulib/import/m4/rawmemchr.m4: Update.
661         * gnulib/import/m4/readdir.m4: Update.
662         * gnulib/import/m4/readlink.m4: Update.
663         * gnulib/import/m4/realloc.m4: Update.
664         * gnulib/import/m4/rename.m4: Update.
665         * gnulib/import/m4/rewinddir.m4: Update.
666         * gnulib/import/m4/rmdir.m4: Update.
667         * gnulib/import/m4/save-cwd.m4: Update.
668         * gnulib/import/m4/secure_getenv.m4: Update.
669         * gnulib/import/m4/setenv.m4: Update.
670         * gnulib/import/m4/signal_h.m4: Update.
671         * gnulib/import/m4/ssize_t.m4: Update.
672         * gnulib/import/m4/stat-time.m4: Update.
673         * gnulib/import/m4/stat.m4: Update.
674         * gnulib/import/m4/std-gnu11.m4: Update.
675         * gnulib/import/m4/stdbool.m4: Update.
676         * gnulib/import/m4/stddef_h.m4: Update.
677         * gnulib/import/m4/stdint.m4: Update.
678         * gnulib/import/m4/stdio_h.m4: Update.
679         * gnulib/import/m4/stdlib_h.m4: Update.
680         * gnulib/import/m4/strchrnul.m4: Update.
681         * gnulib/import/m4/strdup.m4: Update.
682         * gnulib/import/m4/strerror.m4: Update.
683         * gnulib/import/m4/string_h.m4: Update.
684         * gnulib/import/m4/strstr.m4: Update.
685         * gnulib/import/m4/strtok_r.m4: Update.
686         * gnulib/import/m4/sys_socket_h.m4: Update.
687         * gnulib/import/m4/sys_stat_h.m4: Update.
688         * gnulib/import/m4/sys_time_h.m4: Update.
689         * gnulib/import/m4/sys_types_h.m4: Update.
690         * gnulib/import/m4/tempname.m4: Update.
691         * gnulib/import/m4/time_h.m4: Update.
692         * gnulib/import/m4/unistd-safer.m4: Update.
693         * gnulib/import/m4/unistd_h.m4: Update.
694         * gnulib/import/m4/warn-on-use.m4: Update.
695         * gnulib/import/m4/wchar_h.m4: Update.
696         * gnulib/import/m4/wchar_t.m4: Update.
697         * gnulib/import/m4/wctype_h.m4: Update.
698         * gnulib/import/m4/wint_t.m4: Update.
699         * gnulib/import/malloc.c: Update.
700         * gnulib/import/malloc/scratch_buffer.h: Update.
701         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
702         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
703         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
704         * gnulib/import/malloca.c: Update.
705         * gnulib/import/malloca.h: Update.
706         * gnulib/import/malloca.valgrind: Update.
707         * gnulib/import/math.in.h: Update.
708         * gnulib/import/mbrtowc.c: Update.
709         * gnulib/import/mbsinit.c: Update.
710         * gnulib/import/mbsrtowcs-impl.h: Update.
711         * gnulib/import/mbsrtowcs-state.c: Update.
712         * gnulib/import/mbsrtowcs.c: Update.
713         * gnulib/import/memchr.c: Update.
714         * gnulib/import/memmem.c: Update.
715         * gnulib/import/mempcpy.c: Update.
716         * gnulib/import/memrchr.c: Update.
717         * gnulib/import/mkdir.c: Update.
718         * gnulib/import/mkstemp.c: Update.
719         * gnulib/import/msvc-inval.c: Update.
720         * gnulib/import/msvc-inval.h: Update.
721         * gnulib/import/msvc-nothrow.c: Update.
722         * gnulib/import/msvc-nothrow.h: Update.
723         * gnulib/import/open.c: Update.
724         * gnulib/import/openat-die.c: Update.
725         * gnulib/import/openat-priv.h: Update.
726         * gnulib/import/openat-proc.c: Update.
727         * gnulib/import/openat.c: Update.
728         * gnulib/import/openat.h: Update.
729         * gnulib/import/opendir.c: Update.
730         * gnulib/import/pathmax.h: Update.
731         * gnulib/import/pipe-safer.c: Update.
732         * gnulib/import/rawmemchr.c: Update.
733         * gnulib/import/readdir.c: Update.
734         * gnulib/import/readlink.c: Update.
735         * gnulib/import/realloc.c: Update.
736         * gnulib/import/ref-add.sin: Update.
737         * gnulib/import/ref-del.sin: Update.
738         * gnulib/import/rename.c: Update.
739         * gnulib/import/rewinddir.c: Update.
740         * gnulib/import/rmdir.c: Update.
741         * gnulib/import/same-inode.h: Update.
742         * gnulib/import/save-cwd.c: Update.
743         * gnulib/import/save-cwd.h: Update.
744         * gnulib/import/scratch_buffer.h: Update.
745         * gnulib/import/secure_getenv.c: Update.
746         * gnulib/import/setenv.c: Update.
747         * gnulib/import/signal.in.h: Update.
748         * gnulib/import/stat-time.c: Update.
749         * gnulib/import/stat-time.h: Update.
750         * gnulib/import/stat-w32.c: Update.
751         * gnulib/import/stat-w32.h: Update.
752         * gnulib/import/stat.c: Update.
753         * gnulib/import/stdbool.in.h: Update.
754         * gnulib/import/stddef.in.h: Update.
755         * gnulib/import/stdint.in.h: Update.
756         * gnulib/import/stdio.in.h: Update.
757         * gnulib/import/stdlib.in.h: Update.
758         * gnulib/import/str-two-way.h: Update.
759         * gnulib/import/strchrnul.c: Update.
760         * gnulib/import/strdup.c: Update.
761         * gnulib/import/streq.h: Update.
762         * gnulib/import/strerror-override.c: Update.
763         * gnulib/import/strerror-override.h: Update.
764         * gnulib/import/strerror.c: Update.
765         * gnulib/import/string.in.h: Update.
766         * gnulib/import/stripslash.c: Update.
767         * gnulib/import/strnlen1.c: Update.
768         * gnulib/import/strnlen1.h: Update.
769         * gnulib/import/strstr.c: Update.
770         * gnulib/import/strtok_r.c: Update.
771         * gnulib/import/sys_stat.in.h: Update.
772         * gnulib/import/sys_time.in.h: Update.
773         * gnulib/import/sys_types.in.h: Update.
774         * gnulib/import/tempname.c: Update.
775         * gnulib/import/tempname.h: Update.
776         * gnulib/import/time.in.h: Update.
777         * gnulib/import/unistd--.h: Update.
778         * gnulib/import/unistd-safer.h: Update.
779         * gnulib/import/unistd.in.h: Update.
780         * gnulib/import/unsetenv.c: Update.
781         * gnulib/import/verify.h: Update.
782         * gnulib/import/extra/snippet/warn-on-use.h: Update.
783         * gnulib/import/wchar.in.h: Update.
784         * gnulib/import/wctype.in.h: Update.
785         * gnulib/import/xalloc-oversized.h: Update.
786         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
787         "53e2c179f26a890fa6685af4b6c1397ee370433b".
788
789 2018-08-16  Gary Benson <gbenson@redhat.com>
790
791         PR gdb/13000:
792         * gdb/main.c (captured_main_1): Exit with nonzero status
793         in batch mode if the last command to be executed failed.
794         * NEWS: Mention the above.
795
796 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
797
798         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
799         end of warning message.
800
801 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
802
803         PR gdb/22943:
804         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
805         (aarch64_extract_return_value): Use
806         aapcs_is_vfp_call_or_return_candidate.
807         (aarch64_return_in_memory): Likewise.
808         (aarch64_store_return_value): Likewise.
809
810 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
811
812         * aarch64-tdep.c
813         (aapcs_is_vfp_call_or_return_candidate): Make static
814         (pass_in_v_or_stack): Remove function.
815         (pass_in_v_vfp_candidate): New function.
816         (aarch64_push_dummy_call): Check for float register candidates.
817
818 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
819
820         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
821         (aapcs_is_vfp_call_or_return_candidate_1): New function.
822         (aapcs_is_vfp_call_or_return_candidate): Likewise.
823
824 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
825
826         PR build/23399
827         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
828         (struct ipa_sym_addresses): Rename to...
829         (struct ipa_sym_addresses_common): ... this.
830         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
831
832 2018-08-28  Tom Tromey  <tom@tromey.com>
833
834         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
835         (token_fifo): Now a std::vector.
836         (yylex, c_parse): Update.
837         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
838         (token_fifo): Now a std::vector.
839         (yylex, d_parse): Update.
840         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
841         (token_fifo): Now a std::vector.
842         (yylex, go_parse): Update.
843
844 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
845
846         * parser-defs.h (struct type_stack) <elements>: Change type to
847         std::vector<union type_stack_elt>.
848         <depth, size>: Remove.
849         * parse.c (parse_exp_in_context_1): Adjust.
850         (type_stack_reserve): Remove.
851         (check_type_stack_depth): Remove.
852         (insert_into_type_stack): Adjust to std::vector.
853         (insert_type): Likewise.
854         (push_type): Likewise.
855         (push_type_int): Likewise.
856         (insert_type_address_space): Likewise.
857         (pop_type): Likewise.
858         (pop_type_int): Likewise.
859         (pop_typelist): Likewise.
860         (pop_type_stack): Likewise.
861         (append_type_stack): Likewise.
862         (push_type_stack): Likewise.
863         (get_type_stack): Likewise.
864         (type_stack_cleanup): Likewise.
865         (push_typelist): Likewise.
866         (follow_types): Likewise.
867         (_initialize_parse): Likewise.
868
869 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
870
871         * NEWS: Mention csky target.
872
873 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
874             Hafiz Abid Qadeer  <abidh@codesourcery.com>
875             Don Breazeal  <donb@codesourcery.com>
876
877         * csky-linux-tdep.c: New file.
878         * csky-tdep.c: Likewise.
879         * csky-tdep.h: Likewise.
880         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
881         csky-tdep.o.
882         (HFILES_NO_SRCDIR): Add csky-tdep.h.
883         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
884         * configure.tgt: Add csky support.
885
886 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
887
888         * python/py-framefilter.c (py_print_frame): Print frame architecture
889         when printing on an MI output.
890
891 2018-08-27  Tom Tromey  <tom@tromey.com>
892
893         PR build/23087:
894         * configure: Rebuild.
895         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
896
897 2018-08-27  Tom Tromey  <tom@tromey.com>
898
899         * aarch64-linux-tdep.c
900         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
901         casts to int.
902
903 2018-08-27  Tom Tromey  <tom@tromey.com>
904
905         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
906         unsigned.
907         (ppc64_standard_linkage1, ppc64_standard_linkage2)
908         (ppc64_standard_linkage3, ppc64_standard_linkage4)
909         (ppc64_standard_linkage5, ppc64_standard_linkage6)
910         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
911         unsigned.
912
913 2018-08-27  Tom Tromey  <tom@tromey.com>
914
915         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
916         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
917
918 2018-08-27  Tom Tromey  <tom@tromey.com>
919
920         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
921         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
922         ULONGEST_MAX.
923         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
924         ULONGEST_MAX.
925         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
926         ULONGEST_MAX.
927         * sparc-linux-tdep.c (sparc32_linux_sigframe)
928         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
929         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
930         ULONGEST_MAX.
931         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
932         (ppc64_linux_sigaction_tramp_frame)
933         (ppc32_linux_sighandler_tramp_frame)
934         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
935         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
936         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
937         * mn10300-linux-tdep.c (am33_linux_sigframe)
938         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
939         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
940         * mips-linux-tdep.c (mips_linux_o32_sigframe)
941         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
942         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
943         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
944         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
945         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
946         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
947         * microblaze-linux-tdep.c
948         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
949         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
950         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
951         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
952         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
953         * common/common-types.h (ULONGEST_MAX): New define.
954         (CORE_ADDR_MAX): Fix formatting.
955         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
956         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
957         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
958         (arm_linux_rt_sigreturn_tramp_frame)
959         (arm_eabi_linux_sigreturn_tramp_frame)
960         (arm_eabi_linux_rt_sigreturn_tramp_frame)
961         (thumb2_eabi_linux_sigreturn_tramp_frame)
962         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
963         (arm_linux_restart_syscall_tramp_frame)
964         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
965         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
966         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
967         ULONGEST_MAX.
968         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
969
970 2018-08-27  Tom Tromey  <tom@tromey.com>
971
972         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
973         CORE_ADDR_MAX.
974         * mips-tdep.c (mips_deal_with_atomic_sequence)
975         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
976         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
977         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
978         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
979         CORE_ADDR_MAX.
980         * aarch64-tdep.c (aarch64_software_single_step): Use
981         CORE_ADDR_MAX.
982
983 2018-08-27  Tom Tromey  <tom@tromey.com>
984
985         * linespec.c (complete_linespec_component): Add cast to "char".
986         * completer.c (completion_tracker::build_completion_result): Add
987         cast to "char".
988
989 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
990
991         * solist.h (struct solist, struct target_so_ops): Fix
992         indentation.
993
994 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
995
996         * ada-tasks.c (ada_task_info_s): Remove typedef.
997         (DEF_VEC_O(ada_task_info_s)): Remove.
998         (struct ada_tasks_inferior_data): Initialize fields.
999         <task_list>: Make an std::vector.
1000         (get_ada_tasks_inferior_data): Allocate with new.
1001         (ada_get_task_number): Adjust.
1002         (get_task_number_from_id): Likewise.
1003         (valid_task_id): Likewise.
1004         (ada_get_task_info_from_ptid): Likewise.
1005         (iterate_over_live_ada_tasks): Likewise.
1006         (add_ada_task): Likewise.
1007         (read_known_tasks): Likewise.
1008         (ada_build_task_list): Likewise.
1009         (print_ada_task_info): Likewise.
1010         (info_task): Likewise.
1011         (task_command_1): Likewise.
1012
1013 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1014
1015         * ada-lang.c (add_angle_brackets): Return std::string.
1016
1017 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
1018
1019         * python/py-threadevent.c (py_get_event_thread): Initialize
1020         pythread.
1021
1022 2018-08-24  Pedro Alves  <palves@redhat.com>
1023
1024         * python/py-bpevent.c (create_breakpoint_event_object): Use
1025         copy-initialization.
1026         * python/py-continueevent.c (emit_continue_event): Use
1027         copy-initialization.
1028         * python/py-exitedevent.c (create_exited_event_object): Return a
1029         gdbpy_ref<>.
1030         (emit_exited_event): Use copy-initialization.
1031         * python/py-inferior.c (python_new_inferior)
1032         (python_inferior_deleted, add_thread_object): Use
1033         copy-initialization.
1034         * python/py-infevents.c (create_inferior_call_event_object)
1035         (create_register_changed_event_object)
1036         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1037         (emit_inferior_call_event, emit_memory_changed_event)
1038         (emit_register_changed_event): Use copy-initialization.
1039         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1040         Return a gdbpy_ref<>.
1041         (emit_new_objfile_event): Use copy-initialization.
1042         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1043         (emit_clear_objfiles_event): Use copy-initialization.
1044         * python/py-signalevent.c (create_signal_event_object): Use
1045         copy-initialization.
1046         * python/py-threadevent.c (create_thread_event_object): Use
1047         copy-initialization.
1048
1049 2018-08-24  Pedro Alves  <palves@redhat.com>
1050             Simon Marchi  <simon.marchi@ericsson.com>
1051
1052         PR gdb/23379
1053         * python/py-continueevent.c: Include "gdbthread.h".
1054         (create_continue_event_object): Add intro comment.  Add 'ptid'
1055         parameter.  Use it to find thread to pass to
1056         create_thread_event_object.
1057         (emit_continue_event): Pass PTID down to
1058         create_continue_event_object.
1059         * python/py-event.h (py_get_event_thread): Declare.
1060         (create_thread_event_object): Remove default from 'thread'
1061         parameter.
1062         * python/py-stopevent.c (create_stop_event_object): Use
1063         py_get_event_thread.
1064         * python/py-threadevent.c (get_event_thread): Rename to ...
1065         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1066         and use it to find the thread.
1067         (create_thread_event_object): Assert that THREAD isn't null.
1068         Don't find the event thread here.
1069
1070 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1071
1072         * block.h (blockrange, blockranges): New struct declarations.
1073         (struct block): Add new field named `ranges'.
1074         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1075         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1076         macros for accessing ranges in struct block.
1077         (make_blockranges): New declaration.
1078         block.c (make_blockranges): New function.
1079         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1080         for block.
1081         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1082         * blockframe.c (cache_pc_function_block): New static global.
1083         (clear_pc_function_cache): Clear cache_pc_function_block.
1084         (find_pc_partial_function): Move comment to symtab.h.  Add
1085         support for non-contiguous blocks.
1086         * cli/cli-cmds.c (block.h): Include.
1087         (print_disassembly): Handle printing of non-contiguous blocks.
1088         (disassemble_current_function): Likewise.
1089         (disassemble_command): Likewise.
1090
1091         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1092         BLOCK_START.
1093         * blockframe.c (get_pc_function_start): Likewise.
1094         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1095         (gcc_symbol_address): Likewise.
1096         * compile/compile-object-run.c (compile_object_run): Likewise.
1097         * compile/compile.c (get_expr_block_and_pc): Likewise.
1098         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1099         (func_addr_to_tail_call_list): Likewise.
1100         * findvar.c (default_read_var_value): Likewise.
1101         * inline-frame.c (inline_frame_this_id): Likewise.
1102         (skip-inline_frames): Likewise.
1103         * infcmd.c (until_next_command): Likewise.
1104         * linespec.c (convert_linespec_to_sals): Likewise.
1105         * parse.c (parse_exp_in_context_1): Likewise.
1106         * printcmd.c (build_address_symbolic): likewise.
1107         (info_address_command): Likewise.
1108         symtab.c (find_function_start_sal): Likewise.
1109         (skip_prologue_sal): Likewise.
1110         (find_function_alias_target): Likewise.
1111         (find_gnu_ifunc): Likewise.
1112         * stack.c (find_frame_funname): Likewise.
1113         * symtab.c (fixup_symbol_section): Likewise.
1114         (find_function_start_sal): Likewise.
1115         (skip_prologue_sal): Likewsie.
1116         (find_function_alias_target): Likewise.
1117         (find_gnu_ifunc): Likewise.
1118         * tracepoint.c (info_scope_command): Likewise.
1119         * value.c (value_fn_field): Likewise.
1120
1121         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1122         in place of find_pc_partial_function.
1123         * blockframe.c (find_function_entry_range_from_pc): New function.
1124         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1125         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1126         for each range in a block.
1127
1128
1129 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1130
1131         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1132         incrementation.
1133
1134 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1135
1136         * solib-svr4.c (read_program_headers_from_bfd): Return
1137         gdb::optional<gdb::byte_vector>.
1138         (svr4_exec_displacement): Adjust.
1139
1140 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1141
1142         * solib-svr4.c (read_program_header): Return
1143         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1144         (find_program_interpreter): Return
1145         gdb::optional<gdb::byte_vector>.
1146         (scan_dyntag_auxv): Adjust.
1147         (enable_break): Adjust.
1148         (svr4_exec_displacement): Adjust.
1149
1150 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1151
1152         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1153         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1154
1155 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1156
1157         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1158         string_vprintf.
1159         * guile/scm-utils.c (gdbscm_printf): Likewise.
1160         * serial.c (serial_printf): Likewise.
1161         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1162
1163 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1164
1165         * stack.c (print_frame): Print frame architecture when printing on
1166         an MI output.
1167         * NEWS: Mention new "arch" attribute in frame output.
1168
1169 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1170
1171         * arch/aarch64.h (aarch64_regnum): Update comment.
1172
1173 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1174
1175         * NEWS: Add SVE to 8.2 section.
1176
1177 2018-08-21  Pedro Alves  <palves@redhat.com>
1178
1179         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1180         out from gdbscm_parse_function_args.
1181         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1182         gdbscm_parse_function_args_1.
1183
1184 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1185
1186         PR gdb/17816
1187         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1188         operator.
1189
1190 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1191
1192         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1193
1194 2018-08-19  Michael Spang  <spang@google.com>
1195
1196         PR gdb/11786
1197         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1198         for PT_TLS segments.
1199
1200 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1201
1202         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1203         dwarf_variable_value.
1204         * dwarf2-frame.c (class dwarf_expr_executor):
1205         Add override for dwarf_variable_value.
1206         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1207         (class symbol_needs_eval_context): Likewise.
1208         (indirect_synthetic_pointer): Add forward declaration.
1209         (sect_variable_value): New function.
1210         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1211         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1212         for DW_OP_GNU_variable_value.
1213
1214 2018-08-16  Tom Tromey  <tom@tromey.com>
1215
1216         * top.c (read_command_file): Update.
1217         (command_line_input): Remove "repeat" argument.
1218         * ada-lang.c (get_selections): Update.
1219         * linespec.c (decode_line_2): Update.
1220         * defs.h (command_line_input): Remove argument.
1221         * cli/cli-script.c (read_next_line): Update.
1222         * python/py-gdb-readline.c: Update.
1223
1224 2018-08-17  Tom Tromey  <tom@tromey.com>
1225
1226         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1227         command_line_input.
1228
1229 2018-08-15  Tom Tromey  <tom@tromey.com>
1230
1231         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1232
1233 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1234
1235         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1236         If used, use find_pc_partial_function to find address range
1237         to disassemble.
1238         * mi/mi-main.c (mi_cmd_list_features): Report
1239         "data-disassemble-a-option" feature.
1240         * NEWS: Mention new -data-disassemble option -a.
1241
1242 2018-08-13  Tom Tromey  <tom@tromey.com>
1243
1244         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1245
1246 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1247
1248         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1249         (aarch64_linux_collect_sve_regset): Likewise.
1250         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1251         * regcache.h (regcache_map_entry_size): New function.
1252
1253 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1254
1255         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1256         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1257         (SVE_HEADER_VL_LENGTH): Likewise.
1258         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1259         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1260         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1261         (SVE_HEADER_SIZE_OFFSET): Likewise.
1262         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1263         (SVE_HEADER_VL_OFFSET): Likewise.
1264         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1265         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1266         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1267         (SVE_HEADER_SIZE): Likewise.
1268         (aarch64_linux_core_read_vq): Add function.
1269         (aarch64_linux_core_read_description): Check for SVE section.
1270
1271 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1272
1273         * aarch64-fbsd-tdep.c
1274         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1275         collect_size.
1276         * aarch64-linux-tdep.c
1277         (aarch64_linux_iterate_over_regset_sections): Likewise.
1278         * alpha-linux-tdep.c
1279         (alpha_linux_iterate_over_regset_sections):
1280         * alpha-nbsd-tdep.c
1281         (alphanbsd_iterate_over_regset_sections): Likewise.
1282         * amd64-fbsd-tdep.c
1283         (amd64fbsd_iterate_over_regset_sections): Likewise.
1284         * amd64-linux-tdep.c
1285         (amd64_linux_iterate_over_regset_sections): Likewise.
1286         * arm-bsd-tdep.c
1287         (armbsd_iterate_over_regset_sections): Likewise.
1288         * arm-fbsd-tdep.c
1289         (arm_fbsd_iterate_over_regset_sections): Likewise.
1290         * arm-linux-tdep.c
1291         (arm_linux_iterate_over_regset_sections): Likewise.
1292         * corelow.c (get_core_registers_cb): Likewise.
1293         (core_target::fetch_registers): Likewise.
1294         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1295         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1296         * gdbarch.h (void): Regenerate.
1297         * gdbarch.sh: Add supply_size and collect_size.
1298         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1299         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1300         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1301         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1302         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1303         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1304         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1305         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1306         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1307         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1308         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1309         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1310         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1311         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1312         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1313         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1314         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1315         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1316         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1317         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1318         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1319         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1320         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1321         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1322         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1323         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1324         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1325         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1326         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1327         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1328
1329 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1330
1331         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1332         with string_printf.
1333
1334 2018-08-10  Keith Seitz  <keiths@redhat.com>
1335
1336         * compile/compile-c-support.c (add_code_header, add_code_footer):
1337         Move into policy class.
1338         (c_push_user_expression, pop_user_expression_nop)
1339         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1340         (compile_program): New host class.
1341         (c_compile_program): New typedef.
1342         (c_compute_porgram): Use c_compile_program.
1343
1344 2018-08-10  Keith Seitz  <keiths@redhat.com>
1345
1346         * compile/compile-internal.h (compile_instance::~compile_instance):
1347         Remove calls to htab_delete.
1348         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1349         * compile.c (compile_instance::compile_instance): Initialize
1350         htab unique pointers.
1351         (compile_instance::get_cached_type, compile_instance::insert_type)
1352         (compile_instance::error_symbol_once): Update for unique_ptr.
1353
1354 2018-08-10  Keith Seitz  <keiths@redhat.com>
1355
1356         * compile/compile-c-symbols.c (struct symbol_error)
1357         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1358         (compile_instance::insert_symbol_error)
1359         (compile_instance::error_symbol_once): Move to ...
1360         * compile/compile.c: ... here.
1361
1362 2018-08-10  Keith Seitz  <keiths@redhat.com>
1363
1364         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1365         instead of `new_compile_instance'.
1366         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1367         Update description.
1368         If the symbol error map is not initialized, create it.
1369         (generate_c_for_for_one_symbol): Do not check/initialize
1370         the symbol error map.
1371         * compile/compile-c-types.c (compile_c_instance): Make a class.
1372         Update all callers.
1373         (compile_instance::compile_instance): Initialize the type cache.
1374         (get_cached_type): New function.
1375         (insert_type): Update description.
1376         (compile_c_instance::m_default_cflags): Define.
1377         (convert_type): Update description.  Use get_cached_type.
1378         (delete_instance): Moved to destructor.
1379         (new_compile_instance): Moved to constructor.
1380         * compile/compile-c.h (compile_c_instance): Make class inheriting
1381         from compile_instance.
1382         <base>: Remove field.
1383         <type_map, symbol_err_map>: Move to base class.
1384         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1385         * compile/compile-internal.h (compile_instance): Make class.
1386         <type_map_t, symbol_err_map_t>: Define.
1387         <fe>: Rename to `m_gcc_fe'.
1388         <scope, block, gcc_target_options>: Add `m_' prefix.
1389         <m_type_map, m_symbol_err_map>: New fields, moved from
1390         compile_c_instance.
1391         <destroy>: Remove.
1392         (convert_type, new_compile_instance): Remove.
1393         * compile/compile.c (cleanup_compile_instance): Remove.
1394         (compile_to_object): Use unique_ptr to eliminate cleanups.
1395         (compile_instance::set_print_callback, compile_instance::version)
1396         (compile_instance::set_verbose)
1397         (compile_instance::set_driver_filename)
1398         (compile_instance::set_triplet_regexp)
1399         (compile_instance::set_arguments)
1400         (compile_instance::set_source_file)
1401         (compile_instance::compile): Define.
1402
1403 2018-08-10  Keith Seitz  <keiths@redhat.com>
1404
1405         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1406         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1407         gcc-c-fe.def to define C plugin.
1408         (delete_instance): Delete `c_plugin'.
1409         (new_compile_instance): Initialize `c_plugin'.
1410         * compile/compile-c.h: Include gcc_c_plugin.h.
1411         (struct compile_c_instance) <c_plugin>: New member.
1412         * gcc-c-plugin.h: New file.
1413         Update all callers with API change.
1414
1415 2018-08-10  Keith Seitz  <keiths@redhat.com>
1416
1417         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1418         (HFILES_NO_SRCDIR): ... to here.
1419         Add compile-internal.h and compile-c.h.
1420         * compile/compile-c-support.c: Include compile-c.h.
1421         * compile/compile-c-symbols.c: Include compile-c.h.
1422         (generate_c_for_variable_locations): Update comment.
1423         * compile/compile-c-types.c: Include compile-c.h.
1424         * compile/compile-c.h: New file -- moved C language declarations
1425         from other files here.
1426         * compile/compile-internal.h: Do not include hashtab.h or
1427         common/enum-flags.h.
1428         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1429         (gcc_convert_symbol, gcc_symbol_address)
1430         (generate_c_for_variable_locations, c_get_mode_for_size)
1431         (c_get_range_decl_name): Definitions moved to compile-c.h.
1432         * compile/compile-loc2c.c: Include compile-c.h.
1433
1434 2018-08-10  Keith Seitz  <keiths@redhat.com>
1435
1436         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1437         (c_symbol_substitution_name): ... this.
1438         Update all callers.
1439
1440 2018-08-10  Keith Seitz  <keiths@redhat.com>
1441
1442         * compile/compile-c-support.c (c_compute_program): Use
1443         unique_xmalloc_ptr to eliminate cleanup.
1444         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1445         Return a unique_xmalloc_ptr and eliminate cleanup.
1446         * compile/compile-internal.h (generate_c_for_variable_locations):
1447         Return unique_xmalloc_ptr and update description.
1448
1449 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1450
1451         * corelow.c (core_target::get_core_register_section): Rename
1452         min_size to section_min_size.
1453
1454 2018-08-09  Jim Wilson  <jimw@sifive.com>
1455
1456         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1457         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1458         * NEWS: Mention new GNU/Linux RISC-V target.
1459         * configure.host: Add riscv*-*-linux*.
1460         * configure.nat: Add riscv*.
1461         * configure.tgt: Add riscv*-*-linux*.
1462         * riscv-linux-nat.c: New file.
1463         * riscv-linux-tdep.c: New file.
1464
1465 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1466
1467         * infrun.c (resume): Make static, add forward declaration.
1468         (proceed): Update header comment.
1469         * infrun.h (resume): Delete declaration.
1470
1471 2018-08-09  Tom Tromey  <tom@tromey.com>
1472
1473         * riscv-tdep.h: Minor formatting fixes.
1474
1475 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1476
1477         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1478         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1479         (test_mkdir_recursive): Likewise.
1480         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1481
1482 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1483
1484         * valarith.c (value_subscripted_rvalue): If an array is not in
1485         memory, and we don't know the upper bound, then we can't know that
1486         the requested element exists or not.
1487
1488 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1489
1490         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1491         (target_options_to_string): Add comment.
1492
1493 2018-08-08  Tom Tromey  <tom@tromey.com>
1494
1495         * unittests/scoped_mmap-selftests.c: Check result of "write".
1496
1497 2018-08-08  Jim Wilson  <jimw@sifive.com>
1498
1499         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1500         (decode_register_index_short): New.
1501         (decode_j_type_insn, decode_cj_type_insn): New.
1502         (decode_b_type_insn, decode_cb_type_insn): New.
1503         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1504         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1505         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1506         is_c_sw_insn instead of is_sw_insn.
1507         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1508         (riscv_software_single_step): New.
1509         * riscv-tdep.h (riscv_software_single_step): Declare.
1510
1511         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1512         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1513
1514 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1515
1516         PR gdb/18050:
1517         * target.c (dispose_inferior): Don't dispose of inferiors that are
1518         already killed.
1519
1520 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1521
1522         * remote.c (remote_target::download_tracepoint): Change char* to
1523         const char*.
1524
1525 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1526
1527         * target.h (target_options_to_string): Return an std::string.
1528         * target.c (str_comma_list_concat_elem): Return void, use
1529         std::string.
1530         (do_option): Likewise.
1531         (target_options_to_string): Return an std::string.
1532         * linux-nat.c (linux_nat_target::wait): Adjust.
1533         * target-debug.h (target_debug_print_options): Adjust.
1534
1535 2018-08-07  Tom Tromey  <tom@tromey.com>
1536
1537         * Makefile.in (CPPFLAGS): New variable.
1538         (INTERNAL_CPPFLAGS): Use it.
1539
1540 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1541
1542         * NEWS: Mention the index cache.
1543
1544 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1545
1546         * common/pathstuff.h (get_standard_cache_dir): New.
1547         * common/pathstuff.c (get_standard_cache_dir): New.
1548         * build-id.h (build_id_to_string): New.
1549         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1550         DEBUG_STR_SUFFIX): Move to here.
1551         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1552         DEBUG_STR_SUFFIX): Move from there.
1553         (write_psymtabs_to_index): Make non-static, add basename
1554         parameter.  Write to temporary files, rename when done.
1555         (save_gdb_index_command): Adjust call to
1556         write_psymtabs_to_index.
1557         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1558         field.
1559         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1560         (get_gdb_index_contents_from_cache): New.
1561         (get_gdb_index_contents_from_cache_dwz): New.
1562         (dwarf2_initialize_objfile): Read index from cache.
1563         (dwarf2_build_psymtabs): Save to index.
1564         * dwarf-index-cache.h: New file.
1565         * dwarf-index-cache.c: New file.
1566         * dwarf-index-write.h: New file.
1567
1568 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1569
1570         * gnulib/aclocal.m4: Re-generate.
1571         * gnulib/config.in: Re-generate.
1572         * gnulib/configure: Re-generate.
1573         * gnulib/import/Makefile.am: Re-generate.
1574         * gnulib/import/Makefile.in: Re-generate.
1575         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1576         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1577         * gnulib/import/m4/mkdir.m4: New file.
1578         * gnulib/import/mkdir.c: New file.
1579         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1580         module.
1581
1582 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1583
1584         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1585         * common/scoped_mmap.c: New file.
1586         * common/scoped_mmap.h (destroy): New method.
1587         (~scoped_mmap, reset): Use destroy.
1588         (scoped_mmap): New move constructor.
1589         (mmap_file): New declaration.
1590         * unittests/scoped_mmap-selftests.c (test_normal,
1591         test_invalid_filename, run_tests): New functions.
1592         (_initialize_scoped_mmap_selftests): Register selftest.
1593
1594 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1595
1596         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1597         (read_gdb_index_from_buffer): ... this.  Remove section
1598         parameter, add buffer parameter.
1599         (get_gdb_index_contents_ftype,
1600         get_gdb_index_contents_dwz_ftype): New typedefs.
1601         (dwarf2_read_gdb_index): Add callback parameters to get the
1602         index contents.
1603         (get_gdb_index_contents_from_section): New.
1604         (dwarf2_initialize_objfile): Update call to
1605         dwarf2_read_gdb_index.
1606
1607 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1608
1609         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1610         (gdb_open_cloexec): Likewise.
1611         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1612         (commandline_from_pid): Likewise.
1613         (linux_xfer_osdata_threads): Likewise.
1614         (linux_xfer_osdata_fds): Likewise.
1615         * ada-lang.c (is_package_name): Likewise.
1616         * auxv.c (procfs_xfer_auxv): Likewise.
1617         * breakpoint.c (print_one_breakpoint_location): Use
1618         uiout::field_fmt.
1619         (print_one_catch_solib): Use string_printf.
1620         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1621         (add_pe_forwarded_sym): Likewise.
1622         * dwarf2read.c (create_type_unit_group): Likewise.
1623         (build_error_marker_type): Likewise.
1624         * infcall.c (get_function_name): Likewise.
1625         * valprint.c (print_converted_chars_to_obstack): Likewise.
1626         * xtensa-tdep.c (xtensa_register_type): Likewise.
1627
1628 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1629
1630         * remote.c (remote_target::download_tracepoint): Fix format
1631         string errors.
1632
1633 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1634
1635         * tracefile.c: Include common/byte-vector.h.
1636         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1637         with trace_regblock_size if needed.  Update uses of buf.
1638
1639 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1640
1641         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1642         std::vector<unsigned char>.
1643         * tracepoint.c (collection_list::collection_list): Remove
1644         m_regs_mask initializer from initializer list.  Resize
1645         m_regs_mask using the largest remote register number.
1646         (collection_list::add_remote_register): Remove size check on
1647         m_regs_mask.  Use at to access element.
1648         (collection_list::stringify): Change type of temp_buf to
1649         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1650         stringify the register mask.  Use pack_hex_byte for the register
1651         mask.
1652
1653 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1654
1655         * tracepoint.h (class collection_list) <add_register>: Remove.
1656         <add_remote_register, add_ax_registers, add_local_register>:
1657         Declare.
1658         <add_memrange>: Add scope parameter.
1659         * tracepoint.c (encode_actions_1): Likewise.
1660         (collection_list::add_register): Rename to ...
1661         (collection_list::add_remote_register): ... this.  Update
1662         comment.
1663         (collection_list::add_ax_registers, add_local_register): New
1664         methods.
1665         (collection_list::add_memrange): Add scope parameter.  Call
1666         add_local_register instead of add_register.
1667         (finalize_tracepoint_aexpr): New function.
1668         (collection_list::collect_symbol): Update calls to add_memrange.
1669         Call add_local_register instead of add_register.  Call
1670         add_ax_registers.  Call finalize_tracepoint_aexpr.
1671         (encode_actions_1): Get remote regnos for $reg action.  Call
1672         add_remote_register, add_ax_registers, and add_local_register.
1673         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1674         (validate_actionline): Call finalize_tracepoint_aexpr.
1675
1676 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1677
1678         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1679         Replace array buf with gdb::char_vector buf, of size
1680         get_remote_packet_size ().  Replace references to buf and
1681         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1682         and xsnprintf with snprintf.  Raise errors if the buffer is too
1683         small.
1684
1685 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1686
1687         * remote.c (remote_target::download_tracepoint): Fix the has_more
1688         predicate in the QTDP action list iteration.
1689
1690 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1691
1692         * remote.c (remote_target::download_tracepoint): Fix indentation
1693         in for block.
1694
1695 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1696
1697         * proc-api.c (_initialize_proc_api): Remove c, unused.
1698         * procfs.c (procfs_init_inferior): Remove signals, unused.
1699         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1700         unused.
1701
1702 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1703             Andrew Burgess  <andrew.burgess@embecosm.com>
1704
1705         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1706         'W_STOPCODE (0)' as this could be ambiguous.
1707
1708 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1709
1710         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1711         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1712         "ai_socktype").
1713
1714 2018-08-02  Tom Tromey  <tom@tromey.com>
1715
1716         PR symtab/16842.
1717         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1718         symbols.
1719         (process_structure_scope): Likewise.
1720
1721 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1722
1723         PR gdb/22629:
1724         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1725         kill inferior.
1726
1727 2018-08-02  Tom Tromey  <tom@tromey.com>
1728
1729         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1730         (darwin_suspend_inferior, darwin_resume_inferior)
1731         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1732         (darwin_check_new_threads): Check result of get_darwin_inferior.
1733
1734 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1735
1736         GDB 8.1.1 released.
1737
1738 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1739
1740         * varobj.c (varobj_get_path_expr_parent): Report an error if
1741         parent is a dynamic varobj.
1742
1743 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1744
1745         * gnulib/aclocal.m4: Re-generate.
1746         * gnulib/config.in: Re-generate.
1747         * gnulib/configure: Re-generate.
1748         * gnulib/import/Makefile.in: Re-generate.
1749         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1750         * gnulib/import/m4/onceonly.m4: Re-generate.
1751
1752 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1753
1754         * target-descriptions.c (struct xml_test_tdesc): New.
1755         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1756         (record_xml_tdesc): Update.
1757         (maintenance_check_xml_descriptions): Update.
1758         * target-descriptions.h (record_xml_tdesc): Update comment.
1759
1760 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1761
1762         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1763         checking array bounds are defined.
1764
1765 2018-07-30  Tom Tromey  <tom@tromey.com>
1766
1767         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1768         irreflexivity violation.
1769
1770 2018-07-30  Tom Tromey  <tom@tromey.com>
1771
1772         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1773         * value.c (unpack_long): Remove lint code.
1774         * valops.c (value_ind): Remove lint code.
1775         * valarith.c (value_x_binop, value_x_unop, value_equal)
1776         (value_pos): Remove lint code.
1777
1778 2018-07-28  Tom de Vries  <tdevries@suse.de>
1779
1780         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1781         with undefined upper bound as <optimized out>.
1782
1783 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1784
1785         * gcore.in: Rename variable "name" to "prefix".  Expand
1786         "usage" text.
1787
1788 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1789
1790         * windows-nat.c (windows_nat_target::create_inferior): Update to
1791         call close() in global namespace.
1792
1793 2018-07-26  Tom Tromey  <tom@tromey.com>
1794
1795         * dwarf-index-write.c (add_address_entry): Don't add objfile
1796         offsets.
1797         * dbxread.c (find_stab_function): Rename from
1798         find_stab_function_addr.  Return a bound_minimal_symbol.
1799         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1800         Don't add objfile offsets.
1801         (end_psymtab): Use raw_text_low, raw_text_high,
1802         MSYMBOL_VALUE_RAW_ADDRESS.
1803         (read_ofile_symtab): Update.
1804         (process_one_symbol): Update.
1805         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1806         offsets.
1807         (dw2_relocate): Remove.
1808         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1809         searching addrmap.
1810         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1811         Update.
1812         (process_psymtab_comp_unit_reader, add_partial_symbol)
1813         (add_partial_subprogram, dwarf2_ranges_read): Update.
1814         (load_partial_dies): Update.
1815         (add_address_entry): Don't add objfile offsets.
1816         (dwarf2_build_include_psymtabs): Update.
1817         (create_addrmap_from_aranges): Don't add objfile offsets.
1818         (dw2_find_pc_sect_compunit_symtab): Update.
1819         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1820         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1821         Update.
1822         (parse_partial_symbols): Don't add objfile offsets.  Use
1823         raw_text_low, raw_text_high.  Update.
1824         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1825         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1826         or call 'relocate' quick function.  Clear psymbol_map.
1827         * psympriv.h (struct partial_symbol) <address>: Add section
1828         offset.
1829         <set_unrelocated_address>: Rename from set_address.
1830         <raw_text_low, raw_text_high>: New methods.
1831         <text_low, text_high>: Add objfile parameter.
1832         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1833         set_unrelocated_address.
1834         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1835         (find_pc_psymbol): Update.
1836         (fixup_psymbol_section, relocate_psymtabs): Remove.
1837         (dump_psymtab, psym_functions): Update.
1838         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1839         parameter.
1840         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1841         (start_psymtab_common): Update.
1842         * symfile-debug.c (debug_qf_relocate): Remove.
1843         (debug_sym_quick_functions): Update.
1844         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1845         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1846         Update.
1847
1848 2018-07-26  Tom Tromey  <tromey@redhat.com>
1849
1850         * dbxread.c (end_psymtab): Use text_high_valid and
1851         text_low_valid.
1852         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1853         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1854         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1855         Update comment.
1856         <text_low_valid, text_high_valid>: New fields.
1857         <set_text_low, set_text_high>: Update.
1858         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1859
1860 2018-07-26  Tom Tromey  <tom@tromey.com>
1861
1862         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1863         Update.
1864         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1865         textlow and texthigh fields.
1866         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1867         Update.
1868         * mdebugread.c (parse_lines, parse_partial_symbols)
1869         (psymtab_to_symtab_1): Update.
1870         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1871         Rename fields.  Update comment.  Now private.
1872         <text_low, text_high, set_text_low, set_text_high>: New methods.
1873         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1874         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1875         (start_psymtab_common, maintenance_info_psymtabs)
1876         (maintenance_check_psymtabs): Update.
1877         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1878         texthigh fields.
1879         (scan_xcoff_symtab): Update.
1880
1881 2018-07-26  Tom Tromey  <tromey@redhat.com>
1882
1883         * psympriv.h (struct partial_symbol) <unrelocated_address,
1884         address, set_address>: New methods.
1885         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1886         (fixup_psymbol_section, relocate_psymtabs): Update.
1887         (print_partial_symbols): Add 'objfile' parameter.  Update.
1888         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1889         Update.
1890
1891 2018-07-26  Tom Tromey  <tom@tromey.com>
1892
1893         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1894         (debug_names::write_psymbols): Update.
1895         * psympriv.h (struct partial_symbol): Derive from
1896         general_symbol_info.
1897         <obj_section>: New method.
1898         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1899         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1900         (find_pc_sect_psymbol, fixup_psymbol_section)
1901         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1902         (print_partial_symbols, recursively_search_psymtabs)
1903         (compare_psymbols, psymbol_hash, psymbol_compare)
1904         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1905         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1906
1907 2018-07-26  Tom Tromey  <tromey@redhat.com>
1908
1909         * dbxread.c (end_psymtab): Remove dead code.
1910
1911 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1912
1913         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1914         DWARF unwinders are disabled.
1915         * dwarf2-frame.c: Add dwarf2read.h include.
1916         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1917         disabled.
1918         (dwarf2_frame_unwinders_enabled_p): Define.
1919         (show_dwarf_unwinders_enabled_p): New function.
1920         (_initialize_dwarf2_frame): Register switch to control DWARF
1921         unwinder use.
1922         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1923         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1924         (show_dwarf_cmdlist): Remove static keyword.
1925         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1926         (show_dwarf_cmdlist): Declare.
1927         * NEWS: Document new feature.
1928
1929 2018-07-26  Tom de Vries  <tdevries@suse.de>
1930
1931         PR breakpoints/23366
1932         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1933
1934 2018-07-26  Tom de Vries  <tdevries@suse.de>
1935
1936         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1937         DW_AT_count can't be translated to a dynamic prop.
1938
1939 2018-07-25  Tom de Vries  <tdevries@suse.de>
1940
1941         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1942         try/catch.
1943
1944 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1945
1946         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1947
1948 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1949
1950         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1951
1952 2018-07-24  Keith Seitz  <keiths@redhat.comt
1953
1954         PR symtab/23010
1955         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1956         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1957         instead of add_symbol_to_list.
1958         (read_file_scope): Call prepare_one_comp_unit before reading
1959         any other DIEs.
1960
1961 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1962
1963         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1964
1965 2018-07-24  Tom Tromey  <tom@tromey.com>
1966
1967         * utils.c (malloc, realloc, free): Don't declare.
1968         * configure, config.in: Rebuild.
1969         * configure.ac: Don't check for declarations of free, malloc, or
1970         realloc.
1971
1972 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1973
1974         * aarch64-linux-nat.c
1975         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1976         variable.
1977         * arm-linux-nat.c (fetch_regs): Likewise.
1978         (store_regs): Likewise.
1979         (fetch_vfp_regs): Likewise.
1980         (store_vfp_regs): Likewise.
1981         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1982         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1983         (arm_linux_nat_target::insert_watchpoint): Likewise.
1984         (arm_linux_nat_target::remove_watchpoint): Likewise.
1985         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1986         Likewise.
1987         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1988         Likewise.
1989         * ppc-linux-nat.c (fetch_register): Likewise.
1990         (fetch_all_gp_regs): Likewise.
1991         (fetch_ppc_registers): Likewise.
1992         (store_all_gp_regs): Likewise.
1993         (store_ppc_registers): Likewise.
1994         (hwdebug_insert_point): Likewise.
1995         (can_use_watchpoint_cond_accel): Likewise.
1996         * remote-sim.c (gdb_os_write_stdout): Likewise.
1997
1998 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1999             Tom Tromey  <tom@tromey.com>
2000
2001         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2002         test for it.
2003         * configure: Rebuild.
2004
2005 2018-07-22  Tom Tromey  <tom@tromey.com>
2006
2007         * regformats/regdat.sh: Define xmltarget_${name} inside
2008         #ifndef IN_PROCESS_AGENT.
2009
2010 2018-07-22  Tom Tromey  <tom@tromey.com>
2011
2012         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2013
2014 2018-07-22  Tom Tromey  <tom@tromey.com>
2015
2016         * symfile.c (reread_symbols): Notify iter, not objfile.
2017
2018 2018-07-22  Tom Tromey  <tom@tromey.com>
2019
2020         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2021         Use arch_ops.
2022         (ravenscar_thread_target::prepare_to_store): Likewise.
2023
2024 2018-07-22  Tom Tromey  <tom@tromey.com>
2025
2026         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2027         unused variable.  Call value_fetch_lazy when needed.
2028         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2029         Remove unused variable.  Call value_fetch_lazy when needed.
2030
2031 2018-07-22  Tom Tromey  <tom@tromey.com>
2032
2033         * m32c-tdep.c (mark_dma): Return void.
2034         (make_regs): Remove unused declarations.
2035
2036 2018-07-22  Tom Tromey  <tom@tromey.com>
2037
2038         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2039         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2040         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2041         bkscm_get_valid_block_smob_arg_unsafe for effect.
2042
2043 2018-07-22  Tom Tromey  <tom@tromey.com>
2044
2045         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2046         value_type.
2047
2048 2018-07-22  Tom Tromey  <tom@tromey.com>
2049
2050         * windows-nat.c (saved_context): Conditionally define.
2051         * remote.c (remote_target::remote_btrace_maybe_reopen):
2052         Conditionally declare "warned".
2053         * inflow.c (sigquit_ours): Conditionally define.
2054         (new_tty): Move "tty" declaration inside #if.
2055         * guile/guile.c (guile_datadir): Conditionally define.
2056         * charset.c (set_be_le_names): Move some declarations inside #if.
2057         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2058         #if.
2059         (parse_xml_btrace_conf): Likewise.
2060
2061 2018-07-22  Tom Tromey  <tom@tromey.com>
2062
2063         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2064
2065 2018-07-22  Tom Tromey  <tom@tromey.com>
2066
2067         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2068         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2069         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2070         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2071         * stack.c (frame_apply_level_command): Remove unused variable.
2072         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2073         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2074         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2075         unused variable.
2076         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2077         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2078         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2079         variable.
2080         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2081         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2082         variable.
2083         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2084         Remove unused variable.
2085         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2086         variable.
2087         * common/tdesc.c (print_xml_feature::visit): Remove unused
2088         variable.
2089         * compile/compile-object-load.c (store_regs): Remove unused
2090         variables.
2091         * complaints.c (clear_complaints): Remove unused variable.
2092         * corelow.c (core_target_open): Remove unused variable.
2093         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2094         variable.
2095         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2096         variable.
2097         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2098         variable.
2099         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2100         variable.
2101         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2102         variable.
2103         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2104         variable.
2105         * ia64-tdep.c (examine_prologue): Remove unused variable.
2106         * infcall.c (run_inferior_call): Remove unused variable.
2107         * inferior.c (exit_inferior): Remove unused variable.
2108         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2109         * linespec.c (decode_line_2): Remove unused variable.
2110         * linux-nat.c (super_close): Remove.
2111         * linux-tdep.c (linux_info_proc): Remove unused variable.
2112         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2113         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2114         Remove unused variable.
2115         * parse.c (find_minsym_type_and_address): Remove unused variable.
2116         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2117         variable.
2118         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2119         variable.
2120         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2121         variables.
2122         * record-btrace.c (record_btrace_target::store_registers): Remove
2123         unused variable.
2124         (cmd_show_record_btrace_cpu): Remove unused variable.
2125         * riscv-tdep.c (riscv_register_reggroup_p)
2126         (riscv_push_dummy_call, riscv_return_value): Remove unused
2127         variable.
2128         * rust-exp.y (literal): Remove unused variable.
2129         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2130         unused variable.
2131         <STRUCTOP_ANONYMOUS>: Likewise.
2132         * s390-linux-tdep.c (s390_linux_init_abi_31)
2133         (s390_linux_init_abi_64): Remove unused variable.
2134         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2135         (file_select_thread, net_windows_open, _initialize_ser_windows):
2136         Remove unused variables.
2137         * symtab.c (find_pc_sect_line): Remove unused variable.
2138         * target-memory.c (compute_garbled_blocks): Remove unused
2139         variable.
2140         (target_write_memory_blocks): Remove unused variable.
2141         * target.c (target_stack::unpush): Remove unused variables.
2142         * tracepoint.c (start_tracing, all_tracepoint_actions)
2143         (merge_uploaded_trace_state_variables)
2144         (print_one_static_tracepoint_marker): Remove unused variable.
2145         * unittests/basic_string_view/element_access/char/1.cc (test01):
2146         Remove unused variable.
2147         * windows-nat.c (windows_continue, windows_add_all_dlls)
2148         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2149         Remove unused variables.
2150
2151 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2152
2153         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2154         attr_profile in HAVE_ELF.
2155         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2156         HAVE_ELF.
2157
2158 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2159
2160         * frame.c (frame_register_unwind): Change parameter name.
2161         (frame_unwind_register): Likewise.
2162         (frame_unwind_register_value): Likewise.
2163         (frame_unwind_register_signed): Likewise.
2164         (frame_unwind_register_unsigned): Likewise.
2165         * frame.h (frame_register_unwind): Likewise.
2166         (frame_unwind_register): Likewise.
2167         (frame_unwind_register_value): Likewise.
2168         (frame_unwind_register_signed): Likewise.
2169         (frame_unwind_register_unsigned): Likewise.
2170         (frame_unwind_arch): Likewise.
2171
2172 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2173
2174         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2175         ISA maintenance.
2176
2177 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2178
2179         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2180         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2181         hand.
2182
2183 2018-07-20  Keith Seitz  <keiths@redhat.com>
2184
2185         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2186         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2187         m_compunit_symtab, m_language>: Add "m_" prefix.
2188         Update all uses.
2189         * buildsym.c: Update all uses.
2190
2191 2018-07-20  Tom Tromey  <tom@tromey.com>
2192
2193         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2194         * buildsym.h (record_line_ftype): Remove typedef.
2195
2196 2018-07-20  Tom Tromey  <tom@tromey.com>
2197
2198         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2199         (end_expandable_symtab): Likewise.
2200         (end_symtab_get_static_block): Likewise.
2201         (end_symtab_from_static_block): Likewise.
2202         * buildsym-legacy.c (augment_type_symtab): Remove.
2203         (end_expandable_symtab): Remove.
2204         (end_symtab_get_static_block): Remove.
2205         (end_symtab_from_static_block): Remove.
2206
2207 2018-07-20  Tom Tromey  <tom@tromey.com>
2208
2209         * dwarf2read.c: Include buildsym.h.
2210         (struct dwarf2_cu) <builder>: New method.
2211         (fixup_go_packaging): Update.
2212         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2213         use scoped_free_pendings.
2214         (using_directives): Add "cu" parameter, remove "language".
2215         (read_import_statement, setup_type_unit_groups, )
2216         (read_func_scope, read_lexical_block_scope)
2217         (dwarf2_record_block_ranges, read_namespace): Update.
2218         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2219         (lnp_state_machine::handle_end_sequence): Update.
2220         (class lnp_state_machine) <m_cu>: New member.
2221         <m_record_line_callback>: Remove.
2222         <m_currently_recording_lines>: New member.
2223         (lnp_state_machine::handle_set_file): Update.
2224         (noop_record_line): Remove.
2225         (dwarf_record_line_p): Add cu parameter.
2226         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2227         (lnp_state_machine::record_line)
2228         (lnp_state_machine::lnp_state_machine)
2229         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2230         (dwarf_decode_lines): Update.
2231         (dwarf2_start_subfile): Add cu parameter.
2232         (dwarf2_start_symtab, new_symbol): Update.
2233         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2234         Remove dwarf2_per_objfile parameter.
2235         (dwarf_decode_macros): Update.
2236
2237 2018-07-20  Tom Tromey  <tom@tromey.com>
2238
2239         * stabsread.c (define_symbol): Update.
2240         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2241         * dwarf2read.c (new_symbol): Update.
2242         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2243         * cp-namespace.c: Include buildsym.h.
2244         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2245         * buildsym-legacy.c (get_buildsym_compunit): New function.
2246
2247 2018-07-20  Tom Tromey  <tom@tromey.com>
2248
2249         * xcoffread.c: Include buildsym-legacy.h.
2250         * windows-nat.c: Include buildsym-legacy.h.
2251         * stabsread.c: Include buildsym-legacy.h.
2252         * mdebugread.c: Include buildsym-legacy.h.
2253         * buildsym-legacy.h: New file.
2254         * buildsym-legacy.c: New file, from buildsym.c.
2255         * go32-nat.c: Include buildsym-legacy.h.
2256         * dwarf2read.c: Include buildsym-legacy.h.
2257         * dbxread.c: Include buildsym-legacy.h.
2258         * cp-namespace.c: Include buildsym-legacy.h.
2259         * coffread.c: Include buildsym-legacy.h.
2260         * buildsym.h: Move some contents to buildsym-legacy.h.
2261         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2262         buildsym-legacy.c.
2263         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2264
2265 2018-07-20  Tom Tromey  <tom@tromey.com>
2266
2267         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2268         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2269         (buildsym_compunit::buildsym_compunit)
2270         (buildsym_compunit::~buildsym_compunit)
2271         (buildsym_compunit::get_macro_table): Define.
2272
2273 2018-07-20  Tom Tromey  <tom@tromey.com>
2274
2275         * buildsym.c (reset_symtab_globals): Remove.
2276         (buildsym_compunit::end_symtab_from_static_block): Update.
2277         (buildsym_compunit::augment_type_symtab): Update.
2278         (end_symtab_from_static_block): Call free_buildsym_compunit.
2279         (augment_type_symtab, end_symtab, end_expandable_symtab):
2280         Likewise.
2281
2282 2018-07-20  Tom Tromey  <tom@tromey.com>
2283
2284         * arch-utils.c: Do not include buildsym.h.
2285         * mipsread.c: Do not include buildsym.h.
2286         * machoread.c: Do not include buildsym.h.
2287         * elfread.c: Do not include buildsym.h.
2288
2289 2018-07-20  Tom Tromey  <tom@tromey.com>
2290
2291         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2292         initialization.
2293         (buildsym_compunit): Add new constructor.
2294         (struct buildsym_compunit) <get_last_source_file, finish_block,
2295         record_block_range, start_subfile, patch_subfile_names,
2296         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2297         set_last_source_start_addr, get_last_source_start_addr,
2298         get_local_using_directives, set_local_using_directives,
2299         get_global_using_directives, outermost_context_p,
2300         get_current_context_stack, get_context_stack_depth,
2301         get_current_subfile, get_local_symbols, get_file_symbols,
2302         get_global_symbols, record_debugformat, record_producer,
2303         push_context, pop_context, end_symtab_get_static_block,
2304         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2305         New public methods.
2306         <record_pending_block, finish_block_internal, make_blockvector,
2307         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2308         private methods.
2309         Update all users.
2310
2311 2018-05-22  Tom Tromey  <tom@tromey.com>
2312
2313         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2314         parameter.
2315         (finish_block_internal): Update.
2316
2317 2018-07-20  Tom Tromey  <tom@tromey.com>
2318
2319         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2320         parameter.
2321         (finish_block_internal): Update.
2322
2323 2018-07-20  Tom Tromey  <tom@tromey.com>
2324
2325         * buildsym.h (EXTERN): Don't define or undef.
2326         * buildsym.c (EXTERN): Don't define.
2327
2328 2018-07-20  Tom Tromey  <tom@tromey.com>
2329
2330         * buildsym.c: Remove TODO comment.
2331
2332 2018-07-20  Tom Tromey  <tom@tromey.com>
2333
2334         * coffread.c (coff_symtab_read): Update.
2335         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2336         (xcoff_new_init): Update.
2337         * mipsread.c (mipscoff_new_init): Update.
2338         * mdebugread.c (mdebug_build_psymtabs): Update.
2339         * elfread.c (elf_new_init): Update.
2340         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2341         Update.
2342         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2343         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2344         (stabsect_build_psymtabs): Update.
2345         * buildsym.h (buildsym_init): Don't declare.
2346         * buildsym.c: Update comment.
2347         (prepare_for_building): Remove.
2348         (start_symtab, restart_symtab): Update.
2349         (reset_symtab_globals): Update comment.
2350         (buildsym_init): Remove.
2351
2352 2018-07-20  Tom Tromey  <tom@tromey.com>
2353
2354         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2355         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2356         (read_enum_type, common_block_start, common_block_end)
2357         (cleanup_undefined_types_1, finish_global_stabs): Update.
2358         * mdebugread.c (psymtab_to_symtab_1): Update.
2359         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2360         (read_lexical_block_scope, new_symbol): Update.
2361         * dbxread.c (process_one_symbol): Update.
2362         * coffread.c (coff_symtab_read, process_coff_symbol)
2363         (coff_read_enum_type): Update.
2364         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2365         declare.
2366         (get_local_symbols, get_file_symbols, get_global_symbols): New
2367         functions.
2368         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2369         m_global_symbols.
2370         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2371         (~scoped_free_pendings): Update.
2372         (finish_block, prepare_for_building, reset_symtab_globals)
2373         (end_symtab_get_static_block, end_symtab_with_blockvector)
2374         (augment_type_symtab, push_context): Update.
2375         (get_local_symbols, get_file_symbols, get_global_symbols): New
2376         functions.
2377         (buildsym_init): Update.
2378
2379 2018-07-20  Tom Tromey  <tom@tromey.com>
2380
2381         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2382         (process_full_type_unit): Likewise.
2383         (dwarf2_start_symtab): Set list_in_scope.
2384
2385 2018-07-20  Tom Tromey  <tom@tromey.com>
2386
2387         * dwarf2read.c (process_psymtab_comp_unit_reader)
2388         (build_type_psymtabs_reader): Do not set list_in_scope.
2389
2390 2018-07-20  Tom Tromey  <tom@tromey.com>
2391
2392         * buildsym.c (free_pendings): Remove.
2393         (add_symbol_to_list, scoped_free_pendings)
2394         (finish_block_internal, buildsym_init): Update.
2395
2396 2018-07-20  Tom Tromey  <tom@tromey.com>
2397
2398         * xcoffread.c (read_xcoff_symtab): Update.
2399         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2400         Update.
2401         * dbxread.c (process_one_symbol): Update.
2402         * coffread.c (coff_symtab_read): Update.
2403         * buildsym.h (finish_block): Update.
2404         * buildsym.c (finish_block): Remove "listhead" argument.
2405         (end_symtab_get_static_block): Update.
2406
2407 2018-07-20  Tom Tromey  <tom@tromey.com>
2408
2409         * buildsym.h (class scoped_free_pendings): Remove constructor.
2410         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2411         method.
2412         <m_pending_block_obstack, m_pending_blocks>: New members.
2413         (pending_block_obstack, pending_blocks): Remove.
2414         (scoped_free_pendings::scoped_free_pendings): Default.
2415         (~scoped_free_pendings): Update.
2416         (free_pending_blocks): Remove.
2417         (finish_block_internal, record_pending_block, make_blockvector)
2418         (end_symtab_get_static_block, augment_type_symtab, push_context)
2419         (buildsym_init): Update.
2420
2421 2018-07-20  Tom Tromey  <tom@tromey.com>
2422
2423         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2424         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2425         members.
2426         (pending_addrmap, pending_addrmap_obstack)
2427         (pending_addrmap_interesting): Remove.
2428         (scoped_free_pendings, record_block_range, make_blockvector)
2429         (prepare_for_building, reset_symtab_globals, buildsym_init):
2430         Update.
2431
2432 2018-07-20  Tom Tromey  <tom@tromey.com>
2433
2434         * xcoffread.c (process_linenos): Update.
2435         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2436         * mdebugread.c (psymtab_to_symtab_1): Update.
2437         * dwarf2read.c (setup_type_unit_groups)
2438         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2439         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2440         * dbxread.c (process_one_symbol): Update.
2441         * coffread.c (coff_symtab_read, enter_linenos)
2442         (process_coff_symbol): Update.
2443         * buildsym.h (current_subfile): Don't declare.
2444         (get_current_subfile): Declare.
2445         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2446         member.
2447         (start_subfile, free_buildsym_compunit, push_subfile)
2448         (prepare_for_building, start_symtab): Update.
2449         (get_current_subfile): New function.
2450
2451 2018-07-20  Tom Tromey  <tom@tromey.com>
2452
2453         * coffread.c (coff_symtab_read): Update.
2454         * xcoffread.c (read_xcoff_symtab): Update.
2455         * dwarf2read.c (new_symbol): Update.
2456         (read_func_scope, read_lexical_block_scope): Update.
2457         * dbxread.c (process_one_symbol): Update.
2458         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2459         (outermost_context_p): Remove macro.
2460         (outermost_context_p, get_current_context_stack)
2461         (get_context_stack_depth): Declare.
2462         (pop_context): Return struct context_stack.
2463         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2464         member.
2465         (context_stack_size): Remove.
2466         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2467         (prepare_for_building, end_symtab_get_static_block)
2468         (augment_type_symtab, push_context): Update.
2469         (pop_context): Return struct context_stack.
2470         (outermost_context_p, get_current_context_stack)
2471         (get_context_stack_depth): New functions.
2472         (buildsym_init): Update.
2473
2474 2018-07-20  Tom Tromey  <tom@tromey.com>
2475
2476         * rust-exp.y: Now a pure parser.  Update all rules.
2477         (%union): Move earlier.
2478         (current_parser, work_obstack): Remove globals.
2479         (rust_parser, ~rust_parser): Update.
2480         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2481         lex_character, lex_number, lex_string, lex_identifier,
2482         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2483         convert_name, convert_params_to_expression,
2484         convert_ast_to_expression, ast_basic_type, ast_operation,
2485         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2486         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2487         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2488         ast_array_type, ast_slice_type, ast_reference_type,
2489         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2490         (rust_parse): Update.
2491         (rustyyerror, rustyylex): Add parser parameter.
2492         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2493         (rust_lex_stringish_test, rust_lex_test_sequence)
2494         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2495         (rust_lex_test_push_back, rust_lex_tests): Update.
2496
2497 2018-07-19  Pedro Alves  <palves@redhat.com>
2498
2499         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2500         gdb::unique_xmalloc_ptr.
2501         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2502         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2503         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2504         copy-initialization.
2505         * guile/scm-pretty-print.c (ppscm_print_children): Use
2506         gdb::unique_xmalloc_ptr instead of cleanups.
2507         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2508         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2509         gdb::unique_xmalloc_ptr.
2510         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2511         Adjust to use gdb::unique_xmalloc_ptr.
2512         * guile/scm-utils.c (extract_arg): Adjust.
2513         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2514         gdb::unique_xmalloc_ptr instead of a cleanup.
2515
2516 2018-07-19  Tom Tromey  <tom@tromey.com>
2517
2518         * utils.c (do_value_free_to_mark)
2519         (make_cleanup_value_free_to_mark): Remove.
2520         * utils.h (make_cleanup_value_free_to_mark): Remove.
2521
2522 2018-07-19  Pedro Alves  <palves@redhat.com>
2523
2524         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2525         forwarding reference.
2526
2527 2018-07-18  Pedro Alves  <palves@redhat.com>
2528
2529         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2530         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2531         cleanup.
2532
2533 2018-07-18  Pedro Alves  <palves@redhat.com>
2534
2535         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2536         exceptions.
2537         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2538         (gdbscm_wrap): New.
2539         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2540         directly instead of a cleanup.
2541         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2542         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2543         (vlscm_binop_gdbthrow): New, factored out from ...
2544         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2545         (vlscm_rich_compare): Use gdbscm_wrap.
2546         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2547         instead of a cleanup.
2548         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2549         cleanup.
2550         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2551         Use xfree directly instead of a cleanup.
2552         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2553         Adjust to use gdbscm_wrap and scoped_value_mark.
2554         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2555         (gdbscm_value_address, gdbscm_value_dereference)
2556         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2557         scoped_value_mark.
2558         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2559         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2560         scoped_value_mark.
2561         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2562         gdbscm_wrap and scoped_value_mark.
2563         (gdbscm_value_to_string): Use xfree directly instead of a
2564         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2565         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2566         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2567         scoped_value_mark.
2568         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2569         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2570         scoped_value_mark.
2571         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2572         gdbscm_wrap.
2573
2574 2018-07-18  Tom de Vries  <tdevries@suse.de>
2575
2576         * findvar.c (default_read_var_value): Also resolve dynamic type for
2577         LOC_OPTIMIZED_OUT vars.
2578
2579 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2580
2581         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2582         decoding.
2583
2584 2018-07-17  Tom Tromey  <tom@tromey.com>
2585
2586         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2587         (compute_enum_list, pascm_set_param_value_x)
2588         (gdbscm_parameter_value): Update.
2589         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2590         (gdbscm_scm_to_host_string): Update.
2591         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2592         Update.
2593         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2594         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2595         * guile/scm-string.c (gdbscm_scm_to_string): Return
2596         unique_xmalloc_ptr.
2597         (gdbscm_scm_to_host_string): Likewise.
2598
2599 2018-07-17  Tom Tromey  <tom@tromey.com>
2600
2601         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2602         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2603         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2604         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2605         unique_xmalloc_ptr.
2606
2607 2018-07-17  Tom Tromey  <tom@tromey.com>
2608
2609         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2610         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2611         Update.
2612         * guile/scm-cmd.c (cmdscm_function): Update.
2613         * guile/scm-pretty-print.c
2614         (ppscm_print_exception_unless_memory_error): Update.
2615         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2616         Return unique_xmalloc_ptr.
2617
2618 2018-07-17  Tom Tromey  <tom@tromey.com>
2619
2620         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2621         Use string_printf.
2622
2623 2018-07-17  Jim Wilson  <jimw@sifive.com>
2624
2625         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2626         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2627         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2628         unecessary braces after EF_RISCV_RVC test.  Delete call to
2629         set_gdbarch_decr_pc_after_break.
2630
2631         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2632         RISCV_LAST_FP_REGNUM + 1.
2633         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2634
2635 2018-07-17  Tom Tromey  <tom@tromey.com>
2636
2637         * configure.ac: Remove --disable-gdbcli.
2638         * configure: Rebuild.
2639         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2640         (SUBDIR_CLI_CFLAGS): Remove.
2641         (SFILES): Use SUBDIR_CLI_SRCS.
2642         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2643
2644 2018-07-17  Tom Tromey  <tom@tromey.com>
2645
2646         PR gdb/18624:
2647         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2648
2649 2018-07-16  Jim Wilson  <jimw@sifive.com>
2650
2651         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2652
2653 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2654
2655         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2656         variable.
2657         (libunwind_frame_sniffer): Likewise.
2658         (libunwind_frame_prev_register): Likewise.
2659         (libunwind_sigtramp_frame_sniffer): Likewise.
2660         * ia64-tdep.c (ia64_access_reg): Likewise.
2661         (ia64_access_rse_reg): Likewise.
2662         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2663         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2664
2665 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2666
2667         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2668
2669 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2670
2671         * remote-sim.c (gdbsim_target::close,
2672         gdbsim_target::mourn_inferior): Remove unused variables.
2673
2674 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2675
2676         * ia64-tdep.c (ktab_buf): New global.
2677         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2678         (get_kernel_table): Adjust.
2679
2680 2018-07-16  Tom Tromey  <tom@tromey.com>
2681
2682         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2683         * dwarf2read.c (using_directives, new_symbol): Use
2684         outermost_context_p.
2685         * dbxread.c (process_one_symbol): Use outermost_context_p.
2686         * coffread.c (coff_symtab_read): Use outermost_context_p.
2687
2688 2018-07-16  Tom Tromey  <tom@tromey.com>
2689
2690         * dwarf2read.c (using_directives, read_func_scope)
2691         (read_lexical_block_scope): Update.
2692         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2693         * buildsym.h (local_using_directives, global_using_directives):
2694         Don't declare.
2695         (get_local_using_directives, set_local_using_directives)
2696         (get_global_using_directives): Declare.
2697         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2698         m_global_using_directives>: New members.
2699         (finish_block_internal, prepare_for_building)
2700         (reset_symtab_globals, end_symtab_get_static_block)
2701         (push_context): Update.
2702         (get_local_using_directives, set_local_using_directives)
2703         (get_global_using_directives): New functions.
2704         (buildsym_init): Update.
2705
2706 2018-07-16  Tom Tromey  <tom@tromey.com>
2707
2708         * xcoffread.c (xcoff_initial_scan): Don't call
2709         free_pending_blocks.
2710         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2711         * buildsym.h (class scoped_free_pendings): Add constructor.
2712         (free_pending_blocks): Don't declare.
2713         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2714         (free_pending_blocks): Now static.
2715
2716 2018-07-16  Tom Tromey  <tom@tromey.com>
2717
2718         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2719         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2720         member.
2721         (struct subfile_stack): Remove.
2722         (subfile_stack): Remove.
2723         (push_subfile, pop_subfile, buildsym_init): Update.
2724
2725 2018-07-16  Tom Tromey  <tom@tromey.com>
2726
2727         * buildsym.c (push_subfile): Use gdb_assert.
2728         (pop_subfile): Use gdb_assert.
2729
2730 2018-07-16  Tom Tromey  <tom@tromey.com>
2731
2732         * buildsym.h (merge_symbol_lists): Remove.
2733         * buildsym.c (merge_symbol_lists): Remove.
2734
2735 2018-07-16  Tom Tromey  <tom@tromey.com>
2736
2737         * stabsread.c (scan_file_globals): Update comment.
2738         * stabsread.h (scan_file_globals): Move from buildsym.h.
2739         * buildsym.h (scan_file_globals): Move to stabsread.h.
2740
2741 2018-07-16  Tom Tromey  <tom@tromey.com>
2742
2743         * xcoffread.c (xcoff_new_init): Update.
2744         * mipsread.c (mipscoff_new_init): Update.
2745         * mdebugread.c (mdebug_build_psymtabs): Update.
2746         * elfread.c (elf_new_init): Update.
2747         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2748         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2749         * buildsym.h (buildsym_new_init): Don't declare.
2750         * buildsym.c (buildsym_new_init): Remove.
2751
2752 2018-07-16  Tom Tromey  <tom@tromey.com>
2753
2754         * stabsread.h (within_function): Move from buildsym.h.
2755         * stabsread.c (start_stabs): Clear within_function.
2756         * coffread.c (coff_start_symtab): Clear within_function.
2757         * buildsym.h (within_function): Move to stabsread.h.
2758         * buildsym.c (prepare_for_building): Update.
2759
2760 2018-07-16  Tom Tromey  <tom@tromey.com>
2761
2762         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2763         * dwarf2read.c (dwarf2_start_symtab): Don't set
2764         processing_gcc_compilation.
2765         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2766
2767 2018-07-16  Tom Tromey  <tom@tromey.com>
2768
2769         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2770         (next_symbol_text_func): Move from buildsym.h.
2771         * stabsread.c (hashname): Move from buildsym.c.
2772         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2773         (next_symbol_text_func, hashname): Move to stabsread.h.
2774         * buildsym.c: Don't include bcache.h
2775         (hashname): Move to stasbread.c.
2776
2777 2018-07-16  Tom Tromey  <tom@tromey.com>
2778
2779         * buildsym.h (context_stack_size): Don't declare.
2780         * buildsym.c (context_stack_size): New global.
2781
2782 2018-07-16  Tom Tromey  <tom@tromey.com>
2783
2784         * dbxread.c (processing_acc_compilation): New global.
2785         * buildsym.h (processing_acc_compilation): Don't declare.
2786
2787 2018-07-16  Tom Tromey  <tom@tromey.com>
2788
2789         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2790         * dbxread.c (read_ofile_symtab): Update.
2791         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2792         * buildsym.h (last_source_start_addr): Remove.
2793         (set_last_source_start_addr, get_last_source_start_addr):
2794         Declare.
2795         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2796         parameter.
2797         (struct buildsym_compunit) <m_last_source_start_addr>: New
2798         member.
2799         (prepare_for_building): Remove start_addr parameter.
2800         (start_symtab, restart_symtab, end_symtab_get_static_block)
2801         (end_symtab_with_blockvector): Update.
2802         (set_last_source_start_addr, get_last_source_start_addr): New
2803         functions.
2804
2805 2018-07-16  Tom Tromey  <tom@tromey.com>
2806
2807         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2808         member.
2809         (have_line_numbers): Remove.
2810         (record_line, prepare_for_building, end_symtab_get_static_block)
2811         (augment_type_symtab): Update.
2812
2813 2018-07-16  Tom Tromey  <tom@tromey.com>
2814
2815         * buildsym.c (~buildsym_compunit): Free the macro table.
2816         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2817         methods.
2818         <m_pending_macros>: New member.
2819         (pending_macros): Remove.
2820         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2821         (reset_symtab_globals, end_symtab_get_static_block)
2822         (end_symtab_with_blockvector, augment_type_symtab)
2823         (buildsym_init): Update.
2824
2825 2018-07-16  Tom Tromey  <tom@tromey.com>
2826
2827         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2828         parameter.
2829         (buildsym_compunit::set_last_source_file): New method.
2830         <m_last_source_file>: New member.
2831         (prepare_for_building): Remove "name" parameter.
2832         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2833         (last_source_file): Remove.
2834         (set_last_source_file, get_last_source_file): Update.
2835
2836 2018-07-16  Tom Tromey  <tom@tromey.com>
2837
2838         * buildsym.c (prepare_for_building): Add assert.
2839
2840 2018-07-16  Tom Tromey  <tom@tromey.com>
2841
2842         * buildsym.c (~buildsym_compunit): Update.
2843         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2844         (start_subfile, patch_subfile_names)
2845         (end_symtab_with_blockvector): Update.
2846
2847 2018-07-16  Tom Tromey  <tom@tromey.com>
2848
2849         * buildsym.c (struct buildsym_compunit): Add constructor,
2850         destructor, initializers.
2851         (start_buildsym_compunit): Remove.
2852         (free_buildsym_compunit): Use "delete".
2853         (start_symtab, restart_symtab): Use "new".
2854
2855 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2856
2857         * symfile.c (set_objfile_default_section_offset): Remove struct
2858         keyword.
2859
2860 2018-07-14  Stafford Horne  <shorne@gmail.com>
2861
2862         * (Responsible Maintainers): Add myself as or1k maintainer.
2863
2864 2018-07-13  Tom Tromey  <tom@tromey.com>
2865
2866         * symfile.c (set_objfile_default_section_offset): Use extra braces
2867         around initializer.
2868
2869 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2870
2871         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2872         non-branching basr.
2873
2874 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2875
2876         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2877         unittests/cli-utils-selftests.c
2878         * unittests/cli-utils-selftests.c: New file.
2879
2880 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2881
2882         * NEWS: Mention new commands. Mention change to 'thread apply'.
2883
2884 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2885
2886         * thread.c (thr_try_catch_cmd): New function.
2887         (thread_apply_all_command): Handle qcs flags.
2888         (thread_apply_command): Handle qcs flags.
2889         (taas_command): New function.
2890         (tfaas_command): New function.
2891         (_initialize_thread): Update to setup the new commands 'taas
2892         and 'tfaas'. Change doc string for 'thread apply'.
2893
2894 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2895
2896         * stack.c: (trailing_outermost_frame): New function, mostly
2897         extracted from backtrace_command_1.
2898         (leading_innermost_frame): New function.
2899         (backtrace_command_1): Update to call trailing_outermost_frame.
2900         (frame_apply_command_count): New function.
2901         (frame_apply_level_command): New function.
2902         (frame_apply_all_command): New function.
2903         (frame_apply_command): New function.
2904         (faas_command): New function.
2905         (frame_cmd_list): New variable.
2906         (_initialize_stack): Update to setup the new commands 'frame apply'
2907         and 'faas'.
2908
2909 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2910
2911         * cli-utils.c (number_or_range_parser::get_number): Only handle
2912         numbers or convenience var as numbers.
2913         (parse_flags): New function.
2914         (parse_flags_qcs): New function.
2915         (number_or_range_parser::finished): Ensure parsing end is detected
2916         before end of string.
2917         * cli-utils.h (parse_flags): New function.
2918         (parse_flags_qcs): New function.
2919         (number_or_range_parser): Remove m_finished bool.
2920         (number_or_range_parser::skip_range): Set m_in_range to false.
2921
2922 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2923
2924         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2925         on Windows.
2926
2927 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2928             Jan Kratochvil  <jan.kratochvil@redhat.com>
2929             Paul Fertser  <fercerpav@gmail.com>
2930             Tsutomu Seki  <sekiriki@gmail.com>
2931             Pedro Alves  <palves@redhat.com>
2932
2933         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2934         'unittests/parse-connection-spec-selftests.c'.
2935         (COMMON_SFILES): Add 'common/netstuff.c'.
2936         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2937         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2938         * common/netstuff.c: New file.
2939         * common/netstuff.h: New file.
2940         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2941         (wait_for_connect): Update comment.  New parameter
2942         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2943         Use 'sock' directly instead of 'scb->fd'.
2944         (try_connect): New function, with code from 'net_open'.
2945         (net_open): Rewrite main loop to deal with multiple
2946         sockets/addresses.  Handle IPv6-style hostnames; implement
2947         support for IPv6 connections.
2948         * unittests/parse-connection-spec-selftests.c: New file.
2949
2950 2018-07-11  Pedro Alves  <palves@redhat.com>
2951
2952         PR gdb/23377
2953         * remote.c (remote_target::remote_detach_pid): Call
2954         set_current_process.
2955
2956 2018-07-11  Pedro Alves  <palves@redhat.com>
2957
2958         * h8300-tdep.c (h8300_gdbarch_init): Remove
2959         set_gdbarch_ecoff_reg_to_regnum calls.
2960
2961 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2962
2963         PR c++/23373
2964         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2965         offsets/sizes for static members of a class/struct.
2966
2967 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2968
2969         * target-descriptions.c (tdesc_register_bitsize): Rename.
2970         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2971         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2972         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2973
2974 2018-07-10  Tom Tromey  <tom@tromey.com>
2975
2976         * breakpoint.c (moribund_locations): Now static and a
2977         std::vector.
2978         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2979         (build_bpstat_chain, update_global_location_list)
2980         (breakpoint_retire_moribund): Update.
2981         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2982         VEC.
2983
2984 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2985
2986         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2987         (riscv_register_reggroup_p): Use new function, remove unneeded
2988         parenthesis.
2989         (riscv_push_dummy_call): Extend assert to compare against xlen or
2990         flen based on register type.
2991
2992 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2993
2994         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2995
2996 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2997
2998         * remote.c (show_hardware_watchpoint_limit): New function.
2999         (show_hardware_watchpoint_length_limit): New function.
3000         (show_hardware_breakpoint_limit): New function.
3001         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3002         where appropriate, update help text.
3003
3004 2018-07-09  Tom Tromey  <tom@tromey.com>
3005
3006         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3007         (CLIBS): Don't mention NAT_CLIBS.
3008
3009 2018-07-09  Tom Tromey  <tom@tromey.com>
3010
3011         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3012         (LIBGDB_OBS, clean mostlyclean): Update.
3013         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3014
3015 2018-07-09  Tom Tromey  <tom@tromey.com>
3016
3017         * Makefile.in (%.c: %.y): Use ECHO_YACC.
3018         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
3019         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3020
3021 2018-07-09  Tom Tromey  <tom@tromey.com>
3022
3023         * Makefile.in (ALLDEPFILES): Remove exec.c.
3024         (COMMON_OBS): Remove exec.o.
3025         (COMMON_SFILES): Add exec.c.
3026
3027 2018-07-09  Tom Tromey  <tom@tromey.com>
3028
3029         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3030
3031 2018-07-09  Tom Tromey  <tom@tromey.com>
3032
3033         * Makefile.in (clean mostlyclean): Remove stamp-version.
3034         (version.c): Depend on stamp-version.
3035         (stamp-version): New rule, from version.c rule.
3036
3037 2018-07-09  Tom Tromey  <tom@tromey.com>
3038
3039         * Makefile.in (init.c): Depend on stamp-init.
3040         (stamp-init): New rule, from init.c rule.
3041         (clean mostlyclean): Remove stamp-init.
3042
3043 2018-07-09  Tom Tromey  <tom@tromey.com>
3044
3045         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3046         SUBDIR_GCC_COMPILE_SRCS.
3047
3048 2018-07-09  Tom Tromey  <tom@tromey.com>
3049
3050         * Makefile.in (init.c): Remove some unused sed rules.
3051
3052 2018-07-09  Tom Tromey  <tom@tromey.com>
3053
3054         * Makefile.in (TSOBS): Remove.
3055         (INIT_FILES): Update.
3056         (LIBGDB_OBS): Update.
3057         (COMMON_SFILES): Add inflow.c.
3058         (SFILES): Remove inflow.c.
3059
3060 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3061
3062         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3063
3064 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3065
3066         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3067         get_saveloc_name, is_signal_frame_name, step_name,
3068         init_remote_name, create_addr_space_name,
3069         destroy_addr_space_name, search_unwind_table_name,
3070         find_dyn_list_name): Constify.
3071
3072 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3073
3074         * darwin-nat.c (darwin_pthread_kill): New function.
3075         (darwin_resume_thread): Use darwin_pthread_kill.
3076
3077 2018-07-05  Tom de Vries  <tdevries@suse.de>
3078
3079         * macroexp.c (macro_buffer) <operator=>: New member function.
3080
3081 2018-07-04  Tom Tromey  <tom@tromey.com>
3082
3083         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3084
3085 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3086
3087         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3088         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3089         * maint.c: Likewise.
3090         * top.c: Likewise.
3091
3092 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3093
3094         * NEWS: Create a new section for the next release branch.
3095         Rename the section of the current branch, now that it has
3096         been cut.
3097
3098 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3099
3100         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3101         * version.in: Bump version to 8.2.50.DATE-git.
3102
3103 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3104             Pedro Alves  <palves@redhat.com>
3105
3106         * linux-nat.c (linux_init_ptrace): Rename to ...
3107         (linux_init_ptrace_procfs): ... this.  Call
3108         linux_proc_init_warnings.
3109         (linux_nat_target::post_attach)
3110         (linux_nat_target::post_startup_inferior): Adjust.
3111         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3112         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3113
3114 2018-07-04  Tom de Vries  <tdevries@suse.de>
3115
3116         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3117         check ...
3118         (read_comp_unit_head): ... here.
3119
3120 2018-07-03  Tom Tromey  <tom@tromey.com>
3121
3122         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3123         (stop_tracing, tstatus_command)
3124         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3125         (print_one_static_tracepoint_marker): Update.
3126         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3127         std::vector.
3128         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3129         VEC.
3130         (all_tracepoints, static_tracepoints_here): Return std::vector.
3131
3132 2018-07-03  Tom Tromey  <tom@tromey.com>
3133
3134         * common/ptid.c (ptid_equal): Remove.
3135         * common/ptid.h (ptid_equal): Don't declare.
3136         * ada-tasks.c: Update.
3137         * breakpoint.c: Update.
3138         * common/agent.c: Update.
3139         * corelow.c: Update.
3140         * darwin-nat-info.c: Update.
3141         * darwin-nat.c: Update.
3142         * dcache.c: Update.
3143         * dtrace-probe.c: Update.
3144         * dummy-frame.c: Update.
3145         * fbsd-nat.c: Update.
3146         * frame.c: Update.
3147         * gdbthread.h: Update.
3148         * gnu-nat.c: Update.
3149         * go32-nat.c: Update.
3150         * inf-loop.c: Update.
3151         * inf-ptrace.c: Update.
3152         * infcall.c: Update.
3153         * infcmd.c: Update.
3154         * inflow.c: Update.
3155         * infrun.c: Update.
3156         * linux-fork.c: Update.
3157         * linux-nat.c: Update.
3158         * linux-thread-db.c: Update.
3159         * mi/mi-cmd-var.c: Update.
3160         * mi/mi-interp.c: Update.
3161         * mi/mi-main.c: Update.
3162         * nto-procfs.c: Update.
3163         * ppc-linux-tdep.c: Update.
3164         * procfs.c: Update.
3165         * python/py-inferior.c: Update.
3166         * python/py-record-btrace.c: Update.
3167         * python/py-record.c: Update.
3168         * ravenscar-thread.c: Update.
3169         * regcache.c: Update.
3170         * remote-sim.c: Update.
3171         * remote.c: Update.
3172         * sol-thread.c: Update.
3173         * solib.c: Update.
3174         * target.c: Update.
3175         * tui/tui-stack.c: Update.
3176         * varobj.c: Update.
3177         * windows-nat.c: Update.
3178         * windows-tdep.c: Update.
3179
3180 2018-07-03  Tom Tromey  <tom@tromey.com>
3181
3182         * common/ptid.c (ptid_match): Remove.
3183         * common/ptid.h (ptid_match): Don't declare.
3184         * fbsd-nat.c: Update.
3185         * infcmd.c: Update.
3186         * infrun.c: Update.
3187         * linux-nat.c: Update.
3188         * record-btrace.c: Update.
3189         * regcache.c: Update.
3190         * remote.c: Update.
3191
3192 2018-07-03  Tom Tromey  <tom@tromey.com>
3193
3194         * common/ptid.c (ptid_tid_p): Remove.
3195         * common/ptid.h (ptid_tid_p): Don't declare.
3196         * sol-thread.c: Update.
3197
3198 2018-07-03  Tom Tromey  <tom@tromey.com>
3199
3200         * common/ptid.c (ptid_lwp_p): Remove.
3201         * common/ptid.h (ptid_lwp_p): Don't declare.
3202         * fbsd-nat.c: Update.
3203         * linux-nat.c: Update.
3204         * nat/linux-procfs.c: Update.
3205         * nat/x86-linux-dregs.c: Update.
3206         * sol-thread.c: Update.
3207
3208 2018-07-03  Tom Tromey  <tom@tromey.com>
3209
3210         * common/ptid.c (ptid_is_pid): Remove.
3211         * common/ptid.h (ptid_is_pid): Don't declare.
3212         * infrun.c: Update.
3213         * linux-nat.c: Update.
3214         * mi/mi-interp.c: Update.
3215         * remote.c: Update.
3216         * thread.c: Update.
3217
3218 2018-07-03  Tom Tromey  <tom@tromey.com>
3219
3220         * common/ptid.c (ptid_get_tid): Remove.
3221         * common/ptid.h (ptid_get_tid): Don't declare.
3222         * ada-tasks.c: Update.
3223         * aix-thread.c: Update.
3224         * bsd-uthread.c: Update.
3225         * darwin-nat.c: Update.
3226         * fbsd-nat.c: Update.
3227         * i386-darwin-nat.c: Update.
3228         * infrun.c: Update.
3229         * linux-tdep.c: Update.
3230         * nto-procfs.c: Update.
3231         * ppc-ravenscar-thread.c: Update.
3232         * python/py-infthread.c: Update.
3233         * ravenscar-thread.c: Update.
3234         * sol-thread.c: Update.
3235         * sparc-ravenscar-thread.c: Update.
3236         * windows-nat.c: Update.
3237
3238 2018-07-03  Tom Tromey  <tom@tromey.com>
3239
3240         * common/ptid.c (ptid_get_lwp): Remove.
3241         * common/ptid.h (ptid_get_lwp): Don't declare.
3242         * aarch64-linux-nat.c: Update.
3243         * ada-tasks.c: Update.
3244         * aix-thread.c: Update.
3245         * amd64-linux-nat.c: Update.
3246         * arm-linux-nat.c: Update.
3247         * corelow.c: Update.
3248         * fbsd-nat.c: Update.
3249         * fbsd-tdep.c: Update.
3250         * gnu-nat.c: Update.
3251         * i386-cygwin-tdep.c: Update.
3252         * i386-gnu-nat.c: Update.
3253         * i386-linux-nat.c: Update.
3254         * ia64-linux-nat.c: Update.
3255         * inf-ptrace.c: Update.
3256         * infrun.c: Update.
3257         * linux-fork.c: Update.
3258         * linux-nat.c: Update.
3259         * linux-tdep.c: Update.
3260         * linux-thread-db.c: Update.
3261         * mips-linux-nat.c: Update.
3262         * nat/aarch64-linux-hw-point.c: Update.
3263         * nat/aarch64-linux.c: Update.
3264         * nat/linux-btrace.c: Update.
3265         * nat/linux-osdata.c: Update.
3266         * nat/linux-procfs.c: Update.
3267         * nat/x86-linux-dregs.c: Update.
3268         * obsd-nat.c: Update.
3269         * ppc-fbsd-nat.c: Update.
3270         * ppc-linux-nat.c: Update.
3271         * procfs.c: Update.
3272         * python/py-infthread.c: Update.
3273         * ravenscar-thread.c: Update.
3274         * remote.c: Update.
3275         * s390-linux-nat.c: Update.
3276         * sol-thread.c: Update.
3277         * sol2-tdep.c: Update.
3278         * spu-linux-nat.c: Update.
3279         * x86-linux-nat.c: Update.
3280         * xtensa-linux-nat.c: Update.
3281
3282 2018-07-03  Tom Tromey  <tom@tromey.com>
3283
3284         * common/ptid.c (ptid_get_pid): Remove.
3285         * common/ptid.h (ptid_get_pid): Don't declare.
3286         * aarch64-linux-nat.c: Update.
3287         * ada-lang.c: Update.
3288         * aix-thread.c: Update.
3289         * alpha-bsd-nat.c: Update.
3290         * amd64-fbsd-nat.c: Update.
3291         * amd64-linux-nat.c: Update.
3292         * arm-linux-nat.c: Update.
3293         * arm-nbsd-nat.c: Update.
3294         * auxv.c: Update.
3295         * break-catch-syscall.c: Update.
3296         * breakpoint.c: Update.
3297         * bsd-uthread.c: Update.
3298         * corelow.c: Update.
3299         * ctf.c: Update.
3300         * darwin-nat.c: Update.
3301         * fbsd-nat.c: Update.
3302         * fbsd-tdep.c: Update.
3303         * gcore.c: Update.
3304         * gnu-nat.c: Update.
3305         * hppa-nbsd-nat.c: Update.
3306         * hppa-obsd-nat.c: Update.
3307         * i386-fbsd-nat.c: Update.
3308         * ia64-linux-nat.c: Update.
3309         * inf-ptrace.c: Update.
3310         * infcmd.c: Update.
3311         * inferior.c: Update.
3312         * inferior.h: Update.
3313         * inflow.c: Update.
3314         * infrun.c: Update.
3315         * linux-fork.c: Update.
3316         * linux-nat.c: Update.
3317         * linux-tdep.c: Update.
3318         * linux-thread-db.c: Update.
3319         * m68k-bsd-nat.c: Update.
3320         * mi/mi-interp.c: Update.
3321         * mi/mi-main.c: Update.
3322         * mips-linux-nat.c: Update.
3323         * mips-nbsd-nat.c: Update.
3324         * mips64-obsd-nat.c: Update.
3325         * nat/aarch64-linux-hw-point.c: Update.
3326         * nat/aarch64-linux.c: Update.
3327         * nat/linux-btrace.c: Update.
3328         * nat/linux-osdata.c: Update.
3329         * nat/linux-procfs.c: Update.
3330         * nat/x86-linux-dregs.c: Update.
3331         * nto-procfs.c: Update.
3332         * obsd-nat.c: Update.
3333         * ppc-linux-nat.c: Update.
3334         * ppc-nbsd-nat.c: Update.
3335         * ppc-obsd-nat.c: Update.
3336         * proc-service.c: Update.
3337         * procfs.c: Update.
3338         * python/py-inferior.c: Update.
3339         * python/py-infthread.c: Update.
3340         * ravenscar-thread.c: Update.
3341         * record.c: Update.
3342         * remote-sim.c: Update.
3343         * remote.c: Update.
3344         * rs6000-nat.c: Update.
3345         * s390-linux-nat.c: Update.
3346         * sh-nbsd-nat.c: Update.
3347         * sol-thread.c: Update.
3348         * sparc-nat.c: Update.
3349         * sparc64-tdep.c: Update.
3350         * spu-linux-nat.c: Update.
3351         * spu-tdep.c: Update.
3352         * target-debug.h: Update.
3353         * target.c: Update.
3354         * thread.c: Update.
3355         * tid-parse.c: Update.
3356         * tracefile-tfile.c: Update.
3357         * vax-bsd-nat.c: Update.
3358         * windows-nat.c: Update.
3359         * x86-linux-nat.c: Update.
3360         * x86-nat.c: Update.
3361
3362 2018-07-03  Tom Tromey  <tom@tromey.com>
3363
3364         * common/ptid.c (pid_to_ptid): Remove.
3365         * common/ptid.h (pid_to_ptid): Don't declare.
3366         * aix-thread.c: Update.
3367         * arm-linux-nat.c: Update.
3368         * common/ptid.c: Update.
3369         * common/ptid.h: Update.
3370         * corelow.c: Update.
3371         * ctf.c: Update.
3372         * darwin-nat.c: Update.
3373         * fbsd-nat.c: Update.
3374         * fork-child.c: Update.
3375         * gnu-nat.c: Update.
3376         * go32-nat.c: Update.
3377         * inf-ptrace.c: Update.
3378         * infcmd.c: Update.
3379         * inferior.c: Update.
3380         * infrun.c: Update.
3381         * linux-fork.c: Update.
3382         * linux-nat.c: Update.
3383         * nat/aarch64-linux-hw-point.c: Update.
3384         * nat/fork-inferior.c: Update.
3385         * nat/x86-linux-dregs.c: Update.
3386         * nto-procfs.c: Update.
3387         * obsd-nat.c: Update.
3388         * procfs.c: Update.
3389         * progspace.c: Update.
3390         * remote.c: Update.
3391         * rs6000-nat.c: Update.
3392         * s390-linux-nat.c: Update.
3393         * sol-thread.c: Update.
3394         * spu-linux-nat.c: Update.
3395         * target.c: Update.
3396         * top.c: Update.
3397         * tracefile-tfile.c: Update.
3398         * windows-nat.c: Update.
3399
3400 2018-07-03  Tom Tromey  <tom@tromey.com>
3401
3402         * common/ptid.h (ptid_build): Don't declare.
3403         * common/ptid.c (ptid_build): Remove.
3404         * aix-thread.c: Update.
3405         * bsd-kvm.c: Update.
3406         * bsd-uthread.c: Update.
3407         * common/agent.c: Update.
3408         * common/ptid.c: Update.
3409         * common/ptid.h: Update.
3410         * corelow.c: Update.
3411         * darwin-nat.c: Update.
3412         * fbsd-nat.c: Update.
3413         * gnu-nat.c: Update.
3414         * linux-fork.c: Update.
3415         * linux-nat.c: Update.
3416         * linux-thread-db.c: Update.
3417         * nat/linux-osdata.c: Update.
3418         * nat/linux-procfs.c: Update.
3419         * nto-procfs.c: Update.
3420         * obsd-nat.c: Update.
3421         * proc-service.c: Update.
3422         * procfs.c: Update.
3423         * ravenscar-thread.c: Update.
3424         * remote-sim.c: Update.
3425         * remote.c: Update.
3426         * sol-thread.c: Update.
3427         * target.c: Update.
3428         * windows-nat.c: Update.
3429
3430 2018-07-03  Tom Tromey  <tom@tromey.com>
3431
3432         * infrun.c (follow_exec): Use exit_inferior_silent.
3433         * inferior.c (exit_inferior_num_silent): Remove.
3434         * inferior.h (exit_inferior_num_silent): Don't declare.
3435
3436 2018-07-03  Tom Tromey  <tom@tromey.com>
3437
3438         PR cli/23340:
3439         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3440         inferior_ptid on error.
3441
3442 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3443             Simon Marchi  <simon.marchi@polymtl.ca>
3444
3445         PR tdep/8282
3446         * disasm.h (gdb_disassembler): Add
3447         `m_disassembler_options_holder'. member
3448         * disasm.c (get_all_disassembler_options): New function.
3449         (gdb_disassembler::gdb_disassembler): Use it.
3450         (gdb_buffered_insn_length_init_dis): Likewise.
3451         (gdb_buffered_insn_length): Adjust accordingly.
3452         (set_disassembler_options): Handle options with arguments.
3453         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3454         line if showing options with descriptions.
3455         (disassembler_options_completer): Adapt to using the
3456         `disasm_options_and_args_t' structure.
3457         * mips-tdep.c (mips_disassembler_options): New variable.
3458         (mips_disassembler_options_o32): Likewise.
3459         (mips_disassembler_options_n32): Likewise.
3460         (mips_disassembler_options_n64): Likewise.
3461         (gdb_print_insn_mips): Don't set `disassembler_options'.
3462         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3463         functions.
3464         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3465         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3466         `gdbarch_disassembler_options_implicit' and
3467         `gdbarch_valid_disassembler_options'.
3468         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3469         `disasm_options_and_args_t' structure.
3470         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3471         method.
3472         (valid_disassembler_options): Switch from `disasm_options_t' to
3473         the `disasm_options_and_args_t' structure.
3474         * NEWS: Document `set disassembler-options' support for the MIPS
3475         target.
3476         * gdbarch.h: Regenerate.
3477         * gdbarch.c: Regenerate.
3478
3479 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3480
3481         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3482
3483 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3484
3485         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3486         parameter in call to amd64_target_description.
3487         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3488         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3489         (amd64fbsd_init_abi): Likewise.
3490         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3491         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3492         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3493         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3494
3495 2018-06-29  Pedro Alves  <palves@redhat.com>
3496
3497         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3498         "segments" parameter.
3499         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3500         (_initialize_amd64_tdep): Update call to
3501         amd64_create_target_description.
3502         (amd64_target_description): Add "segments" parameter.  Adjust
3503         the implementation to use it.
3504         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3505         call to amd64_create_target_description.
3506         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3507         * gdb/arch/amd64.h (amd64_create_target_description): Add
3508         "segments" register.
3509         * gdb/arch/amd64.c (amd64_create_target_description): Add
3510         "segments" parameter.  Call create_feature_i386_64bit_segments
3511         only if SEGMENTS is true.
3512         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3513         call to amd64_create_target_description.
3514
3515 2018-06-29  Pedro Alves  <palves@redhat.com>
3516
3517         * thread.c (thread_target_id_str): New, factored out from ...
3518         (print_thread_info_1): ... here.  Use it to compute the max
3519         "Target Id" column width.
3520
3521 2018-06-29  Pedro Alves  <palves@redhat.com>
3522
3523         * remote.c (remote_target::extra_thread_info): Delete
3524         'display_buf' and 'n' locals.  from the cache, regardless of
3525         packet mechanims is in use.  Use cache for qThreadExtra and qP
3526         methods too.
3527
3528 2018-06-29  Pedro Alves  <palves@redhat.com>
3529
3530         * blockframe.c (find_pc_sect_containing_function): New function.
3531         * breakpoint.c (print_breakpoint_location): Don't call
3532         find_pc_sect_function.
3533         * linespec.c (create_sals_line_offset): Record the location's
3534         symbol in the sal.
3535         * linespec.c (convert_address_location_to_sals): Fill in sal's
3536         symbol with find_pc_sect_containing_function.
3537         * symtab.c (find_function_start_sal): Rename to ...
3538         (find_function_start_sal_1): ... this.
3539         (find_function_start_sal): Reimplement as wrapper around
3540         find_function_start_sal_1, and use
3541         find_pc_sect_containing_function to fill in the sal's symbol.
3542         (find_function_start_sal(symbol*, bool)): Adjust.
3543         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3544         comments.
3545         (find_pc_sect_containing_function): Declare.
3546
3547 2018-06-29  Pedro Alves  <palves@redhat.com>
3548
3549         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3550         true if the the location has no symbol.
3551
3552 2018-06-28  Tom Tromey  <tom@tromey.com>
3553
3554         * NEWS: Mention --enable-codesign.
3555         * silent-rules.mk (ECHO_SIGN): New variable.
3556         * configure.ac: Add --enable-codesign.
3557         * configure: Rebuild.
3558         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3559         (gdb$(EXEEXT)): Optionally invoke codesign.
3560
3561 2018-06-28  Pedro Alves  <palves@redhat.com>
3562
3563         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3564         comments.
3565         (switch_to_thread_no_regs): Adjust comment.
3566         * infcmd.c (stop_pc): Delete.
3567         (post_create_inferior, info_program_command): Replace references
3568         to stop_pc with references to thread_info->suspend.stop_pc.
3569         * inferior.h (stop_pc): Delete declaration.
3570         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3571         (handle_inferior_event_1, handle_signal_stop)
3572         (process_event_stop_test, keep_going_stepped_thread)
3573         (handle_step_into_function, handle_step_into_function_backward)
3574         (print_stop_location): Replace references to stop_pc with
3575         references to thread_info->suspend.stop_pc.
3576         (struct infcall_suspend_state) <stop_pc>: Delete field.
3577         (save_infcall_suspend_state, restore_infcall_suspend_state):
3578         Remove references to inf_stat->stop_pc.
3579         * linux-fork.c (fork_load_infrun_state): Likewise.
3580         * record-btrace.c (record_btrace_set_replay): Likewise.
3581         * record-full.c (record_full_goto_entry): Likewise.
3582         * remote.c (print_one_stopped_thread): Likewise.
3583         * target.c (target_resume): Extend comment.
3584         * thread.c (set_executing_thread): New.
3585         (set_executing): Use it.
3586         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3587         Remove references to stop_pc.
3588
3589 2018-06-28  Pedro Alves  <palves@redhat.com>
3590
3591         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3592         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3593
3594 2018-06-28  Tom Tromey  <tom@tromey.com>
3595
3596         * coffread.c (coff_symfile_finish): Update.
3597         * xcoffread.c (xcoff_symfile_finish): Update.
3598         * elfread.c (elf_symfile_finish): Update.
3599         * symfile.h (dwarf2_free_objfile): Don't declare.
3600         * dwarf2read.c (_initialize_dwarf2_read): Use
3601         register_objfile_data_with_cleanup.
3602         (dwarf2_free_objfile): Now static.  Change signature.
3603
3604 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3605
3606         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3607         option "-o" to add-symbol-file-load to add an offset to each
3608         section's load address.
3609         * symfile.c (set_objfile_default_section_offset): New function.
3610
3611 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3612
3613         * symfile.c (add_symbol_file_command): Make sure that sections
3614         with the same name are sorted in the same order.
3615
3616 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3617
3618         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3619         require the second argument.  If omitted, load sections at the
3620         addresses specified in the file.
3621
3622 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3623
3624         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3625         (_initialize_symfile): Add option "-o" to symbol-file to add an
3626         offset to each section of the symbol file.
3627
3628 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3629
3630         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3631
3632 2018-06-27  Tom Tromey  <tom@tromey.com>
3633
3634         * stack.c (_initialize_stack): Update "func" help text.
3635
3636 2018-06-27  Tom Tromey  <tom@tromey.com>
3637
3638         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3639         std::vector.
3640         (unwind_infopy_str, pyuw_create_unwind_info)
3641         (unwind_infopy_add_saved_register, pyuw_sniffer)
3642         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3643         Update.
3644         (struct saved_reg): Add constructor.
3645         <value>: Now a gdbpy_ref<>.
3646
3647 2018-06-27  Tom Tromey  <tom@tromey.com>
3648
3649         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3650
3651 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3652
3653         * gdb-gdb.py.in: Format using autopep8.
3654
3655 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3656
3657         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3658         (type_lookup_function): Recognize CORE_ADDR values.
3659
3660 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3661
3662         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3663         print tag_name.
3664
3665 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3666
3667         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3668         <__lt__>: Add.
3669
3670 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3671
3672         * gdb-gdb.py: Move to...
3673         * gdb-gdb.py.in: ... here.
3674         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3675         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3676         dependencies.
3677         (distclean): Remove gdb-gdb.py when cleaning.
3678         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3679         * configure: Re-generate.
3680
3681 2018-06-27  Pedro Alves  <palves@redhat.com>
3682
3683         * proc-service.c (get_ps_regcache): New.
3684         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3685         (ps_lsetfpregs): Use it.
3686
3687 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3688
3689         PR gdb/21695
3690         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3691         (dwarf_decode_lines_1): Adjust.
3692
3693 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3694
3695         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3696         override.
3697         <info_proc>: Likewise.
3698
3699 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3700
3701         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3702         to windows_fetch_one_register, and only handle the case of
3703         fetching one register.  Move the code that reloads the context
3704         and iterates over all registers if R is negative to...
3705         (windows_nat_target::fetch_registers): ... here.
3706         (do_windows_store_inferior_registers): Rename to
3707         windows_store_one_register, and only handle the case of storing
3708         one register.  Move the code that handles the case where r is
3709         negative to...
3710         (windows_nat_target::store_registers) ... here.
3711
3712 2018-06-26  Tom Tromey  <tom@tromey.com>
3713
3714         PR rust/22574:
3715         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3716         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3717         Update.
3718         (rust_internal_print_type): Add podata parameter.
3719         (rust_print_type): Update.
3720
3721 2018-06-26  Tom Tromey  <tom@tromey.com>
3722
3723         * typeprint.h (struct print_offset_data) <update, finish,
3724         maybe_print_hole>: New methods.
3725         <indentation>: New constant.
3726         * typeprint.c (print_offset_data::indentation): Define.
3727         (print_offset_data::maybe_print_hole, print_offset_data::update)
3728         (print_offset_data::finish): Move from c-typeprint.c and rename.
3729         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3730         (print_spaces_filtered_with_print_options): Update.
3731         (c_print_type_union_field_offset, maybe_print_hole)
3732         (c_print_type_struct_field_offset): Move to typeprint.c and
3733         rename.
3734         (c_type_print_base_struct_union): Update.
3735
3736 2018-06-25  Pedro Alves  <palves@redhat.com>
3737
3738         * gdbthread.h (thread_info_ref, delete_thread)
3739         (delete_thread_silent, first_thread_of_inferior)
3740         (any_thread_of_inferior, switch_to_thread)
3741         (enable_thread_stack_temporaries)
3742         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3743         (get_last_thread_stack_temporary)
3744         (value_in_thread_stack_temporaries, can_access_registers_thread):
3745         Spell out "struct thread_info" instead of just "thread_info".
3746         * inferior.h (notice_new_inferior): Likewise.
3747
3748 2018-06-25  Pedro Alves  <palves@redhat.com>
3749
3750         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3751         pass thread_info pointer to delete_thread.
3752         (windows_nat_target::detach): Pass inferior pointer to
3753         detach_inferior.
3754         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3755         delete_thread.
3756         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3757         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3758         and pass a thread_info pointer to delete_thread.
3759         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3760         pass thread_info pointer to delete_thread.
3761         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3762         delete_thread_silent call.
3763         * procfs.c (procfs_target::detach): Pass inferior pointer to
3764         detach_inferior.
3765         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3766         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3767         delete_thread_silent call.
3768         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3769         pass thread_info pointer to delete_thread.
3770         (windows_nat_target::detach): Pass inferior pointer to
3771         delete_inferior.
3772
3773 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3774
3775         * regcache.c (readable_regcache::read_part): Fix asserts.
3776         (reg_buffer::raw_collect_part): New function.
3777         (regcache::write_part): Fix asserts.
3778         (reg_buffer::raw_supply_part): New function.
3779         (regcache::transfer_regset_register): New helper function.
3780         (regcache::transfer_regset): Call new functions.
3781         (regcache_supply_regset): Use gdb_byte*.
3782         (regcache::supply_regset): Likewise.
3783         (regcache_collect_regset): Likewise.
3784         (regcache::collect_regset): Likewise.
3785         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3786         (reg_buffer::raw_supply_part): Likewise.
3787         (regcache::transfer_regset_register): Likewise.
3788         (regcache::transfer_regset): Use gdb_byte*.
3789
3790 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3791
3792         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3793
3794 2018-06-21  Pedro Alves  <palves@redhat.com>
3795
3796         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3797         instead of a ptid_t.  All callers adjusted.
3798         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3799         adjusted.
3800         (print_ada_task_info, display_current_task_id, task_command_1):
3801         Adjust.
3802         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3803         inferior_thread.
3804         (breakpoint_kind): Adjust.
3805         (remove_breakpoints_pid): Rename to ...
3806         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3807         pointer.  All callers adjusted.
3808         (bpstat_clear_actions): Use inferior_thread.
3809         (get_bpstat_thread): New.
3810         (bpstat_do_actions): Use it.
3811         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3812         to take a thread_info pointer.  All callers adjusted.
3813         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3814         (breakpoint_re_set_thread): Use inferior_thread.
3815         * breakpoint.h (struct inferior): Forward declare.
3816         (bpstat_stop_status): Update.
3817         (remove_breakpoints_pid): Delete.
3818         (remove_breakpoints_inf): New.
3819         * bsd-uthread.c (bsd_uthread_target::wait)
3820         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3821         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3822         (maint_btrace_packet_history_cmd)
3823         (maint_btrace_clear_packet_history_cmd): Adjust.
3824         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3825         inferior_thread.
3826         * cli/cli-interp.c: Include "inferior.h".
3827         * common/refcounted-object.h (struct
3828         refcounted_object_ref_policy): New.
3829         * compile/compile-object-load.c: Include gdbthread.h.
3830         (store_regs): Use inferior_thread.
3831         * corelow.c (core_target::close): Use current_inferior.
3832         (core_target_open): Adjust to use first_thread_of_inferior and use
3833         the current inferior.
3834         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3835         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3836         <thread>: ... this new field.  All references adjusted.
3837         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3838         Take a thread_info pointer instead of a ptid_t.
3839         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3840         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3841         thread_info pointer instead of a ptid_t.
3842         * elfread.c: Include "inferior.h".
3843         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3844         Use inferior_thread.
3845         * eval.c (evaluate_subexp): Likewise.
3846         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3847         inferior_thread.
3848         * gdb_proc_service.h (struct thread_info): Forward declare.
3849         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3850         <thread>: ... this new field.  All references adjusted.
3851         * gdbarch.h, gdbarch.c: Regenerate.
3852         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3853         'thread' parameter.  All implementations and callers adjusted.
3854         * gdbthread.h (thread_info) <set_running>: New method.
3855         (delete_thread, delete_thread_silent): Take a thread_info pointer
3856         instead of a ptid.
3857         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3858         (first_thread_of_process): Delete, replaced by ...
3859         (first_thread_of_inferior): ... this new function.  All callers
3860         adjusted.
3861         (any_live_thread_of_process): Delete, replaced by ...
3862         (any_live_thread_of_inferior): ... this new function.  All callers
3863         adjusted.
3864         (switch_to_thread, switch_to_no_thread): Declare.
3865         (is_executing): Delete.
3866         (enable_thread_stack_temporaries): Update comment.
3867         <enable_thread_stack_temporaries>: Take a thread_info pointer
3868         instead of a ptid_t.  Incref the thread.
3869         <~enable_thread_stack_temporaries>: Decref the thread.
3870         <m_ptid>: Delete
3871         <m_thr>: New.
3872         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3873         (get_last_thread_stack_temporary)
3874         (value_in_thread_stack_temporaries, can_access_registers_thread):
3875         Take a thread_info pointer instead of a ptid_t.  All callers
3876         adjusted.
3877         * infcall.c (get_call_return_value): Use inferior_thread.
3878         (run_inferior_call): Work with thread pointers instead of ptid_t.
3879         (call_function_by_hand_dummy): Work with thread pointers instead
3880         of ptid_t.  Use thread_info_ref.
3881         * infcmd.c (proceed_thread_callback): Access thread's state
3882         directly.
3883         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3884         access thread's state directly.
3885         (continue_command): Use inferior_thread.
3886         (info_program_command): Use find_thread_ptid and access thread
3887         state directly.
3888         (proceed_after_attach_callback): Use thread state directly.
3889         (notice_new_inferior): Take a thread_info pointer instead of a
3890         ptid_t.  All callers adjusted.
3891         (exit_inferior): Take an inferior pointer instead of a pid.  All
3892         callers adjusted.
3893         (exit_inferior_silent): New.
3894         (detach_inferior): Delete.
3895         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3896         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3897         (detach_inferior_command, kill_inferior_command): Use
3898         find_inferior_id instead of valid_gdb_inferior_id and
3899         gdb_inferior_id_to_pid.
3900         (inferior_command): Use inferior and thread pointers.
3901         * inferior.h (struct thread_info): Forward declare.
3902         (notice_new_inferior): Take a thread_info pointer instead of a
3903         ptid_t.  All callers adjusted.
3904         (detach_inferior): Delete declaration.
3905         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3906         instead of a pid.  All callers adjusted.
3907         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3908         (valid_gdb_inferior_id): Delete.
3909         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3910         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3911         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3912         ...
3913         <inf>: ... this new field.
3914         <step_ptid>: Delete, replaced by ...
3915         <step_thread>: ... this new field.
3916         (get_displaced_stepping_state): Take an inferior pointer instead
3917         of a pid.  All callers adjusted.
3918         (displaced_step_in_progress_any_inferior): Adjust.
3919         (displaced_step_in_progress_thread): Take a thread pointer instead
3920         of a ptid_t.  All callers adjusted.
3921         (displaced_step_in_progress, add_displaced_stepping_state): Take
3922         an inferior pointer instead of a pid.  All callers adjusted.
3923         (get_displaced_step_closure_by_addr): Adjust.
3924         (remove_displaced_stepping_state): Take an inferior pointer
3925         instead of a pid.  All callers adjusted.
3926         (displaced_step_prepare_throw, displaced_step_prepare)
3927         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3928         All callers adjusted.
3929         (start_step_over): Adjust.
3930         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3931         displaced step queue.
3932         (do_target_resume): Adjust.
3933         (fetch_inferior_event): Use inferior_thread.
3934         (context_switch, get_inferior_stop_soon): Take an
3935         execution_control_state pointer instead of a ptid_t.  All callers
3936         adjusted.
3937         (switch_to_thread_cleanup): Delete.
3938         (stop_all_threads): Use scoped_restore_current_thread.
3939         * inline-frame.c: Include "gdbthread.h".
3940         (inline_state) <inline_state>: Take a thread pointer instead of a
3941         ptid_t.  All callers adjusted.
3942         <ptid>: Delete, replaced by ...
3943         <thread>: ... this new field.
3944         (find_inline_frame_state): Take a thread pointer instead of a
3945         ptid_t.  All callers adjusted.
3946         (skip_inline_frames, step_into_inline_frame)
3947         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3948         pointer instead of a ptid_t.  All callers adjusted.
3949         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3950         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3951         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3952         pointers directly.
3953         * linux-nat.c (get_detach_signal): Likewise.
3954         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3955         (thread_db_notice_clone): Adjust.
3956         (thread_db_find_new_threads_silently)
3957         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3958         a thread pointer instead of a ptid_t.  All callers adjusted.
3959         * mi/mi-cmd-var.c: Include "inferior.h".
3960         (mi_cmd_var_update_iter): Update to use thread pointers.
3961         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3962         inferior directly.
3963         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3964         out to ...
3965         (mi_output_running): ... this new function.
3966         (mi_on_resume_1): Adjust to use it.
3967         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3968         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3969         directly.
3970         (interrupt_thread_callback): : Adjust to use thread and inferior
3971         pointers.
3972         * proc-service.c: Include "gdbthread.h".
3973         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3974         * progspace-and-thread.c: Include "inferior.h".
3975         * progspace.c: Include "inferior.h".
3976         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3977         hold a reference to an inferior_object.
3978         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3979         inferior_thread.
3980         * python/py-inferior.c (struct inferior_object): Give the type a
3981         tag name instead of a typedef.
3982         (python_on_normal_stop): No need to check if the current thread is
3983         listed.
3984         (inferior_to_inferior_object): Change return type to
3985         inferior_object.  All callers adjusted.
3986         (find_thread_object): Delete, bits factored out to ...
3987         (thread_to_thread_object): ... this new function.
3988         * python/py-infthread.c (create_thread_object): Use
3989         inferior_to_inferior_object.
3990         (thpy_is_stopped): Use thread pointer directly.
3991         (gdbpy_selected_thread): Use inferior_thread.
3992         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3993         field, replaced with ...
3994         <thread>: ... this new field.  All users adjusted.
3995         (btpy_insn_or_gap_new): Drop const.
3996         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3997         callers adjusted.
3998         * python/py-record.c: Include "gdbthread.h".
3999         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4000         a ptid_t.  All callers adjusted.
4001         (gdbpy_current_recording): Use inferior_thread.
4002         * python/py-record.h (recpy_record_object) <ptid>: Delete
4003         field, replaced with ...
4004         <thread>: ... this new field.  All users adjusted.
4005         (recpy_element_object) <ptid>: Delete
4006         field, replaced with ...
4007         <thread>: ... this new field.  All users adjusted.
4008         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4009         a ptid_t.  All callers adjusted.
4010         * python/py-threadevent.c: Include "gdbthread.h".
4011         (get_event_thread): Use thread_to_thread_object.
4012         * python/python-internal.h (struct inferior_object): Forward
4013         declare.
4014         (find_thread_object, find_inferior_object): Delete declarations.
4015         (thread_to_thread_object, inferior_to_inferior_object): New
4016         declarations.
4017         * record-btrace.c: Include "inferior.h".
4018         (require_btrace_thread): Use inferior_thread.
4019         (record_btrace_frame_sniffer)
4020         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4021         (get_thread_current_frame): Use scoped_restore_current_thread and
4022         switch_to_thread.
4023         (get_thread_current_frame): Use thread pointer directly.
4024         (record_btrace_replay_at_breakpoint): Use thread's inferior
4025         pointer directly.
4026         * record-full.c: Include "inferior.h".
4027         * regcache.c: Include "gdbthread.h".
4028         (get_thread_arch_regcache): Use the inferior's address space
4029         directly.
4030         (get_thread_regcache, registers_changed_thread): New.
4031         * regcache.h (get_thread_regcache(thread_info *thread)): New
4032         overload.
4033         (registers_changed_thread): New.
4034         (remote_target) <remote_detach_1>: Swap order of parameters.
4035         (remote_add_thread): <remote_add_thread>: Return the new thread.
4036         (get_remote_thread_info(ptid_t)): New overload.
4037         (remote_target::remote_notice_new_inferior): Use thread pointers
4038         directly.
4039         (remote_target::process_initial_stop_replies): Use
4040         thread_info::set_running.
4041         (remote_target::remote_detach_1, remote_target::detach)
4042         (extended_remote_target::detach): Adjust.
4043         * stack.c (frame_show_address): Use inferior_thread.
4044         * target-debug.h (target_debug_print_thread_info_pp): New.
4045         * target-delegates.c: Regenerate.
4046         * target.c (default_thread_address_space): Delete.
4047         (memory_xfer_partial_1): Use current_inferior.
4048         (target_detach): Use current_inferior.
4049         (target_thread_address_space): Delete.
4050         (generic_mourn_inferior): Use current_inferior.
4051         * target.h (struct target_ops) <thread_address_space>: Delete.
4052         (target_thread_address_space): Delete.
4053         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4054         pointers directly.
4055         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4056         thread pointer instead of a ptid_t.  Adjust all callers.
4057         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4058         (first_thread_of_process): Delete, replaced by ...
4059         (first_thread_of_inferior): ... this new function.  All callers
4060         adjusted.
4061         (any_thread_of_process): Rename to ...
4062         (any_thread_of_inferior): ... this, and take an inferior pointer.
4063         (any_live_thread_of_process): Rename to ...
4064         (any_live_thread_of_inferior): ... this, and take an inferior
4065         pointer.
4066         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4067         (value_in_thread_stack_temporaries)
4068         (get_last_thread_stack_temporary): Take a thread pointer instead
4069         of a ptid_t.  Adjust all callers.
4070         (thread_info::set_running): New.
4071         (validate_registers_access): Use inferior_thread.
4072         (can_access_registers_ptid): Rename to ...
4073         (can_access_registers_thread): ... this, and take a thread
4074         pointer.
4075         (print_thread_info_1): Adjust to compare thread pointers instead
4076         of ptids.
4077         (switch_to_no_thread, switch_to_thread): Make extern.
4078         (scoped_restore_current_thread::~scoped_restore_current_thread):
4079         Use m_thread pointer directly.
4080         (scoped_restore_current_thread::scoped_restore_current_thread):
4081         Use inferior_thread.
4082         (thread_command): Use thread pointer directly.
4083         (thread_num_make_value_helper): Use inferior_thread.
4084         * top.c (execute_command): Use inferior_thread.
4085         * tui/tui-interp.c: Include "inferior.h".
4086         * varobj.c (varobj_create): Use inferior_thread.
4087         (value_of_root_1): Use find_thread_global_id instead of
4088         global_thread_id_to_ptid.
4089
4090 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4091
4092         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4093         possible.
4094         (regcache::write_part): Likewise.
4095         (readable_regcache::cooked_read_part): Update comment.
4096         (readable_regcache::cooked_write_part): Likewise.
4097         * regcache.h: (readable_regcache::read_part): Likewise.
4098         (regcache::write_part): Likewise.
4099
4100 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4101             Dirk Schubert  <dirk.schubert@arm.com>
4102
4103         * aarch64-linux-nat.c (post_attach): New.
4104         (aarch64_linux_nat_target::post_attach): Override post_attach to
4105         record the number of hardware debug registers.
4106
4107 2018-06-20  Tom Tromey  <tom@tromey.com>
4108
4109         * python/py-param.c (add_setshow_generic): Make parameters const.
4110         (parmpy_init): Update.
4111
4112 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4113
4114         * regcache.h (regcache_cooked_read_ftype): Rename to...
4115         (register_read_ftype): ...this, change type to function_view.
4116         (class reg_buffer) <save>: Remove src parameter.
4117         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4118         parameter non-const in first overload.  Remove src parameter in
4119         second overload.
4120         * regcache.c (do_cooked_read): Remove.
4121         (readonly_detached_regcache::readonly_detached_regcache): Make
4122         parameter non-const, adjust call to other constructor.
4123         (reg_buffer::save): Remove src parameter.
4124         * frame.c (do_frame_register_read): Remove.
4125         (frame_save_as_regcache): Use lambda function.
4126         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4127         parameter to ppu2spu_data *.
4128         (ppu2spu_sniffer): Use lambda function.
4129
4130 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4131
4132         * record-full.c (record_full_target::insert_breakpoint): Remove
4133         "struct" keyword, add const.
4134
4135 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4136
4137         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4138         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4139         * configure.ac: Remove AC_PREREQ, add missing quoting.
4140         * gnulib/configure.ac: Modernize usage of
4141         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4142         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4143         (AUTOMAKE_VERSION): Bump to 1.15.1.
4144         * configure: Re-generate.
4145         * config.in: Re-generate.
4146         * aclocal.m4: Re-generate.
4147         * gnulib/aclocal.m4: Re-generate.
4148         * gnulib/config.in: Re-generate.
4149         * gnulib/configure: Re-generate.
4150         * gnulib/import/Makefile.in: Re-generate.
4151
4152 2018-06-19  Pedro Alves  <palves@redhat.com>
4153
4154         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4155         (lookup_minimal_symbol_by_pc_section): ... here with
4156         gdb_assert_not_reached added.
4157
4158 2018-06-19  Pedro Alves  <palves@redhat.com>
4159
4160         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4161         parameter with a block parameter.  Compare location's block symbol
4162         with the frame's block instead of addresses.
4163         (skip_inline_frames): Pass the current block instead of the
4164         frame's address.  Break out as soon as we determine the frame
4165         should not be skipped.
4166
4167 2018-06-18  Tom Tromey  <tom@tromey.com>
4168
4169         * solib-aix.c (solib_aix_get_section_offsets): Return
4170         unique_xmalloc_ptr.
4171         (solib_aix_solib_create_inferior_hook): Update.
4172
4173 2018-06-18  Tom Tromey  <tom@tromey.com>
4174
4175         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4176
4177 2018-06-18  Tom Tromey  <tom@tromey.com>
4178
4179         * solib-frv.c (frv_relocate_main_executable): Use
4180         unique_xmalloc_ptr.
4181         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4182         unique_xmalloc_ptr.
4183
4184 2018-06-18  Tom Tromey  <tom@tromey.com>
4185
4186         * objfiles.h (inhibit_section_map_updates): Update.
4187         (resume_section_map_updates, resume_section_map_updates_cleanup):
4188         Remove.
4189         * solib-svr4.c (svr4_handle_solib_event): Update.
4190         * objfiles.c (inhibit_section_map_updates): Return
4191         scoped_restore_tmpl<int>.
4192         (resume_section_map_updates, resume_section_map_updates_cleanup):
4193         Remove.
4194
4195 2018-06-18  Tom Tromey  <tom@tromey.com>
4196
4197         * valprint.h (read_string): Update.
4198         * valprint.c (read_string): Change type of "buffer".
4199         (val_print_string): Update.
4200         * python/py-value.c (valpy_string): Update.
4201         * language.h (struct language_defn) <la_get_string>: Change
4202         type of "buffer".
4203         (default_get_string, c_get_string): Update.
4204         * language.c (default_get_string): Change type of "buffer".
4205         * guile/scm-value.c (gdbscm_value_to_string): Update.
4206         * c-lang.c (c_get_string): Change type of "buffer".
4207
4208 2018-06-18  Tom Tromey  <tom@tromey.com>
4209
4210         * ser-mingw.c (struct pipe_state_destroyer): New.
4211         (pipe_state_up): New typedef.
4212         (cleanup_pipe_state): Remove.
4213         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4214
4215 2018-06-18  Tom Tromey  <tom@tromey.com>
4216
4217         * rust-lang.h (rust_yyerror): Don't declare.
4218         * rust-lang.c (rust_language_defn): Update.
4219         * rust-exp.y (yyerror): Now static.
4220         * parse.c (parse_exp_in_context_1): Update.
4221         * p-lang.h (p_yyerror): Don't declare.
4222         * p-lang.c (p_language_defn): Update.
4223         * p-exp.y (yyerror): Now static.
4224         * opencl-lang.c (opencl_language_defn): Update.
4225         * objc-lang.c (objc_language_defn): Update.
4226         * m2-lang.h (m2_yyerror): Don't declare.
4227         * m2-lang.c (m2_language_defn): Update.
4228         * m2-exp.y (yyerror): Now static.
4229         * language.h (struct language_defn) <la_error>: Remove.
4230         * language.c (unk_lang_error): Remove.
4231         (unknown_language_defn, auto_language_defn): Remove.
4232         * go-lang.h (go_yyerror): Don't declare.
4233         * go-lang.c (go_language_defn): Update.
4234         * go-exp.y (yyerror): Now static.
4235         * f-lang.h (f_yyerror): Don't declare.
4236         * f-lang.c (f_language_defn): Update.
4237         * f-exp.y (yyerror): Now static.
4238         * d-lang.h (d_yyerror): Don't declare.
4239         * d-lang.c (d_language_defn): Update.
4240         * d-exp.y (yyerror): Now static.
4241         * c-lang.h (c_yyerror): Don't declare.
4242         * c-lang.c (c_language_defn, cplus_language_defn)
4243         (asm_language_defn, minimal_language_defn): Update.
4244         * c-exp.y (yyerror): Now static.
4245         * ada-lang.h (ada_yyerror): Don't declare.
4246         * ada-lang.c (ada_language_defn): Update.
4247         * ada-exp.y (yyerror): Now static.
4248
4249 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4250
4251         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4252         (store_sveregs_to_thread): Likewise.
4253         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4254         (aarch64_linux_store_inferior_registers): Likewise.
4255         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4256         function.
4257         (aarch64_sve_regs_copy_to_regcache): Likewise.
4258         (aarch64_sve_regs_copy_from_regcache): Likewise.
4259         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4260         declaration.
4261         (aarch64_sve_regs_copy_to_regcache): Likewise.
4262         (aarch64_sve_regs_copy_from_regcache): Likewise.
4263         (sve_context): Structure from Linux headers.
4264         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4265         (SVE_SIG_ZREG_SIZE): Likewise.
4266         (SVE_SIG_PREG_SIZE): Likewise.
4267         (SVE_SIG_FFR_SIZE): Likewise.
4268         (SVE_SIG_REGS_OFFSET): Likewise.
4269         (SVE_SIG_ZREGS_OFFSET): Likewise.
4270         (SVE_SIG_ZREG_OFFSET): Likewise.
4271         (SVE_SIG_ZREGS_SIZE): Likewise.
4272         (SVE_SIG_PREGS_OFFSET): Likewise.
4273         (SVE_SIG_PREG_OFFSET): Likewise.
4274         (SVE_SIG_PREGS_SIZE): Likewise.
4275         (SVE_SIG_FFR_OFFSET): Likewise.
4276         (SVE_SIG_REGS_SIZE): Likewise.
4277         (SVE_SIG_CONTEXT_SIZE): Likewise.
4278         (SVE_PT_REGS_MASK): Likewise.
4279         (SVE_PT_REGS_FPSIMD): Likewise.
4280         (SVE_PT_REGS_SVE): Likewise.
4281         (SVE_PT_VL_INHERIT): Likewise.
4282         (SVE_PT_VL_ONEXEC): Likewise.
4283         (SVE_PT_REGS_OFFSET): Likewise.
4284         (SVE_PT_FPSIMD_OFFSET): Likewise.
4285         (SVE_PT_FPSIMD_SIZE): Likewise.
4286         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4287         (SVE_PT_SVE_PREG_SIZE): Likewise.
4288         (SVE_PT_SVE_FFR_SIZE): Likewise.
4289         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4290         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4291         (__SVE_SIG_TO_PT): Likewise.
4292         (SVE_PT_SVE_OFFSET): Likewise.
4293         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4294         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4295         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4296         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4297         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4298         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4299         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4300         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4301         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4302         (SVE_PT_SVE_SIZE): Likewise.
4303         (SVE_PT_SIZE): Likewise.
4304         (HAS_SVE_STATE): New define.
4305
4306 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4307
4308         * nat/aarch64-sve-linux-sigcontext.h: New file.
4309         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4310         new files.
4311         (SVE_VQ_MIN): Likewise.
4312         (SVE_VQ_MAX): Likewise.
4313         (SVE_VL_MIN): Likewise.
4314         (SVE_VL_MAX): Likewise.
4315         (SVE_NUM_ZREGS): Likewise.
4316         (SVE_NUM_PREGS): Likewise.
4317         (sve_vl_valid): Likewise.
4318         (struct user_sve_header): Likewise.
4319
4320 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4321             Richard Bunt <Richard.Bunt@arm.com>
4322
4323         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4324         was requested by GDB.
4325
4326 2018-06-15  Tom de Vries  <tdevries@suse.de>
4327
4328         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4329
4330 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4331
4332         * gnulib/update-gnulib.sh: Print expected versions of
4333         autoconf/aclocal.
4334
4335 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4336
4337         * arch-utils.c (default_type_align): Use type_length_units.
4338         * gdbtypes.c (type_align): Use type_length_units.
4339
4340 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4341
4342         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4343         of 'define' command.
4344
4345 2018-06-14  Tom de Vries  <tdevries@suse.de>
4346
4347         PR cli/22573
4348         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4349         get_no_prettyformat_print_options.
4350
4351 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4352
4353         * sparc-nat.h: Include target.h.
4354         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4355         <fetch_registers>: Remove this argument in function call.
4356         <store_registers>: Remove this argument in function call, remove
4357         extra semicolon.
4358         <low_forget_process>: Call sparc64_forget_process instead of
4359         sparc_forget_process.
4360
4361 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4362
4363         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4364         (procfs_target::make_corefile_notes): Adjust to new
4365         target_read_alloc return type.
4366
4367 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4368             Stephen Roberts  <stephen.roberts@arm.com>
4369
4370         PR gdb/22882
4371         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4372         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4373         Move should_notify_stop local into more inner scope.
4374
4375 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4376             Stephen Roberts  <stephen.roberts@arm.com>
4377
4378         PR gdb/22882
4379         * infrun.c (resume_1): Add call to mark_async_event_handler.
4380
4381 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4382
4383         * infrun.c (do_target_wait): Change old version of $pc printed.
4384
4385 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4386
4387         * dwarf2read.c (read_index_from_section): Rename to...
4388         (read_gdb_index_from_section): ... this, update all callers.
4389         (dwarf2_read_index): Rename to...
4390         (dwarf2_read_gdb_index): ... this, update all callers.
4391
4392 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4393
4394         * gdb/hppa-linux-nat.c
4395         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4396         hppa_linux_nat_target::fetch_registers.
4397
4398 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4399
4400         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4401         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4402         (AARCH64_DWARF_SVE_FFR): Likewise.
4403         (AARCH64_DWARF_SVE_P0): Likewise.
4404         (AARCH64_DWARF_SVE_Z0): Likewise.
4405
4406 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4407
4408         * common/common-regcache.h (raw_compare): New function.
4409         * regcache.c (regcache::raw_compare): Likewise.
4410         * regcache.h (regcache::raw_compare): New declaration.
4411
4412 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4413
4414         * common/common-regcache.h (reg_buffer_common): New structure.
4415         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4416         (reg_buffer::raw_supply): Likewise.
4417         (reg_buffer::raw_supply_integer): Likewise.
4418         (reg_buffer::raw_supply_zeroed): Likewise.
4419         (reg_buffer::raw_collect): Likewise.
4420         (reg_buffer::raw_collect_integer): Likewise.
4421         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4422         (reg_buffer::raw_supply): Likewise.
4423         (reg_buffer::raw_supply_integer): Likewise.
4424         (reg_buffer::raw_supply_zeroed): Likewise.
4425         (reg_buffer::raw_collect): Likewise.
4426         (reg_buffer::raw_collect_integer): Likewise.
4427
4428 2018-06-10  Tom Tromey  <tom@tromey.com>
4429
4430         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4431         (class remote_state) <stop_reply_queue>: Now std::vector.
4432         (remote_state::~remote_state)
4433         (remote_target::stop_reply_queue_length): Update.
4434         (struct queue_iter_param, remove_child_of_pending_fork)
4435         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4436         (check_pending_event_prevents_wildcard_vcont_callback)
4437         (remove_stop_reply_for_inferior)
4438         (remove_stop_reply_of_remote_state)
4439         (remote_notif_remove_once_on_match)
4440         (stop_reply_match_ptid_and_ws)
4441         (remote_kill_child_of_pending_fork): Remove.
4442         (remote_target::remove_new_fork_children)
4443         (remote_target::check_pending_events_prevent_wildcard_vcont)
4444         (remote_target::discard_pending_stop_replies)
4445         (remote_target::discard_pending_stop_replies_in_queue)
4446         (remote_target::remote_notif_remove_queued_reply)
4447         (remote_target::queued_stop_reply)
4448         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4449         (remote_target::wait, remote_target::kill_new_fork_children)
4450         (remote_target::async): Update.
4451
4452 2018-06-10  Tom Tromey  <tom@tromey.com>
4453
4454         * record-full.c (record_full_arch_list_cleanups): Remove.
4455         (record_full_message): Use try/catch.
4456         (record_full_wait_cleanups): Remove.
4457         (record_full_wait_1): Use try/catch.
4458         (record_full_restore): Likewise.
4459
4460 2018-06-10  Tom Tromey  <tom@tromey.com>
4461
4462         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4463         declare VEC.  Add constructor.
4464         <in_target_beneath>: Now bool.
4465         (record_full_breakpoints): Now a std::vector, static.
4466         (record_full_sync_record_breakpoints)
4467         (record_full_init_record_breakpoints)
4468         (record_full_target::insert_breakpoint)
4469         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4470
4471 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4472
4473         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4474         * serial.c (serial_interface_lookup): Remove struct keyword.
4475
4476 2018-06-10  Tom Tromey  <tom@tromey.com>
4477
4478         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4479         method.
4480         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4481         a method.
4482         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4483         method.
4484         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4485         "beneath" as a method.
4486         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4487         Use "beneath" as a method.
4488
4489 2018-06-10  Tom Tromey  <tom@tromey.com>
4490
4491         * tracefile.c (struct trace_file_writer_deleter): New.
4492         <operator()>: Rename from trace_file_writer_xfree.
4493         (trace_file_writer_up): New typedef.
4494         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4495
4496 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4497
4498         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4499         <m_registers, m_register_status>: Change type to
4500         std::unique_ptr.
4501         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4502         XCNEWVEC.
4503
4504 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4505
4506         * common/common-regcache.h (enum register_status): Add
4507         underlying type "signed char".
4508         * regcache.h (reg_buffer) <m_register_status>: Change type to
4509         register_status *.
4510         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4511         register_status instead of signed char.
4512         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4513         (reg_buffer::get_register_status): Remove cast.
4514         (readable_regcache::raw_read): Remove cast.
4515         (readable_regcache::cooked_read): Remove cast.
4516
4517 2018-06-09  Tom Tromey  <tom@tromey.com>
4518
4519         * source.c (reverse_search_command, forward_search_command): Use
4520         scoped_fd.
4521
4522 2018-06-09  Tom Tromey  <tom@tromey.com>
4523
4524         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4525         (serial_ops_list): Now static, std::vector.
4526         (serial_interface_lookup, serial_add_interface): Update.
4527
4528 2018-06-09  Tom Tromey  <tom@tromey.com>
4529
4530         * dwarf2read.c (process_cu_includes): Update.
4531         (process_full_comp_unit): Update.
4532         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4533         std::vector.
4534
4535 2018-06-08  Paul Koning  <paul_koning@dell.com>
4536
4537         PR gdb/23252
4538
4539         * python/python.c (do_start_initialization):
4540         Avoid call to internal Python API.
4541         (init__gdb_module): New function.
4542
4543 2018-06-08  Gary Benson <gbenson@redhat.com>
4544
4545         * linux-thread-db.c (valprint.h): New include.
4546         (struct check_thread_db_info): New structure.
4547         (check_thread_db_on_load, tdb_testinfo): New static globals.
4548         (check_thread_db, check_thread_db_callback): New functions.
4549         (try_thread_db_load_1): Run integrity checks if requested.
4550         (maintenance_check_libthread_db): New function.
4551         (_initialize_thread_db): Register "maint check libthread-db"
4552         and "maint set/show check-libthread-db".
4553         * NEWS: Mention the above new commands.
4554
4555 2018-06-08  Tom Tromey  <tom@tromey.com>
4556
4557         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4558         now a method.
4559
4560 2018-06-08  Tom Tromey  <tom@tromey.com>
4561
4562         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4563
4564 2018-06-08  Tom Tromey  <tom@tromey.com>
4565
4566         * common/btrace-common.h (struct btrace_data): Add constructor,
4567         destructor, move assignment operator.
4568         <empty, clear, fini>: New methods.
4569         <format>: Initialize.
4570         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4571         (btrace_data_empty): Don't declare.
4572         * common/btrace-common.c (btrace_data_init): Remove.
4573         (btrace_data::fini): Rename from btrace_data_fini.
4574         (btrace_data::empty): Rename from btrace_data_empty.
4575         (btrace_data::clear): Rename from btrace_data_clear.  Return
4576         bool.
4577         * btrace.h (make_cleanup_btrace_data): Don't declare.
4578         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4579         (parse_xml_btrace): Update.
4580         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4581         (maint_btrace_clear_packet_history_cmd): Update.
4582
4583 2018-06-07  Pedro Alves  <palves@redhat.com>
4584
4585         * target.h (target_ops) <beneath>: Now a method.  All references
4586         updated.
4587         (class target_stack): New.
4588         * target.c (g_target_stack): New.
4589         (g_current_top_target): Delete.
4590         (current_top_target): Get the top target out of g_target_stack.
4591         (target_stack::push, target_stack::unpush): New.
4592         (push_target, unpush_target): Reimplement.
4593         (target_is_pushed): Reimplement in terms of g_target_stack.
4594         (target_ops::beneath, target_stack::find_beneath): New.
4595
4596 2018-06-07  Pedro Alves  <palves@redhat.com>
4597
4598         * target.h (find_target_beneath): Delete declaration.
4599         * target.c (find_target_beneath): Delete definition.
4600         * aix-thread.c: All callers of find_target_beneath adjusted to
4601         call target_ops::beneath instead.
4602         * bsd-uthread.c: Likewise.
4603         * linux-thread-db.c: Likewise.
4604         * ravenscar-thread.c: Likewise.
4605         * sol-thread.c: Likewise.
4606         * spu-multiarch.c: Likewise.
4607
4608 2018-06-07  Pedro Alves  <palves@redhat.com>
4609
4610         * target.h (target_ops) <beneath>: Now a method.  All references
4611         updated.
4612         (target_ops) <m_beneath>: New.
4613         * target.c (target_ops::beneath): New.
4614         * corelow.c: Adjust all references to target_ops::beneath.
4615         * linux-thread-db.c: Likewise.
4616         * make-target-delegates: Likewise.
4617         * record-btrace.c: Likewise.
4618         * record-full.c: Likewise.
4619         * remote.c: Likewise.
4620         * target.c: Likewise.
4621         * target-delegates.c: Regenerate.
4622
4623 2018-06-07  Pedro Alves  <palves@redhat.com>
4624
4625         * target.h (target_stack): Delete.
4626         (current_top_target): Declare function.
4627         * target.c (target_stack): Delete.
4628         (g_current_top_target): New.
4629         (current_top_target): New function.
4630         * auxv.c: Use current_top_target instead of target_stack
4631         throughout.
4632         * avr-tdep.c: Likewise.
4633         * breakpoint.c: Likewise.
4634         * corefile.c: Likewise.
4635         * elfread.c: Likewise.
4636         * eval.c: Likewise.
4637         * exceptions.c: Likewise.
4638         * frame.c: Likewise.
4639         * gdbarch-selftests.c: Likewise.
4640         * gnu-v3-abi.c: Likewise.
4641         * ia64-tdep.c: Likewise.
4642         * ia64-vms-tdep.c: Likewise.
4643         * infcall.c: Likewise.
4644         * infcmd.c: Likewise.
4645         * infrun.c: Likewise.
4646         * linespec.c: Likewise.
4647         * linux-tdep.c: Likewise.
4648         * minsyms.c: Likewise.
4649         * ppc-linux-nat.c: Likewise.
4650         * ppc-linux-tdep.c: Likewise.
4651         * procfs.c: Likewise.
4652         * regcache.c: Likewise.
4653         * remote.c: Likewise.
4654         * rs6000-tdep.c: Likewise.
4655         * s390-linux-nat.c: Likewise.
4656         * s390-tdep.c: Likewise.
4657         * solib-aix.c: Likewise.
4658         * solib-darwin.c: Likewise.
4659         * solib-dsbt.c: Likewise.
4660         * solib-spu.c: Likewise.
4661         * solib-svr4.c: Likewise.
4662         * solib-target.c: Likewise.
4663         * sparc-tdep.c: Likewise.
4664         * sparc64-tdep.c: Likewise.
4665         * spu-tdep.c: Likewise.
4666         * symfile.c: Likewise.
4667         * symtab.c: Likewise.
4668         * target-descriptions.c: Likewise.
4669         * target-memory.c: Likewise.
4670         * target.c: Likewise.
4671         * target.h: Likewise.
4672         * tracefile-tfile.c: Likewise.
4673         * tracepoint.c: Likewise.
4674         * valops.c: Likewise.
4675         * valprint.c: Likewise.
4676         * value.c: Likewise.
4677         * windows-tdep.c: Likewise.
4678         * mi/mi-main.c: Likewise.
4679
4680 2018-06-07  Tom Tromey  <tom@tromey.com>
4681
4682         * valprint.h (build_address_symbolic): Declare.
4683         * printcmd.c (print_address_symbolic): Update.
4684         (build_address_symbolic): Change "name" and "filename" to
4685         std::string.
4686         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4687         Update.
4688         * defs.h (build_address_symbolic): Remove declaration.
4689
4690 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4691
4692         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4693         (aarch64_vnv_type): Add function.
4694         (aarch64_pseudo_register_name): Add V regs for SVE.
4695         (aarch64_pseudo_register_type): Likewise.
4696         (aarch64_pseudo_register_reggroup_p): Likewise.
4697         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4698         (aarch64_pseudo_read_value): Add V regs for SVE.
4699         (aarch64_pseudo_write_2): Use V0 offset for SVE
4700         (aarch64_pseudo_write): Add V regs for SVE.
4701         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4702
4703 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4704
4705         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4706         (sve_vl_from_vq): Likewise.
4707
4708 2018-06-05  Tom Tromey  <tom@tromey.com>
4709
4710         * cli/cli-cmds.c (show_version): Update.
4711         * top.c (print_gdb_version): Add "interactive" parameter.
4712         Update.
4713         * main.c (captured_main_1): Update.
4714         * top.h (print_gdb_version): Add "interactive" parameter and a
4715         comment.
4716
4717 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4718
4719         * common/enum-flags.h: Add trailing semicolon to example in
4720         comment.
4721
4722 2018-06-05  Tom Tromey  <tom@tromey.com>
4723
4724         PR cli/12326:
4725         * NEWS: Add entry about pager.
4726         * utils.c (pagination_disabled_for_command): New global.
4727         (prompt_for_continue): Allow "c" response to prompt.
4728         (reinitialize_more_filter): Clear
4729         pagination_disabled_for_command.
4730         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4731
4732 2018-06-04  Tom Tromey  <tom@tromey.com>
4733
4734         * ada-lang.h (ada_lookup_symbol_list): Update.
4735         * ada-lang.c (resolve_subexp): Update.
4736         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4737         parameter.
4738         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4739         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4740         results parameter to std::vector.
4741         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4742         Update.
4743         * ada-exp.y (block_lookup): Update.
4744         (select_possible_type_sym): Change type of syms.  Remove nsyms
4745         parameter.
4746         (write_var_or_type, write_name_assoc): Update.
4747
4748 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4749
4750         * windows-nat.c (windows_nat_target::xfer_partial): Return
4751         TARGET_XFER_E_IO if we need to delegate to the target beneath
4752         but BENEATH is NULL.
4753
4754 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4755
4756         * Makefile.in (config.status): Add configure.nat as a
4757         dependency.
4758
4759 2018-06-04  Tom Tromey  <tom@tromey.com>
4760
4761         * cp-name-parser.y (cpname_state): Add method declarations.
4762         (HANDLE_QUAL): Update.
4763         (cpname_state::d_grab, cpname_state::fill_comp)
4764         (cpname_state::make_operator, cpname_state::make_dtor)
4765         (cpname_state::make_builtin_type, cpname_state::make_name)
4766         (cpname_state::d_qualify, cpname_state::d_int_type)
4767         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4768         (%union): Move earlier.
4769
4770 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4771
4772         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4773
4774 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4775
4776         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4777         (aarch64_pseudo_write_1): Likewise.
4778         (aarch64_pseudo_read_value): Use helper.
4779         (aarch64_pseudo_write): Likewise.
4780
4781 2018-06-04  Pedro Alves  <palves@redhat.com>
4782
4783         * darwin-nat.c (darwin_ops): Delete.
4784         (darwin_attach_pid): Use get_native_target.
4785
4786 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4787
4788         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4789         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4790
4791 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4792
4793         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4794         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4795         (aarch64_gdbarch_init): Check for SVE.
4796         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4797
4798 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4799
4800         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4801         * aarch64-tdep.h (aarch64_read_description): Likewise.
4802         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4803         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4804         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4805         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4806         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4807
4808 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4809
4810         * value.c (value_fetch_lazy_bitfield): New.
4811         (value_fetch_lazy_memory): New.
4812         (value_fetch_lazy_register): New.
4813         (value_fetch_lazy): Factor out to smaller functions.
4814
4815 2018-06-01  Tom Tromey  <tom@tromey.com>
4816
4817         * cp-name-parser.y (backslashable, represented): Now const.
4818
4819 2018-06-01  Tom Tromey  <tom@tromey.com>
4820
4821         * cp-name-parser.y: Include parser-defs.h.
4822         (parser_fprintf): Remove declaration.
4823
4824 2018-06-01  Tom Tromey  <tom@tromey.com>
4825
4826         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4827         %parse-param.
4828         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4829         (global_result): Remove globals.
4830         (struct cpname_state): New.
4831         (yyparse): Don't declare.
4832         (yylex, yyerror): Move declarations after %union.
4833         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4834         (make_name): Add state parameter.
4835         Update all callers.
4836         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4837         parameter.
4838         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4839         Update.
4840         (yylex): Add lvalp, state parameters.
4841         (yyerror): Add state parameter.
4842         (cp_demangled_name_to_comp): Update.
4843
4844 2018-06-01  Tom Tromey  <tom@tromey.com>
4845
4846         * cp-name-parser.y (parser_fprintf): Declare.
4847         (GDB_YY_REMAP_PREFIX): Define.
4848         Include yy-remap.h.  Don't redefine yy* identifiers.
4849
4850 2018-06-01  Tom Tromey  <tom@tromey.com>
4851
4852         * python/py-type.c (typy_legacy_template_argument): Update.
4853         * cp-support.h (cp_demangled_name_to_comp): Update.
4854         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4855         parameter to be a "std::string *".
4856         (main): Update.
4857
4858 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4859
4860         * ada-lex.l: Include "diagnostics.h" instead of
4861         "common/diagnostics.h".
4862         * unittests/environ-selftests.c: Likewise.
4863         * common/diagnostics.h: Moved to ../include.
4864
4865 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4866
4867         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4868         to language_mode_manual while calling breakpoint_re_set_one.
4869
4870 2018-06-01  Tom Tromey  <tom@tromey.com>
4871
4872         * valops.c (value_cast_structs, destructor_name_p): Update.
4873         * symtab.c (gdb_mangle_name): Update.
4874         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4875         Update.
4876         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4877         (pascal_object_print_value_fields, pascal_object_print_value):
4878         Update.
4879         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4880         * linespec.c (find_methods): Update.
4881         * gdbtypes.h (type_name_no_tag): Remove.
4882         (type_name_or_error): Rename from type_name_no_tag_or_error.
4883         * gdbtypes.c (type_name_no_tag): Remove.
4884         (type_name_or_error): Rename from type_name_no_tag_or_error.
4885         (lookup_struct_elt_type, check_typedef): Update.
4886         * expprint.c (print_subexp_standard): Update.
4887         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4888         * d-namespace.c (d_lookup_nested_symbol): Update.
4889         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4890         (cp_print_class_member): Update.
4891         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4892         * completer.c (add_struct_fields): Update.
4893         * c-typeprint.c (cp_type_print_derivation_info)
4894         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4895         Update.
4896         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4897         (ada_prefer_type, ada_is_exception_sym): Update.
4898
4899 2018-06-01  Tom Tromey  <tom@tromey.com>
4900
4901         * valops.c (enum_constant_from_type, value_namespace_elt)
4902         (value_maybe_namespace_elt): Update.
4903         * valarith.c (find_size_for_pointer_math): Update.
4904         * target-descriptions.c (make_gdb_type): Update.
4905         * symmisc.c (print_symbol): Update.
4906         * stabsread.c (define_symbol, read_type)
4907         (complain_about_struct_wipeout, add_undefined_type)
4908         (cleanup_undefined_types_1): Update.
4909         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4910         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4911         (rust_internal_print_type, rust_composite_type)
4912         (rust_evaluate_funcall, rust_evaluate_subexp)
4913         (rust_inclusive_range_type_p): Update.
4914         * python/py-type.c (typy_get_tag): Update.
4915         * p-typeprint.c (pascal_type_print_base): Update.
4916         * mdebugread.c (parse_symbol, parse_type): Update.
4917         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4918         Update.
4919         * guile/scm-type.c (gdbscm_type_tag): Update.
4920         * go-lang.c (sixg_string_p): Update.
4921         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4922         Update.
4923         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4924         (TYPE_TAG_NAME): Remove.
4925         * gdbtypes.c (type_name_no_tag): Simplify.
4926         (check_typedef, check_types_equal, recursive_dump_type)
4927         (copy_type_recursive, arch_composite_type): Update.
4928         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4929         in summary mode when needed.
4930         * eval.c (evaluate_funcall): Update.
4931         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4932         (process_structure_scope, read_enumeration_type)
4933         (read_namespace_type, read_module_type, determine_prefix): Update.
4934         * cp-support.c (inspect_type): Update.
4935         * coffread.c (process_coff_symbol, decode_base_type): Update.
4936         * c-varobj.c (c_is_path_expr_parent): Update.
4937         * c-typeprint.c (c_type_print_base_struct_union): Update.
4938         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4939         summary when using C language.
4940         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4941         (gen_maybe_namespace_elt): Update.
4942         * ada-lang.c (ada_type_name): Simplify.
4943         (empty_record, ada_template_to_fixed_record_type_1)
4944         (template_to_static_fixed_type)
4945         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4946
4947 2018-06-01  Tom Tromey  <tom@tromey.com>
4948
4949         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4950         c_print_type.
4951         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4952         (c_print_type): Update.
4953         (c_print_type): New overload.
4954         (c_type_print_varspec_prefix, c_type_print_args)
4955         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4956         (c_type_print_base_struct_union, c_type_print_base_1)
4957         (cp_type_print_method_args): Add "language" parameter.
4958         (c_type_print_base): Update.
4959         * c-lang.h (c_print_type): Add new overload.
4960
4961 2018-06-01  Tom Tromey  <tom@tromey.com>
4962
4963         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4964         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4965
4966 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4967
4968         * aarch64-tdep.c (aarch64_sve_register_names): New const
4969         var.
4970         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4971         (AARCH64_SVE_Z_REGS_NUM): New define.
4972         (AARCH64_SVE_P_REGS_NUM): Likewise.
4973         (AARCH64_SVE_NUM_REGS): Likewise.
4974
4975 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4976
4977         * nat/linux-ptrace.h [__alpha__]
4978         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4979         definitions.
4980
4981 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4982
4983         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4984         the endianness selected.
4985         * NEWS: Document `set endian auto' mode operation update.
4986
4987 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4988
4989         * Makefile.in: Add new header.
4990         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4991         (sve_vl_from_vg): Likewise.
4992         (sve_vq_from_vl): Likewise.
4993         (sve_vl_from_vq): Likewise.
4994         (sve_vq_from_vg): Likewise.
4995         (sve_vg_from_vq): Likewise.
4996         * configure.nat: Add new c file.
4997         * nat/aarch64-sve-linux-ptrace.c: New file.
4998         * nat/aarch64-sve-linux-ptrace.h: New file.
4999
5000 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5001
5002         * aarch64-linux-nat.c (aarch64_linux_read_description):
5003         Add parmeter zero.
5004         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5005         Likewise.
5006         * aarch64-tdep.c (tdesc_aarch64_list): Add.
5007         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5008         (aarch64_gdbarch_init): Add parmeter zero.
5009         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5010         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5011         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5012         parmeter.
5013         * doc/gdb.texinfo: Describe SVE feature
5014         * features/aarch64-sve.c: New file.
5015
5016 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
5017
5018         PR gdb/23210
5019         * gdbarch.sh (significant_addr_bit): Default to zero when
5020         not set by target architecture.
5021         * gdbarch.c: Re-generated.
5022         * utils.c (address_significant): Update.
5023
5024 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
5025
5026         * stack.c (func_command): Remove trailing newline in call to error.
5027
5028 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5029
5030         * regcache.h (regcache_raw_collect): Remove, update callers to
5031         use regcache::raw_collect.
5032         * regcache.c (regcache_raw_collect): Remove.
5033
5034 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5035
5036         * regcache.h (regcache_raw_supply): Remove, update callers to
5037         use detached_regcache::raw_supply.
5038         * regcache.c (regcache_raw_supply): Remove.
5039
5040 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5041
5042         * regcache.h (regcache_cooked_write_part): Remove, update
5043         callers to use regcache::cooked_write_part.
5044         * regcache.c (regcache_cooked_write_part): Remove.
5045
5046 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5047
5048         * regcache.h (regcache_cooked_read_part): Remove, update callers
5049         to use readable_regcache::cooked_read_part.
5050         * regcache.c (regcache_cooked_read_part): Remove.
5051
5052 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5053
5054         * regcache.h (regcache_cooked_read_value): Remove, update
5055         callers to use readable_regcache::cooked_read_value.
5056         * regcache.c (regcache_cooked_read_value): Remove.
5057
5058 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5059
5060         * regcache.h (regcache_cooked_write): Remove, update callers to
5061         use regcache::cooked_write.
5062         * regcache.c (regcache_cooked_write): Remove.
5063
5064 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5065
5066         * regcache.h (regcache_invalidate): Remove, update callers to
5067         use detached_regcache::invalidate instead.
5068         * regcache.c (regcache_invalidate): Remove.
5069
5070 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5071
5072         * regcache.h (regcache_raw_write_part): Remove, update callers
5073         to use regcache::raw_write_part instead.
5074         * regcache.c (regcache_raw_write_part): Remove.
5075
5076 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5077
5078         * regcache.h (regcache_raw_read_part): Remove, update callers to
5079         use readable_regcache::raw_read_part instead.
5080         * regcache.c (regcache_raw_read_part): Remove.
5081
5082 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5083
5084         * regcache.h (regcache_cooked_read): Remove, update callers to
5085         use readable_regcache::cooked_read instead.
5086         * regcache.c (regcache_cooked_read): Remove.
5087
5088 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5089
5090         * regcache.h (regcache_raw_write): Remove, update callers to use
5091         regcache::raw_write instead.
5092         * regcache.c (regcache_raw_write): Remove.
5093
5094 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5095
5096         * regcache.h (regcache_raw_read): Remove, update callers to use
5097         readable_regcache::raw_read instead.
5098         * regcache.c (regcache_raw_read): Remove.
5099
5100 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5101
5102         * regcache.h (regcache_raw_update): Remove, update callers to
5103         use readable_regcache::raw_update instead.
5104         * regcache.c (regcache_raw_update): Remove.
5105
5106 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5107
5108         * regcache.h (regcache_register_status): Remove, update callers
5109         to use reg_buffer::get_register_status directly instead.
5110         * regcache.c (regcache_register_status): Remove.
5111
5112 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5113
5114         * regcache.h (regcache_get_ptid): Remove, update all callers to
5115         call regcache::ptid instead.
5116         * regcache.c (regcache_get_ptid): Remove.
5117
5118 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5119
5120         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5121
5122 2018-05-30  Pedro Alves  <palves@redhat.com>
5123
5124         * common/common-exceptions.h (exception_rethrow): Use
5125         ATTRIBUTE_NORETURN.
5126
5127 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5128
5129         * breakpoint.c (print_solib_event, check_status_catch_solib):
5130         Remove struct keyword in range-based for loops.
5131         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5132         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5133         Likewise.
5134         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5135         Likewise.
5136         * symfile.c (addr_info_make_relative): Likewise.
5137         * thread.c (value_in_thread_stack_temporaries): Likewise.
5138
5139 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5140
5141         PR gdb/16841
5142         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5143         aggregate type to get its real type before accessing it.
5144
5145 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5146
5147         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5148         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5149         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5150         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5151         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5152         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5153         * printcmd.c (info_address_command): Likewise.
5154
5155 2018-05-29  Tom Tromey  <tom@tromey.com>
5156
5157         * windows-nat.c (handle_exception): Update fall-through comment.
5158
5159 2018-05-29  Tom Tromey  <tom@tromey.com>
5160
5161         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5162         (struct program_space) <added_solibs>: Now a std::vector.
5163         * breakpoint.c (print_solib_event): Update.
5164         (check_status_catch_solib): Update.
5165         * progspace.c (clear_program_space_solib_cache): Update.
5166         * solib.c (update_solib_list): Update.
5167
5168 2018-05-29  Tom Tromey  <tom@tromey.com>
5169
5170         * python/py-type.c (typy_richcompare): Update.
5171         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5172         * gdbtypes.h (types_deeply_equal): Return bool.
5173         (types_equal): Likewise.
5174         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5175         declare VEC.
5176         (check_types_equal): Change worklist to std::vector.  Return
5177         bool.
5178         (struct type_equality_entry): Add constructor.
5179         (compare_maybe_null_strings): Return bool.
5180         (check_types_worklist): Return bool.  Change worklist to
5181         std::vector.
5182         (types_deeply_equal): Use std::vector.
5183         (types_equal): Return bool.
5184         (compare_maybe_null_strings): Simplify.
5185
5186 2018-05-29  Tom Tromey  <tom@tromey.com>
5187
5188         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5189
5190 2018-05-29  Tom Tromey  <tom@tromey.com>
5191
5192         * objc-lang.h: Don't include cp-support.h.
5193         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5194         declare VEC.
5195
5196 2018-05-27  Tom Tromey  <tom@tromey.com>
5197
5198         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5199
5200 2018-05-25  Tom Tromey  <tom@tromey.com>
5201
5202         * value.c (value::location): Initialize.
5203
5204 2018-05-25  Tom Tromey  <tom@tromey.com>
5205
5206         * dbxread.c (init_bincl_list): Remove.
5207         (bincl_list): Now a std::vector.
5208         (bincls_allocated, next_bincl): Remove.
5209         (free_bincl_list, do_free_bincl_list_cleanup)
5210         (make_cleanup_free_bincl_list): Remove.
5211         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5212         unique_xmalloc_ptr.
5213         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5214         (struct header_file_location): Add constructor.
5215         (add_bincl_to_list): Remove.
5216
5217 2018-05-25  Tom Tromey  <tom@tromey.com>
5218
5219         * tui/tui.c (tui_enable): Update.
5220         * mi/mi-interp.c (mi_interp::init): Update.
5221         * interps.h (class interp) <name>: New method.
5222         <m_name>: Rename from name.
5223         (~scoped_restore_interp): Update.
5224         * interps.c (interp::interp): Update.
5225         (interp_add, interp_set, interp_lookup_existing)
5226         (current_interp_named_p): Update.
5227
5228 2018-05-25  Tom Tromey  <tom@tromey.com>
5229
5230         * interps.c (interp_name): Remove.
5231         * mi/mi-interp.c (mi_interp::init): Update.
5232         * interps.h (interp_name): Remove.
5233         (~scoped_restore_interp): Update.
5234         * tui/tui.c (tui_enable): Update.
5235
5236 2018-05-25  Tom Tromey  <tom@tromey.com>
5237
5238         * utils.c (fputs_maybe_filtered): Update.
5239         * linespec.c (decode_line_full): Update.
5240         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5241         (mi_print_breakpoint_for_event, mi_solib_loaded)
5242         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5243         (mi_user_selected_context_changed): Update.
5244         * mi/mi-main.c (mi_execute_command): Update.
5245         * cli/cli-script.c (execute_control_command): Update.
5246         * python/python.c (execute_gdb_command): Update.
5247         * solib.c (info_sharedlibrary_command): Update.
5248         * interps.c (interp_ui_out): Remove.
5249         * interps.h (interp_ui_out): Remove.
5250
5251 2018-05-25  Tom Tromey  <tom@tromey.com>
5252
5253         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5254         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5255         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5256
5257 2018-05-25  Tom Tromey  <tom@tromey.com>
5258
5259         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5260         * interps.c (interp_exec): Use scoped_restore.
5261
5262 2018-05-25  Tom Tromey  <tom@tromey.com>
5263
5264         * remote.c (remote_target::remote_file_get): Use
5265         gdb::byte_vector.
5266         (remote_target::remote_file_put): Likewise.
5267
5268 2018-05-25  Tom Tromey  <tom@tromey.com>
5269
5270         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5271         a std::string.
5272         (get_pe_section_index, add_pe_exported_sym): Update.
5273         (read_pe_exported_syms): Use gdb::def_vector.
5274
5275 2018-05-25  Tom Tromey  <tom@tromey.com>
5276
5277         * frame.c (remove_prev_frame): Remove.
5278         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5279
5280 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5281
5282         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5283         Remove prototypes.
5284         * mips-linux-nat.c (supply_fpregset): Always call
5285         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5286         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5287         `mips_fill_fpregset'.
5288         * mips-linux-tdep.c (mips_supply_fpregset)
5289         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5290         (mips_fill_fpregset_wrapper): Remove functions.
5291         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5292         (mips_linux_fpregset): Remove variable.
5293         (mips_linux_iterate_over_regset_sections): Use
5294         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5295         (mips_linux_o32_sigframe_init): Remove comment.
5296
5297 2018-05-25  Pedro Alves  <palves@redhat.com>
5298
5299         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5300         (struct readahead_cache, struct packet_reg, struct
5301         remote_arch_state, class remote_state): Move higher up in the
5302         file.
5303         (remote_target::m_remote_state): Now an object instead of a pointer.
5304         (remote_target::get_remote_state): Adjust.
5305
5306 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5307
5308         * stack.c (select_and_print_frame): Delete.
5309         (struct function_bounds): Move struct within function.
5310         (func_command): Most content moved into new function
5311         find_frame_for_function, use new function, print result, add
5312         function comment.
5313         (find_frame_for_function): New function, now returns a result.
5314
5315 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5316
5317         * stack.c (iterate_over_block_arg_vars): Fix comment.
5318         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5319
5320 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5321
5322         PR gdb/23203
5323         * frame.c
5324         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5325         Define.
5326         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5327         Define.
5328         * frame.h (class scoped_restore_selected_frame): New class.
5329         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5330         of any exception, use scoped_restore_selected_frame to restore the
5331         frame instead.
5332
5333 2018-05-24  Pedro Alves  <palves@redhat.com>
5334
5335         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5336         override.
5337
5338 2018-05-23  Tom Tromey  <tom@tromey.com>
5339
5340         * complaints.c (struct complaints): Remove.
5341         (symfile_complaint_book): Remove.
5342         (series): New global.
5343         (complaint_internal): Update.
5344         (clear_complaints): Update.
5345
5346 2018-05-23  Tom Tromey  <tom@tromey.com>
5347
5348         * complaints.c (counters): New global.
5349         (struct complain): Remove.
5350         (struct complaints) <root>: Remove.
5351         (complaint_sentinel): Remove.
5352         (symfile_complaint_book): Update.
5353         (find_complaint) Remove.
5354         (complaint_internal, clear_complaints): Update.
5355
5356 2018-05-23  Tom Tromey  <tom@tromey.com>
5357
5358         * complaints.c (struct complain) <file, line>: Remove.
5359         (find_complaint): Remove file, line parameters.
5360         (complaint_internal): Update.
5361
5362 2018-05-23  Tom Tromey  <tom@tromey.com>
5363
5364         * complaints.c (vcomplaint): Remove.
5365         (complaint_internal) Merge in contents of vcomplaint.
5366
5367 2018-05-23  Tom Tromey  <tom@tromey.com>
5368
5369         * complaints.c (struct complaints) <explanation>: Remove.
5370         (symfile_explanations): Remove.
5371         (symfile_complaint_book): Update.
5372         (vcomplaint): Update.
5373         (struct explanation): Remove.
5374
5375 2018-05-23  Tom Tromey  <tom@tromey.com>
5376
5377         * complaints.c (symfile_complaints): Remove.
5378         (complaint_internal): Remove "complaints" parameter.
5379         (clear_complaints, vcomplaint): Remove "c" parameter.
5380         (get_complaints): Remove.
5381         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5382         (dwarf2_debug_line_missing_file_complaint)
5383         (dwarf2_debug_line_missing_end_sequence_complaint)
5384         (dwarf2_complex_location_expr_complaint)
5385         (dwarf2_const_value_length_mismatch_complaint)
5386         (dwarf2_section_buffer_overflow_complaint)
5387         (dwarf2_macro_malformed_definition_complaint)
5388         (dwarf2_invalid_attrib_class_complaint)
5389         (create_addrmap_from_index, dw2_symtab_iter_next)
5390         (dw2_expand_marked_cus)
5391         (dw2_debug_names_iterator::find_vec_in_debug_names)
5392         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5393         (create_debug_type_hash_table, init_cutu_and_read_dies)
5394         (partial_die_parent_scope, add_partial_enumeration)
5395         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5396         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5397         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5398         (create_cus_hash_table, create_dwp_hash_table)
5399         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5400         (dwarf2_rnglists_process, dwarf2_ranges_process)
5401         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5402         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5403         (handle_struct_member_die, process_structure_scope)
5404         (read_array_type, read_common_block, read_module_type)
5405         (read_tag_pointer_type, read_typedef, read_base_type)
5406         (read_subrange_type, load_partial_dies, partial_die_info::read)
5407         (partial_die_info::read, partial_die_info::read)
5408         (partial_die_info::read, read_checked_initial_length_and_offset)
5409         (dwarf2_string_attr, read_formatted_entries)
5410         (dwarf_decode_line_header)
5411         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5412         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5413         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5414         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5415         (get_signatured_type, get_DW_AT_signature_type)
5416         (decode_locdesc, file_file_name, consume_improper_spaces)
5417         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5418         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5419         (dwarf2_symbol_mark_computed, set_die_type)
5420         (read_attribute_value): Update.
5421         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5422         Update.
5423         * dbxread.c (unknown_symtype_complaint)
5424         (lbrac_mismatch_complaint, repeated_header_complaint)
5425         (set_namestring, function_outside_compilation_unit_complaint)
5426         (read_dbx_symtab, process_one_symbol): Update.
5427         * gdbtypes.c (stub_noname_complaint): Update.
5428         * windows-nat.c (handle_unload_dll): Update.
5429         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5430         (decode_base_type): Update.
5431         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5432         (eb_complaint, record_include_begin, record_include_end)
5433         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5434         (process_xcoff_symbol, read_symbol)
5435         (function_outside_compilation_unit_complaint)
5436         (scan_xcoff_symtab): Update.
5437         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5438         * buildsym.c (finish_block_internal, make_blockvector)
5439         (end_symtab_get_static_block, augment_type_symtab): Update.
5440         * dtrace-probe.c (dtrace_process_dof)
5441         (dtrace_static_probe_ops::get_probes): Update.
5442         * complaints.h (struct complaint): Don't declare.
5443         (symfile_complaints): Remove.
5444         (complaint_internal): Remove "complaints" parameter.
5445         (complaint): Likewise.
5446         (clear_complaints): Likewise.
5447         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5448         (reread_symbols): Update.
5449         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5450         (dwarf2_frame_cache, decode_frame_entry): Update.
5451         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5452         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5453         (info_selectors_command): Update.
5454         * macrotab.c (macro_include, check_for_redefinition)
5455         (macro_undef): Update.
5456         * objfiles.c (filter_overlapping_sections): Update.
5457         * stabsread.c (invalid_cpp_abbrev_complaint)
5458         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5459         (define_symbol, error_type, read_type, rs6000_builtin_type)
5460         (stabs_method_name_from_physname, read_member_functions)
5461         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5462         (attach_fields_to_type, complain_about_struct_wipeout)
5463         (read_range_type, read_args, common_block_start)
5464         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5465         Update.
5466         * mdebugread.c (index_complaint, unknown_ext_complaint)
5467         (basic_type_complaint, bad_tag_guess_complaint)
5468         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5469         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5470         (parse_procedure, parse_lines)
5471         (function_outside_compilation_unit_complaint)
5472         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5473         (bad_tag_guess_complaint, reg_value_complaint): Update.
5474         * cp-support.c (demangled_name_complaint): Update.
5475         * macroscope.c (sal_macro_scope): Update.
5476         * dwarf-index-write.c (class debug_names): Update.
5477
5478 2018-05-23  Tom Tromey  <tom@tromey.com>
5479
5480         * complaints.c (clear_complaints): Remove "noisy" parameter.
5481         * complaints.h (clear_complaints): Update.
5482         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5483         (reread_symbols): Update.
5484
5485 2018-05-23  Tom Tromey  <tom@tromey.com>
5486
5487         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5488         SUBSEQUENT_MESSAGE.
5489         (vcomplaint, clear_complaints): Update.
5490         (symfile_explanations): Remove some messages.
5491
5492 2018-05-23  Tom Tromey  <tom@tromey.com>
5493
5494         * complaints.c (internal_complaint): Remove.
5495         * complaints.h (internal_complaint): Remove.
5496
5497 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5498
5499         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5500
5501 2018-05-22  Pedro Alves  <palves@redhat.com>
5502
5503         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5504         (remote_fileio_badfd, remote_fileio_return_errno)
5505         (remote_fileio_return_success, remote_fileio_func_open)
5506         (remote_fileio_func_open, remote_fileio_func_close)
5507         (remote_fileio_func_read, remote_fileio_func_write)
5508         (remote_fileio_func_lseek, remote_fileio_func_rename)
5509         (remote_fileio_func_unlink, remote_fileio_func_stat)
5510         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5511         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5512         remote_target parameter.
5513         (remote_fio_func_map) <func>: Add remote_target parameter.
5514         (do_remote_fileio_request, remote_fileio_request):
5515         * remote-fileio.h (remote_fileio_request):
5516         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5517         remote_target parameter.
5518         (remote_notif_process, handle_notification): Adjust to pass down
5519         the remote.
5520         (remote_notif_state_allocate): Add remote_target parameter.  Save
5521         it.
5522         * remote-notif.h (struct remote_target): Forward declare.
5523         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5524         remote_target parameter.
5525         (struct remote_notif_state) <remote>: New field.
5526         (remote_notif_ack, remote_notif_parse): Add remote_target
5527         parameter.
5528         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5529         remote_target parameter.
5530         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5531         (threads_listing_context, rmt_thread_action, protocol_feature)
5532         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5533         (packet_result, struct threads_listing_context, remote_state):
5534         Move definitions and declarations higher up.
5535         (remote_target) <~remote_target>: Declare.
5536         (remote_download_command_source, remote_file_put, remote_file_get)
5537         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5538         (remote_hostio_pread_vFile, remote_hostio_send_command)
5539         (remote_hostio_set_filesystem, remote_hostio_open)
5540         (remote_hostio_close, remote_hostio_unlink, remote_state)
5541         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5542         (get_memory_write_packet_size, get_memory_read_packet_size)
5543         (append_pending_thread_resumptions, remote_detach_1)
5544         (append_resumption, remote_resume_with_vcont)
5545         (add_current_inferior_and_thread, wait_ns, wait_as)
5546         (process_stop_reply, remote_notice_new_inferior)
5547         (process_initial_stop_replies, remote_add_thread)
5548         (btrace_sync_conf, remote_btrace_maybe_reopen)
5549         (remove_new_fork_children, kill_new_fork_children)
5550         (discard_pending_stop_replies, stop_reply_queue_length)
5551         (check_pending_events_prevent_wildcard_vcont)
5552         (discard_pending_stop_replies_in_queue, stop_reply)
5553         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5554         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5555         (remote_interrupt_as, remote_interrupt_ns)
5556         (remote_get_noisy_reply, remote_query_attached)
5557         (remote_add_inferior, remote_current_thread, get_current_thread)
5558         (set_thread, set_general_thread, set_continue_thread)
5559         (set_general_process, write_ptid)
5560         (remote_unpack_thread_info_response, remote_get_threadinfo)
5561         (parse_threadlist_response, remote_get_threadlist)
5562         (remote_threadlist_iterator, remote_get_threads_with_ql)
5563         (remote_get_threads_with_qxfer)
5564         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5565         (get_offsets, remote_check_symbols, remote_supported_packet)
5566         (remote_query_supported, remote_packet_size)
5567         (remote_serial_quit_handler, remote_detach_pid)
5568         (remote_vcont_probe, remote_resume_with_hc)
5569         (send_interrupt_sequence, interrupt_query)
5570         (remote_notif_get_pending_events, fetch_register_using_p)
5571         (send_g_packet, process_g_packet, fetch_registers_using_g)
5572         (store_register_using_P, store_registers_using_G)
5573         (set_remote_traceframe, check_binary_download)
5574         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5575         (remote_xfer_live_readonly_partial, remote_read_bytes)
5576         (remote_send_printf, remote_flash_write, readchar)
5577         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5578         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5579         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5580         (extended_remote_disable_randomization, extended_remote_run)
5581         (send_environment_packet, extended_remote_environment_support)
5582         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5583         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5584         (packet_command): Now methods of ...
5585         (remote_target): ... this class.
5586         (m_remote_state) <remote_target>: New field.
5587         (struct remote_state) <stop_reply_queue,
5588         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5589         fields.
5590         (remote_state::remote_state): Allocate stop_reply_queue.
5591         (remote_state): Delete global.
5592         (get_remote_state_raw): Delete.
5593         (remote_target::get_remote_state): Allocate m_remote_state on
5594         demand.
5595         (get_current_remote_target): New.
5596         (remote_ops, extended_remote_ops): Delete.
5597         (wait_forever_enabled_p, remote_async_inferior_event_token):
5598         Delete, moved to struct remote_state.
5599         (remote_target::close): Delete self.  Destruction bits split to
5600         ...
5601         (remote_target::~remote_target): ... this.
5602         (show_memory_packet_size): Adjust to use
5603         get_current_remote_target.
5604         (struct protocol_feature) <func>: Add remote_target parameter.
5605         All callers adjusted.
5606         (curr_quit_handler_target): New.
5607         (remote_serial_quit_handler): Reimplement.
5608         (remote_target::open_1): Adjust to use get_current_remote_target.
5609         Heap-allocate remote_target/extended_remote_target instances.
5610         (vcont_builder::vcont_builder): Add remote_target parameter, and
5611         save it in m_remote.  All callers adjusted.
5612         (vcont_builder::m_remote): New field.
5613         (vcont_builder::restart, vcont_builder::flush)
5614         (vcont_builder::push_action): Use it.
5615         (remote_target::commit_resume): Use it.
5616         (struct queue_iter_param) <remote>: New field.
5617         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5618         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5619         (check_pending_event_prevents_wildcard_vcont_callback)
5620         (remote_target::check_pending_events_prevent_wildcard_vcont)
5621         (remote_target::discard_pending_stop_replies)
5622         (remote_target::discard_pending_stop_replies_in_queue)
5623         (remote_target::remote_notif_remove_queued_reply): Fill in
5624         'remote' field.
5625         (remote_notif_get_pending_events): New.
5626         (remote_target::readchar, remote_target::remote_serial_write):
5627         Save/restore curr_quit_handler_target.
5628         (putpkt): New.
5629         (kill_new_fork_children): Fill in 'remote' field.
5630         (packet_command): Use get_current_remote_target, defer to
5631         remote_target method of same name.
5632         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5633         parameter, and save it in m_remote.  All callers adjusted.
5634         (scoped_remote_fd::release): Use m_remote.
5635         (scoped_remote_fd::m_remote): New field.
5636         (remote_file_put, remote_file_get, remote_file_delete): Use
5637         get_current_remote_target, defer to remote_target method of same
5638         name.
5639         (remote_btrace_reset): Add remote_state paremeter.  Update all
5640         callers.
5641         (remote_async_inferior_event_handler). Pass down 'data'.
5642         (remote_new_objfile): Use get_current_remote_target.
5643         (remote_target::vcont_r_supported): New.
5644         (set_range_stepping): Use get_current_remote_target and
5645         remote_target::vcont_r_supported.
5646         (_initialize_remote): Don't allocate 'remote_state' and
5647         'stop_reply_queue' globals.
5648         * remote.h (struct remote_target): Forward declare.
5649         (getpkt, putpkt, remote_notif_get_pending_events): Add
5650         'remote_target' parameter.
5651
5652 2018-05-22  Pedro Alves  <palves@redhat.com>
5653
5654         * remote.c (vcont_builder): Now a class.  Make all data members
5655         private.
5656         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5657         Declare methods.
5658         (vcont_builder_restart): Rename to ...
5659         (vcont_builder::restart): ... this.
5660         (vcont_builder_flush): Rename to ...
5661         (vcont_builder::flush): ... this.
5662         (vcont_builder_push_action): Rename to ...
5663         (vcont_builder::push_action): ... this.
5664         (remote_target::commit_resume): Adjust.
5665
5666 2018-05-22  Pedro Alves  <palves@redhat.com>
5667
5668         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5669         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5670         (get_fixed_memory_packet_size): New.
5671         (get_memory_packet_size): Use it.
5672         (set_memory_packet_size): Don't override the config size with
5673         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5674         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5675         Don't refer to get_memory_packet_size if not connected to a remote
5676         target.  Show "(default)" if configured size is 0.
5677
5678 2018-05-22  Pedro Alves  <palves@redhat.com>
5679
5680         * remote.c (remote_target::mourn_inferior): Move
5681         discard_pending_stop_replies call here from ...
5682         (_initialize_remote): ... here.
5683
5684 2018-05-22  Pedro Alves  <palves@redhat.com>
5685
5686         * remote.c (compare_section_command): Remove set_general_process
5687         call.
5688
5689 2018-05-22  Pedro Alves  <palves@redhat.com>
5690
5691         * remote.c (struct packet_reg, struct remote_arch_state):
5692         Move higher up in the file.
5693         (remote_state) <m_arch_states>: Store remote_arch_state values
5694         instead of remote_arch_state pointers.
5695         (remote_state::get_remote_arch_state): Adjust.
5696
5697 2018-05-22  Pedro Alves  <palves@redhat.com>
5698
5699         * remote.c: Include <unordered_map>.
5700         (remote_state): Now a class.
5701         (remote_state) <get_remote_arch_state>: Declare method.
5702         <get_remote_arch_state>: New field.
5703         (remote_arch_state) <remote_arch_state>: Declare ctor.
5704         <regs>: Now a unique_ptr.
5705         (remote_gdbarch_data_handle): Delete.
5706         (get_remote_arch_state): Delete.
5707         (remote_state::get_remote_arch_state): New.
5708         (get_remote_state): Adjust to call remote_state's
5709         get_remote_arch_state method.
5710         (init_remote_state): Delete, bits factored out to ...
5711         (remote_arch_state::remote_arch_state): ... this new method.
5712         (get_remote_packet_size, get_memory_packet_size)
5713         (process_g_packet, remote_target::fetch_registers)
5714         (remote_target::prepare_to_store, store_registers_using_G)
5715         (remote_target::store_registers, remote_target::get_trace_status):
5716         Adjust to call remote_state's method.
5717         (_initialize_remote): Remove reference to
5718         remote_gdbarch_data_handle.
5719
5720 2018-05-22  Pedro Alves  <palves@redhat.com>
5721
5722         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5723         pread>: New method declarations.
5724         (remote_target::open_1): Adjust.
5725         (readahead_cache_invalidate): Rename to ...
5726         (readahead_cache::invalidate): ... this, and adjust to be a class
5727         method.
5728         (readahead_cache_invalidate_fd): Rename to ...
5729         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5730         class method.
5731         (remote_hostio_pwrite): Adjust.
5732         (remote_hostio_pread_from_cache): Rename to ...
5733         (readahead_cache::pread): ... this, and adjust to be a class
5734         method.
5735         (remote_hostio_close): Adjust.
5736
5737 2018-05-22  Pedro Alves  <palves@redhat.com>
5738
5739         * remote.c (remote_hostio_close_cleanup): Delete.
5740         (class scoped_remote_fd): New.
5741         (remote_file_put, remote_file_get): Use it.
5742
5743 2018-05-22  Pedro Alves  <palves@redhat.com>
5744
5745         (struct vCont_action_support): Use bool and initialize all fields.
5746         (struct readahead_cache): Initialize all fields.
5747         (remote_state): Use bool and initialize all fields.
5748         (remote_state::remote_state, remote_state::~remote_state): New.
5749         (new_remote_state): Delete.
5750         (_initialize_remote): Use new to allocate remote_state.
5751
5752 2018-05-22  Pedro Alves  <palves@redhat.com>
5753             張俊芝  <zjz@zjz.name>
5754
5755         PR gdb/22973
5756         * c-exp.y: Include "c-support.h".
5757         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5758         of tolower.  Use c_ident_is_alpha to scan names.
5759         * c-lang.c: Include "c-support.h".
5760         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5761         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5762         * c-support.h: New file, with bits factored out from ...
5763         * cp-name-parser.y: ... this file.
5764         Include "c-support.h".
5765         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5766         c-support.h and renamed.
5767         (symbol_end, yylex): Adjust.
5768
5769 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5770
5771         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5772         parameter type to CORE_ADDR.
5773         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5774         parameter type in declaration to CORE_ADDR.
5775         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5776         target_auxv_search to get AT_HWCAP and use the result to get the
5777         target description.
5778         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5779         to CORE_ADDR. Remove the cast of the return value to unsigned
5780         long. Fix error predicate of target_auxv_search.
5781         (ppc_linux_nat_target::read_description): Change the type of the
5782         hwcap variable to CORE_ADDR.
5783
5784 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5785
5786         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5787         if the size of fpscr is larger than 32 bits.
5788
5789 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5790
5791         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5792         (ppc32_linux_vsxregmap): New global.
5793         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5794         regcache_supply_regset, and regcache_collect_regset.
5795         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5796         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5797         (fetch_vsx_register, store_vsx_register): Remove.
5798         (fetch_vsx_registers): Add regno parameter. Get regset using
5799         ppc_linux_vsxregset. Use regset to supply registers.
5800         (store_vsx_registers): Add regno parameter. Get regset using
5801         ppc_linux_vsxregset. Use regset to collect registers.
5802         (fetch_register): Call fetch_vsx_registers instead of
5803         fetch_vsx_register.
5804         (store_register): Call store_vsx_registers instead of
5805         store_vsx_register.
5806         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5807         new regno parameter.
5808         (store_ppc_registers): Call store_vsx_registers with -1 for the
5809         new regno parameter.
5810         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5811         (ppc_collect_vsxregset): Remove.
5812
5813 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5814
5815         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5816         offset fields.
5817         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5818         for vector register offset fields.
5819         (ppc64_fbsd_reg_offsets): Likewise.
5820         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5821         to vector register offset fields.
5822         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5823         to vector register offset fields.
5824         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5825         vector register offset fields.
5826         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5827         initializers for vector register offset fields.
5828         (rs6000_aix64_reg_offsets): Likewise.
5829         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5830         (ppc_supply_vrregset): Remove.
5831         (ppc_collect_vrregset): Remove.
5832         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5833         (ppc_linux_vrregset) : New function.
5834         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5835         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5836         (ppc32_linux_vrregset): Remove.
5837         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5838         and use result instead of ppc32_linux_vrregset.
5839         (ppc32_linux_reg_offsets): Remove initializers for vector register
5840         offset fields.
5841         (ppc64_linux_reg_offsets): Likewise.
5842         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5843         * ppc-linux-nat.c: Include regset.h.
5844         (gdb_vrregset_t): Adjust comment to account for little-endian
5845         mode.
5846         (supply_vrregset, fill_vrregset): Remove.
5847         (fetch_altivec_register, store_altivec_register): Remove.
5848         (fetch_altivec_registers): Add regno parameter. Get regset using
5849         ppc_linux_vrregset. Use regset to supply registers.
5850         (store_altivec_registers): Add regno parameter. Get regset using
5851         ppc_linux_vrregset. Use regset to collect registers.
5852         (fetch_register): Call fetch_altivec_registers instead of
5853         fetch_altivec_register.
5854         (store_register): Call store_altivec_registers instead of
5855         store_altivec_register.
5856         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5857         the new regno parameter.
5858         (store_ppc_registers): Call store_altivec_registers with -1 for
5859         the new regno parameter.
5860
5861 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5862
5863         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5864         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5865         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5866         (gdb_vrregset_t): Change array type size to
5867         PPC_LINUX_SIZEOF_VRREGSET.
5868         (gdb_vsxregset_t): Change array type size to
5869         PPC_LINUX_SIZEOF_VSXREGSET.
5870         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5871         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5872         PPC_LINUX_SIZEOF_VSXREGSET.
5873
5874 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5875
5876         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5877         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5878         nat/ppc-linux.c.
5879         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5880         ppc_linux_target_wordsize with tid.
5881         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5882         wordsize with tid.
5883         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5884         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5885         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5886         tid parameter. Remove static specifier.
5887         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5888         (ppc_linux_target_wordsize): New declaration.
5889
5890 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5891
5892         * arch/ppc-linux-common.c: New file.
5893         * arch/ppc-linux-common.h: New file.
5894         * arch/ppc-linux-tdesc.h: New file.
5895         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5896         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5897         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5898         arch/ppc-linux-tdesc.h.
5899         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5900         arch/ppc-linux-tdesc.h.
5901         (ppc_linux_nat_target::read_description): Remove target
5902         description matching code. Fill a ppc_linux_features struct and
5903         call ppc_linux_match_description with it. Move comment about ISA
5904         2.05 to ppc-linux-common.c.
5905         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5906         arch/ppc-linux-tdesc.h.
5907         (ppc_linux_core_read_description): Remove target description
5908         matching code. Fill a ppc_linux_features struct and call
5909         ppc_linux_match_description with it.
5910         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5911         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5912         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5913         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5914         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5915         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5916         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5917         (tdesc_powerpc_e500l): Remove.
5918
5919 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5920
5921         * ada-lang.c (catch_assert_command): Pass empty string instead
5922         of NULL for excep_string argument.
5923
5924 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5925
5926         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5927         the width of the requested register exceeds the width of the
5928         `ptrace' data type.
5929
5930 2018-05-21  Tom Tromey  <tom@tromey.com>
5931
5932         * printcmd.c (output_command): Remove.
5933         (output_command_const): Rename to output_command.
5934         * valprint.h (output_command): Rename from output_command_const.
5935         * tracepoint.c (trace_dump_actions): Call output_command.
5936
5937 2018-05-21  Tom Tromey  <tom@tromey.com>
5938
5939         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5940         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5941         * ada-lang.h (create_ada_exception_catchpoint): Update.
5942         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5943         std::string.
5944         (create_excep_cond_exprs, ~ada_catchpoint)
5945         (should_stop_exception, print_one_exception)
5946         (print_mention_exception, print_recreate_exception): Update.
5947         (ada_get_next_arg): Remove.
5948         (catch_ada_exception_command_split): Use std::string.  Change type
5949         of "excep_string", "cond_string".
5950         (catch_ada_exception_command): Update.
5951         (create_ada_exception_catchpoint): Change type of excep_string.
5952         (ada_exception_sal): Remove excep_string parameter.
5953         (~ada_catchpoint): Remove.
5954
5955 2018-05-21  Tom Tromey  <tom@tromey.com>
5956
5957         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5958         cleanup.
5959
5960 2018-05-21  Tom Tromey  <tom@tromey.com>
5961
5962         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5963         Return unique_xmalloc_ptr.
5964         (print_it_exception): Update.
5965
5966 2018-05-21  Tom Tromey  <tom@tromey.com>
5967
5968         * tracepoint.c (trace_dump_actions): Use std::string.
5969
5970 2018-05-21  Tom Tromey  <tom@tromey.com>
5971
5972         * symfile.c (reread_symbols): Use std::string for original_name.
5973
5974 2018-05-21  Tom Tromey  <tom@tromey.com>
5975
5976         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5977         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5978         constructor.
5979
5980 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5981
5982         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5983         instance to...
5984         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5985         * objfiles.c (get_objfile_bfd_data): Allocate
5986         objfile_per_bfd_storage with obstack_new when allocating on
5987         obstack.
5988
5989 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5990
5991         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5992         OBSTACK_ZALLOC.
5993         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5994         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5995         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5996         (add_pending): Likewise.
5997         (parse_symbol): Likewise.
5998         (parse_partial_symbols): Likewise.
5999         (psymtab_to_symtab_1): Likewise.
6000         (new_psymtab): Likewise.
6001         (elfmdebug_build_psymtabs): Likewise.
6002         * minsyms.c (terminate_minimal_symbol_table): Likewise.
6003         * objfiles.c (get_objfile_bfd_data): Likewise.
6004         (objfile_register_static_link): Likewise.
6005         * psymtab.c (allocate_psymtab): Likewise.
6006         * stabsread.c (read_member_functions): Likewise.
6007         * xcoffread.c (xcoff_end_psymtab): Likewise.
6008
6009 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6010
6011         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6012         compiler supports std::is_trivially_constructible.
6013         * common/poison.h: Include obstack.h.
6014         (IsMallocable): Define to is_trivially_constructible if the
6015         compiler supports it, define to true_type otherwise.
6016         (xobnew): New.
6017         (XOBNEW): Redefine.
6018         (xobnewvec): New.
6019         (XOBNEWVEC): Redefine.
6020         * gdb_obstack.h (obstack_zalloc): New.
6021         (OBSTACK_ZALLOC): Redefine.
6022         (obstack_calloc): New.
6023         (OBSTACK_CALLOC): Redefine.
6024         (obstack_new): New.
6025         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6026         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6027         gdbarch.c.
6028         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6029         obstack_calloc/obstack_zalloc.
6030         (gdbarch_obstack_zalloc): Remove.
6031         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6032
6033 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6034
6035         * stack.c (backtrace_command_1): Remove useless variable int i.
6036
6037 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6038
6039         * stack.c (print_frame_info): Fix comment.
6040
6041 2018-05-18  Tom Tromey  <tom@tromey.com>
6042
6043         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6044         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6045         (~dwarf2_per_objfile): Update
6046         (dwarf2_get_dwz_file): Use new.
6047         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6048         unique_ptr.
6049
6050 2018-05-18  Tom Tromey  <tom@tromey.com>
6051
6052         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6053         unique_ptr.
6054         * dwarf2read.c (struct dwp_file): Add constructor and
6055         initializers.
6056         (open_and_init_dwp_file): Return a unique_ptr.
6057         (dwarf2_per_objfile, create_dwp_hash_table)
6058         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6059         (lookup_dwo_unit_in_dwp): Update.
6060         (open_and_init_dwp_file, get_dwp_file): Update.
6061
6062 2018-05-18  Tom Tromey  <tom@tromey.com>
6063
6064         * dwarf2read.c (dwarf2_per_objfile): Update.
6065         (struct mapped_index): Add initializers.
6066         (dwarf2_read_index): Use new.
6067         (dw2_symtab_iter_init): Update.
6068         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6069         unique_ptr.
6070
6071 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6072
6073         * dwarf2read.c (mapped_index) <total_size>: Remove.
6074
6075 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6076
6077         * unittests/format_pieces-selftests.c (test_format_specifier):
6078         Add ARI comments.
6079
6080 2018-05-18  Tom Tromey  <tom@tromey.com>
6081
6082         * c-typeprint.c (maybe_print_hole): New function.
6083         (c_print_type_struct_field_offset): Update.
6084         (c_type_print_base_struct_union): Call maybe_print_hole.
6085
6086 2018-05-17  Keith Seitz  <keiths@redhat.com>
6087
6088         * breakpoint.c (build_bpstat_chain): New function, moved from
6089         bpstat_stop_status.
6090         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6091         If no stop chain is passed, call build_bpstat_chain to build it.
6092         * breakpoint.h (build_bpstat_chain): Declare.
6093         (bpstat_stop_status): Move documentation here from breakpoint.c.
6094         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6095         build the stop chain and pass it to skip_inline_frames.
6096         Pass this stop chain to bpstat_stop_status.
6097         * inline-frame.c: Include breakpoint.h.
6098         (stopped_by_user_bp_inline_frame): New function.
6099         (skip_inline_frames): Add parameter `stop_chain'.
6100         Move documention to inline-frame.h.
6101         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6102         whether the frame should be elided.
6103         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6104         Add moved documentation and update for new parameter.
6105
6106 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6107
6108         PR cli/14975
6109         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6110         unittests/format_pieces-selftests.c.
6111         * common/format.h (format_piece) <operator==>: New.
6112         (format_pieces) <operator[]>: Remove.
6113         * common/format.c (format_pieces::format_pieces): Handle \e.
6114         * unittests/format_pieces-selftests.c: New.
6115
6116 2018-05-17  Tom Tromey  <tom@tromey.com>
6117
6118         PR symtab/23010:
6119         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6120         (dw2_instantiate_symtab): Add skip_partial parameter.
6121         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6122         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6123         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6124         (dw2_expand_symtabs_matching_one)
6125         (dw2_find_pc_sect_compunit_symtab)
6126         (dw2_debug_names_lookup_symbol)
6127         (dw2_debug_names_expand_symtabs_for_function): Update.
6128         (init_cutu_and_read_dies): Add skip_partial parameter.
6129         (process_psymtab_comp_unit, build_type_psymtabs_1)
6130         (process_skeletonless_type_unit, load_partial_comp_unit)
6131         (psymtab_to_symtab_1): Update.
6132         (load_full_comp_unit): Add skip_partial parameter.
6133         (process_imported_unit_die, dwarf2_read_addr_index)
6134         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6135         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6136         (read_signatured_type): Update.
6137
6138 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6139
6140         * value.c (release_value): Remove unused variable.
6141         (record_latest_value): Likewise.
6142         (access_value_history): Likewise.
6143         (preserve_values): Likewise.
6144
6145 2018-05-17  Tom Tromey  <tom@tromey.com>
6146
6147         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6148         Initialize.
6149
6150 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6151
6152         PR gdb/22286
6153         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6154         Also handle registers whose width is not a multiple of
6155         PTRACE_TYPE_RET.
6156         (linux_nat_trad_target::store_register): Likewise.
6157
6158 2018-05-16  Tom Tromey  <tom@tromey.com>
6159
6160         * gdbcore.h (core_bfd): Redefine.
6161         * corelow.c (core_target::close): Update.
6162         (core_target_open): Update.
6163         * progspace.h (struct program_space) <cbfd>: Now a
6164         gdb_bfd_ref_ptr.
6165
6166 2018-05-16  Tom Tromey  <tom@tromey.com>
6167
6168         PR cli/19551:
6169         * symfile-add-flags.h (enum symfile_add_flags)
6170         <SYMFILE_NOT_FILENAME>: New constant.
6171         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6172         objfile name from BFD.
6173         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6174         * minidebug.c (find_separate_debug_file_in_section): Put
6175         ".gnu_debugdata" into BFD's file name.
6176
6177 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6178
6179         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6180         Remove.
6181
6182 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6183
6184         PR binutils/21446
6185         * aarch64-tdep.c (aarch64_analyze_prologue,
6186         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6187         Indicate not interested in errors.
6188
6189 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6190
6191         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6192         Supply the MIPS_ZERO_REGNUM register.
6193
6194 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6195
6196         * mips-tdep.c (mask_address_var): Make variable static.
6197
6198 2018-05-14  Tom Tromey  <tom@tromey.com>
6199
6200         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6201
6202 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6203
6204         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6205         FXSAVE_ADDR for the mxcsr register.
6206
6207 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6208
6209         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6210
6211 2018-05-11  Pedro Alves  <palves@redhat.com>
6212
6213         * corelow.c (core_target) <core_target>: No longer inline.
6214         Initialize m_core_gdbarch, m_core_vec and build the section table
6215         here.
6216         <~core_target>: New.
6217         <core_gdbarch, get_core_register_section>: New methods.
6218         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6219         factored out from ...
6220         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6221         (core_ops): Delete.
6222         (sniff_core_bfd): Add gdbarch parameter.
6223         (core_close): Delete, merged into ...
6224         (core_target::close): ... here.  Delete self.
6225         (core_close_cleanup): Delete.
6226         (core_target_open): Allocate a core_target on the heap.  Use a
6227         unique_ptr instead of a cleanup.  Bits moved into the core_target
6228         ctor.  Adjust to use core_target methods instead of globals.
6229         (get_core_register_section): Rename to ...
6230         (core_target::get_core_register_section): ... this and adjust.
6231         (struct get_core_registers_cb_data): New.
6232         (get_core_registers_cb): Use it.  Use bool.
6233         (core_target::fetch_registers, core_target::files_info)
6234         (core_target::xfer_partial, core_target::read_description)
6235         (core_target::pid_to, core_target::thread_name): Adjust to
6236         reference class fields instead of globals.
6237         * target.h (struct target_ops_deleter, target_ops_up): New.
6238
6239 2018-05-11  Pedro Alves  <palves@redhat.com>
6240
6241         * corefile.c (core_file_command): Move to corelow.c.
6242         * corelow.c (the_core_target): Delete.
6243         (core_file_command): Moved from corefile.c.  Check exec_bfd
6244         instead of the_core_target.  Use target_detach instead of calling
6245         into the_core_target directly.
6246         (maybe_say_no_core_file_now): New.
6247         (core_target::detach): Use it.
6248         (_initialize_corelow): Remove references to the_core_target.
6249         * gdbcore.h (the_core_target): Delete.
6250
6251 2018-05-11  Tom Tromey  <tromey@redhat.com>
6252             Pedro Alves  <palves@redhat.com>
6253
6254         * corefile.c (core_bfd): Remove.
6255         * gdbcore.h (core_bfd): Now a macro.
6256         * progspace.h (struct program_space) <cbfd>: New field.
6257
6258 2018-05-11  Tom Tromey  <tom@tromey.com>
6259
6260         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6261         gdb::def_vector.
6262
6263 2018-05-10  Tom Tromey  <tom@tromey.com>
6264
6265         * configure: Rebuild.
6266         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6267
6268 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6269
6270         PR server/23158:
6271         * regformats/regdat.sh: Adjust script, following the addition
6272         of the new expedite_regs parameter to init_target_desc.
6273
6274 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6275     
6276         PR gdb/23127
6277         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6278         set_gdbarch_significant_addr_bit.
6279         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6280         set_gdbarch_significant_addr_bit.
6281         * utils.c (address_significant): Update to sign extend addr.
6282
6283 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6284
6285         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6286         (xtensa_linux_init_abi): Limit tdep->num_regs by
6287         tdep->num_nopriv_regs.
6288         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6289         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6290         not initialized.
6291
6292 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6293
6294         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6295
6296 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6297
6298         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6299         (I387_MXCSR_INIT_VAL): New constant.
6300         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6301         buffer if it was supplied by the inferior.
6302         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6303         (i387_xsave_get_clear_bv): New function.
6304         (i387_supply_xsave): Only read x87 control registers from the
6305         xsave buffer if the feature is enabled, and the state will have
6306         been written, otherwise, provide a suitable default.
6307         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6308         including x87 control registers.  Update control registers if they
6309         have changed from the default value, and mark features as enabled
6310         as required.
6311         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6312
6313 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6314
6315         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6316
6317 2018-05-07  Tom Tromey  <tom@tromey.com>
6318
6319         * configure: Rebuild.
6320         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6321
6322 2018-05-07  Tom Tromey  <tom@tromey.com>
6323
6324         PR tdep/20362:
6325         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6326         bit.  Use correct value for VDIV.
6327
6328 2018-05-04  Tom Tromey  <tom@tromey.com>
6329
6330         * configure: Rebuild.
6331         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6332
6333 2018-05-04  Tom Tromey  <tom@tromey.com>
6334
6335         * linux-record.c (record_linux_system_call) <case
6336         RECORD_SYS_RECVFROM>: Add "break".
6337
6338 2018-05-04  Tom Tromey  <tom@tromey.com>
6339
6340         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6341         Add missing "break".
6342         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6343         Add missing "break".
6344
6345 2018-05-04  Tom Tromey  <tom@tromey.com>
6346
6347         * rs6000-tdep.c (ppc_process_record_op4)
6348         (ppc_process_record_op63): Add fall-through comment.
6349
6350 2018-05-04  Tom Tromey  <tom@tromey.com>
6351
6352         * i386-tdep.c (i386_process_record): Add fall-through comment.
6353
6354 2018-05-04  Tom Tromey  <tom@tromey.com>
6355
6356         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6357         comment.
6358
6359 2018-05-04  Tom Tromey  <tom@tromey.com>
6360
6361         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6362         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6363         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6364         comment.
6365         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6366         comment.
6367         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6368         comment.
6369
6370 2018-05-04  Tom Tromey  <tom@tromey.com>
6371
6372         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6373
6374 2018-05-04  Tom Tromey  <tom@tromey.com>
6375
6376         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6377         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6378         * symfile.c (section_is_mapped): Fix fall-through comment.
6379         * stabsread.c (define_symbol, read_member_functions): Fix
6380         fall-through comment.
6381         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6382         comment.
6383         * remote.c (remote_wait_as): Fix fall-through comment.
6384         * p-exp.y (yylex): Fix fall-through comment.
6385         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6386         comment.
6387         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6388         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6389         * jv-exp.y (yylex): Fix fall-through comment.
6390         * go-exp.y (lex_one_token): Fix fall-through comment.
6391         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6392         fall-through comment.
6393         * f-exp.y (yylex): Fix fall-through comment.
6394         * dwarf2read.c (process_die): Fix fall-through comments.
6395         * dbxread.c (process_one_symbol): Fix fall-through comment.
6396         * d-exp.y (lex_one_token): Fix fall-through comment.
6397         * cp-name-parser.y (yylex): Fix fall-through comment.
6398         * coffread.c (coff_symtab_read): Fix fall-through comment.
6399         * c-exp.y (lex_one_token): Fix fall-through comment.
6400         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6401         comment.
6402         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6403         comment.
6404
6405 2018-05-04  Tom Tromey  <tom@tromey.com>
6406
6407         PR python/22730:
6408         * NEWS: Mention gdb.execute change.
6409         * gdbcmd.h (execute_control_command): Don't declare.
6410         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6411         execute_control_commands, execute_control_commands_to_string.
6412         * cli/cli-script.h (execute_control_commands)
6413         (execute_control_commands_to_string): Declare.
6414         (execute_control_command): Add from_tty parameter.
6415         * cli/cli-script.c (execute_control_commands)
6416         (execute_control_commands_to_string): New functions.
6417         (execute_user_command): Use execute_control_commands.
6418         (execute_control_command_1): Add "from_tty" parameter.  Update.
6419         (execute_control_command): Likewise.
6420
6421 2018-05-04  Tom Tromey  <tom@tromey.com>
6422
6423         PR python/22731:
6424         * NEWS: Mention that breakpoint commands are writable.
6425         * python/py-breakpoint.c (bppy_set_commands): New function.
6426         (breakpoint_object_getset) <"commands">: Use it.
6427
6428 2018-05-04  Tom Tromey  <tom@tromey.com>
6429
6430         * tracepoint.c (actions_command): Update.
6431         * mi/mi-cmd-break.c (mi_command_line_array)
6432         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6433         (mi_read_next_line): Remove.
6434         (mi_cmd_break_commands): Update.
6435         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6436         function_view.
6437         * cli/cli-script.c (get_command_line): Update.
6438         (process_next_line): Use function_view.  Constify.
6439         (recurse_read_control_structure, read_command_lines)
6440         (read_command_lines_1): Change argument types to function_view.
6441         (do_define_command, document_command): Update.
6442         * breakpoint.h (check_tracepoint_command): Don't declare.
6443         * breakpoint.c (check_tracepoint_command): Remove.
6444         (commands_command_1, create_tracepoint_from_upload): Update.
6445
6446 2018-05-04  Tom Tromey  <tom@tromey.com>
6447
6448         PR gdb/11750:
6449         * cli/cli-script.h (enum command_control_type) <define_control>:
6450         New constant.
6451         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6452         (build_command_line, execute_control_command_1)
6453         (process_next_line): Likewise.
6454         (do_define_command): New function, extracted from define_command.
6455         (define_command): Use it.
6456
6457 2018-05-04  Tom Tromey  <tom@tromey.com>
6458
6459         * tracepoint.c (actions_command): Update.
6460         * cli/cli-script.h (read_command_lines): Update.
6461         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6462         (MAX_TMPBUF): Remove define.
6463         (define_command): Use string_printf.
6464         (document_command): Likewise.
6465         * breakpoint.c (commands_command_1): Update.
6466
6467 2018-05-04  Tom Tromey  <tom@tromey.com>
6468
6469         * top.c (execute_command): Update.
6470         * cli/cli-script.h (print_command_lines): Now varargs.
6471         * cli/cli-script.c (print_command_lines): Now varargs.
6472         (execute_control_command_1) <case while_control, case if_control>:
6473         Update.
6474
6475 2018-05-04  Tom Tromey  <tom@tromey.com>
6476
6477         * tracepoint.c (all_tracepoint_actions): Rename from
6478         all_tracepoint_actions_and_cleanup.  Change return type.
6479         (actions_command, encode_actions_1, encode_actions)
6480         (trace_dump_actions, tdump_command): Update.
6481         * remote.c (remote_download_command_source): Update.
6482         * python/python.c (gdbpy_eval_from_control_command)
6483         (python_command, python_interactive_command): Update.
6484         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6485         * guile/guile.c (guile_command)
6486         (gdbscm_eval_from_control_command, guile_command): Update.
6487         * compile/compile.c (compile_code_command)
6488         (compile_print_command, compile_to_object): Update.
6489         * cli/cli-script.h (struct command_lines_deleter): New.
6490         (counted_command_line): New typedef.
6491         (struct command_line): Add constructor, destructor.
6492         <body_list>: Remove.
6493         <body_list_0, body_list_1>: New members.
6494         (command_line_up): Remove typedef.
6495         (read_command_lines, read_command_lines_1, get_command_line):
6496         Update.
6497         (copy_command_lines): Don't declare.
6498         * cli/cli-script.c (build_command_line): Use "new".
6499         (get_command_line): Return counted_command_line.
6500         (print_command_lines, execute_user_command)
6501         (execute_control_command_1, while_command, if_command): Update.
6502         (realloc_body_list): Remove.
6503         (process_next_line, recurse_read_control_structure): Update.
6504         (read_command_lines, read_command_lines_1): Return counted_command_line.
6505         (free_command_lines): Use "delete".
6506         (copy_command_lines): Remove.
6507         (define_command, document_command, show_user_1): Update.
6508         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6509         a counted_command_line.
6510         * breakpoint.h (counted_command_line): Remove typedef.
6511         (breakpoint_set_commands): Update.
6512         * breakpoint.c (check_no_tracepoint_commands)
6513         (validate_commands_for_breakpoint): Update.
6514         (breakpoint_set_commands): Change commands to be a
6515         counted_command_line.
6516         (commands_command_1, update_dprintf_command_list)
6517         (create_tracepoint_from_upload): Update.
6518
6519 2018-05-04  Tom Tromey  <tom@tromey.com>
6520
6521         * cli/cli-decode.h (cmd_list_element): New constructor.
6522         (~cmd_list_element): New destructor.
6523         (struct cmd_list_element): Add initializers.
6524         * cli/cli-decode.c (do_add_cmd): Use "new".
6525         (delete_cmd): Use "delete".
6526
6527 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6528             Pedro Alves <palves@redhat.com>
6529
6530         PR breakpoints/19806 and support for PR external/20207.
6531         * NEWS: Mention Aarch64 watchpoint improvements.
6532         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6533         watchpoints and PR external/20207 watchpoints.
6534         * nat/aarch64-linux-hw-point.c
6535         (kernel_supports_any_contiguous_range): New.
6536         (aarch64_watchpoint_offset): New.
6537         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6538         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6539         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6540         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6541         next_addr_orig_p.  Support PR external/20207 watchpoints.
6542         (aarch64_downgrade_regs): New.
6543         (aarch64_dr_state_insert_one_point): New parameters offset and
6544         addr_orig.
6545         (aarch64_dr_state_remove_one_point): Likewise.
6546         (aarch64_handle_breakpoint): Update caller.
6547         (aarch64_handle_aligned_watchpoint): Likewise.
6548         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6549         aligned_offset.
6550         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6551         aarch64_downgrade_regs.
6552         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6553         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6554         (DR_CONTROL_MASK): ... this.
6555         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6556         (unsigned int aarch64_watchpoint_offset): New prototype.
6557         (aarch64_linux_set_debug_regs): Remove const from state.
6558         * utils.c (align_up, align_down): Move to ...
6559         * common/common-utils.c (align_up, align_down): ... here.
6560         * utils.h (align_up, align_down): Move to ...
6561         * common/common-utils.h (align_up, align_down): ... here.
6562
6563 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6564
6565         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6566         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6567         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6568         Re-implement to match the ABI as summarized in GCC's
6569         gcc/config/sparc/sparc.c.  All callers updated.
6570         (sparc32_store_arguments): Remove assertion.
6571
6572 2018-05-04  Tom Tromey  <tom@tromey.com>
6573
6574         * printcmd.c: Don't include tui.h.
6575         (decode_format): Use skip_spaces.
6576
6577 2018-05-04  Tom Tromey  <tom@tromey.com>
6578
6579         PR gdb/22619:
6580         * printcmd.c (last_count): New global.
6581         (x_command): Use saved count when repeating.
6582
6583 2018-05-04  Tom Tromey  <tom@tromey.com>
6584
6585         * nto-procfs.c (do_closedir_cleanup): Remove.
6586         (procfs_pidlist): Use gdb_dir_up.
6587         * procfs.c (do_closedir_cleanup): Remove.
6588         (proc_update_threads): Use gdb_dir_up.
6589         * common/filestuff.h (struct gdb_dir_deleter): New.
6590         (gdb_dir_up): New typedef.
6591
6592 2018-05-04  Tom Tromey  <tom@tromey.com>
6593
6594         * ada-lang.c (print_mention_exception): Use std::string.
6595
6596 2018-05-04  Tom Tromey  <tom@tromey.com>
6597
6598         * ada-lang.c (create_excep_cond_exprs): Update.
6599         (ada_exception_catchpoint_cond_string): Use std::string.
6600
6601 2018-05-04  Tom Tromey  <tom@tromey.com>
6602
6603         * ada-lang.c (xget_renaming_scope): Return std::string.
6604         (old_renaming_is_invisible): Update.
6605
6606 2018-05-04  Tom Tromey  <tom@tromey.com>
6607
6608         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6609         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6610
6611 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6612
6613         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6614
6615 2018-05-04  Tom Tromey  <tom@tromey.com>
6616
6617         * remote.c (remote_query_supported_append): Change type.
6618         (remote_check_symbols): Update.
6619
6620 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6621
6622         PR gdb/11420
6623         * configure.ac: Prepend libpython.
6624         * python/python-config.py: Likewise.
6625         * configure: Regenerate.
6626
6627 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6628
6629         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6630
6631 2018-05-03  Pedro Alves  <palves@redhat.com>
6632
6633         * s390-linux-nat.c
6634         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6635         override.  Write 'true' instead of '1'.
6636         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6637         declaration.
6638
6639 2018-05-02  Pedro Alves  <palves@redhat.com>
6640
6641         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6642         add_inf_child_target.
6643         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6644         add_inf_child_target.
6645         * aix-thread.c (aix_thread_target_info): New.
6646         (aix_thread_target) <shortname, longname, doc>: Delete.
6647         <info>: New.
6648         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6649         add_inf_child_target.
6650         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6651         add_inf_child_target.
6652         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6653         add_inf_child_target.
6654         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6655         add_inf_child_target.
6656         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6657         add_inf_child_target.
6658         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6659         add_inf_child_target.
6660         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6661         add_inf_child_target.
6662         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6663         add_inf_child_target.
6664         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6665         add_inf_child_target.
6666         * bfd-target.c (target_bfd_target_info): New.
6667         (target_bfd) <shortname, longname, doc>: Delete.
6668         <info>: New.
6669         * bsd-kvm.c (bsd_kvm_target_info): New.
6670         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6671         <info>: New.
6672         (bsd_kvm_target::open): Rename to ...
6673         (bsd_kvm_target_open): ... this.  Adjust.
6674         * bsd-uthread.c (bsd_uthread_target_info): New.
6675         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6676         <info>: New.
6677         * corefile.c (core_file_command): Adjust.
6678         * corelow.c (core_target_info): New.
6679         (core_target) <shortname, longname, doc>: Delete.
6680         <info>: New.
6681         (core_target::open): Rename to ...
6682         (core_target_open): ... this.  Adjust.
6683         * ctf.c (ctf_target_info): New.
6684         (ctf_target) <shortname, longname, doc>: Delete.
6685         <info>: New.
6686         (ctf_target::open): Rename to ...
6687         (ctf_target_open): ... this.
6688         (_initialize_ctf): Adjust.
6689         * exec.c (exec_target_info): New.
6690         (exec_target) <shortname, longname, doc>: Delete.
6691         <info>: New.
6692         (exec_target::open): Rename to ...
6693         (exec_target_open): ... this.
6694         * gdbcore.h (core_target_open): Declare.
6695         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6696         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6697         add_inf_child_target.
6698         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6699         add_inf_child_target.
6700         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6701         add_inf_child_target.
6702         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6703         add_inf_child_target.
6704         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6705         add_inf_child_target.
6706         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6707         add_inf_child_target.
6708         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6709         add_inf_child_target.
6710         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6711         add_inf_child_target.
6712         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6713         add_inf_child_target.
6714         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6715         add_inf_child_target.
6716         * inf-child.c (inf_child_target_info): New.
6717         (inf_child_target::info): New.
6718         (inf_child_open_target): Remove 'target' parameter.  Use
6719         get_native_target instead.
6720         (inf_child_target::open): Delete.
6721         (add_inf_child_target): New.
6722         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6723         Delete.
6724         <info>: New.
6725         (add_inf_child_target): Declare.
6726         (inf_child_open_target): Declare.
6727         * linux-thread-db.c (thread_db_target_info): New.
6728         (thread_db_target) <shortname, longname, doc>: Delete.
6729         <info>: New.
6730         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6731         add_inf_child_target.
6732         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6733         add_inf_child_target.
6734         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6735         add_inf_child_target.
6736         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6737         add_inf_child_target.
6738         * make-target-delegates (print_class): Adjust.
6739         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6740         add_inf_child_target.
6741         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6742         add_inf_child_target.
6743         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6744         add_inf_child_target.
6745         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6746         add_inf_child_target.
6747         * nto-procfs.c (nto_native_target_info): New.
6748         (nto_procfs_target_native) <shortname, longname, doc>:
6749         Delete.
6750         <info>: New.
6751         (nto_procfs_target_info): New.
6752         (nto_procfs_target_procfs) <shortname, longname, doc>:
6753         Delete.
6754         <info>: New.
6755         (init_procfs_targets): Adjust.
6756         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6757         add_inf_child_target.
6758         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6759         add_inf_child_target.
6760         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6761         add_inf_child_target.
6762         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6763         add_inf_child_target.
6764         * ravenscar-thread.c (ravenscar_target_info): New.
6765         (ravenscar_thread_target) <shortname, longname, doc>:
6766         Delete.
6767         <info>: New.
6768         * record-btrace.c (record_btrace_target_info):
6769         (record_btrace_target) <shortname, longname, doc>: Delete.
6770         <info>: New.
6771         (record_btrace_target::open): Rename to ...
6772         (record_btrace_target_open): ... this.  Adjust.
6773         * record-full.c (record_longname, record_doc): New.
6774         (record_full_base_target) <shortname, longname, doc>: Delete.
6775         <info>: New.
6776         (record_full_target_info): New.
6777         (record_full_target): <shortname>: Delete.
6778         <info>: New.
6779         (record_full_core_open_1, record_full_open_1): Update comments.
6780         (record_full_base_target::open): Rename to ...
6781         (record_full_open): ... this.
6782         (cmd_record_full_restore): Update.
6783         (_initialize_record_full): Update.
6784         * remote-sim.c (remote_sim_target_info): New.
6785         (gdbsim_target) <shortname, longname, doc>: Delete.
6786         <info>: New.
6787         (gdbsim_target::open): Rename to ...
6788         (gdbsim_target_open): ... this.
6789         (_initialize_remote_sim): Adjust.
6790         * remote.c (remote_doc): New.
6791         (remote_target_info): New.
6792         (remote_target) <shortname, longname, doc>: Delete.
6793         <info>: New.
6794         (extended_remote_target_info): New.
6795         (extended_remote_target) <shortname, longname, doc>: Delete.
6796         <info>: New.
6797         (remote_target::open_1): Make static.  Adjust.
6798         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6799         * s390-linux-nat.c (_initialize_s390_nat): Use
6800         add_inf_child_target.
6801         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6802         add_inf_child_target.
6803         * sol-thread.c (thread_db_target_info): New.
6804         (sol_thread_target) <shortname, longname, doc>: Delete.
6805         <info>: New.
6806         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6807         add_inf_child_target.
6808         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6809         add_inf_child_target.
6810         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6811         add_inf_child_target.
6812         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6813         add_inf_child_target.
6814         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6815         add_inf_child_target.
6816         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6817         add_inf_child_target.
6818         * spu-linux-nat.c (_initialize_spu_nat): Use
6819         add_inf_child_target.
6820         * spu-multiarch.c (spu_multiarch_target_info): New.
6821         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6822         <info>: New.
6823         * target-delegates.c: Regenerate.
6824         * target.c: Include <unordered_map>.
6825         (target_ops_p): Delete.
6826         (DEF_VEC_P(target_ops_p)): Delete.
6827         (target_factories): New.
6828         (test_target_info): New.
6829         (test_target_ops::info): New.
6830         (open_target): Adjust to use target_factories.
6831         (add_target_with_completer): Rename to ...
6832         (add_target): ... this.  Change prototype.  Register target_info
6833         and open callback in target_factories.  Register target_info in
6834         command context instead of target_ops.
6835         (add_target): Delete old implementation.
6836         (add_deprecated_target_alias): Change prototype.  Adjust.
6837         (the_native_target): New.
6838         (set_native_target, get_native_target): New.
6839         (find_default_run_target): Use the_native_target.
6840         (find_attach_target, find_run_target): Simplify.
6841         (target_ops::open): Delete.
6842         (dummy_target_info): New.
6843         (dummy_target::shortname, dummy_target::longname)
6844         (dummy_target::doc): Delete.
6845         (dummy_target::info): New.
6846         (debug_target::shortname, debug_target::longname)
6847         (debug_target::doc): Delete.
6848         (debug_target::info): New.
6849         * target.h (struct target_info): New.
6850         (target_ops::~target_ops): Add comment.
6851         (target_ops::info): New.
6852         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6853         longer virtual.  Implement in terms of target_info.
6854         (set_native_target, get_native_target): Declare.
6855         (target_open_ftype): New.
6856         (add_target, add_target_with_completer)
6857         (add_deprecated_target_alias): Change prototype.
6858         (test_target) <shortname, longname, doc>: Delete.
6859         <info>: New.
6860         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6861         add_inf_child_target.
6862         * tracefile-tfile.c (tfile_target_info): New.
6863         (tfile_target) <shortname, longname, doc>: Delete.
6864         <info>: New.
6865         (tfile_target::open): Rename to ...
6866         (tfile_target_open): ... this.
6867         (_initialize_tracefile_tfile): Adjust.
6868         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6869         add_inf_child_target.
6870         * windows-nat.c (_initialize_windows_nat): Use
6871         add_inf_child_target.
6872         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6873         add_inf_child_target.
6874
6875 2018-05-02  Pedro Alves  <palves@redhat.com>
6876
6877         * linux-nat.h (linux_nat_target) <low_new_thread,
6878         low_delete_thread, low_new_fork, low_forget_process,
6879         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6880         New virtual methods.
6881         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6882         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6883         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6884         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6885         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6886         Delete.
6887         * linux-fork.c (delete_fork): Adjust to call low method.
6888         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6889         (linux_nat_new_fork, linux_nat_forget_process_hook)
6890         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6891         (linux_nat_status_is_event):
6892         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6893         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6894         to call low method.
6895         (sigtrap_is_event): Rename to ...
6896         (linux_nat_target::low_status_is_event): ... this.
6897         (linux_nat_set_status_is_event): Delete.
6898         (save_stop_reason, linux_nat_wait_1)
6899         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6900         low methods.
6901         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6902         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6903         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6904         (linux_nat_set_prepare_to_resume): Delete.
6905         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6906         low virtual methods.
6907         * amd64-linux-nat.c: Likewise.
6908         * arm-linux-nat.c: Likewise.
6909         * i386-linux-nat.c: Likewise.
6910         * ia64-linux-nat.c: Likewise.
6911         * mips-linux-nat.c: Likewise.
6912         * ppc-linux-nat.c: Likewise.
6913         * s390-linux-nat.c: Likewise.
6914         * sparc64-linux-nat.c: Likewise.
6915         * x86-linux-nat.c: Likewise.
6916         * x86-linux-nat.h: Include "nat/x86-linux.h".
6917         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6918         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6919         Override methods.
6920
6921 2018-05-02  Pedro Alves  <palves@redhat.com>
6922
6923         * target.h (target_ops)
6924         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6925         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6926         stopped_by_watchpoint, have_continuable_watchpoint,
6927         stopped_data_address, watchpoint_addr_within_range,
6928         can_accel_watchpoint_condition, can_run, thread_alive,
6929         has_all_memory, has_memory, has_stack, has_registers,
6930         has_execution, can_async_p, is_async_p, supports_non_stop,
6931         always_non_stop_p, can_execute_reverse, supports_multi_process,
6932         supports_enable_disable_tracepoint,
6933         supports_disable_randomization, supports_string_tracing,
6934         supports_evaluation_of_breakpoint_conditions,
6935         can_run_breakpoint_commands, filesystem_is_local,
6936         can_download_tracepoint, get_trace_state_variable_value,
6937         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6938         record_is_replaying, record_will_replay,
6939         augmented_libraries_svr4_read>: Adjust to return bool.
6940         * aarch64-linux-nat.c: All implementations adjusted.
6941         * aix-thread.c: All implementations adjusted.
6942         * arm-linux-nat.c: All implementations adjusted.
6943         * breakpoint.c: All implementations adjusted.
6944         * bsd-kvm.c: All implementations adjusted.
6945         * bsd-uthread.c: All implementations adjusted.
6946         * corelow.c: All implementations adjusted.
6947         * ctf.c: All implementations adjusted.
6948         * darwin-nat.c: All implementations adjusted.
6949         * darwin-nat.h: All implementations adjusted.
6950         * exec.c: All implementations adjusted.
6951         * fbsd-nat.c: All implementations adjusted.
6952         * fbsd-nat.h: All implementations adjusted.
6953         * gnu-nat.c: All implementations adjusted.
6954         * gnu-nat.h: All implementations adjusted.
6955         * go32-nat.c: All implementations adjusted.
6956         * ia64-linux-nat.c: All implementations adjusted.
6957         * inf-child.c: All implementations adjusted.
6958         * inf-child.h: All implementations adjusted.
6959         * inf-ptrace.c: All implementations adjusted.
6960         * inf-ptrace.h: All implementations adjusted.
6961         * linux-nat.c: All implementations adjusted.
6962         * linux-nat.h: All implementations adjusted.
6963         * mips-linux-nat.c: All implementations adjusted.
6964         * nto-procfs.c: All implementations adjusted.
6965         * ppc-linux-nat.c: All implementations adjusted.
6966         * procfs.c: All implementations adjusted.
6967         * ravenscar-thread.c: All implementations adjusted.
6968         * record-btrace.c: All implementations adjusted.
6969         * record-full.c: All implementations adjusted.
6970         * remote-sim.c: All implementations adjusted.
6971         * remote.c: All implementations adjusted.
6972         * s390-linux-nat.c: All implementations adjusted.
6973         * sol-thread.c: All implementations adjusted.
6974         * spu-multiarch.c: All implementations adjusted.
6975         * target-delegates.c: All implementations adjusted.
6976         * target.c: All implementations adjusted.
6977         * target.h: All implementations adjusted.
6978         * tracefile-tfile.c: All implementations adjusted.
6979         * tracefile.c: All implementations adjusted.
6980         * tracefile.h: All implementations adjusted.
6981         * windows-nat.c: All implementations adjusted.
6982         * x86-linux-nat.h: All implementations adjusted.
6983         * x86-nat.h: All implementations adjusted.
6984
6985 2018-05-02  Pedro Alves  <palves@redhat.com>
6986
6987         * make-target-delegates (scan_target_h): Don't trim lines here.
6988         Replace sequences of tabs and/or whitespace with a single
6989         whitespace.
6990         (top level, parsing methods): Trim each line before processing it
6991         here.
6992
6993 2018-05-02  Pedro Alves  <palves@redhat.com>
6994             John Baldwin  <jhb@freebsd.org>
6995
6996         * target.h (enum strata) <debug_stratum>: New.
6997         (struct target_ops) <all delegation methods>: Replace by C++
6998         virtual methods, and drop "to_" prefix.  All references updated
6999         throughout.
7000         <to_shortname, to_longname, to_doc, to_data,
7001         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7002         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7003         virtual methods.  All references updated throughout.
7004         <can_attach, supports_terminal_ours, can_create_inferior,
7005         get_thread_control_capabilities, attach_no_wait>: New
7006         virtual methods.
7007         <insert_breakpoint, remove_breakpoint>: Now
7008         TARGET_DEFAULT_NORETURN methods.
7009         <info_proc>: Now returns bool.
7010         <to_magic>: Delete.
7011         (OPS_MAGIC): Delete.
7012         (current_target): Delete.  All references replaced by references
7013         to ...
7014         (target_stack): ... this.  New.
7015         (target_shortname, target_longname): Adjust.
7016         (target_can_run): Now a function declaration.
7017         (default_child_has_all_memory, default_child_has_memory)
7018         (default_child_has_stack, default_child_has_registers)
7019         (default_child_has_execution): Remove target_ops parameter.
7020         (complete_target_initialization): Delete.
7021         (memory_breakpoint_target): New template class.
7022         (test_target_ops): Refactor as a C++ class with virtual methods.
7023         * make-target-delegates (NAME_PART): Tighten.
7024         (POINTER_PART, CP_SYMBOL): New.
7025         (SIMPLE_RETURN_PART): Reimplement.
7026         (VEC_RETURN_PART): Expect less.
7027         (RETURN_PART, VIRTUAL_PART): New.
7028         (METHOD): Adjust to C++ virtual methods.
7029         (scan_target_h): Remove reference to C99.
7030         (dname): Output "target_ops::" prefix.
7031         (write_function_header): Adjust to output a C++ class method.
7032         (write_declaration): New.
7033         (write_delegator): Adjust to output a C++ class method.
7034         (tdname): Output "dummy_target::" prefix.
7035         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7036         method.
7037         (tdefault_names, debug_names): Delete.
7038         (return_types, tdefaults, styles, argtypes_array): New.
7039         (top level): All methods are delegators.
7040         (print_class): New.
7041         (top level): Print dummy_target and debug_target classes.
7042         * target-delegates.c: Regenerate.
7043         * target-debug.h (target_debug_print_enum_info_proc_what)
7044         (target_debug_print_thread_control_capabilities)
7045         (target_debug_print_thread_info_p): New.
7046         * target.c (dummy_target): Delete.
7047         (the_dummy_target, the_debug_target): New.
7048         (target_stack): Now extern.
7049         (set_targetdebug): Push/unpush debug target.
7050         (default_child_has_all_memory, default_child_has_memory)
7051         (default_child_has_stack, default_child_has_registers)
7052         (default_child_has_execution): Remove target_ops parameter.
7053         (complete_target_initialization): Delete.
7054         (add_target_with_completer): No longer call
7055         complete_target_initialization.
7056         (target_supports_terminal_ours): Use regular delegation.
7057         (update_current_target): Delete.
7058         (push_target): No longer check magic number.  Don't call
7059         update_current_target.
7060         (unpush_target): Don't call update_current_target.
7061         (target_is_pushed): No longer check magic number.
7062         (target_require_runnable): Skip for all stratums over
7063         process_stratum.
7064         (target_ops::info_proc): New.
7065         (target_info_proc): Use find_target_at and
7066         find_default_run_target.
7067         (target_supports_disable_randomization): Use regular delegation.
7068         (target_get_osdata): Use find_target_at.
7069         (target_ops::open, target_ops::close, target_ops::can_attach)
7070         (target_ops::attach, target_ops::can_create_inferior)
7071         (target_ops::create_inferior, target_ops::can_run)
7072         (target_can_run): New.
7073         (default_fileio_target): Use regular delegation.
7074         (target_ops::fileio_open, target_ops::fileio_pwrite)
7075         (target_ops::fileio_pread, target_ops::fileio_fstat)
7076         (target_ops::fileio_close, target_ops::fileio_unlink)
7077         (target_ops::fileio_readlink): New.
7078         (target_fileio_open_1, target_fileio_unlink)
7079         (target_fileio_readlink): Always call the target method.  Handle
7080         FILEIO_ENOSYS.
7081         (return_zero, return_zero_has_execution): Delete.
7082         (init_dummy_target): Delete.
7083         (dummy_target::dummy_target, dummy_target::shortname)
7084         (dummy_target::longname, dummy_target::doc)
7085         (debug_target::debug_target, debug_target::shortname)
7086         (debug_target::longname, debug_target::doc): New.
7087         (target_supports_delete_record): Use regular delegation.
7088         (setup_target_debug): Delete.
7089         (maintenance_print_target_stack): Skip debug_stratum.
7090         (initialize_targets): Instantiate the_dummy_target and
7091         the_debug_target.
7092         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7093         use target_stack.
7094         (target_auxv_search, fprint_target_auxv): Adjust.
7095         (info_auxv_command): Adjust to use target_stack.
7096         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7097         * exceptions.c (print_flush): Handle a NULL target_stack.
7098         * regcache.c (target_ops_no_register): Refactor as class with
7099         virtual methods.
7100
7101         * exec.c (exec_target): New class.
7102         (exec_ops): Now an exec_target.
7103         (exec_open, exec_close_1, exec_get_section_table)
7104         (exec_xfer_partial, exec_files_info, exec_has_memory)
7105         (exec_make_note_section): Refactor as exec_target methods.
7106         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7107         Delete.
7108         (exec_target::find_memory_regions): New.
7109         (_initialize_exec): Don't call init_exec_ops.
7110         * gdbcore.h (exec_file_clear): Delete.
7111
7112         * corefile.c (core_target): Delete.
7113         (core_file_command): Adjust.
7114         * corelow.c (core_target): New class.
7115         (the_core_target): New.
7116         (core_close): Remove target_ops parameter.
7117         (core_close_cleanup): Adjust.
7118         (core_target::close): New.
7119         (core_open, core_detach, get_core_registers, core_files_info)
7120         (core_xfer_partial, core_thread_alive, core_read_description)
7121         (core_pid_to_str, core_thread_name, core_has_memory)
7122         (core_has_stack, core_has_registers, core_info_proc): Rework as
7123         core_target methods.
7124         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7125         (_initialize_corelow): Initialize the_core_target.
7126         * gdbcore.h (core_target): Delete.
7127         (the_core_target): New.
7128
7129         * ctf.c: (ctf_target): New class.
7130         (ctf_ops): Now a ctf_target.
7131         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7132         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7133         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7134         methods.
7135         (init_ctf_ops): Delete.
7136         (_initialize_ctf): Don't call it.
7137         * tracefile-tfile.c (tfile_target): New class.
7138         (tfile_ops): Now a tfile_target.
7139         (tfile_open, tfile_close, tfile_files_info)
7140         (tfile_get_tracepoint_status, tfile_trace_find)
7141         (tfile_fetch_registers, tfile_xfer_partial)
7142         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7143         Refactor as tfile_target methods.
7144         (tfile_xfer_partial_features): Remove target_ops parameter.
7145         (init_tfile_ops): Delete.
7146         (_initialize_tracefile_tfile): Don't call it.
7147         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7148         (tracefile_has_stack, tracefile_has_registers)
7149         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7150         tracefile_target methods.
7151         (init_tracefile_ops): Delete.
7152         (tracefile_target::tracefile_target): New.
7153         * tracefile.h: Include "target.h".
7154         (tracefile_target): New class.
7155         (init_tracefile_ops): Delete.
7156
7157         * spu-multiarch.c (spu_multiarch_target): New class.
7158         (spu_ops): Now a spu_multiarch_target.
7159         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7160         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7161         (spu_search_memory, spu_mourn_inferior): Refactor as
7162         spu_multiarch_target methods.
7163         (init_spu_ops): Delete.
7164         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7165         complete_target_initialization.
7166
7167         * ravenscar-thread.c (ravenscar_thread_target): New class.
7168         (ravenscar_ops): Now a ravenscar_thread_target.
7169         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7170         (ravenscar_thread_alive, ravenscar_pid_to_str)
7171         (ravenscar_fetch_registers, ravenscar_store_registers)
7172         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7173         (ravenscar_stopped_by_hw_breakpoint)
7174         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7175         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7176         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7177         methods.
7178         (init_ravenscar_thread_ops): Delete.
7179         (_initialize_ravenscar): Remove references to
7180         init_ravenscar_thread_ops and complete_target_initialization.
7181
7182         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7183         (bsd_uthread_target): New class.
7184         (bsd_uthread_ops): Now a bsd_uthread_target.
7185         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7186         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7187         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7188         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7189         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7190         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7191         (bsd_uthread_target): Delete function.
7192         (_initialize_bsd_uthread): Remove reference to
7193         complete_target_initialization.
7194
7195         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7196         (target_bfd): ... this new class.
7197         (target_bfd_xfer_partial, target_bfd_get_section_table)
7198         (target_bfd_close): Refactor as target_bfd methods.
7199         (target_bfd::~target_bfd): New.
7200         (target_bfd_reopen): Adjust.
7201         (target_bfd::close): New.
7202
7203         * record-btrace.c (record_btrace_target): New class.
7204         (record_btrace_ops): Now a record_btrace_target.
7205         (record_btrace_open, record_btrace_stop_recording)
7206         (record_btrace_disconnect, record_btrace_close)
7207         (record_btrace_async, record_btrace_info)
7208         (record_btrace_insn_history, record_btrace_insn_history_range)
7209         (record_btrace_insn_history_from, record_btrace_call_history)
7210         (record_btrace_call_history_range)
7211         (record_btrace_call_history_from, record_btrace_record_method)
7212         (record_btrace_is_replaying, record_btrace_will_replay)
7213         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7214         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7215         (record_btrace_store_registers, record_btrace_prepare_to_store)
7216         (record_btrace_to_get_unwinder)
7217         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7218         (record_btrace_commit_resume, record_btrace_wait)
7219         (record_btrace_stop, record_btrace_can_execute_reverse)
7220         (record_btrace_stopped_by_sw_breakpoint)
7221         (record_btrace_supports_stopped_by_sw_breakpoint)
7222         (record_btrace_stopped_by_hw_breakpoint)
7223         (record_btrace_supports_stopped_by_hw_breakpoint)
7224         (record_btrace_update_thread_list, record_btrace_thread_alive)
7225         (record_btrace_goto_begin, record_btrace_goto_end)
7226         (record_btrace_goto, record_btrace_stop_replaying_all)
7227         (record_btrace_execution_direction)
7228         (record_btrace_prepare_to_generate_core)
7229         (record_btrace_done_generating_core): Refactor as
7230         record_btrace_target methods.
7231         (init_record_btrace_ops): Delete.
7232         (_initialize_record_btrace): Remove reference to
7233         init_record_btrace_ops.
7234         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7235         the execution_direction global.
7236         (record_full_base_target, record_full_target)
7237         (record_full_core_target): New classes.
7238         (record_full_ops): Now a record_full_target.
7239         (record_full_core_ops): Now a record_full_core_target.
7240         (record_full_target::detach, record_full_target::disconnect)
7241         (record_full_core_target::disconnect)
7242         (record_full_target::mourn_inferior, record_full_target::kill):
7243         New.
7244         (record_full_open, record_full_close, record_full_async): Refactor
7245         as methods of the record_full_base_target class.
7246         (record_full_resume, record_full_commit_resume): Refactor
7247         as methods of the record_full_target class.
7248         (record_full_wait, record_full_stopped_by_watchpoint)
7249         (record_full_stopped_data_address)
7250         (record_full_stopped_by_sw_breakpoint)
7251         (record_full_supports_stopped_by_sw_breakpoint)
7252         (record_full_stopped_by_hw_breakpoint)
7253         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7254         methods of the record_full_base_target class.
7255         (record_full_store_registers, record_full_xfer_partial)
7256         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7257         Refactor as methods of the record_full_target class.
7258         (record_full_can_execute_reverse, record_full_get_bookmark)
7259         (record_full_goto_bookmark, record_full_execution_direction)
7260         (record_full_record_method, record_full_info, record_full_delete)
7261         (record_full_is_replaying, record_full_will_replay)
7262         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7263         (record_full_stop_replaying): Refactor as methods of the
7264         record_full_base_target class.
7265         (record_full_core_resume, record_full_core_kill)
7266         (record_full_core_fetch_registers)
7267         (record_full_core_prepare_to_store)
7268         (record_full_core_store_registers, record_full_core_xfer_partial)
7269         (record_full_core_insert_breakpoint)
7270         (record_full_core_remove_breakpoint)
7271         (record_full_core_has_execution): Refactor
7272         as methods of the record_full_core_target class.
7273         (record_full_base_target::supports_delete_record): New.
7274         (init_record_full_ops): Delete.
7275         (init_record_full_core_ops): Delete.
7276         (record_full_save): Refactor as method of the
7277         record_full_base_target class.
7278         (_initialize_record_full): Remove references to
7279         init_record_full_ops and init_record_full_core_ops.
7280
7281         * remote.c (remote_target, extended_remote_target): New classes.
7282         (remote_ops): Now a remote_target.
7283         (extended_remote_ops): Now an extended_remote_target.
7284         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7285         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7286         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7287         (remote_pass_signals, remote_set_syscall_catchpoint)
7288         (remote_program_signals, )
7289         (remote_thread_always_alive): Remove target_ops parameter.
7290         (remote_thread_alive, remote_thread_name)
7291         (remote_update_thread_list, remote_threads_extra_info)
7292         (remote_static_tracepoint_marker_at)
7293         (remote_static_tracepoint_markers_by_strid)
7294         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7295         (remote_open): Refactor as methods of remote_target.
7296         (extended_remote_open, extended_remote_detach)
7297         (extended_remote_attach, extended_remote_post_attach):
7298         (extended_remote_supports_disable_randomization)
7299         (extended_remote_create_inferior): : Refactor as method of
7300         extended_remote_target.
7301         (remote_set_permissions, remote_open_1, remote_detach)
7302         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7303         (remote_resume, remote_commit_resume, remote_stop)
7304         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7305         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7306         (remote_prepare_to_store, remote_store_registers)
7307         (remote_flash_erase, remote_flash_done, remote_files_info)
7308         (remote_kill, remote_mourn, remote_insert_breakpoint)
7309         (remote_remove_breakpoint, remote_insert_watchpoint)
7310         (remote_watchpoint_addr_within_range)
7311         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7312         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7313         (remote_supports_stopped_by_sw_breakpoint)
7314         (remote_stopped_by_hw_breakpoint)
7315         (remote_supports_stopped_by_hw_breakpoint)
7316         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7317         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7318         (remote_verify_memory): Refactor as methods of remote_target.
7319         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7320         parameter.
7321         (remote_xfer_partial, remote_get_memory_xfer_limit)
7322         (remote_search_memory, remote_rcmd, remote_memory_map)
7323         (remote_pid_to_str, remote_get_thread_local_address)
7324         (remote_get_tib_address, remote_read_description): Refactor as
7325         methods of remote_target.
7326         (remote_target::fileio_open, remote_target::fileio_pwrite)
7327         (remote_target::fileio_pread, remote_target::fileio_close): New.
7328         (remote_hostio_readlink, remote_hostio_fstat)
7329         (remote_filesystem_is_local, remote_can_execute_reverse)
7330         (remote_supports_non_stop, remote_supports_disable_randomization)
7331         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7332         (remote_supports_enable_disable_tracepoint)
7333         (remote_supports_string_tracing)
7334         (remote_can_run_breakpoint_commands, remote_trace_init)
7335         (remote_download_tracepoint, remote_can_download_tracepoint)
7336         (remote_download_trace_state_variable, remote_enable_tracepoint)
7337         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7338         (remote_trace_start, remote_get_trace_status)
7339         (remote_get_tracepoint_status, remote_trace_stop)
7340         (remote_trace_find, remote_get_trace_state_variable_value)
7341         (remote_save_trace_data, remote_get_raw_trace_data)
7342         (remote_set_disconnected_tracing, remote_core_of_thread)
7343         (remote_set_circular_trace_buffer, remote_traceframe_info)
7344         (remote_get_min_fast_tracepoint_insn_len)
7345         (remote_set_trace_buffer_size, remote_set_trace_notes)
7346         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7347         (remote_disable_btrace, remote_teardown_btrace)
7348         (remote_read_btrace, remote_btrace_conf)
7349         (remote_augmented_libraries_svr4_read, remote_load)
7350         (remote_pid_to_exec_file, remote_can_do_single_step)
7351         (remote_execution_direction, remote_thread_handle_to_thread_info):
7352         Refactor as methods of remote_target.
7353         (init_remote_ops, init_extended_remote_ops): Delete.
7354         (remote_can_async_p, remote_is_async_p, remote_async)
7355         (remote_thread_events, remote_upload_tracepoints)
7356         (remote_upload_trace_state_variables): Refactor as methods of
7357         remote_target.
7358         (_initialize_remote): Remove references to init_remote_ops and
7359         init_extended_remote_ops.
7360
7361         * remote-sim.c (gdbsim_target): New class.
7362         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7363         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7364         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7365         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7366         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7367         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7368         Refactor as methods of gdbsim_target.
7369         (gdbsim_ops): Now a gdbsim_target.
7370         (init_gdbsim_ops): Delete.
7371         (gdbsim_cntrl_c): Adjust.
7372         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7373
7374         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7375         (the_amd64_linux_nat_target): New.
7376         (amd64_linux_fetch_inferior_registers)
7377         (amd64_linux_store_inferior_registers): Refactor as methods of
7378         amd64_linux_nat_target.
7379         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7380         * i386-linux-nat.c: Don't include "linux-nat.h".
7381         (i386_linux_nat_target): New class.
7382         (the_i386_linux_nat_target): New.
7383         (i386_linux_fetch_inferior_registers)
7384         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7385         as methods of i386_linux_nat_target.
7386         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7387         * inf-child.c (inf_child_ops): Delete.
7388         (inf_child_fetch_inferior_registers)
7389         (inf_child_store_inferior_registers): Delete.
7390         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7391         methods of inf_child_target.
7392         (inf_child_target::supports_terminal_ours)
7393         (inf_child_target::terminal_init)
7394         (inf_child_target::terminal_inferior)
7395         (inf_child_target::terminal_ours_for_output)
7396         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7397         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7398         New.
7399         (inf_child_open, inf_child_disconnect, inf_child_close)
7400         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7401         (inf_child_post_startup_inferior, inf_child_can_run)
7402         (inf_child_pid_to_exec_file): Refactor as methods of
7403         inf_child_target.
7404         (inf_child_follow_fork): Delete.
7405         (inf_child_target::can_create_inferior)
7406         (inf_child_target::can_attach): New.
7407         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7408         (inf_child_target::has_stack, inf_child_target::has_registers)
7409         (inf_child_target::has_execution): New.
7410         (inf_child_fileio_open, inf_child_fileio_pwrite)
7411         (inf_child_fileio_pread, inf_child_fileio_fstat)
7412         (inf_child_fileio_close, inf_child_fileio_unlink)
7413         (inf_child_fileio_readlink, inf_child_use_agent)
7414         (inf_child_can_use_agent): Refactor as methods of
7415         inf_child_target.
7416         (return_zero, inf_child_target): Delete.
7417         (inf_child_target::inf_child_target): New.
7418         * inf-child.h: Include "target.h".
7419         (inf_child_target): Delete function prototype.
7420         (inf_child_target): New class.
7421         (inf_child_open_target, inf_child_mourn_inferior)
7422         (inf_child_maybe_unpush_target): Delete.
7423         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7424         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7425         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7426         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7427         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7428         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7429         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7430         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7431         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7432         methods of inf_ptrace_target.
7433         (inf_ptrace_target): Delete function.
7434         * inf-ptrace.h: Include "inf-child.h".
7435         (inf_ptrace_target): Delete function declaration.
7436         (inf_ptrace_target): New class.
7437         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7438         * linux-nat.c (linux_target): New.
7439         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7440         (linux_nat_target::~linux_nat_target): New.
7441         (linux_child_post_attach, linux_child_post_startup_inferior)
7442         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7443         (linux_child_remove_fork_catchpoint)
7444         (linux_child_insert_vfork_catchpoint)
7445         (linux_child_remove_vfork_catchpoint)
7446         (linux_child_insert_exec_catchpoint)
7447         (linux_child_remove_exec_catchpoint)
7448         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7449         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7450         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7451         (linux_nat_stopped_data_address)
7452         (linux_nat_stopped_by_sw_breakpoint)
7453         (linux_nat_supports_stopped_by_sw_breakpoint)
7454         (linux_nat_stopped_by_hw_breakpoint)
7455         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7456         (linux_nat_kill, linux_nat_mourn_inferior)
7457         (linux_nat_xfer_partial, linux_nat_thread_alive)
7458         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7459         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7460         (linux_child_static_tracepoint_markers_by_strid)
7461         (linux_nat_is_async_p, linux_nat_can_async_p)
7462         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7463         (linux_nat_supports_multi_process)
7464         (linux_nat_supports_disable_randomization, linux_nat_async)
7465         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7466         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7467         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7468         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7469         methods of linux_nat_target.
7470         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7471         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7472         parameter.
7473         (check_stopped_by_watchpoint): Adjust.
7474         (linux_xfer_partial): Delete.
7475         (linux_target_install_ops, linux_target, linux_nat_add_target):
7476         Delete.
7477         (linux_nat_target::linux_nat_target): New.
7478         * linux-nat.h: Include "inf-ptrace.h".
7479         (linux_nat_target): New.
7480         (linux_target, linux_target_install_ops, linux_nat_add_target):
7481         Delete function declarations.
7482         (linux_target): Declare global.
7483         * linux-thread-db.c (thread_db_target): New.
7484         (thread_db_target::thread_db_target): New.
7485         (thread_db_ops): Delete.
7486         (the_thread_db_target): New.
7487         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7488         (thread_db_update_thread_list, thread_db_pid_to_str)
7489         (thread_db_extra_thread_info)
7490         (thread_db_thread_handle_to_thread_info)
7491         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7492         (thread_db_resume): Refactor as methods of thread_db_target.
7493         (init_thread_db_ops): Delete.
7494         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7495         * x86-linux-nat.c: Don't include "linux-nat.h".
7496         (super_post_startup_inferior): Delete.
7497         (x86_linux_nat_target::~x86_linux_nat_target): New.
7498         (x86_linux_child_post_startup_inferior)
7499         (x86_linux_read_description, x86_linux_enable_btrace)
7500         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7501         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7502         methods of x86_linux_nat_target.
7503         (x86_linux_create_target): Delete.  Bits folded ...
7504         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7505         pointer.
7506         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7507         (x86_linux_nat_target): New class.
7508         (x86_linux_create_target): Delete.
7509         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7510         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7511         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7512         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7513         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7514         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7515         make extern.
7516         (x86_use_watchpoints): Delete.
7517         * x86-nat.h: Include "breakpoint.h" and "target.h".
7518         (x86_use_watchpoints): Delete.
7519         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7520         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7521         (x86_insert_watchpoint, x86_remove_watchpoint)
7522         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7523         (x86_stopped_by_hw_breakpoint): New declarations.
7524         (x86_nat_target): New template class.
7525
7526         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7527         (the_ppc_linux_nat_target): New.
7528         (ppc_linux_fetch_inferior_registers)
7529         (ppc_linux_can_use_hw_breakpoint)
7530         (ppc_linux_region_ok_for_hw_watchpoint)
7531         (ppc_linux_ranged_break_num_registers)
7532         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7533         (ppc_linux_insert_mask_watchpoint)
7534         (ppc_linux_remove_mask_watchpoint)
7535         (ppc_linux_can_accel_watchpoint_condition)
7536         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7537         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7538         (ppc_linux_watchpoint_addr_within_range)
7539         (ppc_linux_masked_watch_num_registers)
7540         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7541         (ppc_linux_read_description): Refactor as methods of
7542         ppc_linux_nat_target.
7543         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7544
7545         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7546         (procfs_target): New class.
7547         (the_procfs_target): New.
7548         (procfs_target): Delete function.
7549         (procfs_auxv_parse, procfs_attach, procfs_detach)
7550         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7551         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7552         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7553         (procfs_create_inferior, procfs_update_thread_list)
7554         (procfs_thread_alive, procfs_pid_to_str)
7555         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7556         (procfs_stopped_data_address, procfs_insert_watchpoint)
7557         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7558         (proc_find_memory_regions, procfs_info_proc)
7559         (procfs_make_note_section): Refactor as methods of procfs_target.
7560         (_initialize_procfs): Adjust.
7561         * sol-thread.c (sol_thread_target): New class.
7562         (sol_thread_ops): Now a sol_thread_target.
7563         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7564         (sol_thread_fetch_registers, sol_thread_store_registers)
7565         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7566         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7567         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7568         (init_sol_thread_ops): Delete.
7569         (_initialize_sol_thread): Adjust.  Remove references to
7570         init_sol_thread_ops and complete_target_initialization.
7571
7572         * windows-nat.c (windows_nat_target): New class.
7573         (windows_fetch_inferior_registers)
7574         (windows_store_inferior_registers, windows_resume, windows_wait)
7575         (windows_attach, windows_detach, windows_pid_to_exec_file)
7576         (windows_files_info, windows_create_inferior)
7577         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7578         (windows_close, windows_pid_to_str, windows_xfer_partial)
7579         (windows_get_tib_address, windows_get_ada_task_ptid)
7580         (windows_thread_name, windows_thread_alive): Refactor as
7581         windows_nat_target methods.
7582         (do_initial_windows_stuff): Adjust.
7583         (windows_target): Delete function.
7584         (_initialize_windows_nat): Adjust.
7585
7586         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7587         (darwin_mourn_inferior, darwin_kill_inferior)
7588         (darwin_create_inferior, darwin_attach, darwin_detach)
7589         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7590         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7591         (darwin_supports_multi_process): Refactor as darwin_nat_target
7592         methods.
7593         (darwin_resume_to, darwin_files_info): Delete.
7594         (_initialize_darwin_inferior): Rename to ...
7595         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7596         * darwin-nat.h: Include "inf-child.h".
7597         (darwin_nat_target): New class.
7598         (darwin_complete_target): Delete.
7599         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7600         (darwin_target): New.
7601         (i386_darwin_fetch_inferior_registers)
7602         (i386_darwin_store_inferior_registers): Refactor as methods of
7603         darwin_nat_target.
7604         (darwin_complete_target): Delete, with ...
7605         (_initialize_i386_darwin_nat): ... bits factored out here.
7606
7607         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7608         (the_alpha_linux_nat_target): New.
7609         (alpha_linux_register_u_offset): Refactor as
7610         alpha_linux_nat_target method.
7611         (_initialize_alpha_linux_nat): Adjust.
7612         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7613         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7614         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7615         methods of linux_nat_trad_target.
7616         (linux_trad_target): Delete.
7617         * linux-nat-trad.h (linux_trad_target): Delete function.
7618         (linux_nat_trad_target): New class.
7619         * mips-linux-nat.c (mips_linux_nat_target): New class.
7620         (super_fetch_registers, super_store_registers, super_close):
7621         Delete.
7622         (the_mips_linux_nat_target): New.
7623         (mips64_linux_regsets_fetch_registers)
7624         (mips64_linux_regsets_store_registers)
7625         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7626         (mips_linux_register_u_offset, mips_linux_read_description)
7627         (mips_linux_can_use_hw_breakpoint)
7628         (mips_linux_stopped_by_watchpoint)
7629         (mips_linux_stopped_data_address)
7630         (mips_linux_region_ok_for_hw_watchpoint)
7631         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7632         (mips_linux_close): Refactor as methods of mips_linux_nat.
7633         (_initialize_mips_linux_nat): Adjust to C++ification.
7634
7635         * aix-thread.c (aix_thread_target): New class.
7636         (aix_thread_ops): Now an aix_thread_target.
7637         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7638         (aix_thread_fetch_registers, aix_thread_store_registers)
7639         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7640         (aix_thread_thread_alive, aix_thread_pid_to_str)
7641         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7642         Refactor as methods of aix_thread_target.
7643         (init_aix_thread_ops): Delete.
7644         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7645         and complete_target_initialization.
7646         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7647         (rs6000_nat_target): New class.
7648         (the_rs6000_nat_target): New.
7649         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7650         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7651         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7652         (super_create_inferior): Delete.
7653         (_initialize_rs6000_nat): Adjust to C++ification.
7654
7655         * arm-linux-nat.c (arm_linux_nat_target): New class.
7656         (the_arm_linux_nat_target): New.
7657         (arm_linux_fetch_inferior_registers)
7658         (arm_linux_store_inferior_registers, arm_linux_read_description)
7659         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7660         (arm_linux_remove_hw_breakpoint)
7661         (arm_linux_region_ok_for_hw_watchpoint)
7662         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7663         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7664         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7665         arm_linux_nat_target.
7666         (_initialize_arm_linux_nat): Adjust to C++ification.
7667
7668         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7669         (the_aarch64_linux_nat_target): New.
7670         (aarch64_linux_fetch_inferior_registers)
7671         (aarch64_linux_store_inferior_registers)
7672         (aarch64_linux_child_post_startup_inferior)
7673         (aarch64_linux_read_description)
7674         (aarch64_linux_can_use_hw_breakpoint)
7675         (aarch64_linux_insert_hw_breakpoint)
7676         (aarch64_linux_remove_hw_breakpoint)
7677         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7678         (aarch64_linux_region_ok_for_hw_watchpoint)
7679         (aarch64_linux_stopped_data_address)
7680         (aarch64_linux_stopped_by_watchpoint)
7681         (aarch64_linux_watchpoint_addr_within_range)
7682         (aarch64_linux_can_do_single_step): Refactor as methods of
7683         aarch64_linux_nat_target.
7684         (super_post_startup_inferior): Delete.
7685         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7686
7687         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7688         (the_hppa_linux_nat_target): New.
7689         (hppa_linux_fetch_inferior_registers)
7690         (hppa_linux_store_inferior_registers): Refactor as methods of
7691         hppa_linux_nat_target.
7692         (_initialize_hppa_linux_nat): Adjust to C++ification.
7693
7694         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7695         (the_ia64_linux_nat_target): New.
7696         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7697         (ia64_linux_stopped_data_address)
7698         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7699         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7700         ia64_linux_nat_target methods.
7701         (super_xfer_partial): Delete.
7702         (_initialize_ia64_linux_nat): Adjust to C++ification.
7703
7704         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7705         (the_m32r_linux_nat_target): New.
7706         (m32r_linux_fetch_inferior_registers)
7707         (m32r_linux_store_inferior_registers): Refactor as
7708         m32r_linux_nat_target methods.
7709         (_initialize_m32r_linux_nat): Adjust to C++ification.
7710
7711         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7712         (the_m68k_linux_nat_target): New.
7713         (m68k_linux_fetch_inferior_registers)
7714         (m68k_linux_store_inferior_registers): Refactor as
7715         m68k_linux_nat_target methods.
7716         (_initialize_m68k_linux_nat): Adjust to C++ification.
7717
7718         * s390-linux-nat.c (s390_linux_nat_target): New class.
7719         (the_s390_linux_nat_target): New.
7720         (s390_linux_fetch_inferior_registers)
7721         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7722         (s390_insert_watchpoint, s390_remove_watchpoint)
7723         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7724         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7725         (s390_auxv_parse, s390_read_description): Refactor as methods of
7726         s390_linux_nat_target.
7727         (_initialize_s390_nat): Adjust to C++ification.
7728
7729         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7730         (the_sparc_linux_nat_target): New.
7731         (_initialize_sparc_linux_nat): Adjust to C++ification.
7732         * sparc-nat.c (sparc_fetch_inferior_registers)
7733         (sparc_store_inferior_registers): Remove target_ops parameter.
7734         * sparc-nat.h (sparc_fetch_inferior_registers)
7735         (sparc_store_inferior_registers): Remove target_ops parameter.
7736         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7737         (the_sparc64_linux_nat_target): New.
7738         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7739
7740         * spu-linux-nat.c (spu_linux_nat_target): New class.
7741         (the_spu_linux_nat_target): New.
7742         (spu_child_post_startup_inferior, spu_child_post_attach)
7743         (spu_child_wait, spu_fetch_inferior_registers)
7744         (spu_store_inferior_registers, spu_xfer_partial)
7745         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7746         methods.
7747         (_initialize_spu_nat): Adjust to C++ification.
7748
7749         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7750         (the_tilegx_linux_nat_target): New.
7751         (fetch_inferior_registers, store_inferior_registers):
7752         Refactor as methods.
7753         (_initialize_tile_linux_nat): Adjust to C++ification.
7754
7755         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7756         (the_xtensa_linux_nat_target): New.
7757         (xtensa_linux_fetch_inferior_registers)
7758         (xtensa_linux_store_inferior_registers): Refactor as
7759         xtensa_linux_nat_target methods.
7760         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7761
7762         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7763         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7764         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7765         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7766         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7767         (fbsd_stopped_by_sw_breakpoint)
7768         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7769         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7770         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7771         (fbsd_post_startup_inferior, fbsd_post_attach)
7772         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7773         (fbsd_set_syscall_catchpoint)
7774         (super_xfer_partial, super_resume, super_wait)
7775         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7776         (fbsd_handle_debug_trap): Remove target_ops parameter.
7777         (fbsd_nat_add_target): Delete.
7778         * fbsd-nat.h: Include "inf-ptrace.h".
7779         (fbsd_nat_add_target): Delete.
7780         (USE_SIGTRAP_SIGINFO): Define.
7781         (fbsd_nat_target): New class.
7782
7783         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7784         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7785         (amd64bsd_target): Delete.
7786         * amd64-bsd-nat.h: New file.
7787         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7788         "x86-bsd-nat.h".
7789         (amd64_fbsd_nat_target): New class.
7790         (the_amd64_fbsd_nat_target): New.
7791         (amd64fbsd_read_description): Refactor as method of
7792         amd64_fbsd_nat_target.
7793         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7794         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7795         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7796         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7797         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7798         (i386bsd_target): Delete.
7799         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7800         (i386bsd_fetch_inferior_registers)
7801         (i386bsd_store_inferior_registers): Declare.
7802         (i386_bsd_nat_target): New class.
7803         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7804         (the_i386_fbsd_nat_target): New.
7805         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7806         i386_fbsd_nat_target methods.
7807         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7808         (_initialize_i386fbsd_nat): Adjust to C++ification.
7809         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7810         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7811         (_initialize_x86_bsd_nat): Adjust to C++ification.
7812         * x86-bsd-nat.h: Include "x86-nat.h".
7813         (x86bsd_target): Delete declaration.
7814         (x86bsd_nat_target): New class.
7815
7816         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7817         (the_aarch64_fbsd_nat_target): New.
7818         (aarch64_fbsd_fetch_inferior_registers)
7819         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7820         aarch64_fbsd_nat_target.
7821         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7822         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7823         (the_alpha_bsd_nat_target): New.
7824         (alphabsd_fetch_inferior_registers)
7825         (alphabsd_store_inferior_registers): Refactor as
7826         alpha_bsd_nat_target methods.
7827         (_initialize_alphabsd_nat): Refactor as methods of
7828         alpha_bsd_nat_target.
7829         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7830         (the_amd64_nbsd_nat_target): New.
7831         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7832         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7833         (the_amd64_obsd_nat_target): New.
7834         (_initialize_amd64obsd_nat): Adjust to C++ification.
7835         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7836         (the_arm_fbsd_nat_target): New.
7837         (arm_fbsd_fetch_inferior_registers)
7838         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7839         (_initialize_arm_fbsd_nat): Refactor as methods of
7840         arm_fbsd_nat_target.
7841         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7842         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7843         (the_arm_netbsd_nat_target): New.
7844         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7845         arm_netbsd_nat_target.
7846         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7847         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7848         (the_hppa_nbsd_nat_target): New.
7849         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7850         hppa_nbsd_nat_target methods.
7851         (_initialize_hppanbsd_nat): Adjust to C++ification.
7852         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7853         (the_hppa_obsd_nat_target): New.
7854         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7855         methods of hppa_obsd_nat_target.
7856         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7857         add_target.
7858         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7859         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7860         add_target.
7861         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7862         (_initialize_i386obsd_nat): Use add_target.
7863         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7864         (the_m68k_bsd_nat_target): New.
7865         (m68kbsd_fetch_inferior_registers)
7866         (m68kbsd_store_inferior_registers): Refactor as methods of
7867         m68k_bsd_nat_target.
7868         (_initialize_m68kbsd_nat): Adjust to C++ification.
7869         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7870         (the_mips_fbsd_nat_target): New.
7871         (mips_fbsd_fetch_inferior_registers)
7872         (mips_fbsd_store_inferior_registers): Refactor as methods of
7873         mips_fbsd_nat_target.
7874         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7875         add_target.
7876         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7877         (the_mips_nbsd_nat_target): New.
7878         (mipsnbsd_fetch_inferior_registers)
7879         (mipsnbsd_store_inferior_registers): Refactor as methods of
7880         mips_nbsd_nat_target.
7881         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7882         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7883         (the_mips64_obsd_nat_target): New.
7884         (mips64obsd_fetch_inferior_registers)
7885         (mips64obsd_store_inferior_registers): Refactor as methods of
7886         mips64_obsd_nat_target.
7887         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7888         add_target.
7889         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7890         nbsd_nat_target.
7891         * nbsd-nat.h: Include "inf-ptrace.h".
7892         (nbsd_nat_target): New class.
7893         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7894         (obsd_wait): Refactor as methods of obsd_nat_target.
7895         (obsd_add_target): Delete.
7896         * obsd-nat.h: Include "inf-ptrace.h".
7897         (obsd_nat_target): New class.
7898         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7899         (the_ppc_fbsd_nat_target): New.
7900         (ppcfbsd_fetch_inferior_registers)
7901         (ppcfbsd_store_inferior_registers): Refactor as methods of
7902         ppc_fbsd_nat_target.
7903         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7904         add_target.
7905         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7906         (the_ppc_nbsd_nat_target): New.
7907         (ppcnbsd_fetch_inferior_registers)
7908         (ppcnbsd_store_inferior_registers): Refactor as methods of
7909         ppc_nbsd_nat_target.
7910         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7911         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7912         (the_ppc_obsd_nat_target): New.
7913         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7914         methods of ppc_obsd_nat_target.
7915         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7916         add_target.
7917         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7918         (the_sh_nbsd_nat_target): New.
7919         (shnbsd_fetch_inferior_registers)
7920         (shnbsd_store_inferior_registers): Refactor as methods of
7921         sh_nbsd_nat_target.
7922         (_initialize_shnbsd_nat): Adjust to C++ification.
7923         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7924         (inf_ptrace_xfer_partial): Delete.
7925         (sparc_xfer_partial, sparc_target): Delete.
7926         * sparc-nat.h (sparc_fetch_inferior_registers)
7927         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7928         (sparc_target): Delete function declaration.
7929         (sparc_target): New template class.
7930         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7931         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7932         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7933         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7934         add_target.
7935         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7936         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7937         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7938         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7939         add_target.
7940         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7941         (the_vax_bsd_nat_target): New.
7942         (vaxbsd_fetch_inferior_registers)
7943         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7944         methods.
7945         (_initialize_vaxbsd_nat): Adjust to C++ification.
7946
7947         * bsd-kvm.c (bsd_kvm_target): New class.
7948         (bsd_kvm_ops): Now a bsd_kvm_target.
7949         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7950         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7951         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7952         bsd_kvm_target.
7953         (bsd_kvm_return_one): Delete.
7954         (bsd_kvm_add_target): Adjust to C++ification.
7955
7956         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7957         (nto_procfs_target_procfs): New classes.
7958         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7959         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7960         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7961         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7962         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7963         (procfs_remove_hw_breakpoint, procfs_resume)
7964         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7965         (procfs_kill_inferior, procfs_store_registers)
7966         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7967         as methods of nto_procfs_target.
7968         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7969         (nto_native_ops): Delete.
7970         (procfs_open, procfs_native_open): Delete.
7971         (nto_native_ops): Now an nto_procfs_target_native.
7972         (init_procfs_targets): Adjust to C++ification.
7973         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7974         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7975         Refactor as methods of nto_procfs_target.
7976
7977         * go32-nat.c (go32_nat_target): New class.
7978         (the_go32_nat_target): New.
7979         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7980         (go32_store_registers, go32_xfer_partial, go32_files_info)
7981         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7982         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7983         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7984         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7985         (go32_target): Delete.
7986         (_initialize_go32_nat): Adjust to C++ification.
7987
7988         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7989         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7990         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7991         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7992         gnu_nat_target.
7993         (gnu_target): Delete.
7994         * gnu-nat.h (gnu_target): Delete.
7995         (gnu_nat_target): New class.
7996         * i386-gnu-nat.c (gnu_base_target): New.
7997         (i386_gnu_nat_target): New class.
7998         (the_i386_gnu_nat_target): New.
7999         (_initialize_i386gnu_nat): Adjust to C++ification.
8000
8001 2018-05-02  Pedro Alves  <palves@redhat.com>
8002
8003         * bfd-target.c (target_bfd_xclose): Rename to ...
8004         (target_bfd_close): ... this.
8005         (target_bfd_reopen): Adjust.
8006         * target.c (target_close): Remove references to to_xclose.
8007         * target.h (target_ops::to_xclose): Delete.
8008         (target_ops::to_close): Update comments.
8009
8010 2018-05-02  Pedro Alves  <palves@redhat.com>
8011
8012         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8013         "linux-nat.h".
8014         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8015         * inf-ptrace.c (inf_ptrace_register_u_offset)
8016         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8017         (inf_ptrace_store_register, inf_ptrace_store_registers)
8018         (inf_ptrace_trad_target): Move to ...
8019         * linux-nat-trad.c: ... this new file.
8020         * linux-nat-trad.h: New file.
8021         * linux-nat.c (linux_target_install_ops): Make extern.
8022         (linux_trad_target): Delete.
8023         * linux-nat.h (linux_trad_target): Delete declaration.
8024         (linux_target_install_ops): Declare.
8025         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8026         "linux-nat.h".
8027
8028 2018-05-02  Pedro Alves  <palves@redhat.com>
8029
8030         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8031         procfs_target/add_target here.
8032         * procfs.c (procfs_target): Make static.
8033         (_initialize_procfs): Call add_target here.
8034         * procfs.h (struct target_ops): Remove forward declaration.
8035         (procfs_target): Remove declaration.
8036         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8037
8038 2018-05-02  Pedro Alves  <palves@redhat.com>
8039
8040         * procfs.c (procfs_stopped_by_watchpoint)
8041         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8042         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8043         Forward declare.
8044         (procfs_use_watchpoints): Delete, move contents...
8045         (procfs_target): ... here.
8046         * procfs.h (procfs_use_watchpoints): Delete declaration.
8047         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8048         procfs_use_watchpoints.
8049         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8050         procfs_use_watchpoints.
8051
8052 2018-05-02  Tom Tromey  <tom@tromey.com>
8053
8054         PR python/20084:
8055         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8056         and var_zuinteger_unlimited.
8057         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8058         and PARAM_ZUINTEGER_UNLIMITED.
8059         (set_parameter_value): Handle var_zuinteger and
8060         var_zuinteger_unlimited.
8061         (add_setshow_generic): Likewise.
8062         (parmpy_init): Likewise.
8063
8064 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8065
8066         PR rust/23124
8067         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8068         pointer is not null before dereferencing it.
8069
8070 2018-04-30  Tom Tromey  <tom@tromey.com>
8071
8072         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8073         is_mi_like_p.
8074
8075 2018-04-30  Tom Tromey  <tom@tromey.com>
8076
8077         * breakpoint.c (mention): Remove use of is_mi_like_p.
8078         (print_mention_ranged_breakpoint): Likewise.
8079         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8080         of is_mi_like_p.
8081
8082 2018-04-30  Tom Tromey  <tom@tromey.com>
8083
8084         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8085
8086 2018-04-30  Tom Tromey  <tom@tromey.com>
8087
8088         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8089         (info_spu_event_command): Remove some uses of is_mi_like_p.
8090
8091 2018-04-30  Tom Tromey  <tom@tromey.com>
8092
8093         * python/py-framefilter.c (py_print_single_arg)
8094         (enumerate_locals, py_print_args, py_print_frame): Remove some
8095         uses of is_mi_like_p.
8096
8097 2018-04-30  Tom Tromey  <tom@tromey.com>
8098
8099         * ui-out.c: Update.
8100         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8101         * ui-out.h (ui_out::is_mi_like_p): Now const.
8102         (ui_out::do_is_mi_like_p): Now const.
8103         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8104
8105 2018-04-30  Tom Tromey  <tom@tromey.com>
8106
8107         * varobj.c (varobj_set_visualizer): Use new_reference.
8108         * python/python.c (gdbpy_decode_line): Use new_reference.
8109         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8110         new_reference.
8111
8112 2018-04-30  Tom Tromey  <tom@tromey.com>
8113
8114         * varobj.c (install_new_value): Use new_reference.
8115         * value.h (value_incref): Return void.  Swap intro comment with
8116         value_decref.
8117         * value.c (set_value_parent): Use new_reference.
8118         (value_incref): Return void.  Update intro comment.
8119         (release_value): Use new_reference.
8120         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8121
8122 2018-04-30  Tom Tromey  <tom@tromey.com>
8123
8124         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8125         * gdb_bfd.h (new_bfd_ref): Remove.
8126         (gdb_bfd_open): Update comment.
8127         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8128         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8129         (gdb_bfd_fdopenr): Use new_reference.
8130         * exec.c (exec_file_attach): Use new_reference.
8131
8132 2018-04-30  Tom Tromey  <tom@tromey.com>
8133
8134         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8135         method.
8136
8137 2018-04-30  Tom Tromey  <tom@tromey.com>
8138
8139         * jit.c (jit_read_code_entry): Use type_align.
8140         * i386-tdep.c (i386_gdbarch_init): Don't call
8141         set_gdbarch_long_long_align_bit.
8142         * gdbarch.sh: Remove long_long_align_bit.
8143         * gdbarch.c, gdbarch.h: Rebuild.
8144         * arc-tdep.c (arc_type_align): New function.
8145         (arc_gdbarch_init): Use arc_type_align.  Don't call
8146         set_gdbarch_long_long_align_bit.
8147
8148 2018-04-30  Tom Tromey  <tom@tromey.com>
8149
8150         * rust-lang.c (rust_type_alignment): Remove.
8151         (rust_composite_type): Use type_align.
8152
8153 2018-04-30  Tom Tromey  <tom@tromey.com>
8154
8155         * NEWS: Mention Type.align.
8156         * python/py-type.c (typy_get_alignof): New function.
8157         (type_object_getset): Add "alignof".
8158
8159 2018-04-30  Tom Tromey  <tom@tromey.com>
8160
8161         PR exp/17095:
8162         * NEWS: Update.
8163         * std-operator.def (UNOP_ALIGNOF): New operator.
8164         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8165         New.
8166         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8167         * c-lang.c (c_op_print_tab): Add alignof.
8168         * c-exp.y (ALIGNOF): New token.
8169         (exp): Add "ALIGNOF" production.
8170         (ident_tokens): Add _Alignof and alignof.
8171
8172 2018-04-30  Tom Tromey  <tom@tromey.com>
8173
8174         * i386-tdep.c (i386_type_align): New function.
8175         (i386_gdbarch_init): Update.
8176         * gdbarch.sh (type_align): New method.
8177         * gdbarch.c, gdbarch.h: Rebuild.
8178         * arch-utils.h (default_type_align): Declare.
8179         * arch-utils.c (default_type_align): New function.
8180         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8181         (struct type) <align_log2>: New field.
8182         <instance_flags>: Now a bitfield.
8183         (TYPE_RAW_ALIGN): New macro.
8184         (type_align, type_raw_align, set_type_align): Declare.
8185         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8186         functions.
8187         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8188         (get_alignment, maybe_set_alignment): New functions.
8189         (read_structure_type, read_enumeration_type, read_array_type)
8190         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8191         (read_subrange_type, read_base_type): Set type alignment.
8192
8193 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8194
8195         * dwarf2read.c (read_index_from_section): Use bool.
8196
8197 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8198
8199         PR gdb/22950
8200         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8201         with #ifdef.
8202
8203 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8204
8205         PR build/22873
8206         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8207         last step, and do it atomically.
8208
8209 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8210
8211         * compile/compile-c-types.c (convert_int, convert_float):
8212         Update for C FE v1.
8213
8214 2018-04-27  Tom Tromey  <tom@tromey.com>
8215
8216         PR rust/22545:
8217         * rust-lang.c (rust_inclusive_range_type_p): New function.
8218         (rust_range): Handle inclusive ranges.
8219         (rust_compute_range): Likewise.
8220         * rust-exp.y (struct rust_op) <inclusive>: New field.
8221         (DOTDOTEQ): New constant.
8222         (range_expr): Add "..=" productions.
8223         (operator_tokens): Add "..=" token.
8224         (ast_range): Add "inclusive" parameter.
8225         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8226         ranges.
8227         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8228         bounds values.
8229         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8230         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8231         Update comments.
8232         * expprint.c (print_subexp_standard): Handle new bounds values.
8233         (dump_subexp_body_standard): Likewise.
8234
8235 2018-04-27  Tom Tromey  <tom@tromey.com>
8236
8237         * configure: Rebuild.
8238         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8239         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8240         "OVERRIDE".
8241         (class symbol_needs_eval_context): Likewise.
8242         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8243         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8244         "virtual".
8245         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8246         "override".
8247         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8248         * aarch64-tdep.c (instruction_reader::read): Use "override".
8249         (instruction_reader_test::read): Likewise.
8250         * arm-tdep.c (instruction_reader::read): Use "override".
8251         (instruction_reader_thumb::read): Likewise.
8252
8253 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8254
8255         PR remote/9665
8256         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8257         instead of remote_send.
8258         (remote_send): Remove.
8259
8260 2018-04-26  Pedro Alves  <palves@redhat.com>
8261
8262         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8263         find_function_start_sal instead of find_pc_line.
8264
8265 2018-04-26  Pedro Alves  <palves@redhat.com>
8266
8267         * breakpoint.c (set_breakpoint_location_function): Handle
8268         mst_data_gnu_ifunc.
8269         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8270         * elfread.c (elf_symtab_read): Give data symbols with
8271         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8272         (elf_rel_plt_read): Update comment.
8273         * linespec.c (convert_linespec_to_sals): Handle
8274         mst_data_gnu_ifunc.
8275         (minsym_found): Handle mst_data_gnu_ifunc.
8276         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8277         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8278         * parse.c (find_minsym_type_and_address): Handle
8279         mst_data_gnu_ifunc.
8280         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8281         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8282         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8283         comment.
8284         <mst_data_gnu_ifunc>: New enumerator.
8285
8286 2018-04-26  Pedro Alves  <palves@redhat.com>
8287
8288         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8289         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8290         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8291         Handle it.
8292         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8293         (lookup_minimal_symbol_by_pc): Adjust.
8294         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8295         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8296         * minsyms.h (lookup_msym_prefer): New enum.
8297         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8298         parameter by a lookup_msym_prefer parameter.
8299
8300 2018-04-26  Pedro Alves  <palves@redhat.com>
8301
8302         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8303         ends in "@plt" instead of looking at the symbol's section.
8304
8305 2018-04-26  Pedro Alves  <palves@redhat.com>
8306
8307         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8308         all references.
8309         (find_pc_partial_function_gnu_ifunc): Rename to ...
8310         (find_pc_partial_function): ... this, and remove references to
8311         'is_gnu_ifunc_p'.
8312         (find_pc_partial_function): Delete old implementation.
8313         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8314
8315 2018-04-26  Pedro Alves  <palves@redhat.com>
8316
8317         * linespec.c (struct bound_minimal_symbol_search_key): New.
8318         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8319         skip first line if we found a GNU ifunc minimal symbol by name.
8320         (compare_msymbols): Change parameters to work with a destructured
8321         lhs minsym.
8322         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8323         functions.
8324
8325 2018-04-26  Pedro Alves  <palves@redhat.com>
8326
8327         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8328         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8329         address/name.
8330         (add_location_to_breakpoint): Store the minsym and the objfile in
8331         the breakpoint location.
8332         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8333         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8334         Record the minsym in the sal.
8335         * symtab.h (symtab_and_line) <msymbol>: New field.
8336
8337 2018-04-26  Pedro Alves  <palves@redhat.com>
8338
8339         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8340         unless we actually resolved the ifunc.
8341
8342 2018-04-26  Pedro Alves  <palves@redhat.com>
8343
8344         * c-exp.y (variable production): Prefer ifunc minsyms over
8345         regular function symbols.
8346         * symtab.c (find_gnu_ifunc): New function.
8347         * minsyms.h (lookup_msym_prefer): New enum.
8348         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8349         parameter by a lookup_msym_prefer parameter.
8350         * symtab.h (find_gnu_ifunc): New declaration.
8351
8352 2018-04-26  Pedro Alves  <palves@redhat.com>
8353
8354         * blockframe.c (find_gnu_ifunc_target_type): New function.
8355         (find_function_type): New.
8356         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8357         return a value with a memory address.
8358         (eval_call): For calls to GNU ifunc functions, try to find the
8359         type of the target function from the type that the resolver
8360         returns.
8361         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8362         symbols.
8363         * infcall.c (find_function_return_type): Delete.
8364         (find_function_addr): Add 'function_type' parameter.  For calls to
8365         GNU ifunc functions, try to find the type of the target function
8366         from the type that the resolver returns, and return it via
8367         FUNCTION_TYPE.
8368         (call_function_by_hand_dummy): Adjust to use the function type
8369         returned by find_function_addr.
8370         (find_function_addr): Add 'function_type' parameter and move
8371         description here.
8372         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8373         declarations.
8374
8375 2018-04-26  Pedro Alves  <palves@redhat.com>
8376
8377         * c-exp.y (variable production): Skip finding an alias for ifunc
8378         symbols.
8379
8380 2018-04-26  Pedro Alves  <palves@redhat.com>
8381
8382         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8383
8384 2018-04-25  Pedro Alves  <palves@redhat.com>
8385
8386         * infcmd.c (kill_command): Print the pid as string, not the whole
8387         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8388         message.
8389         * remote.c (remote_detach_1): Print the pid as string, not the
8390         whole thread's ptid.
8391
8392 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8393             Sergio Durigan Junior  <sergiodj@redhat.com>
8394             Pedro Alves  <palves@redhat.com>
8395
8396         * infcmd.c (kill_command): Print message when inferior has
8397         been killed.
8398         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8399         '1'.
8400         (add_inferior): Improve message printed when
8401         'print_inferior_events' is on.
8402         (exit_inferior): Remove message printed when
8403         'print_inferior_events' is on.
8404         (detach_inferior): Improve message printed when
8405         'print_inferior_events' is on.
8406         (initialize_inferiors): Use 'add_inferior_silent' to set
8407         'current_inferior_'.
8408         * inferior.h (print_inferior_events): Declare here as
8409         'extern'.
8410         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8411         '[Detaching...]' messages when 'print_inferior_events' is on.
8412         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8413         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8414         'Detaching after fork from child...', replace it by '... from
8415         parent...'.
8416         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8417         prefix/suffix when printing 'Detaching...' messages.  Print
8418         them when 'print_inferior_events' is on.
8419         * remote.c (remote_detach_1): Print message when detaching
8420         from inferior and '!is_fork_parent'.
8421
8422 2018-04-24  Tom Tromey  <tom@tromey.com>
8423
8424         * cli-out.h: Reindent.
8425
8426 2018-04-24  Tom Tromey  <tom@tromey.com>
8427
8428         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8429         (cli_ui_out::do_field_string): Use fputs_filtered.
8430         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8431
8432 2018-04-23  Tom Tromey  <tom@tromey.com>
8433
8434         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8435         gdb::unique_xmalloc_ptr.
8436
8437 2018-04-23  Tom Tromey  <tom@tromey.com>
8438
8439         * configure: Rebuild.
8440
8441 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8442
8443         PR gdb/23095
8444         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8445         prepare_for_testing.  Set normal_bp to r_debug_state if target
8446         is bsd.
8447
8448 2018-04-21  Pedro Alves  <palves@redhat.com>
8449             Rajendra SY  <rajendra.sy@gmail.com>
8450
8451         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8452         * remote.c (extended_remote_attach): In all-stop mode, mark the
8453         thread as executing.
8454
8455 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8456
8457         * thread.c (thread_apply_all_command): Fix comment.
8458         (thread_command): Fix comment.
8459
8460 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8461
8462         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8463         parameter.
8464         * features/aarch64-core.c (create_feature_aarch64_core):
8465         Regenerate.
8466         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8467         Likewise.
8468         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8469         Likewise.
8470         * features/i386/32bit-avx512.c
8471         (create_feature_i386_32bit_avx512): Likewise.
8472         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8473         Likewise.
8474         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8475         Likewise.
8476         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8477         Likewise.
8478         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8479         Likewise.
8480         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8481         Likewise.
8482         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8483         Likewise.
8484         * features/i386/64bit-avx512.c
8485         (create_feature_i386_64bit_avx512): Likewise.
8486         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8487         Likewise.
8488         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8489         Likewise.
8490         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8491         Likewise.
8492         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8493         Likewise.
8494         * features/i386/64bit-segments.c
8495         (create_feature_i386_64bit_segments): Likewise.
8496         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8497         Likewise.
8498         * features/i386/x32-core.c
8499         (create_feature_i386_x32_core): Likewise.
8500         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8501         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8502         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8503         * target-descriptions.c: In generated code, don't pass xml
8504         filename.
8505
8506 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8507
8508         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8509         (print_xml_feature::visit_post): Likewise.
8510         (print_xml_feature::visit): Likewise.
8511         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8512         (print_xml_feature): Add new class.
8513         * regformats/regdat.sh: Null xmltarget on feature targets.
8514         * target-descriptions.c (struct target_desc): Add xmltarget.
8515         (maintenance_check_tdesc_xml_convert): Add unittest function.
8516         (tdesc_get_features_xml): Add function to get xml.
8517         (maintenance_check_xml_descriptions): Test xml generation.
8518         * xml-tdesc.c (string_read_description_xml): Add function.
8519         * xml-tdesc.h (string_read_description_xml): Add declaration.
8520
8521 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8522
8523         * features/Makefile: Add feature marker to targets with new style
8524         target descriptions.
8525         * regformats/aarch64.dat: Regenerate.
8526         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8527         * regformats/i386/amd64-avx-linux.dat: Likewise.
8528         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8529         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8530         * regformats/i386/amd64-linux.dat: Likewise.
8531         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8532         * regformats/i386/amd64.dat: Likewise.
8533         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8534         * regformats/i386/i386-avx-linux.dat: Likewise.
8535         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8536         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8537         * regformats/i386/i386-linux.dat: Likewise.
8538         * regformats/i386/i386-mmx-linux.dat: Likewise.
8539         * regformats/i386/i386-mpx-linux.dat: Likewise.
8540         * regformats/i386/i386.dat: Likewise.
8541         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8542         * regformats/i386/x32-avx-linux.dat: Likewise.
8543         * regformats/i386/x32-linux.dat: Likewise.
8544         * regformats/tic6x-c62x-linux.dat: Likewise.
8545         * regformats/tic6x-c64x-linux.dat: Likewise.
8546         * regformats/tic6x-c64xp-linux.dat: Likewise.
8547         * regformats/regdat.sh: Parse feature marker.
8548
8549 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8550
8551         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8552         (tdesc_osabi_name): Likewise.
8553         * target-descriptions.c (tdesc_architecture_name): Add new
8554         function.
8555         (tdesc_osabi_name): Likewise.
8556
8557 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8558
8559         * common/tdesc.c (tdesc_predefined_type): Move to here.
8560         (tdesc_named_type): Likewise.
8561         (tdesc_create_vector): Likewise.
8562         (tdesc_create_struct): Likewise.
8563         (tdesc_set_struct_size): Likewise.
8564         (tdesc_create_union): Likewise.
8565         (tdesc_create_flags): Likewise.
8566         (tdesc_create_enum): Likewise.
8567         (tdesc_add_field): Likewise.
8568         (tdesc_add_typed_bitfield): Likewise.
8569         (tdesc_add_bitfield): Likewise.
8570         (tdesc_add_flag): Likewise.
8571         (tdesc_add_enum_value): Likewise.
8572         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8573         (struct tdesc_type_vector): Likewise.
8574         (struct tdesc_type_field): Likewise.
8575         (struct tdesc_type_with_fields): Likewise.
8576         (tdesc_create_enum): Add declaration.
8577         (tdesc_add_typed_bitfield): Likewise.
8578         (tdesc_add_enum_value): Likewise.
8579         * target-descriptions.c (tdesc_type_field): Move from here.
8580         (tdesc_type_builtin): Likewise.
8581         (tdesc_type_vector): Likewise.
8582         (tdesc_type_with_fields): Likewise.
8583         (tdesc_predefined_types): Likewise.
8584         (tdesc_named_type): Likewise.
8585         (tdesc_create_vector): Likewise.
8586         (tdesc_create_struct): Likewise.
8587         (tdesc_set_struct_size): Likewise.
8588         (tdesc_create_union): Likewise.
8589         (tdesc_create_flags): Likewise.
8590         (tdesc_create_enum): Likewise.
8591         (tdesc_add_field): Likewise.
8592         (tdesc_add_typed_bitfield): Likewise.
8593         (tdesc_add_bitfield): Likewise.
8594         (tdesc_add_flag): Likewise.
8595         (tdesc_add_enum_value): Likewise.
8596         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8597         (tdesc_add_typed_bitfield): Likewise.
8598         (tdesc_add_enum_value): Likewise.
8599
8600 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8601
8602         * common/tdesc.c (tdesc_feature::accept): Move to here.
8603         (tdesc_feature::operator==): Likewise.
8604         (tdesc_create_reg): Likewise.
8605         * common/tdesc.h (tdesc_type_kind): Likewise.
8606         (struct tdesc_type): Likewise.
8607         (struct tdesc_feature): Likewise.
8608         * regformats/regdat.sh: Create a feature.
8609         * target-descriptions.c (tdesc_type_kind): Move from here.
8610         (tdesc_type): Likewise.
8611         (tdesc_type_up): Likewise.
8612         (tdesc_feature): Likewise.
8613         (tdesc_create_reg): Likewise.
8614
8615 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8616
8617         * Makefile.in: Add arch/tdesc.c
8618         * common/tdesc.c: New file.
8619         * common/tdesc.h (tdesc_element_visitor): Move to here.
8620         (tdesc_element): Likewise.
8621         (tdesc_reg): Likewise.
8622         (tdesc_reg_up): Likewise.
8623         * regformats/regdef.h (reg): Add offset to constructors.
8624         * target-descriptions.c (tdesc_element_visitor): Move from here.
8625         (tdesc_element): Likewise.
8626         (tdesc_reg): Likewise.
8627         (tdesc_reg_up): Likewise.
8628
8629 2018-04-17  Tom Tromey  <tom@tromey.com>
8630
8631         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8632         discriminant field.
8633
8634 2018-04-17  Tom Tromey  <tom@tromey.com>
8635
8636         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8637
8638 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8639
8640         * symtab.c (print_symbol_info): Skip printing filename and line
8641         number when `last' is NULL.
8642         (symtab_symbol_info): Use empty string instead of NULL for first
8643         invocation of print_symbol_info.
8644         (rbreak_command): Pass NULL to `last' parameter of
8645         print_symbol_info.
8646
8647 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8648
8649         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8650         instead of nullptr.
8651
8652 2018-04-16  Pedro Alves  <palves@redhat.com>
8653
8654         * MAINTAINERS (sh): Remove.
8655         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8656         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8657         (ALLDEPFILES): Remove sh64-tdep.c.
8658         * NEWS: Mentions that support for SH-5/SH64 is removed.
8659         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8660         (sh*-*-openbsd*): Ditto.
8661         (sh64-*-elf*): Remove.
8662         (sh*): Remove.
8663         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8664         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8665         * sh-tdep.c: No longer include "sh64-tdep.h".
8666         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8667         * sh64-tdep.c, sh64-tdep.h: Remove files.
8668
8669 2018-04-16  Pedro Alves  <palves@redhat.com>
8670
8671         * MAINTAINERS: Remove m88k.
8672         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8673         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8674         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8675         * NEWS: Mention that support for m88k was removed.
8676         * configure.host (m88*-*-*): Remove support.
8677         * configure.nat (m88k-*-*): Remove support.
8678         * configure.tgt (m88*-*-openbsd*): Remove.
8679         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8680
8681 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8682
8683         * configure.tgt (x86_tobjs): New variable.
8684         (amd64_tobjs, i386_tobjs): Use it.
8685
8686 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8687
8688         * symtab.c (print_symbol_info): Precede the symbol definition by
8689         the line number when available.
8690         * NEWS: Advertise this enhancement.
8691
8692 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8693
8694         * NEWS (New options): announce set/show record btrace cpu.
8695         * btrace.c: Include record-btrace.h.
8696         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8697         the vendor is unknown.
8698         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8699         Maybe overwrite the btrace configuration's cpu.
8700         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8701         (btrace_fetch): Add cpu parameter.  Update callers.
8702         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8703         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8704         errata workarounds if the vendor is unknown.
8705         * python/py-record-btrace.c: Include record-btrace.h.
8706         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8707         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8708         * record-btrace.c (record_btrace_cpu_state_kind): New.
8709         (record_btrace_cpu): New.
8710         (set_record_btrace_cpu_cmdlist): New.
8711         (record_btrace_get_cpu): New.
8712         (require_btrace_thread, record_btrace_info)
8713         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8714         (cmd_set_record_btrace_cpu_none): New.
8715         (cmd_set_record_btrace_cpu_auto): New.
8716         (cmd_set_record_btrace_cpu): New.
8717         (cmd_show_record_btrace_cpu): New.
8718         (_initialize_record_btrace): Initialize set/show record btrace cpu
8719         commands.
8720         * record-btrace.h (record_btrace_get_cpu): New.
8721
8722 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8723
8724         * record.c (set_record_command): Fix typo in message.
8725
8726 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8727
8728         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8729
8730 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8731
8732         * infrun.c (process_event_stop_test): Call
8733         gdbarch_in_indirect_branch_thunk.
8734         * gdbarch.sh (in_indirect_branch_thunk): New.
8735         * gdbarch.c: Regenerated.
8736         * gdbarch.h: Regenerated.
8737         * x86-tdep.h: New.
8738         * x86-tdep.c: New.
8739         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8740         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8741         (ALLDEPFILES): Add x86-tdep.c.
8742         * arch-utils.h (default_in_indirect_branch_thunk): New.
8743         * arch-utils.c (default_in_indirect_branch_thunk): New.
8744         * i386-tdep: Include x86-tdep.h.
8745         (i386_in_indirect_branch_thunk): New.
8746         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8747         function.
8748         * amd64-tdep: Include x86-tdep.h.
8749         (amd64_in_indirect_branch_thunk): New.
8750         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8751
8752 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8753
8754         PR gdb/23053
8755         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8756         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8757         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8758         regression.
8759
8760 2018-04-12  Tom Tromey  <tom@tromey.com>
8761
8762         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8763         (rust_evaluate_subexp): Likewise.
8764
8765 2018-04-12  Pedro Alves  <palves@redhat.com>
8766
8767         * procfs.c (procfs_detach): Make forward declaration's prototype
8768         match definition's protototype.
8769         (proc_get_LDT_entry): Remove stale do_cleanups call.
8770
8771 2018-04-12  Pedro Alves  <palves@redhat.com>
8772
8773         * target.h (target_ops::to_has_exited): Delete.
8774         (target_has_exited): Delete.
8775         * target-delegates.c: Regenerate.
8776
8777 2018-04-11  Pedro Alves  <palves@redhat.com>
8778
8779         * target.c (fileio_fh_t::t): Add comment.
8780         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8781         (target_fileio_close): Handle a NULL target.
8782         (invalidate_fileio_fh): New.
8783         (target_close): Call it.
8784         * remote.c (remote_hostio_send_command): No longer check whether
8785         remote_desc is open.
8786
8787 2018-04-11  Pedro Alves  <palves@redhat.com>
8788
8789         * target.c (fileio_fh_t): Make it a named struct instead of a
8790         typedef.
8791         (fileio_fh_t::is_closed): New method.
8792         (DEF_VEC_O (fileio_fh_t)): Remove.
8793         (fileio_fhandles): Now a std::vector.
8794         (is_closed_fileio_fh): Delete.
8795         (acquire_fileio_fd): Adjust.  Rename parameters.
8796         (release_fileio_fd): Adjust.
8797         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8798         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8799         (target_fileio_close): Adjust.
8800
8801 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8802
8803         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8804         index.
8805
8806 2018-04-10  Pedro Alves  <palves@redhat.com>
8807
8808         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8809         (scoped_finish_thread_state): New class.
8810         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8811         cleanup.
8812         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8813         (fetch_inferior_event, normal_stop): Likewise.
8814         * thread.c (finish_thread_state_cleanup): Delete.
8815
8816 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8817             Pedro Alves  <palves@redhat.com>
8818
8819         * value.c: Include "selftest.h" and "common/array-view.h".
8820         (struct range) <operator ==>: New.
8821         (test_ranges_contain): New.
8822         (check_ranges_vector): New.
8823         (test_insert_into_bit_range_vector): New.
8824         (_initialize_values): Register selftests.
8825         * common/array-view.h (operator==, operator!=): New.
8826
8827 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8828
8829         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8830         an iterator.
8831         * inline-frame.c: Include <algorithm>.
8832         (struct inline_state): Add constructor.
8833         (inline_state_s): Remove.
8834         (DEF_VEC_O(inline_state_s)): Remove.
8835         (inline_states): Change type to std::vector.
8836         (find_inline_frame_state): Adjust to std::vector.
8837         (allocate_inline_frame_state): Remove.
8838         (clear_inline_frame_state): Adjust to std::vector.
8839         (skip_inline_frames): Adjust to std::vector.
8840
8841 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8842
8843         * tracepoint.h (struct trace_state_variable): Add constructor.
8844         <name>: Change type to std::string.
8845         * tracepoint.c (tsv_s): Remove.
8846         (DEF_VEC_O(tsv_s)): Remove.
8847         (tvariables): Change to std::vector.
8848         (create_trace_state_variable): Adjust to std::vector.
8849         (find_trace_state_variable): Likewise.
8850         (find_trace_state_variable_by_number): Likewise.
8851         (delete_trace_state_variable): Likewise.
8852         (trace_variable_command): Adjust to std::string.
8853         (delete_trace_variable_command): Likewise.
8854         (tvariables_info_1): Adjust to std::vector.
8855         (save_trace_state_variables): Likewise.
8856         (start_tracing): Likewise.
8857         (merge_uploaded_trace_state_variables): Adjust to std::vector
8858         and std::string.
8859         * target.h (struct target_ops)
8860         <to_download_trace_state_variable>: Pass reference to
8861         trace_state_variable.
8862         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8863         * target-delegates.c: Re-generate.
8864         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8865         (mi_tsv_deleted): Likewise.
8866         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8867         * remote.c (remote_download_trace_state_variable): Change
8868         pointer to reference and adjust.
8869         * make-target-delegates (parse_argtypes): Handle references.
8870         (write_function_header): Likewise.
8871         (munge_type): Likewise.
8872
8873 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8874
8875         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8876         string_view-selftests.c.
8877         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8878         testsuite.
8879         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8880         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8881         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8882         * unittests/basic_string_view/element_access/char/1.cc:
8883         Likewise.
8884         * unittests/basic_string_view/element_access/char/empty.cc:
8885         Likewise.
8886         * unittests/basic_string_view/element_access/char/front_back.cc:
8887         Likewise.
8888         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8889         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8890         Likewise.
8891         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8892         Likewise.
8893         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8894         Likewise.
8895         * unittests/basic_string_view/operations/compare/char/1.cc:
8896         Likewise.
8897         * unittests/basic_string_view/operations/compare/char/13650.cc:
8898         Likewise.
8899         * unittests/basic_string_view/operations/copy/char/1.cc:
8900         Likewise.
8901         * unittests/basic_string_view/operations/data/char/1.cc:
8902         Likewise.
8903         * unittests/basic_string_view/operations/find/char/1.cc:
8904         Likewise.
8905         * unittests/basic_string_view/operations/find/char/2.cc:
8906         Likewise.
8907         * unittests/basic_string_view/operations/find/char/3.cc:
8908         Likewise.
8909         * unittests/basic_string_view/operations/find/char/4.cc:
8910         Likewise.
8911         * unittests/basic_string_view/operations/rfind/char/1.cc:
8912         Likewise.
8913         * unittests/basic_string_view/operations/rfind/char/2.cc:
8914         Likewise.
8915         * unittests/basic_string_view/operations/rfind/char/3.cc:
8916         Likewise.
8917         * unittests/basic_string_view/operations/substr/char/1.cc:
8918         Likewise.
8919         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8920         * unittests/string_view-selftests.c: New file.
8921
8922 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8923
8924         * unittests/basic_string_view/capacity/1.cc: New file.
8925         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8926         * unittests/basic_string_view/cons/char/1.cc: New file.
8927         * unittests/basic_string_view/cons/char/2.cc: New file.
8928         * unittests/basic_string_view/cons/char/3.cc: New file.
8929         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8930         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8931         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8932         * unittests/basic_string_view/element_access/char/1.cc: New file.
8933         * unittests/basic_string_view/element_access/char/2.cc: New file.
8934         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8935         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8936         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8937         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8938         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8939         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8940         * unittests/basic_string_view/include.cc: New file.
8941         * unittests/basic_string_view/inserters/char/1.cc: New file.
8942         * unittests/basic_string_view/inserters/char/2.cc: New file.
8943         * unittests/basic_string_view/inserters/char/3.cc: New file.
8944         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8945         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8946         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8947         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8948         * unittests/basic_string_view/literals/types.cc: New file.
8949         * unittests/basic_string_view/literals/values.cc: New file.
8950         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8951         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8952         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8953         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8954         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8955         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8956         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8957         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8958         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8959         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8960         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8961         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8962         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8963         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8964         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8965         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8966         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8967         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8968         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8969         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8970         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8971         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8972         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8973         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8974         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8975         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8976         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8977         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8978         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8979         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8980         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8981         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8982         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8983         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8984         * unittests/basic_string_view/operators/char/2.cc: New file.
8985         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8986         * unittests/basic_string_view/range_access/char/1.cc: New file.
8987         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8988         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8989         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8990         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8991         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8992         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8993         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8994         * unittests/basic_string_view/typedefs.cc: New file.
8995         * unittests/basic_string_view/types/1.cc: New file.
8996
8997 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8998
8999         * common/gdb_string_view.h: Remove libstdc++ implementation
9000         details, adjust to gdb reality.
9001         * common/gdb_string_view.tcc: Likewise.
9002         * cli/cli-script.c (struct string_view): Remove.
9003         (user_args) <m_args>: Change element type to gdb::string_view.
9004         (user_args::insert_args): Adjust.
9005
9006 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9007
9008         * common/gdb_string_view.h: New file.
9009         * common/gdb_string_view.tcc: New file.
9010
9011 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9012
9013         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9014         * configure: Re-generate.
9015
9016 2018-04-09  Pedro Alves  <palves@redhat.com>
9017
9018         * gdbarch.sh: Include "observable.h" instead of "observer.h".
9019         (set_target_gdbarch): Call
9020         gdb::observers::architecture_changed.notify instead of
9021         observer_notify_architecture_changed.
9022
9023 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9024
9025         * tracepoint.c (struct current_traceframe_cleanup): Remove.
9026         (do_restore_current_traceframe_cleanup): Remove.
9027         (restore_current_traceframe_cleanup_dtor): Remove.
9028         (make_cleanup_restore_current_traceframe): Remove.
9029         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9030         New.
9031         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9032         * infrun.c (fetch_inferior_event): Use
9033         scoped_restore_current_traceframe.
9034
9035 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9036
9037         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9038         Remove.
9039         <n_allocated_type_units>: Remove.
9040         <all_type_units>: Change to std::vector.
9041         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9042         to std::vector change.
9043         (dwarf2_per_objfile::get_cutu): Likewise.
9044         (dwarf2_per_objfile::get_tu): Likewise.
9045         (create_signatured_type_table_from_index): Likewise.
9046         (create_signatured_type_table_from_debug_names): Likewise.
9047         (dw2_symtab_iter_next): Likewise.
9048         (dw2_print_stats): Likewise.
9049         (dw2_expand_all_symtabs): Likewise.
9050         (dw2_expand_marked_cus): Likewise.
9051         (dw2_debug_names_iterator::next): Likewise.
9052         (dwarf2_initialize_objfile): Likewise.
9053         (add_signatured_type_cu_to_table): Likewise.
9054         (create_all_type_units): Likewise.
9055         (add_type_unit): Likewise.
9056         (struct tu_abbrev_offset): Add constructor.
9057         (build_type_psymtabs_1): Adjust to std::vector change.
9058         (print_tu_stats): Likewise.
9059         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9060         (write_debug_names): Likewise.
9061
9062 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9063
9064         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9065         Make an std::vector.
9066         <n_comp_units>: Remove.
9067         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9068         to std::vector change.
9069         (dwarf2_per_objfile::get_cutu): Likewise.
9070         (dwarf2_per_objfile::get_cu): Likewise.
9071         (create_cus_from_index): Likewise.
9072         (create_addrmap_from_index): Likewise.
9073         (create_addrmap_from_aranges): Likewise.
9074         (dwarf2_read_index): Likewise.
9075         (dw2_find_last_source_symtab): Likewise.
9076         (dw2_map_symtabs_matching_filename): Likewise.
9077         (dw2_symtab_iter_next): Likewise.
9078         (dw2_print_stats): Likewise.
9079         (dw2_expand_all_symtabs): Likewise.
9080         (dw2_expand_symtabs_with_fullname): Likewise.
9081         (dw2_expand_marked_cus): Likewise.
9082         (dw2_map_symbol_filenames): Likewise.
9083         (create_cus_from_debug_names): Likewise.
9084         (dwarf2_read_debug_names): Likewise.
9085         (dw2_debug_names_iterator::next): Likewise.
9086         (dwarf2_initialize_objfile): Likewise.
9087         (set_partial_user): Likewise.
9088         (dwarf2_build_psymtabs_hard): Likewise.
9089         (read_comp_units_from_section): Remove arguments, adjust to
9090         std::vector change.
9091         (create_all_comp_units): Adjust to std::vector and
9092         read_comp_units_from_section changes.
9093         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9094         change.
9095         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9096         (psyms_seen_size): Likewise.
9097         (write_gdbindex): Likewise.
9098         (write_debug_names): Likewise.
9099
9100 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9101
9102         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9103         with dwarf2_per_objfile.
9104         (create_cus_from_index): Likewise.
9105         (create_signatured_type_table_from_index): Likewise.
9106         (dwarf2_read_index): Likewise.
9107         (dwarf2_initialize_objfile): Likewise.
9108         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9109         per_cu rather than get_dwarf2_per_objfile.
9110
9111 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9112
9113         * dwarf2read.h (struct signatured_type): Forward declare.
9114         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9115         New methods.
9116         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9117         (dw2_get_cutu): ...this.
9118         (dwarf2_per_objfile::get_cu): Rename from...
9119         (dw2_get_cu): ...this.
9120         (dwarf2_per_objfile::get_tu): New.
9121         (create_addrmap_from_index): Adjust.
9122         (create_addrmap_from_aranges): Adjust.
9123         (dw2_find_last_source_symtab): Adjust.
9124         (dw2_map_symtabs_matching_filename): Adjust.
9125         (dw2_symtab_iter_next): Adjust.
9126         (dw2_print_stats): Adjust.
9127         (dw2_expand_all_symtabs): Adjust.
9128         (dw2_expand_symtabs_with_fullname): Adjust.
9129         (dw2_expand_marked_cus): Adjust.
9130         (dw_expand_symtabs_matching_file_matcher): Adjust.
9131         (dw2_map_symbol_filenames): Adjust.
9132         (dw2_debug_names_iterator::next): Adjust.
9133         (dwarf2_initialize_objfile): Adjust.
9134         (set_partial_user): Adjust.
9135         (dwarf2_build_psymtabs_hard): Adjust.
9136
9137 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9138
9139         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9140         Remove unused variables.
9141         (dw2_map_symtabs_matching_filename): Likewise.
9142         (dwarf2_record_block_ranges): Likewise.
9143         (dwarf2_read_addr_index): Likewise.
9144         (follow_die_offset): Likewise.
9145
9146 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9147
9148         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9149         to symbol_file_add_main.
9150
9151 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9152
9153         PR mi/22299
9154         * mi/mi-console.c (do_fputc_async_safe): New.
9155         (mi_console_file::write_async_safe): New.
9156         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9157         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9158         New.
9159         * ui-file.c (ui_file::putstrn): Adjust call to
9160         fputstrn_unfiltered.
9161         * utils.c (printchar): Replace do_fputs and do_fprintf
9162         parameters by do_fputc.
9163         (fputstr_filtered): Adjust call to printchar.
9164         (fputstr_unfiltered): Likewise.
9165         (fputstrn_filtered): Likewise.
9166         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9167         printchar.
9168         * utils.h (do_fputc_ftype): New typedef.
9169         (fputstrn_unfiltered): Add do_fputc parameter.
9170
9171 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9172
9173         * regformats/i386/i386-avx.dat: Remove.
9174
9175 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9176
9177         PR gdb/22979
9178         * amd64-tdep.c (amd64_none_init_abi): New function.
9179         (amd64_x32_none_init_abi): New function.
9180         (_initialize_amd64_tdep): Register handlers for x86-64 and
9181         x64_32 with GDB_OSABI_NONE.
9182         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9183         GDB_OSABI_NONE osabi.
9184
9185 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9186
9187         PR gdb/22980
9188         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9189         GDB_OSABI_NONE.
9190         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9191         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9192
9193 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9194
9195         * common/byte-vector.h (char_vector): New type.
9196         * target.h (target_read_alloc): Return
9197         gdb::optional<byte_vector>.
9198         (target_read_stralloc): Return gdb::optional<char_vector>.
9199         (target_get_osdata): Return gdb::optional<char_vector>.
9200         * target.c (target_read_alloc_1): Templatize.  Replacement
9201         manual memory management with vector.
9202         (target_read_alloc): Change return type, adjust.
9203         (target_read_stralloc): Change return type, adjust.
9204         (target_get_osdata): Change return type, adjust.
9205         * auxv.c (struct auxv_info) <length>: Remove.
9206         <data>: Change type to gdb::optional<byte_vector>.
9207         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9208         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9209         (target_auxv_search): Adjust.
9210         (fprint_target_auxv): Adjust.
9211         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9212         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9213         (linux_make_corefile_notes): Adjust.
9214         * osdata.c (get_osdata): Adjust.
9215         * remote.c (remote_get_threads_with_qxfer): Adjust.
9216         (remote_memory_map): Adjust.
9217         (remote_traceframe_info): Adjust.
9218         (btrace_read_config): Adjust.
9219         (remote_read_btrace): Adjust.
9220         (remote_pid_to_exec_file): Adjust.
9221         * solib-aix.c (solib_aix_get_library_list): Adjust.
9222         * solib-dsbt.c (decode_loadmap): Don't free buf.
9223         (dsbt_get_initial_loadmaps): Adjust.
9224         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9225         * solib-target.c (solib_target_current_sos): Adjust.
9226         * tracepoint.c (sdata_make_value): Adjust.
9227         * xml-support.c (xinclude_start_include): Adjust.
9228         (xml_fetch_content_from_file): Adjust.
9229         * xml-support.h (xml_fetch_another): Change return type.
9230         (xml_fetch_content_from_file): Change return type.
9231         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9232         * xml-tdesc.c (file_read_description_xml): Adjust.
9233         (fetch_available_features_from_target): Change return type.
9234         (target_fetch_description_xml): Adjust.
9235         (target_read_description_xml): Adjust.
9236
9237 2018-04-06  Tom Tromey  <tom@tromey.com>
9238
9239         * value.c (~value): Update.
9240         (struct value) <contents>: Now unique_xmalloc_ptr.
9241         (value_contents_bits_eq, allocate_value_contents)
9242         (value_contents_raw, value_contents_all_raw)
9243         (value_contents_for_printing, value_contents_for_printing_const)
9244         (set_value_enclosing_type): Update.
9245
9246 2018-04-06  Tom Tromey  <tom@tromey.com>
9247
9248         * value.c (range_s): Remove typedef, VEC.
9249         (struct range): Add operator<.
9250         (range_lessthan): Remove.
9251         (ranges_contain): Change type.
9252         (~value): Update.
9253         (struct value) <unavailable, optimized_out>: Now std::vector.
9254         (value_entirely_available)
9255         (value_entirely_covered_by_range_vector)
9256         (value_entirely_unavailable, value_entirely_optimized_out):
9257         Update.
9258         (insert_into_bit_range_vector): Change argument type.
9259         (find_first_range_overlap): Likewise.
9260         (struct ranges_and_idx, value_contents_bits_eq)
9261         (require_not_optimized_out, require_available): Update.
9262         (ranges_copy_adjusted): Change argument types.
9263         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9264
9265 2018-04-06  Tom Tromey  <tom@tromey.com>
9266
9267         * value.c (~value): Update.
9268         (struct value) <parent>: Now a value_ref_ptr.
9269         (value_parent, set_value_parent, value_address, value_copy):
9270         Update.
9271
9272 2018-04-06  Tom Tromey  <tom@tromey.com>
9273
9274         * value.c (struct value): Add constructor, destructor, and member
9275         initializers.
9276         (allocate_value_lazy, value_decref): Update.
9277
9278 2018-04-06  Tom Tromey  <tom@tromey.com>
9279
9280         * value.c (struct value) <released, next>: Remove.
9281         (all_values): Now a std::vector.
9282         (allocate_value_lazy): Update.
9283         (value_next): Remove.
9284         (value_mark, value_free_to_mark, release_value)
9285         (value_release_to_mark): Update.
9286
9287 2018-04-06  Tom Tromey  <tom@tromey.com>
9288
9289         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9290         (free_value_chain): Remove.
9291         * value.c (free_value_chain): Remove.
9292         (value_release_to_mark): Return a std::vector.
9293         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9294         std::vector.
9295         (check_condition): Update.
9296         * eval.c (fetch_subexp_value): Change "val_chain" to a
9297         std::vector.
9298         * breakpoint.c (update_watchpoint): Update.
9299         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9300
9301 2018-04-06  Tom Tromey  <tom@tromey.com>
9302
9303         * value.h (free_all_values): Remove.
9304         * value.c (free_all_values): Remove.
9305
9306 2018-04-06  Tom Tromey  <tom@tromey.com>
9307
9308         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9309         (value_history_chain, value_history_count): Remove.
9310         (value_history): New global.
9311         (record_latest_value, access_value_history, show_values)
9312         (preserve_values): Update.
9313
9314 2018-04-06  Tom Tromey  <tom@tromey.com>
9315
9316         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9317         * varobj.c (varobj_set_display_format, varobj_set_value)
9318         (install_default_visualizer, construct_visualizer)
9319         (install_new_value, ~varobj, varobj_get_value_type)
9320         (my_value_of_variable, varobj_editable_p): Update.
9321         * c-varobj.c (c_describe_child, c_value_of_variable)
9322         (cplus_number_of_children, cplus_describe_child): Update.
9323         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9324         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9325         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9326
9327 2018-04-06  Tom Tromey  <tom@tromey.com>
9328
9329         * printcmd.c (last_examine_address): Change type to
9330         value_ref_ptr.
9331         (do_examine, x_command): Update.
9332
9333 2018-04-06  Tom Tromey  <tom@tromey.com>
9334
9335         * value.c (release_value): Update.
9336         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9337         (struct bpstats) <val>: Now a value_ref_ptr.
9338         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9339         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9340         (~watchpoint, print_it_watchpoint, watch_command_1)
9341         (invalidate_bp_value_on_memory_change): Update.
9342
9343 2018-04-06  Tom Tromey  <tom@tromey.com>
9344
9345         * varobj.c (varobj_clear_saved_item)
9346         (update_dynamic_varobj_children, install_new_value, ~varobj):
9347         Update.
9348         * value.h (value_incref): Move declaration earlier.
9349         (value_decref): Rename from value_free.
9350         (struct value_ref_policy): New.
9351         (value_ref_ptr): New typedef.
9352         (struct value_deleter): Remove.
9353         (gdb_value_up): Remove typedef.
9354         (release_value): Change return type.
9355         (release_value_or_incref): Remove.
9356         * value.c (set_value_parent): Update.
9357         (value_incref): Change return type.
9358         (value_decref): Rename from value_free.
9359         (value_free_to_mark, free_all_values, free_value_chain): Update.
9360         (release_value): Return value_ref_ptr.
9361         (release_value_or_incref): Remove.
9362         (record_latest_value, set_internalvar, clear_internalvar):
9363         Update.
9364         * stack.c (info_frame_command): Don't call value_free.
9365         * python/py-value.c (valpy_dealloc, valpy_new)
9366         (value_to_value_object): Update.
9367         * printcmd.c (do_examine): Update.
9368         * opencl-lang.c (lval_func_free_closure): Update.
9369         * mi/mi-main.c (register_changed_p): Don't call value_free.
9370         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9371         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9372         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9373         value_free.
9374         * guile/scm-value.c (vlscm_free_value_smob)
9375         (vlscm_scm_from_value): Update.
9376         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9377         (frame_unwind_register_unsigned, get_frame_register_bytes)
9378         (put_frame_register_bytes): Don't call value_free.
9379         * findvar.c (address_from_register): Don't call value_free.
9380         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9381         * dwarf2loc.c (entry_data_value_free_closure)
9382         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9383         (dwarf2_evaluate_loc_desc_full): Update.
9384         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9385         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9386         (~watchpoint, watch_command_1)
9387         (invalidate_bp_value_on_memory_change): Update.
9388         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9389
9390 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9391
9392         PR gdb/23022
9393         * warning.m4: Add -Wno-error=deprecated-register.
9394         * configure: Re-generate.
9395
9396 2018-04-05  Tom Tromey  <tom@tromey.com>
9397
9398         * linespec.h: Remove include of "vec.h".
9399
9400 2018-04-05  Tom Tromey  <tom@tromey.com>
9401
9402         * linespec.c (typep): Remove typedef.
9403         (find_methods, find_superclass_methods): Take a std::vector.
9404         (find_method): Use std::vector.
9405
9406 2018-04-05  Tom Tromey  <tom@tromey.com>
9407
9408         * utils.c (compare_strings): Remove.
9409         * utils.h (compare_strings): Remove.
9410         * objc-lang.h (find_imps): Update.
9411         * objc-lang.c (find_methods): Take a std::vector.
9412         (uniquify_strings, find_imps): Likewise.
9413         * linespec.c (find_methods): Take a std::vector.
9414         (decode_objc): Use std::vector.
9415         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9416         a std::vector.
9417         (find_method, find_function_symbols): Use std::vector.
9418
9419 2018-04-05  Tom Tromey  <tom@tromey.com>
9420
9421         * completer.c (completion_tracker::completion_tracker): Remove
9422         cast.
9423         (completion_tracker::discard_completions): Likewise.
9424         * breakpoint.c (ambiguous_names_p): Remove cast.
9425         * ada-lang.c (_initialize_ada_language): Remove cast.
9426         * utils.h (streq): Update.
9427         (streq_hash): Add new declaration.
9428         * utils.c (streq): Return bool.
9429         (streq_hash): New function.
9430
9431 2018-04-05  Tom Tromey  <tom@tromey.com>
9432
9433         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9434         Remove a string copy.
9435
9436 2018-04-05  Tom Tromey  <tom@tromey.com>
9437
9438         * linespec.c (filter_results): Use std::vector.
9439         (decode_line_2, decode_line_full): Update.
9440
9441 2018-04-05  Tom Tromey  <tom@tromey.com>
9442
9443         * linespec.c (canonical_to_fullform): Return std::string.
9444         (filter_results): Update.
9445         (struct decode_line_2_item): Add constructor.
9446         <fullform, displayform>: Now std::string.
9447         (decode_line_2_compare_items): Now a std::sort comparator.
9448         (decode_line_2): Update.
9449
9450 2018-04-05  Tom Tromey  <tom@tromey.com>
9451
9452         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9453         (unexpected_linespec_error): Update.
9454         (linespec_parse_basic, parse_linespec): Update.
9455
9456 2018-04-05  Tom Tromey  <tom@tromey.com>
9457
9458         * linespec.c (linespec_parse_basic): Reindent.
9459
9460 2018-04-05  Tom Tromey  <tom@tromey.com>
9461
9462         * minsyms.h (iterate_over_minimal_symbols): Update.
9463         * minsyms.c (iterate_over_minimal_symbols): Take a
9464         gdb::function_view.
9465         * linespec.c (struct collect_minsyms): Remove.
9466         (compare_msyms): Now a std::sort comparator.
9467         (add_minsym): Add parameters.
9468         (search_minsyms_for_name): Update.  Use std::vector.
9469
9470 2018-04-03  Tom Tromey  <tom@tromey.com>
9471
9472         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9473         gdb::byte_vector.
9474
9475 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9476
9477         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9478
9479 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9480
9481         PR gdb/16959
9482         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9483         printing static type.
9484
9485 2018-04-01  Tom Tromey  <tom@tromey.com>
9486
9487         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9488         (rs6000_xfer_shared_libraries): Update.
9489
9490 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9491
9492         * common/gdb_vecs.h (char_ptr): Remove.
9493         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9494
9495 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9496
9497         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9498         with std::vector.
9499         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9500
9501 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9502
9503         * tracepoint.h (struct uploaded_tp): Initialize fields.
9504         <actions, step_actions, cmd_strings>: Change type to
9505         std::vector<char *>.
9506         * tracepoint.c (get_uploaded_tp): Allocate with new.
9507         (free_uploaded_tps): Free with delete.
9508         (parse_tracepoint_definition): Adjust to std::vector change.
9509         * breakpoint.c (read_uploaded_action): Likewise.
9510         (create_tracepoint_from_upload): Likewise.
9511         * ctf.c (ctf_write_uploaded_tp): Likewise.
9512         (SET_ARRAY_FIELD): Likewise.
9513         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9514
9515 2018-03-30  Tom Tromey  <tom@tromey.com>
9516
9517         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9518         std::unique_ptr.
9519         (svr4_keep_data_in_core): Update.
9520         (svr4_read_so_list): Update.
9521
9522 2018-03-30  Tom Tromey  <tom@tromey.com>
9523
9524         * windows-nat.c (handle_output_debug_string, handle_exception):
9525         Update.
9526         * target.h (target_read_string): Update.
9527         * target.c (target_read_string): Change "string" to
9528         unique_xmalloc_ptr.
9529         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9530         Update.
9531         * solib-frv.c (frv_current_sos): Update.
9532         * solib-dsbt.c (dsbt_current_sos): Update.
9533         * solib-darwin.c (darwin_current_sos): Update.
9534         * linux-thread-db.c (inferior_has_bug): Update.
9535         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9536         Update.  Remove alloca.
9537         * ada-lang.c (ada_main_name): Update.
9538
9539 2018-03-30  Tom Tromey  <tom@tromey.com>
9540
9541         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9542         (struct dwo_file_deleter): New.
9543         (dwo_file_up): New typedef.
9544         (open_and_init_dwo_file): Use dwo_file_up.
9545         (free_dwo_file_cleanup): Remove.
9546
9547 2018-03-30  Tom Tromey  <tom@tromey.com>
9548
9549         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9550         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9551
9552 2018-03-30  Tom Tromey  <tom@tromey.com>
9553
9554         * dwarf2read.c (class free_cached_comp_units): New class.
9555         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9556         (free_cached_comp_units): Remove function.
9557
9558 2018-03-30  Tom Tromey  <tom@tromey.com>
9559
9560         * utils.h (make_cleanup_unpush_target): Remove.
9561         * inf-ptrace.c (struct target_unpusher): New.
9562         (target_unpush_up) New typedef.
9563         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9564         target_unpush_up.
9565         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9566
9567 2018-03-27  Tom Tromey  <tom@tromey.com>
9568
9569         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9570
9571 2018-03-27  Pedro Alves  <palves@redhat.com>
9572             Tom Tromey  <tom@tromey.com>
9573
9574         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9575         destructor.  Now a class.
9576         (gdb_readline_wrapper_cleanup): Remove function.
9577         (gdb_readline_wrapper): Remove cleanups.
9578
9579 2018-03-27  Tom Tromey  <tom@tromey.com>
9580
9581         * typeprint.h (struct type_print_options) <local_typedefs,
9582         global_typedefs>: Remove "struct" keyword.
9583         (class typedef_hash_table): New class.
9584         (recursively_update_typedef_hash, add_template_parameters)
9585         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9586         (find_typedef_in_hash): Don't declare.
9587         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9588         (typedef_hash_table::recursively_update): Rename from
9589         recursively_update_typedef_hash.  Now a member.
9590         (typedef_hash_table::add_template_parameters): Rename from
9591         add_template_parameters.  Now a member.
9592         (typedef_hash_table::typedef_hash_table): Now a constructor;
9593         rename from create_typedef_hash.
9594         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9595         rename from free_typedef_hash.
9596         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9597         (do_free_global_table): Remove.
9598         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9599         from copy_type_recursive.
9600         (create_global_typedef_table): Remove.
9601         (typedef_hash_table::find_global_typedef): Now a member of
9602         typedef_hash_table.
9603         (typedef_hash_table::find_typedef): Rename from
9604         find_typedef_in_hash; now a member.
9605         (whatis_exp): Update.
9606         * extension.h (struct ext_lang_type_printers): Add constructor and
9607         destructor.
9608         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9609         declare.
9610         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9611         Now a constructor; rename from start_ext_lang_type_printers.
9612         (ext_lang_type_printers): Now a destructor; rename from
9613         free_ext_lang_type_printers.
9614         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9615         Update.
9616         (c_type_print_base_struct_union): Update.  Remove cleanups.
9617
9618 2018-03-27  Tom Tromey  <tom@tromey.com>
9619
9620         * dwarf-index-write.c: Include <cmath>.
9621
9622 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9623
9624         * NEWS: Add entry describing new "set|show varsize-limit" command.
9625         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9626         command.
9627         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9628         "set variable".
9629
9630 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9631
9632         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9633         dwarf-index-write.c
9634         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9635         * dwarf-index-common.c: New file.
9636         * dwarf-index-common.h: New file.
9637         * dwarf-index-write.c: New file.
9638         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9639         (struct dwarf2_section_info): Move from here.
9640         (dwarf2_section_info_def): Likewise.
9641         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9642         (offset_type): Likewise.
9643         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9644         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9645         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9646         (byte_swap): Likewise.
9647         (MAYBE_SWAP): Likewise.
9648         (dwarf2_per_cu_ptr): Likewise.
9649         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9650         (struct tu_stats): Likewise.
9651         (struct dwarf2_per_objfile): Likewise.
9652         (struct dwarf2_per_cu_data): Likewise.
9653         (struct signatured_type): Likewise.
9654         (sig_type_ptr): Likewise.
9655         (DEF_VEC_P (sig_type_ptr)): Likewise.
9656         (INDEX4_SUFFIX): Likewise.
9657         (INDEX5_SUFFIX): Likewise.
9658         (DEBUG_STR_SUFFIX): Likewise.
9659         (dwarf2_read_section): Make non-static.
9660         (mapped_index_string_hash): Move from here.
9661         (dwarf5_djb_hash): Likewise.
9662         (file_write): Likewise.
9663         (class data_buf): Likewise.
9664         (struct symtab_index_entry): Likewise.
9665         (struct mapped_symtab): Likewise.
9666         (find_slot): Likewise.
9667         (hash_expand): Likewise.
9668         (add_index_entry): Likewise.
9669         (uniquify_cu_indices): Likewise.
9670         (class c_str_view): Likewise.
9671         (class c_str_view_hasher): Likewise.
9672         (class vector_hasher): Likewise.
9673         (write_hash_table): Likewise.
9674         (psym_index_map): Likewise.
9675         (struct addrmap_index_data): Likewise.
9676         (add_address_entry): Likewise.
9677         (add_address_entry_worker): Likewise.
9678         (write_address_map): Likewise.
9679         (symbol_kind): Likewise.
9680         (write_psymbols): Likewise.
9681         (struct signatured_type_index_data): Likewise.
9682         (write_one_signatured_type): Likewise.
9683         (recursively_count_psymbols): Likewise.
9684         (recursively_write_psymbols): Likewise.
9685         (class debug_names): Likewise.
9686         (check_dwarf64_offsets): Likewise.
9687         (psyms_seen_size): Likewise.
9688         (write_gdbindex): Likewise.
9689         (write_debug_names): Likewise.
9690         (assert_file_size): Likewise.
9691         (write_psymtabs_to_index): Likewise.
9692         (save_gdb_index_command): Likewise.
9693         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9694         command.
9695         * dwarf2read.h: New file.
9696
9697 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9698
9699         PR gdb/22670
9700         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9701         symbol name if the CU's language stores symbol names in linkage
9702         format.
9703         * language.h (struct language_defn)
9704         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9705         all instances of this struct.
9706
9707 2018-03-26  Tom Tromey  <tom@tromey.com>
9708
9709         * stack.c (backtrace_command_1): Remove verbose code.
9710
9711 2018-03-26  Tom Tromey  <tom@tromey.com>
9712
9713         * python/py-framefilter.c (py_print_type): Don't catch
9714         exceptions.  Return void.
9715         (py_print_value): Likewise.
9716         (py_print_single_arg): Likewise.
9717         (enumerate_args): Don't catch exceptions.
9718         (py_print_args): Likewise.
9719         (py_print_frame): Likewise.
9720         (gdbpy_apply_frame_filter): Catch exceptions here.
9721
9722 2018-03-26  Tom Tromey  <tom@tromey.com>
9723
9724         * stack.c (_initialize_stack): Remove trailing newlines from help
9725         text.  Add "Usage" line to "backtrace" help.
9726
9727 2018-03-26  Tom Tromey  <tom@tromey.com>
9728
9729         PR python/16486:
9730         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9731
9732 2018-03-26  Tom Tromey  <tom@tromey.com>
9733
9734         * python/py-framefilter.c (py_print_single_arg): Return
9735         EXT_LANG_BT_ERROR from catch.
9736
9737 2018-03-26  Tom Tromey  <tom@tromey.com>
9738
9739         PR backtrace/15584:
9740         * stack.c (backtrace_command_1): Move some code into no-filters
9741         "if".
9742
9743 2018-03-26  Tom Tromey  <tom@tromey.com>
9744
9745         * python/py-framefilter.c (throw_quit_or_print_exception): New
9746         function.
9747         (gdbpy_apply_frame_filter): Use it.
9748
9749 2018-03-26  Tom Tromey  <tom@tromey.com>
9750
9751         PR cli/17716:
9752         * python/py-framefilter.c (py_print_type, py_print_value)
9753         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9754         RETURN_MASK_ERROR.
9755
9756 2018-03-26  Tom Tromey  <tom@tromey.com>
9757
9758         * python/py-framefilter.c (enumerate_args): Use
9759         gdb::unique_xmalloc_ptr.
9760
9761 2018-03-26  Tom Tromey  <tom@tromey.com>
9762
9763         * python/py-framefilter.c (py_print_frame): Return
9764         EXT_LANG_BT_OK.
9765         (gdbpy_apply_frame_filter): Update comment.
9766         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9767         Remove.
9768         <EXT_LANG_BT_NO_FILTERS>: Change value.
9769
9770 2018-03-26  Tom Tromey  <tom@tromey.com>
9771
9772         PR backtrace/15582:
9773         * stack.c (backtrace_command): Parse "hide" argument.
9774         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9775         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9776         constant.
9777
9778 2018-03-26  Tom Tromey  <tom@tromey.com>
9779
9780         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9781         add "flags".
9782         (backtrace_command): Remove "fulltrace", add "flags".
9783
9784 2018-03-26  Tom Tromey  <tom@tromey.com>
9785
9786         * stack.c (backtrace_command): Rewrite command line parsing.
9787
9788 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9789
9790         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9791
9792 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9793
9794         * filename-seen-cache.h: Add include guard.
9795
9796 2018-03-26  Keith Seitz  <keiths@redhat.com>
9797
9798         * symfile.c (place_section): Remove "struct" from section_addr_info
9799         in comment.
9800         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9801         "struct" keyword from section_addr_info.
9802
9803 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9804
9805         * regformats/regdef.h (reg): Add constructors.
9806
9807 2018-03-25  Pedro Alves  <palves@redhat.com>
9808
9809         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9810         if then/else bodies in var_func_name extraction.
9811
9812 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9813
9814         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9815         lookup_minimal_symbol() to find symbol entry.
9816         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9817
9818 2018-03-23  Keith Seitz  <keiths@redhat.com>
9819
9820         PR c++/22968
9821         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9822         nested type definitions for C++, too.
9823
9824 2018-03-23  Tom Tromey  <tom@tromey.com>
9825
9826         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9827         a typedef.
9828         (macho_register_oso): Remove.
9829         (macho_symtab_read): Take a std::vector.
9830         (oso_el_compare_name): Now a std::sort comparator.
9831         (macho_symfile_read_all_oso): Take a std::vector.
9832         (macho_symfile_read): Use std::vector.  Remove cleanups.
9833
9834 2018-03-22  Tom Tromey  <tom@tromey.com>
9835
9836         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9837         (record_full_goto_bookmark): Use std::string.
9838
9839 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9840
9841         PR tdep/18295
9842         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9843         a single mask.
9844
9845 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9846
9847         * rs6000-tdep.c (store_insn_p): New function.
9848         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9849         and cr_reg to their unshifted values. Use store_insn_p to
9850         match LR saves using either R1 or fdata->alloca_reg. Use
9851         store_insn_p to match CR saves. Set alloca_reg_offset
9852         when alloca_reg and framep are set. Remove lr_reg shift
9853         when assigning to fdata->lr_register.
9854
9855 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9856
9857         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9858         command line args instead of emitting a warning.
9859
9860 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9861
9862         * tracepoint.h (struct static_tracepoint_marker): Initialize
9863         fields, define default constructor, move constructor and move
9864         assignment, disable the rest.
9865         <str_id, extra>: Make std::string.
9866         (release_static_tracepoint_marker): Remove.
9867         (free_current_marker): Remove.
9868         * tracepoint.c (free_current_marker): Remove.
9869         (parse_static_tracepoint_marker_definition): Adjust to
9870         std::string, use new hex2str overload.
9871         (release_static_tracepoint_marker): Remove.
9872         (print_one_static_tracepoint_marker): Get marker by reference
9873         and adjust to std::string.
9874         (info_static_tracepoint_markers_command): Adjust to std::vector
9875         changes
9876         * target.h (static_tracepoint_marker_p): Remove typedef.
9877         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9878         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9879         bool.
9880         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9881         * target-debug.h
9882         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9883         (target_debug_print_std_vector_static_tracepoint_marker): New.
9884         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9885         to...
9886         (target_debug_print_static_tracepoint_marker_p): ... this.
9887         * target-delegates.c: Re-generate.
9888         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9889         Make std::string.
9890         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9891         (decode_static_tracepoint_spec): Adjust to std::vector.
9892         (tracepoint_print_one_detail): Adjust to std::string.
9893         (strace_marker_decode_location): Adjust to std::string.
9894         (update_static_tracepoint): Adjust to std::string, remove call
9895         to release_static_tracepoint_marker.
9896         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9897         Adjust to std::vector.
9898         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9899         (remote_static_tracepoint_markers_by_strid): Adjust to
9900         std::vector.
9901         * common/rsp-low.h (hex2str): New overload with explicit count
9902         of bytes.
9903         * common/rsp-low.c (hex2str): New overload with explicit count
9904         of bytes.
9905         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9906         (_initialize_rsp_low_selftests): Add test_hex2str test.
9907         * unittests/tracepoint-selftests.c
9908         (test_parse_static_tracepoint_marker_definition): Adjust to
9909         std::string.
9910
9911 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9912
9913         * tracepoint.c (parse_static_tracepoint_marker_definition):
9914         Consider case where the definition is followed by more
9915         definitions.
9916         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9917         tracepoint-selftests.c.
9918         * unittests/tracepoint-selftests.c: New.
9919
9920 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9921
9922         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9923         Carvalho.
9924
9925 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9926
9927         * symtab.c (find_pc_sect_line): fixed indentation.
9928
9929 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9930
9931         * symtab.c (find_pc_sect_line): now uses binary search.
9932
9933 2018-03-19  Tom Tromey  <tom@tromey.com>
9934
9935         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9936         "IDENT" production.
9937
9938 2018-03-19  Pedro Alves  <palves@redhat.com>
9939             Tom Tromey  <tom@tromey.com>
9940
9941         * unittests/observable-selftests.c: New file.
9942         * common/observable.h: New file.
9943         * observable.h: New file.
9944         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9945         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9946         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9947         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9948         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9949         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9950         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9951         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9952         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9953         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9954         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9955         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9956         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9957         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9958         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9959         tui/tui-interp.c, valops.c: Update all users.
9960         * tui/tui-hooks.c (tui_bp_created_observer)
9961         (tui_bp_deleted_observer, tui_bp_modified_observer)
9962         (tui_inferior_exit_observer, tui_before_prompt_observer)
9963         (tui_normal_stop_observer, tui_register_changed_observer):
9964         Remove.
9965         (tui_observers_token): New global.
9966         (attach_or_detach, tui_attach_detach_observers): New functions.
9967         (tui_install_hooks, tui_remove_hooks): Use
9968         tui_attach_detach_observers.
9969         * record-btrace.c (record_btrace_thread_observer): Remove.
9970         (record_btrace_thread_observer_token): New global.
9971         * observer.sh: Remove.
9972         * observer.c: Rename to observable.c.
9973         * observable.c (namespace gdb_observers): Define new objects.
9974         (observer_debug): Move into gdb_observers namespace.
9975         (struct observer, struct observer_list, xalloc_observer_list_node)
9976         (xfree_observer_list_node, generic_observer_attach)
9977         (generic_observer_detach, generic_observer_notify): Remove.
9978         (_initialize_observer): Update.
9979         Don't include observer.inc.
9980         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9981         (clean mostlyclean): Likewise.
9982         (observer.h, observer.inc): Remove targets.
9983         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9984         (COMMON_SFILES): Use observable.c, not observer.c.
9985         * .gitignore: Remove observer.h.
9986
9987 2018-03-18  Tom Tromey  <tom@tromey.com>
9988
9989         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9990         gdb::def_vector.
9991         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9992
9993 2018-03-17  Tom Tromey  <tom@tromey.com>
9994
9995         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9996
9997 2018-03-17  Tom Tromey  <tom@tromey.com>
9998
9999         * target.c (class scoped_target_fd): New.
10000         (target_fileio_close_cleanup): Remove.
10001         (target_fileio_read_alloc_1): Use scoped_target_fd.
10002
10003 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
10004
10005         * silent-rules.mk: New.
10006         * Makefile.in: Include silent-rules.mk
10007         (srcdir, VPATH, top_srcdir): Move up.
10008         (COMPILE): Add ECHO_CXX.
10009         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10010         (init.c): Add ECHO_INIT_C.
10011         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10012         (version.c): Add ECHO_GEN.
10013         (printcmd.o): Add ECHO_CXX.
10014         (target-float.o): Add ECHO_CXX.
10015         (ada-exp.o): Add ECHO_CXX.
10016         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10017         (insight$(EXEEXT)): Add ECHO_CXXLD.
10018         * gnulib/configure.ac: Add AM_SILENT_RULES.
10019         * gnulib/aclocal.m4: Re-generate.
10020         * gnulib/configure: Re-generate.
10021         * gnulib/import/Makefile.in: Re-generate.
10022
10023 2018-03-16  Tom Tromey  <tom@tromey.com>
10024
10025         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10026         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10027         * utils.c (do_free_section_addr_info)
10028         (make_cleanup_free_section_addr_info): Remove.
10029         * symfile.h (struct other_sections): Add constructor.
10030         (struct section_addr_info): Remove.
10031         (section_addr_info): New typedef.
10032         (struct sym_fns) <sym_offsets>: Change type of parameter.
10033         (build_section_addr_info_from_objfile)
10034         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10035         (default_symfile_offsets, symbol_file_add)
10036         (symbol_file_add_from_bfd)
10037         (build_section_addr_info_from_section_table): Update.
10038         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10039         * symfile.c (alloc_section_addr_info): Remove.
10040         (build_section_addr_info_from_section_table): Change return type.
10041         Update.
10042         (build_section_addr_info_from_bfd)
10043         (build_section_addr_info_from_objfile): Likewise.
10044         (free_section_addr_info): Remove.
10045         (relative_addr_info_to_section_offsets): Change type of "addrs".
10046         (addrs_section_compar): Now a std::sort comparator.
10047         (addrs_section_sort): Change return type.
10048         (addr_info_make_relative): Change type of "addrs".  Update.
10049         (default_symfile_offsets, syms_from_objfile_1)
10050         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10051         (symbol_file_add_separate): Update.
10052         (symbol_file_add): Change type of "addrs".  Update.
10053         (add_symbol_file_command): Update.  Remove cleanups.
10054         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10055         cleanups.
10056         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10057         * solib.c (solib_read_symbols): Update.
10058         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10059         * machoread.c (macho_symfile_offsets): Update.
10060         * jit.c (jit_bfd_try_read_symtab): Update.
10061
10062 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10063
10064         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10065         unittests/utils-selftests.c.
10066         * unittests/utils-selftests.c: New file.
10067
10068 2018-03-14  Tom Tromey  <tom@tromey.com>
10069
10070         PR cli/14977:
10071         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10072         for NULL.
10073
10074 2018-03-14  Tom Tromey  <tom@tromey.com>
10075
10076         PR cli/19918:
10077         * printcmd.c (printf_pointer): Allow "-" in format.
10078
10079 2018-03-14  Tom Tromey  <tom@tromey.com>
10080
10081         * printcmd.c (_initialize_printcmd): Add usage to printf.
10082
10083 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10084
10085         * MAINTAINERS: Update my email address.
10086
10087 2018-03-13  Tom Tromey  <tom@tromey.com>
10088
10089         * machoread.c (macho_check_dsym): Change filenamep to a
10090         std::string*.
10091         (macho_symfile_read): Update.
10092         * symfile.c (load_command): Use std::string.
10093
10094 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10095
10096         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10097         to error message string.
10098         (riscv_register_name): Use xsnprintf instead of sprintf.
10099         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10100         internal_error.
10101         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10102         error.
10103         (riscv_push_dummy_call): Likewise.
10104
10105 2018-03-12  Tom Tromey  <tom@tromey.com>
10106
10107         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10108         Use gdb::byte_vector.
10109         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10110
10111 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10112
10113         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10114         parameter type to readable_regcache.
10115         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10116         the declaration.
10117
10118 2018-03-11  Tom Tromey  <tom@tromey.com>
10119
10120         * dwarf2read.c (struct nextfield): Add initializers.
10121         (struct nextfnfield): Remove.
10122         (struct fnfieldlist): Add initializers.  Remove "length" and
10123         "head", use std::vector.
10124         (struct decl_field_list): Remove.
10125         (struct field_info): Add initializers.
10126         <fields, baseclasses>: Now std::vector.
10127         <nbaseclasses, nfnfields, typedef_field_list_count,
10128         nested_types_list_count>: Remove.
10129         (dwarf2_add_field, dwarf2_add_type_defn)
10130         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10131         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10132         (process_structure_scope): Update.
10133
10134 2018-03-11  Tom Tromey  <tom@tromey.com>
10135
10136         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10137         for use by std::sort.
10138         (build_type_psymtabs_1): Use std::vector.
10139
10140 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10141
10142         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10143         and LIBMPFR in the printed configuration.
10144
10145 2018-03-08  Tom Tromey  <tom@tromey.com>
10146
10147         * source.c (get_filename_and_charpos): Use scoped_fd.
10148         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10149         (procfs_pidlist): Likewise.
10150         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10151         (iterate_over_mappings): Likewise.
10152
10153 2018-03-08  Tom Tromey  <tom@tromey.com>
10154
10155         * infcall.c (struct call_return_meta_info)
10156         <stack_temporaries_enabled>: Remove.
10157         (get_call_return_value, call_function_by_hand_dummy): Update.
10158         * thread.c (disable_thread_stack_temporaries): Remove.
10159         (enable_thread_stack_temporaries): Remove.
10160         (thread_stack_temporaries_enabled_p): Return bool.
10161         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10162         (get_last_thread_stack_temporary): Update.
10163         * eval.c (evaluate_subexp): Update.
10164         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10165         class, not a function.
10166         (value_ptr, value_vec): Remove typedefs.
10167         (class thread_info) <stack_temporaries_enabled>: Now bool.
10168         <stack_temporaries>: Now a std::vector.
10169         (thread_stack_temporaries_enabled_p)
10170         (value_in_thread_stack_temporaries): Return bool.
10171
10172 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10173
10174         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10175         (getpkt_or_notif_sane_1): Likewise.
10176
10177 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10178
10179         * build-id.c (build_id_to_debug_bfd): Use std::string.
10180
10181 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10182
10183         * build-id.c (find_separate_debug_file_by_buildid): Return
10184         std::string.
10185         * build-id.h (find_separate_debug_file_by_buildid): Return
10186         std::string.
10187         * coffread.c (coff_symfile_read): Adjust to std::string.
10188         * elfread.c (elf_symfile_read): Adjust to std::string.
10189         * symfile.c (separate_debug_file_exists): Change parameter to
10190         std::string.
10191         (find_separate_debug_file): Return std::string.
10192         (find_separate_debug_file_by_debuglink): Return std::string.
10193         * symfile.h (find_separate_debug_file_by_debuglink): Return
10194         std::string.
10195
10196 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10197
10198         * common/xml-utils.c (xml_escape_text): Move code to...
10199         (xml_escape_text_append): ... this new function.
10200         * common/xml-utils.h (xml_escape_text_append): New declaration.
10201         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10202         New function.
10203         (_initialize_xml_utils): register test_xml_escape_text_append as
10204         a selftest.
10205
10206 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10207
10208         * defs.h: Remove MAX_REGISTER_SIZE.
10209         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10210         asserts.
10211         * python/py-unwind.c (pyuw_sniffer): Likewise.
10212
10213 2018-03-07  Tom Tromey  <tom@tromey.com>
10214
10215         * linux-tdep.c (linux_info_proc): Update.
10216         * target.h (struct target_ops) <to_fileio_readlink>: Return
10217         optional<string>.
10218         (target_fileio_readlink): Return optional<string>.
10219         * remote.c (remote_hostio_readlink): Return optional<string>.
10220         * inf-child.c (inf_child_fileio_readlink): Return
10221         optional<string>.
10222         * target.c (target_fileio_readlink): Return optional<string>.
10223
10224 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10225
10226         * regcache.c (cooked_read_test): Add riscv to the list of
10227         architectures that have a save_reggroup.
10228
10229 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10230
10231         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10232         value is not a dynamic class object.
10233
10234 2018-03-06  Tom Tromey  <tom@tromey.com>
10235
10236         * rust-exp.y: Formatting fixes.
10237
10238 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10239
10240         * riscv-tdep.c (riscv_register_name): Remove target description
10241         support.
10242         (riscv_gdbarch_init): Remove target description check.
10243
10244 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10245
10246         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10247         comment.
10248         * riscv-tdep.h: Likewise.
10249
10250 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10251
10252         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10253         (riscv_pseudo_register_write): Delete.
10254         (riscv_gdbarch_init): Remove all use of pseudo registers.
10255
10256 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10257
10258         * record-btrace.c (btrace_print_lines): Replace cleanup
10259         parameter with RAII equivalents.
10260         (btrace_insn_history): Replace cleanup with RAII equivalents.
10261         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10262         make_cleanup_ui_out_tuple_begin_end): Remove.
10263         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10264         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10265         make_cleanup_ui_out_list_begin_end): Remove.
10266
10267 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10268
10269         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10270         parameter types to std::vector.  Use bool.
10271         (record_btrace_wait): Replace VEC(tp_t) with
10272         std::vector<thread_info *>.
10273         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10274
10275 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10276
10277         * record-btrace.c (record_btrace_disable_callback): Remove.
10278         (struct scoped_btrace_disable): New.
10279         (record_btrace_open): Use scoped_btrace_disable.
10280
10281 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10282
10283         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10284         reading values from registers.
10285
10286 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10287
10288         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10289         where appropriate.
10290
10291 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10292
10293         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10294         change parameter type.  Use GDB's print functions, and use
10295         core_addr_to_string where appropriate.
10296         (riscv_push_dummy_call): Use core_addr_to_string where
10297         appropriate, update call to riscv_print_arg_location, and reindent
10298         a few lines.
10299         (riscv_return_value): Update call to riscv_print_arg_location.
10300
10301 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10302             Tim Newsome <tim@sifive.com>
10303             Albert Ou <a0u@eecs.berkeley.edu>
10304             Darius Rad <darius@bluespec.com>
10305
10306         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10307         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10308         (ALLDEPFILES): Add riscv-tdep.c
10309         * configure.tgt: Add riscv support.
10310         * riscv-tdep.c: New file.
10311         * riscv-tdep.h: New file.
10312         * NEWS: Mention new target.
10313         * MAINTAINERS: Add entry for riscv.
10314
10315 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10316
10317         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10318         fields within aggregates.
10319
10320 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10321
10322         * record-btrace.c (btrace_print_lines): Change type of flags to
10323         gdb_disassembly_flags.
10324
10325 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10326
10327         * fbsd-nat.c: Include "inf-ptrace.h".
10328         (USE_SIGTRAP_SIGINFO): Conditionally define.
10329         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10330         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10331         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10332         function.
10333         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10334         Likewise.
10335         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10336         Likewise.
10337         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10338         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10339         "supports_stopped_by_hw_breakpoint" target methods.
10340
10341 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10342
10343         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10344         * fbsd-nat.c (debug_fbsd_nat): New variable.
10345         (show_fbsd_nat_debug): New function.
10346         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10347         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10348
10349 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10350
10351         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10352         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10353         prototype.
10354         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10355         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10356         method.
10357
10358 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10359
10360         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10361         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10362
10363 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10364
10365         * charset.c (struct charset_vector): New.
10366         (charsets): Change type to charset_vector.
10367         (find_charset_names): Adjust.
10368         (add_one): Adjust.
10369         (_initialize_charset): Adjust.
10370
10371 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10372
10373         * progspace.h (struct program_space) <deleted_solibs>: Change
10374         type to std::vector<std::string>.
10375         * progspace.c (clear_program_space_solib_cache): Adjust.
10376         * breakpoint.c (print_solib_event): Adjust.
10377         (check_status_catch_solib): Adjust.
10378         * solib.c (update_solib_list): Adjust.
10379         * ui-out.h (class ui_out) <field_string>: New overload.
10380         * ui-out.c (ui_out::field_string): New overload.
10381
10382 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10383
10384         * progspace.h (struct program_space): Add constructor and
10385         destructor, initialize fields.
10386         (add_program_space): Remove.
10387         * progspace.c (add_program_space): Rename to...
10388         (program_space::program_space): ... this.
10389         (release_program_space): Rename to...
10390         (program_space::~program_space): ... this.
10391         (delete_program_space): Use delete to delete program_space.
10392         (initialize_progspace): Use new to allocate program_space.
10393         * inferior.c (add_inferior_with_spaces): Likewise.
10394         (clone_inferior_command): Likewise.
10395         * infrun.c (follow_fork_inferior): Likewise.
10396         (handle_vfork_child_exec_or_exit): Likewise.
10397
10398 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10399
10400         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10401         (delim_string_to_char_ptr_vec): Return std::vector of
10402         gdb::unique_xmalloc_ptr.
10403         (dirnames_to_char_ptr_vec_append): Take std::vector of
10404         gdb::unique_xmalloc_ptr.
10405         (dirnames_to_char_ptr_vec): Return std::vector of
10406         gdb::unique_xmalloc_ptr.
10407         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10408         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10409         (delim_string_to_char_ptr_vec): Return an std::vector of
10410         gdb::unique_xmalloc_ptr, adjust the code.
10411         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10412         gdb::unique_xmalloc_ptr, adjust the code.
10413         (dirnames_to_char_ptr_vec): Return an std::vector of
10414         gdb::unique_xmalloc_ptr, adjust the code.
10415         * auto-load.c (auto_load_safe_path_vec): Change type to
10416         std::vector of gdb::unique_xmalloc_ptr.
10417         (auto_load_expand_dir_vars): Return an std::vector of
10418         gdb::unique_xmalloc_ptr, adjust the code.
10419         (auto_load_safe_path_vec_update): Adjust.
10420         (filename_is_in_auto_load_safe_path_vec): Adjust.
10421         (auto_load_objfile_script_1): Adjust.
10422         * build-id.c (build_id_to_debug_bfd): Adjust.
10423         * linux-thread-db.c (thread_db_load_search): Adjust.
10424         * source.c (add_path): Adjust.
10425         (openp): Adjust.
10426         * symfile.c (find_separate_debug_file): Adjust.
10427         * utils.c (do_free_char_ptr_vec): Remove.
10428         (make_cleanup_free_char_ptr_vec): Remove.
10429
10430 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10431
10432         PR gdb/22907
10433         * common/pathstuff.c: Conditionally include "<windows.h>".
10434
10435 2018-03-01  Georg Sauthoff  <mail@georg.so>
10436
10437         PR gdb/22888
10438         * gcore.in: Quote variables and switch interpreter to bash.
10439
10440 2018-03-01  Tom Tromey  <tom@tromey.com>
10441
10442         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10443         assertion.  Add assertion for discriminant_index.
10444         (quirk_rust_enum): Use correct base type name in univariant case.
10445
10446 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10447
10448         * record.c (get_call_history_modifiers): Return a
10449         record_print_flags.
10450         (cmd_record_call_history): Adjust.
10451         * record-btrace.c (record_btrace_call_history): Adjust.
10452         (record_btrace_call_history_range): Adjust.
10453         (record_btrace_call_history_from): Adjust.
10454         * target-debug.h (target_debug_print_record_print_flags): New.
10455         * target-delegates.c: Re-generate.
10456         * target.c (target_call_history): Change flags type.
10457         (target_call_history_from): Likewise.
10458         (target_call_history_range): Likewise.
10459         * target.h (struct target_ops) <target_call_history>: Likewise.
10460         (target_call_history_from): Likewise.
10461         (target_call_history_range): Likewise.
10462
10463 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10464             Simon Marchi  <simon.marchi@polymtl.ca>
10465
10466         * common/common-utils.c: Include "sys/stat.h".
10467         (is_regular_file): Move here from "source.c"; change return
10468         type to "bool".
10469         * common/common-utils.h (is_regular_file): New prototype.
10470         * common/pathstuff.c (contains_dir_separator): New function.
10471         * common/pathstuff.h (contains_dir_separator): New prototype.
10472         * source.c: Don't include "sys/stat.h".
10473         (is_regular_file): Move to "common/common-utils.c".
10474
10475 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10476
10477         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10478         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10479         * auto-load.c: Include "common/pathstuff.h".
10480         * common/common-def.h (current_directory): Move here.
10481         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10482         function.
10483         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10484         prototype.
10485         * common/pathstuff.c: New file.
10486         * common/pathstuff.h: New file.
10487         * compile/compile.c: Include "common/pathstuff.h".
10488         * defs.h (current_directory): Move to "common/common-defs.h".
10489         * dwarf2read.c: Include "common/pathstuff.h".
10490         * exec.c: Likewise.
10491         * guile/scm-safe-call.c: Likewise.
10492         * linux-thread-db.c: Likewise.
10493         * main.c: Likewise.
10494         * nto-tdep.c: Likewise.
10495         * objfiles.c: Likewise.
10496         * source.c: Likewise.
10497         * symtab.c: Likewise.
10498         * utils.c: Include "common/pathstuff.h".
10499         (gdb_realpath): Move to "common/pathstuff.c".
10500         (gdb_realpath_keepfile): Likewise.
10501         (gdb_abspath): Likewise.
10502         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10503         (gdb_realpath_keepfile): Likewise.
10504         (gdb_abspath): Likewise.
10505
10506 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10507
10508         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10509         wildcard process pid for super_resume for kernels with a
10510         specific bug.
10511
10512 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10513
10514         * compile/compile.c (get_args): Add additional comments
10515         explaining function.
10516
10517 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10518             Tom Tromey  <tom@tromey.com>
10519
10520         * target.h (memory_write_request_s): Remove typedef.  Don't define
10521         VEC.
10522         (target_write_memory_blocks): Change argument to std::vector.
10523         (struct memory_write_request): Add constructor.
10524         * target-memory.c (compare_block_starting_address): Return bool.
10525         Change argument types.
10526         (claim_memory): Change arguments to use std::vector.
10527         (split_regular_and_flash_blocks, blocks_to_erase)
10528         (compute_garbled_blocks): Likewise.
10529         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10530         (target_write_memory_blocks): Change argument to std::vector.
10531         * symfile.c (struct load_section_data): Add constructor and
10532         destructor.  Use std::vector for "requests".
10533         (struct load_progress_data): Add initializers.
10534         (load_section_callback): Update.  Use "new".
10535         (clear_memory_write_data): Remove.
10536         (generic_load): Update.
10537
10538 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10539
10540         * arch/aarch64.h: Use common/tdesc.h.
10541
10542 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10543
10544         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10545         architecture with a 64-bit ABI.
10546
10547 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10548
10549         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10550         ahead of target description loading.
10551
10552 2018-02-26  Tom Tromey  <tom@tromey.com>
10553
10554         * stack.c (backtrace_command_1): Update.
10555         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10556         of "flags".
10557         * python/py-framefilter.c (py_print_frame)
10558         (gdbpy_apply_frame_filter): Change type of "flags".
10559         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10560         of "flags".
10561         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10562         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10563         * extension.h (enum frame_filter_flag): Rename from
10564         frame_filter_flags.
10565         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10566         (apply_ext_lang_frame_filter): Change type of "flags".
10567         * extension.c (apply_ext_lang_frame_filter): Change type of
10568         "flags".
10569         * extension-priv.h (struct extension_language_ops)
10570         <apply_frame_filter>: Change type of "flags".
10571
10572 2018-02-26  Tom Tromey  <tom@tromey.com>
10573
10574         PR python/16497:
10575         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10576         off-by-one in py_end computation.
10577         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10578         PRINT_MORE_FRAMES.
10579         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10580         constant.
10581
10582 2018-02-26  Tom Tromey  <tom@tromey.com>
10583
10584         * dwarf2read.c (struct variant_field): New.
10585         (struct nextfield) <variant>: New field.
10586         (dwarf2_add_field): Handle DW_TAG_variant_part.
10587         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10588         discriminated union.
10589         (read_structure_type): Handle DW_TAG_variant_part.
10590         (handle_struct_member_die): New function, extracted from
10591         process_structure_scope.  Handle DW_TAG_variant.
10592         (process_structure_scope): Handle discriminated unions.  Call
10593         handle_struct_member_die.
10594
10595 2018-02-26  Tom Tromey  <tom@tromey.com>
10596
10597         * rust-lang.h (rust_last_path_segment): Declare.
10598         * rust-lang.c (rust_last_path_segment): Now public.  Change
10599         contract.
10600         (struct disr_info): Remove.
10601         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10602         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10603         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10604         (rust_enum_p, rust_enum_variant): New function.
10605         (rust_underscore_fields): Remove "offset" parameter.
10606         (rust_print_enum): New function.
10607         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10608         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10609         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10610         enums.
10611         (rust_internal_print_type): New function, from rust_print_type.
10612         Remove enum code.
10613         (rust_print_type): Call rust_internal_print_type.
10614         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10615         Update enum handling.
10616         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10617         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10618         (rust_union_quirks): New functions.
10619         (process_full_comp_unit, process_full_type_unit): Call
10620         rust_union_quirks.
10621         (process_structure_scope): Update rust_unions if necessary.
10622
10623 2018-02-26  Tom Tromey  <tom@tromey.com>
10624
10625         * value.h (value_union_variant): Declare.
10626         * valops.c (value_union_variant): New function.
10627         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10628         (struct discriminant_info): New.
10629         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10630         enumerator.
10631         (struct main_type) <flag_discriminated_union>: New field.
10632
10633 2018-02-26  Tom Tromey  <tom@tromey.com>
10634
10635         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10636         unittests/unpack-selftests.c.
10637         * unittests/unpack-selftests.c: New file.
10638         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10639
10640 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10641
10642         * dwarf2read.c (struct partial_die_info) <read>: New method.
10643         (read_partial_die): Remove the declaration.
10644         (load_partial_dies): Update.
10645         (partial_die_info::partial_die_info):
10646         (read_partial_die): Change it to partial_die_info::read.
10647
10648 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10649
10650         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10651         (fixup_partial_die): Remove declaration.
10652         (scan_partial_symbols): Update.
10653         (partial_die_parent_scope): Likewise.
10654         (partial_die_full_name): Likewise.
10655         (fixup_partial_die): Change it to partial_die_info::fixup.
10656
10657 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10658
10659         * dwarf2read.c (read_partial_die): Update the declaration.
10660         (load_partial_dies): Caller update.
10661         (read_partial_die): Remove one argument abbrev_len.
10662
10663 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10664
10665         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10666         assignment operator.
10667         (load_partial_dies): Use ctor and copy ctor.
10668         (read_partial_die): Update.
10669         (dwarf2_cu::find_partial_die): Use ctor.
10670
10671 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10672
10673         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10674         (find_partial_die_in_comp_unit): Change it to
10675         dwarf2_cu::find_partial_die.
10676         (find_partial_die): Update.
10677
10678 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10679
10680         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10681         is NULL.
10682
10683 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10684
10685         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10686
10687 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10688
10689         * arch/amd64.h: Use common/tdesc.h.
10690         * arch/i386.c: Likewise.
10691         * arch/i386.h: Likewise.
10692         * arch/tic6x.c: Likewise.
10693         * arch/tdesc.h: Move file from here...
10694         * common/tdesc.h: ...to here.
10695         * features/aarch64-core.c: Regenerate.
10696         * features/aarch64-fpu.c: Regenerate.
10697         * features/i386/32bit-avx.c: Regenerate.
10698         * features/i386/32bit-avx512.c: Regenerate.
10699         * features/i386/32bit-core.c: Regenerate.
10700         * features/i386/32bit-linux.c: Regenerate.
10701         * features/i386/32bit-mpx.c: Regenerate.
10702         * features/i386/32bit-pkeys.c: Regenerate.
10703         * features/i386/32bit-sse.c: Regenerate.
10704         * features/i386/64bit-avx.c: Regenerate.
10705         * features/i386/64bit-avx512.c: Regenerate.
10706         * features/i386/64bit-core.c: Regenerate.
10707         * features/i386/64bit-linux.c: Regenerate.
10708         * features/i386/64bit-mpx.c: Regenerate.
10709         * features/i386/64bit-pkeys.c: Regenerate.
10710         * features/i386/64bit-segments.c: Regenerate.
10711         * features/i386/64bit-sse.c: Regenerate.
10712         * features/i386/x32-core.c: Regenerate.
10713         * features/tic6x-c6xp.c: Regenerate.
10714         * features/tic6x-core.c: Regenerate.
10715         * features/tic6x-gp.c: Regenerate.
10716         * target-descriptions.c: Use common/tdesc.h.
10717         * target-descriptions.h: Likewise.
10718
10719 2018-02-24  Tom Tromey  <tom@tromey.com>
10720
10721         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10722         (try_thread_db_load_from_dir, thread_db_load_search): Use
10723         std::string.
10724         (info_auto_load_libthread_db_compare): Return bool.  Change
10725         argument types.
10726         (info_auto_load_libthread_db): Use std::vector, std::string.
10727         Remove cleanups.
10728
10729 2018-02-24  Tom Tromey  <tom@tromey.com>
10730
10731         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10732         std::string.
10733         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10734         std::string*.
10735         * gdbarch.c: Rebuild.
10736         * gdbarch.h: Rebuild.
10737         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10738         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10739         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10740         std::string*.
10741
10742 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10743
10744         * gdbtypes.h (sect_offset): Change type to uint64_t.
10745         (sect_offset_str): New function.
10746         * dwarf2read.c (create_addrmap_from_aranges): Use
10747         sect_offset_str.
10748         (error_check_comp_unit_head): Likewise.
10749         (create_debug_type_hash_table): Likewise.
10750         (read_cutu_die_from_dwo): Likewise.
10751         (init_cutu_and_read_dies): Likewise.
10752         (init_cutu_and_read_dies_no_follow): Likewise.
10753         (process_psymtab_comp_unit_reader): Likewise.
10754         (partial_die_parent_scope): Likewise.
10755         (peek_die_abbrev): Likewise.
10756         (process_queue): Likewise.
10757         (dwarf2_physname): Likewise.
10758         (read_namespace_alias): Likewise.
10759         (read_import_statement): Likewise.
10760         (create_dwo_cu_reader): Likewise.
10761         (create_cus_hash_table): Likewise.
10762         (lookup_dwo_cutu): Likewise.
10763         (inherit_abstract_dies): Likewise.
10764         (read_func_scope): Likewise.
10765         (read_call_site_scope): Likewise.
10766         (dwarf2_add_member_fn): Likewise.
10767         (read_common_block): Likewise.
10768         (read_module_type): Likewise.
10769         (read_typedef): Likewise.
10770         (read_subrange_type): Likewise.
10771         (load_partial_dies): Likewise.
10772         (read_partial_die): Likewise.
10773         (find_partial_die): Likewise.
10774         (read_str_index): Likewise.
10775         (dwarf2_string_attr): Likewise.
10776         (build_error_marker_type): Likewise.
10777         (lookup_die_type): Likewise.
10778         (dump_die_shallow): Likewise.
10779         (follow_die_ref): Likewise.
10780         (dwarf2_fetch_die_loc_sect_off): Likewise.
10781         (dwarf2_fetch_constant_bytes): Likewise.
10782         (follow_die_sig): Likewise.
10783         (get_signatured_type): Likewise.
10784         (get_DW_AT_signature_type): Likewise.
10785         (dwarf2_find_containing_comp_unit): Likewise.
10786         (set_die_type): Likewise.
10787
10788 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10789
10790         * arch/aarch64.c: Include "common-defs.h".
10791         * arch/amd64.c: Likewise.
10792         * arch/i386.c: Likewise.
10793
10794 2018-02-21  Tom Tromey  <tom@tromey.com>
10795
10796         * value.h: (extract_field_op): Update.
10797         * eval.c (extract_field_op): Return a const char *.
10798         * expression.h (parse_expression_for_completion): Update.
10799         * completer.c (complete_expression): Update.
10800         (add_struct_fields): Make fieldname const.
10801         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10802         (mark_completion_tag, parse_exp_in_context_1): Update.
10803         (parse_expression_for_completion): Change "name" to
10804         unique_xmalloc_ptr*.
10805
10806 2018-02-21  Tom Tromey  <tom@tromey.com>
10807
10808         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10809
10810 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10811
10812         * avr-tdep.c (avr_read_pc): Change parameter type to
10813         readable_regcache.
10814         * gdbarch.sh (read_pc): Likewise.
10815         * gdbarch.c: Re-generated.
10816         * gdbarch.h: Re-generated.
10817         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10818         readable_regcache.
10819         * ia64-tdep.c (ia64_read_pc): Likewise.
10820         * mips-tdep.c (mips_read_pc): Likewise.
10821         * spu-tdep.c (spu_read_pc): Likewise.
10822
10823 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10824
10825         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10826         * regcache-dump.c: New file.
10827         * regcache.c: Move register_dump to regcache-dump.c.
10828         (maintenance_print_registers): Likewise.
10829         (maintenance_print_raw_registers): Likewise.
10830         (maintenance_print_cooked_registers): Likewise.
10831         (maintenance_print_register_groups): Likewise.
10832         (maintenance_print_remote_registers): Likewise.
10833         (_initialize_regcache): Likewise.
10834         * regcache.h (register_dump): Moved from regcache.c.
10835
10836 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10837
10838         * regcache.c (regcache::regcache): Update.
10839         (regcache::invalidate): Move it to detached_regcache::invalidate.
10840         (get_thread_arch_aspace_regcache): Update.
10841         (regcache::raw_update): Update.
10842         (regcache::cooked_read): Remove some code.
10843         (regcache::cooked_read_value): Likewise.
10844         (regcache::raw_write): Remove assert on m_readonly_p.
10845         (regcache::raw_supply_integer): Move it to
10846         detached_regcache::raw_supply_integer.
10847         (regcache::raw_supply_zeroed): Likewise.
10848         * regcache.h (detached_regcache) <raw_supply_integer>: New
10849         declaration.
10850         <raw_supply_zeroed, invalidate>: Likewise.
10851         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10852         <invalidate>: Likewise.
10853         <m_readonly_p>: Removed.
10854
10855 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10856
10857         * infcmd.c (get_return_value): Let stop_regs point to
10858         get_current_regcache.
10859         * regcache.c (regcache::regcache): Remove.
10860         (register_dump_reg_buffer): New class.
10861         (regcache_print): Adjust.
10862         * regcache.h (regcache): Remove constructors.
10863
10864 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10865
10866         * regcache.c (class register_dump): New class.
10867         (register_dump_regcache, register_dump_none): New class.
10868         (register_dump_remote, register_dump_groups): New class.
10869         (regcache_print): Update.
10870         * regcache.h (regcache_dump_what): Move it to regcache.c.
10871         (regcache) <dump>: Remove.
10872
10873 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10874
10875         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10876          reg_buffer_rw *.
10877         (jit_unwind_reg_set_impl): Call raw_supply.
10878         (jit_frame_sniffer): Use reg_buffer_rw.
10879         * record-full.c (record_full_core_regbuf): Change its type.
10880         (record_full_core_open_1): Use reg_buffer_rw.
10881         (record_full_close): Likewise.
10882         (record_full_core_fetch_registers): Use regcache->raw_supply.
10883         (record_full_core_store_registers): Likewise.
10884         * regcache.c (regcache::get_register_status): Move it to
10885         reg_buffer.
10886         (regcache_raw_set_cached_value): Remove.
10887         (regcache::raw_set_cached_value): Remove.
10888         (regcache::raw_write): Call raw_supply.
10889         (regcache::raw_supply): Move it to reg_buffer_rw.
10890         * regcache.h (regcache_raw_set_cached_value): Remove.
10891         (reg_buffer_rw): New class.
10892
10893 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10894
10895         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10896         readonly_detached_regcache.
10897         (dummy_frame_prev_register): Use regcache->cooked_read.
10898         * frame.c (frame_save_as_regcache): Change return type.
10899         (frame_pop): Update.
10900         * frame.h (frame_save_as_regcache): Update declaration.
10901         * inferior.h (get_infcall_suspend_state_regcache): Update
10902         declaration.
10903         * infrun.c (infcall_suspend_state) <registers>: use
10904         readonly_detached_regcache.
10905         (save_infcall_suspend_state): Don't use regcache_dup.
10906         (get_infcall_suspend_state_regcache): Change return type.
10907         * linux-fork.c (struct fork_info) <savedregs>: Change to
10908         readonly_detached_regcache.
10909         <pc>: New field.
10910         (fork_save_infrun_state): Don't use regcache_dup.
10911         (info_checkpoints_command): Adjust.
10912         * mi/mi-main.c (register_changed_p): Update declaration.
10913         (mi_cmd_data_list_changed_registers): Use
10914         readonly_detached_regcache.
10915         (register_changed_p): Change parameter type to
10916         readonly_detached_regcache.
10917         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10918         readonly_detached_regcache.
10919         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10920         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10921         New.
10922         (regcache::save): Move it to reg_buffer.
10923         (regcache::restore): Change parameter type.
10924         (regcache_dup): Remove.
10925         * regcache.h (reg_buffer) <save>: New method.
10926         (readonly_detached_regcache): New class.
10927         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10928         readonly_detached_regcache.
10929         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10930
10931 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10932
10933         * frame.c (frame_save_as_regcache): Use regcache method save.
10934         (frame_pop): Use regcache method restore.
10935         * infrun.c (restore_infcall_suspend_state): Likewise.
10936         * linux-fork.c (fork_load_infrun_state): Likewise.
10937         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10938         save.
10939         * regcache.c (regcache_save): Remove.
10940         (regcache::restore): More asserts.
10941         (regcache_cpy): Remove.
10942         * regcache.h (regcache_save): Remove the declaration.
10943         (regcache::restore): Move from private to public.
10944         Remove the friend declaration of regcache_cpy.
10945         (regcache_cpy): Remove declaration.
10946
10947 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10948
10949         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10950         parameter type to 'readable_regcache *'.
10951         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10952         * arm-tdep.c (arm_neon_quad_read): Likewise.
10953         (arm_pseudo_read): Likewise.
10954         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10955         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10956         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10957         * gdbarch.c: Re-generated.
10958         * gdbarch.h: Re-generated.
10959         * gdbarch.sh (pseudo_register_read): Change parameter type to
10960         'readable_regcache *'.
10961         (pseudo_register_read_value): Likewise.
10962         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10963         (h8300_pseudo_register_read): Likewise.
10964         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10965         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10966         (i386_pseudo_register_read_into_value): Likewise.
10967         (i386_pseudo_register_read_value): Likewise.
10968         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10969         declaration.
10970         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10971         * m32c-tdep.c (m32c_raw_read): Likewise.
10972         (m32c_read_flg): Likewise.
10973         (m32c_banked_register): Likewise.
10974         (m32c_banked_read): Likewise.
10975         (m32c_sb_read): Likewise.
10976         (m32c_part_read): Likewise.
10977         (m32c_cat_read): Likewise.
10978         (m32c_r3r2r1r0_read): Likewise.
10979         (m32c_pseudo_register_read): Likewise.
10980         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10981         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10982         (mep_pseudo_cr64_read): Likewise.
10983         (mep_pseudo_register_read): Likewise.
10984         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10985         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10986         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10987         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10988         (regcache::cooked_read): Likewise.
10989         (regcache::cooked_read_value): Likewise.
10990         (regcache_cooked_read_signed):
10991         (regcache::cooked_read): Likewise.
10992         * regcache.h (readable_regcache): New class.
10993         (regcache): Inherit readable_regcache.  Move some methods to
10994         readable_regcache.
10995         * rl78-tdep.c (rl78_pseudo_register_read): Change
10996         parameter type to 'readable_regcache *'.
10997         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10998         (e500_pseudo_register_read): Change parameter type to
10999         'readable_regcache *'.
11000         (dfp_pseudo_register_read): Likewise.
11001         (vsx_pseudo_register_read): Likewise.
11002         (efpr_pseudo_register_read): Likewise.
11003         * s390-tdep.c (s390_pseudo_register_read): Likewise.
11004         * sh-tdep.c (sh_pseudo_register_read): Likewise.
11005         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11006         (sh64_pseudo_register_read): Likewise.
11007         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11008         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11009         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11010         (spu_pseudo_register_read): Likewise.
11011         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11012         (xtensa_pseudo_register_read): Likewise.
11013
11014 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11015
11016         * regcache.c (regcache::regcache): Call reg_buffer ctor.
11017         (regcache::arch): Move it to reg_buffer::arch.
11018         (regcache::register_buffer): Likewise.
11019         (regcache::assert_regnum): Likewise.
11020         (regcache::num_raw_registers): Likewise.
11021         * regcache.h (reg_buffer): New class.
11022         (regcache): Inherit reg_buffer.
11023
11024 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
11025
11026         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11027         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11028
11029 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
11030
11031         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11032
11033 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
11034
11035         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11036         (SFILES): Remove common/*.c files.
11037         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11038         * common/common.host: Add common reference.
11039         * configure.ac: Likewise.
11040         * configure: Regenerate.
11041
11042 2018-02-16  Yao Qi  <yao.qi@linaro.org>
11043
11044         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11045         (block_initialize_namespace): Use new.
11046         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11047         (dwarf2_free_objfile): Use delete.
11048         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11049         (copy_type_recursive): Use new.
11050         * gdb_obstack.h (allocate_on_obstack): New.
11051
11052 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11053
11054         PR gdb/22849
11055         * inferior.c (exit_inferior_1): Reset inf->control.
11056
11057 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11058
11059         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11060         declaration.
11061
11062 2018-02-14  Pedro Alves  <palves@redhat.com>
11063
11064         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11065         frame_cleanup_after_sniffer on exception.
11066
11067 2018-02-14  Tom Tromey  <tom@tromey.com>
11068
11069         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11070         const.
11071         (solib_bfd_open): Make pathname const.
11072         * solib.c (solib_bfd_open): Make pathname const.
11073         * solib-spu.c (spu_bfd_fopen): Make name const.
11074         (spu_bfd_open): Make pathname const.
11075         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11076         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11077
11078 2018-02-14  Tom Tromey  <tom@tromey.com>
11079
11080         * symfile.c (symfile_bfd_open): Update.
11081         * source.h (openp, source_full_path_of, find_and_open_source):
11082         Change argument type to unique_xmalloc_ptr.
11083         * source.c (openp): Take a unique_xmalloc_ptr.
11084         (source_full_path_of, find_and_open_source): Likewise.
11085         (open_source_file, symtab_to_fullname): Update.
11086         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11087         unique_xmalloc_ptr.
11088         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11089         (exec_file_find): Update.
11090         * psymtab.c (psymtab_to_fullname): Update.
11091         * nto-tdep.h (nto_find_and_open_solib): Update.
11092         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11093         unique_xmalloc_ptr.
11094         * exec.c (exec_file_attach): Update.
11095         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11096         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11097
11098 2018-02-14  Tom Tromey  <tom@tromey.com>
11099
11100         * solib.c: Include source.h.
11101         * nto-tdep.c: Include source.h.
11102         * mi/mi-cmd-env.c: Include source.h.
11103         * infcmd.c: Include source.h.
11104         * exec.c: Include source.h.
11105         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11106         (add_path, directory_switch, source_path, init_source_path): Move
11107         declarations...
11108         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11109         (add_path, directory_switch, source_path, init_source_path):
11110         ...here.
11111
11112 2018-02-14  Tom Tromey  <tom@tromey.com>
11113
11114         * solist.h (exec_file_find, solib_find): Return
11115         unique_xmalloc_ptr.
11116         (solib_bfd_fopen): Take a const char *.
11117         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11118         (exec_file_find, solib_find): Likewise.
11119         (solib_bfd_fopen): Do not take ownership of "pathname".
11120         (solib_bfd_open): Use unique_xmalloc_ptr.
11121         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11122         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11123         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11124         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11125
11126 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11127
11128         * ada-lang.c (name_match_type_from_name): Remove reference to
11129         ada_name_for_lookup in function's documentation.
11130         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11131
11132 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11133
11134         * defs.h (enum openp_flags): New enum.
11135         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11136         Move to enum openp_flags.
11137         (openp_flags): New enum flags.
11138         (openp): Change parameter type to openp_flags.
11139         * source.c (openp): Change parameter type to openp_flags.
11140         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11141         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11142
11143 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11144
11145         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11146         per-command.
11147
11148 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11149
11150         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11151         into...
11152         (class dwarf2_queue_guard): ...the destructor of this new class.
11153         (dw2_do_instantiate_symtab): Create instance of the new class
11154         dwarf2_queue_guard, remove cleanup.
11155
11156 2018-02-09  Tom Tromey  <tom@tromey.com>
11157
11158         * source.c (find_source_lines): Don't reference past the end of
11159         the vector.
11160
11161 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11162
11163         * remote.c (remote_btrace_maybe_reopen): Change error message.
11164         * btrace.c (btrace_enable): Likewise.
11165         (parse_xml_btrace): Likewise.
11166         (parse_xml_btrace_conf): Likewise.
11167
11168 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11169
11170         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11171         (linux_enable_pt, linux_enable_bts): Call
11172         diagnose_perf_event_open_fail.
11173
11174 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11175
11176         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11177         Remove parameter and change return type.  Update callers.  Move it.
11178         (linux_enable_bts, linux_enable_pt): Improve error message.
11179         (linux_enable_pt): Remove zero buffer size check.
11180         (linux_enable_btrace): Improve error messages.  Remove NULL return
11181         check.
11182
11183 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11184
11185         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11186         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11187         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11188         (linux_supports_pt, linux_supports_btrace): Remove.
11189         (linux_enable_bts): Call cpu_supports_bts.
11190         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11191         * remote.c (remote_supports_btrace): Remove.
11192         (init_remote_ops): Remove remote_supports_btrace.
11193         * target-delegates.c: Regenerated.
11194         * target.c (target_supports_btrace): Remove.
11195         * target.h (target_ops) <to_supports_btrace>: Remove
11196         (target_supports_btrace): Remove.
11197         * x86-linux-nat.c (x86_linux_create_target): Remove
11198         linux_supports_btrace.
11199
11200 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11201
11202         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11203         btrace failed.
11204         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11205         exception and use message in own exception.
11206
11207 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11208
11209         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11210         (perf_event_pt_event_type): Use gdb_file_up.
11211         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11212         scoped_fd, and scoped_mmap.
11213
11214 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11215
11216         * common/scoped_mmap.h: New.
11217         * unittests/scoped_mmap-selftest.c: New.
11218         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11219         unittests/scoped_mmap-selftest.c.
11220
11221 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11222
11223         * common/scoped_fd.h: New.
11224         * unittests/scoped_fd-selftest.c: New.
11225         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11226         unittests/scoped_fd-selftest.c.
11227
11228 2018-02-09  Tom Tromey  <tom@tromey.com>
11229
11230         * auto-load.c (auto_load_section_scripts): Use
11231         gdb::unique_xmalloc_ptr.
11232
11233 2018-02-09  Tom Tromey  <tom@tromey.com>
11234
11235         * auto-load.c (execute_script_contents): Use std::string.
11236
11237 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11238
11239         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11240         Python function, rather than a new command.
11241
11242 2018-02-08  Tom Tromey  <tom@tromey.com>
11243
11244         * solib.c (solib_find_1): Use std::string.
11245         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11246
11247 2018-02-08  Tom Tromey  <tom@tromey.com>
11248
11249         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11250
11251 2018-02-08  Tom Tromey  <tom@tromey.com>
11252
11253         * source.c (find_source_lines): Use gdb::def_vector.
11254
11255 2018-02-08  Tom Tromey  <tom@tromey.com>
11256
11257         * macrocmd.c (struct temporary_macro_definition): New.
11258         (macro_define_command): Use temporary_macro_definition.  Remove
11259         cleanups.
11260         (free_macro_definition_ptr): Remove.
11261
11262 2018-02-08  Tom Tromey  <tom@tromey.com>
11263
11264         * macroexp.c (maybe_expand): Use std::string.
11265
11266 2018-02-08  Tom Tromey  <tom@tromey.com>
11267
11268         * macroexp.c (struct macro_buffer): Add initializers for some
11269         members.
11270         (init_buffer, init_shared_buffer, free_buffer)
11271         (free_buffer_return_text): Remove.
11272         (macro_buffer): New constructors.
11273         (~macro_buffer): New destructor.
11274         (macro_buffer::set_shared): New method.
11275         (macro_buffer::resize_buffer, macro_buffer::appendc)
11276         (macro_buffer::appendmem): Now methods, not free functions.
11277         (set_token, append_tokens_without_splicing, stringify)
11278         (macro_stringify): Update.
11279         (gather_arguments): Change return type.  Remove argc_p argument,
11280         add args_ptr argument.  Use std::vector.
11281         (substitute_args): Remove argc argument.  Accept std::vector.
11282         (expand): Update.  Use std::vector.
11283         (scan, macro_expand, macro_expand_next): Update.
11284
11285 2018-02-08  Tom Tromey  <tom@tromey.com>
11286
11287         * symtab.c (default_collect_symbol_completion_matches_break_on):
11288         Use unique_xmalloc_ptr.
11289         * macroscope.h: (sal_macro_scope, user_macro_scope)
11290         (default_macro_scope): Return unique_xmalloc_ptr.
11291         * macroscope.c (sal_macro_scope, user_macro_scope)
11292         (default_macro_scope): Return unique_xmalloc_ptr.
11293         * macroexp.h (macro_expand, macro_expand_once): Return
11294         unique_xmalloc_ptr.
11295         * macroexp.c (macro_expand, macro_expand_once): Return
11296         unique_xmalloc_ptr.
11297         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11298         (info_macro_command, info_macros_command): Use
11299         unique_xmalloc_ptr.
11300         * compile/compile-c-support.c (write_macro_definitions): Use
11301         unique_xmalloc_ptr.
11302         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11303
11304 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11305
11306         * value.c (value_static_field): Assign field type instead of
11307         containing type when returning an optimized out value.
11308
11309 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11310
11311         * ft32-tdep.c (ft32_read_pc): Remove.
11312         (ft32_write_pc): Remove.
11313         (ft32_gdbarch_init): Update.
11314         * m32r-tdep.c (m32r_read_pc): Remove.
11315         (m32r_gdbarch_init): Update.
11316         * mep-tdep.c (mep_read_pc): Remove.
11317         (mep_gdbarch_init): Update.
11318         * microblaze-tdep.c (microblaze_write_pc): Remove.
11319         (microblaze_gdbarch_init): Update.
11320         * mn10300-tdep.c (mn10300_read_pc): Remove.
11321         (mn10300_write_pc): Remove.
11322         (mn10300_gdbarch_init): Update.
11323         * moxie-tdep.c (moxie_read_pc): Remove.
11324         (moxie_write_pc): Remove.
11325         (moxie_gdbarch_init): Update.
11326
11327 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11328
11329         * expprint.c (print_subexp_standard): Handle
11330         OP_F77_UNDETERMINED_ARGLIST.
11331         (dump_subexp_body_standard): Likewise.
11332
11333 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11334
11335         * target-descriptions.c (tdesc_element_visitor) Add empty
11336         implementations.
11337         (tdesc_type): Move make_gdb_type from here.
11338         (tdesc_type_builtin): Likewise.
11339         (tdesc_type_vector): Likewise.
11340         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11341         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11342         (make_gdb_type_union): Likewise.
11343         (make_gdb_type_flags): Likewise.
11344         (make_gdb_type_enum): Likewise.
11345         (make_gdb_type): New function.
11346         (tdesc_register_type): Use static make_gdb_type.
11347
11348 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11349
11350         * infcmd.c (default_print_one_register_info): Align natural-format
11351         column values consistently one under another.
11352         (pad_to_column): New function.
11353
11354 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11355
11356         * dwarf2read.c (dwarf2_physname): Move commment.
11357
11358 2018-02-01  Leszek Swirski  <leszeks@google.com>
11359
11360         * varobj.c (varobj_formatted_print_options): Allow recursive
11361         pretty printing if pretty printing is enabled.
11362
11363 2018-02-01  Leszek Swirski  <leszeks@google.com>
11364
11365         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11366         names after a structop as a filename.
11367
11368 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11369
11370         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11371         (arm_record_coproc_data_proc): Likewise.
11372
11373 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11374
11375         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11376
11377 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11378
11379         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11380         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11381
11382 2018-01-31  Pedro Alves  <palves@redhat.com>
11383
11384         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11385         * inflow.c (child_terminal_save_inferior): Wrap reference to
11386         tcgetpgrp in HAVE_TERMIOS_H.
11387         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11388         _WIN32.
11389         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11390         always iterate over all inferiors.
11391         (gdbsim_cntrl_c): Adjust.
11392         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11393
11394 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11395
11396         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11397         index type is objfile-owned if the element type is as well.
11398
11399 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11400
11401         GDB 8.1 released.
11402
11403 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11404
11405         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11406         "features/s390x-linux64.c".
11407         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11408         s390_linux32 and s390x_linux64.
11409         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11410         default tdesc.
11411         * s390-tdep.c: Include "features/s390-linux32.c" and
11412         "features/s390x-linux64.c".
11413         (s390_tdesc_valid): Add check for tdesc_has_registers.
11414         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11415         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11416         tdesc_s390x_linux64.
11417         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11418         tdesc_s390x_linux64 to...
11419         * s390-tdep.h: ...here.
11420
11421 2018-01-30  Pedro Alves  <palves@redhat.com>
11422
11423         PR gdb/13211
11424         * config.in, configure: Regenerate.
11425         * configure.ac: Check for getpgid.
11426         * go32-nat.c (go32_pass_ctrlc): New.
11427         (go32_target): Install it.
11428         * inf-child.c (inf_child_target): Install
11429         child_terminal_save_inferior, child_pass_ctrlc and
11430         child_interrupt.
11431         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11432         (inf_ptrace_target): No longer install it.
11433         * infcmd.c (interrupt_target_1): Adjust.
11434         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11435         (child_interrupt): Declare.
11436         (inferior::terminal_state): New.
11437         * inflow.c (struct terminal_info): Update comments.
11438         (inferior_process_group): Delete.
11439         (terminal_is_ours): Delete.
11440         (gdb_tty_state): New.
11441         (child_terminal_init): Adjust.
11442         (is_gdb_terminal, sharing_input_terminal_1)
11443         (sharing_input_terminal): New functions.
11444         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11445         Set the process's actual process group in the foreground if
11446         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11447         mark terminal as the inferior's if not sharing GDB's terminal.
11448         Don't check attach_flag.
11449         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11450         pass down a target_terminal_state.
11451         (child_terminal_save_inferior): New, factored out from ...
11452         (child_terminal_ours_1): ... this.  Handle
11453         target_terminal_state::is_ours_for_output.
11454         (child_interrupt, child_pass_ctrlc): New.
11455         (inflow_inferior_exit): Clear the inferior's terminal_state.
11456         (copy_terminal_info): Copy the inferior's terminal state.
11457         (_initialize_inflow): Remove reference to terminal_is_ours.
11458         * inflow.h (inferior_process_group): Delete.
11459         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11460         * procfs.c (procfs_target): Don't install procfs_interrupt.
11461         (procfs_interrupt): Delete.
11462         * remote.c (remote_serial_quit_handler): Adjust.
11463         (remote_interrupt): Remove ptid parameter.  Adjust.
11464         * target-delegates.c: Regenerate.
11465         * target.c: Include "terminal.h".
11466         (target_terminal::terminal_state): Rename to ...
11467         (target_terminal::m_terminal_state): ... this.
11468         (target_terminal::init): Adjust.
11469         (target_terminal::inferior): Adjust to per-inferior
11470         terminal_state.
11471         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11472         (target_terminal::ours, target_terminal::ours_for_output): Use
11473         target_terminal_is_ours_kind.
11474         (target_interrupt): Remove ptid parameter.  Adjust.
11475         (default_target_pass_ctrlc): Adjust.
11476         * target.h (target_ops::to_terminal_save_inferior): New field.
11477         (target_ops::to_interrupt): Remove ptid_t parameter.
11478         (target_interrupt): Remove ptid_t parameter.  Update comment.
11479         (target_pass_ctrlc): Update comment.
11480         * target/target.h (target_terminal_state): New scoped enum,
11481         factored out of ...
11482         (target_terminal::terminal_state): ... here.
11483         (target_terminal::inferior): Update comments.
11484         (target_terminal::restore_inferior): New.
11485         (target_terminal::is_inferior, target_terminal::is_ours)
11486         (target_terminal::is_ours_for_output): Adjust.
11487         (target_terminal::scoped_restore_terminal_state): Adjust to
11488         rename, and call restore_inferior() instead of inferior().
11489         (target_terminal::scoped_restore_terminal_state::m_state): Change
11490         type.
11491         (target_terminal::terminal_state): Rename to ...
11492         (target_terminal::m_terminal_state): ... this and change type.
11493
11494 2018-01-30  Pedro Alves  <palves@redhat.com>
11495
11496         * linux-nat.c (wait_for_signal): New function.
11497         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11498         directly.
11499         (async_terminal_is_ours)
11500         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11501         (linux_nat_add_target): Don't override
11502         to_terminal_inferior/to_terminal_ours.
11503
11504 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11505
11506         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11507
11508 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11509
11510         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11511         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11512         dwarf2_per_objfile_free here.
11513         (dwarf2_per_objfile_free): Remove.
11514         (_initialize_dwarf2_read): Don't register
11515         dwarf2_per_objfile_free as a registry cleanup.
11516
11517 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11518
11519         Avoid compilation errors in MinGW native builds
11520
11521         The error is triggered by including python-internal.h, and the
11522         error message is:
11523
11524              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11525                       from build-gnulib/import/math.h:27,
11526                       from d:/usr/Python26/include/pyport.h:235,
11527                       from d:/usr/Python26/include/Python.h:58,
11528                       from python/python-internal.h:94,
11529                       from python/py-arch.c:24:
11530              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11531         using ::hypot;
11532                 ^~~~~
11533
11534         This happens because Python headers define 'hypot' to expand t
11535         '_hypot' in the Windows builds.
11536         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11537         'hypoth'.  This avoids a compilation error.
11538
11539 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11540
11541         * MAINTAINERS (Write After Approval): Fix ordering.
11542
11543 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11544
11545         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11546
11547 2018-01-26  Alan Modra  <amodra@gmail.com>
11548
11549         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11550         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11551         Remove nop.  Make const.  Comment.
11552         (powerpc32_plt_stub_so_2): New.
11553         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11554         Correct count.  Update uses.
11555         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11556         Move common code reading PLT entry word.  Correct
11557         powerpc32_plt_stub PLT address calculation.
11558         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11559         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11560         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11561         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11562         (ppc64_standard_linkage8): Likewise.
11563         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11564         Correct insns description.
11565         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11566
11567 2018-01-24  Pedro Alves  <palves@redhat.com>
11568
11569         GCC PR libstdc++/83906
11570         * gdbtypes.c (operator==(const dynamic_prop &,
11571         const dynamic_prop &)): New.
11572         (operator==(const range_bounds &, const range_bounds &)): New.
11573         (check_types_equal): Use them instead of memcmp.
11574         * gdbtypes.h (operator==(const dynamic_prop &,
11575         const dynamic_prop &)): Declare.
11576         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11577         (operator==(const range_bounds &, const range_bounds &)): Declare.
11578         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11579
11580 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11581
11582         * s390-linux-tdep.c (s390_record_address_mask)
11583         (s390_record_calc_disp_common, s390_record_calc_disp)
11584         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11585         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11586         (s390_process_record): Move to s390-tdep.c.
11587         (s390_linux_init_abi_any): Adjust.
11588         * s390-tdep.c (s390_record_address_mask)
11589         (s390_record_calc_disp_common, s390_record_calc_disp)
11590         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11591         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11592         (s390_process_record): Moved from s390-linux-tdep.c
11593         (s390_gdbarch_init): Adjust.
11594
11595 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11596
11597         * s390-linux-nat.c (s390-tdep.h): New include.
11598         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11599         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11600         (ALLDEPFILES): Add s390-tdep.c.
11601         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11602         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11603         * s390-tdep.h: ...this.  New file.
11604         * s390-linux-tdep.c (s390-tdep.h): New include.
11605         (_initialize_s390_tdep): Rename to...
11606         (_initialize_s390_linux_tdep): ...this and adjust.
11607         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11608         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11609         s390-tdep.h.
11610         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11611         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11612         (s390_is_partial_instruction, s390_software_single_step)
11613         (is_non_branch_ril, s390_displaced_step_copy_insn)
11614         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11615         (s390_prologue_data, s390_addr, s390_store, s390_load)
11616         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11617         (s390_register_call_saved, s390_guess_tracepoint_registers)
11618         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11619         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11620         (s390_pseudo_register_name, s390_pseudo_register_type)
11621         (s390_pseudo_register_read, s390_pseudo_register_write)
11622         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11623         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11624         (s390_addr_bits_remove, s390_address_class_type_flags)
11625         (s390_address_class_type_flags_to_name)
11626         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11627         (s390_function_arg_float, s390_function_arg_vector)
11628         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11629         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11630         (s390_frame_align, s390_register_return_value, s390_return_value)
11631         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11632         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11633         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11634         (s390_trad_frame_prev_register, s390_unwind_cache)
11635         (s390_prologue_frame_unwind_cache)
11636         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11637         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11638         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11639         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11640         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11641         (s390_frame_base_address, s390_local_base_address)
11642         (s390_frame_base, s390_gcc_target_options)
11643         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11644         (s390_validate_reg_range, s390_tdesc_valid)
11645         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11646         * s390-tdep.c: ...this.  New file.
11647
11648 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11649
11650         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11651         (s390_process_record, s390_gdbarch_tdep_alloc)
11652         (s390_linux_init_abi_any): Use/set new hook.
11653
11654 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11655
11656         * s390-linux-tdep.c (osabi.h): New include.
11657         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11658         (s390_linux_init_abi_any): New functions.
11659         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11660
11661 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11662
11663         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11664         tdesc_has_registers check
11665
11666 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11667
11668         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11669         (s390_validate_reg_range): New macro.
11670         (s390_gdbarch_init): Adjust.
11671
11672 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11673
11674         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11675         (s390_gdbarch_tdep_alloc): Adjust.
11676         (s390_gdbarch_init): Adjust.
11677
11678 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11679
11680         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11681         <have_tdb>: Change type to bool.
11682         (s390_gdbarch_tdep_alloc): Adjust.
11683         (s390_gdbarch_init): Adjust.
11684
11685 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11686
11687         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11688         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11689         (s390_gdbarch_tdep_alloc): New function.
11690         (s390_gdbarch_init): Allocate tdep at start and use its fields
11691         instead of separate variables.
11692
11693 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11694
11695         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11696         when looking for cached gdbarch and add comment for remaining.
11697
11698 2018-01-22  Pedro Alves  <palves@redhat.com>
11699             Sergio Durigan Junior  <sergiodj@redhat.com>
11700
11701         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11702         case.
11703
11704 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11705
11706         * MAINTAINERS: Update my company e-mail address.
11707
11708 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11709
11710         * regcache.c (cooked_write_test): New function.
11711         (_initialize_regcache): Register the test.
11712
11713 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11714
11715         * ia64-tdep.c (ia64_pseudo_register_read): Call
11716         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11717         * m32c-tdep.c (m32c_cat_read): Likewise.
11718         (m32c_r3r2r1r0_read): Likewise.
11719         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11720         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11721
11722 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11723
11724         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11725         method raw_read instead of regcache_raw_read.
11726         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11727         * arm-tdep.c (arm_neon_quad_read): Likewise.
11728         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11729         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11730         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11731         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11732         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11733         (i386_pseudo_register_read_into_value): Likewise.
11734         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11735         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11736         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11737         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11738         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11739         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11740         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11741         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11742         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11743
11744 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11745
11746         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11747         * configure.tgt: Remove target mt.
11748         * mt-tdep.c: Remove.
11749         * regcache.c (cooked_read_test): Remove the check for mt.
11750
11751 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11752
11753         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11754         instead of gdbarch_pseudo_register_read_value.
11755
11756 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11757
11758         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11759         language is Ada.
11760
11761 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11762
11763         * linespec.c (create_sals_line_offset): Remove code that preserved
11764         the symtab_and_line's line number.
11765
11766 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11767
11768         * varobj.c (varobj_create): Don't set valid_block when creating a
11769         floating varobj.
11770
11771 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11772
11773         * varobj.c (varobj_create): Remove out of date comment.
11774
11775 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11776
11777         PR mi/20395
11778         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11779         updating innermost block.
11780         * parse.c (innermost_block_tracker::update): Take extra type
11781         parameter, and check types match before updating innermost block.
11782         (write_dollar_variable): Update innermost block for registers.
11783         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11784         (innermost_block_tracker::innermost_block_tracker): Initialise
11785         m_types member.
11786         (innermost_block_tracker::reset): Take type parameter.
11787         (innermost_block_tracker::update): Take type parameter, and pass
11788         type through as needed.
11789         (innermost_block_tracker::m_types): New member.
11790         * varobj.c (varobj_create): Pass type when reseting innermost
11791         block.
11792
11793 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11794
11795         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11796         * ada-lang.c (resolve_subexp): Likewise.
11797         * breakpoint.c (set_breakpoint_condition) Likewise.
11798         (watch_command_1) Likewise.
11799         * c-exp.y (variable): Likewise.
11800         * d-exp.y (PrimaryExpression): Likewise.
11801         * f-exp.y (variable): Likewise.
11802         * go-exp.y (variable): Likewise.
11803         * m2-exp.y (variable): Likewise.
11804         * objfiles.c (objfile::~objfile): Likewise.
11805         * p-exp.y (variable): Likewise.
11806         * parse.c (innermost_block): Change type.
11807         * parser-defs.h (class innermost_block_tracker): New.
11808         (innermost_block): Change to innermost_block_tracker.
11809         * printcmd.c (display_command): Switch to innermost_block API.
11810         (do_one_display): Likewise.
11811         * rust-exp.y (do_one_display): Likewise.
11812         * symfile.c (clear_symtab_users): Likewise.
11813         * varobj.c (varobj_create): Switch to innermost_block API, replace
11814         use of innermost_block with block stored on varobj object.
11815
11816 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11817
11818         * expression.h (innermost_block): Remove declaration.
11819         * varobj.c: Add 'parser-defs.h' include.
11820
11821 2018-01-19  Tom Tromey  <tom@tromey.com>
11822
11823         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11824         symbols in the static and global blocks.
11825
11826 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11827
11828         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11829         gdb_ptrace.h, and move including gdb_wait.h ...
11830         * nat/linux-ptrace.h: ... to here.
11831
11832 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11833
11834         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11835         inf_ptrace_detach_success.
11836         (inf_ptrace_detach_success): Add inferior parameter, use it
11837         instead of inferior_ptid, pass it to detach_inferior.
11838         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11839         parameter.
11840         * inferior.c (detach_inferior): Add overload that takes an
11841         inferior object.
11842         * inferior.h (detach_inferior): Likewise.
11843         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11844         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11845         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11846
11847 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11848
11849         * target.h (struct target_ops) <to_detach>: Add inferior
11850         parameter.
11851         (target_detach): Likewise.
11852         * target.c (dispose_inferior): Pass inferior down.
11853         (target_detach): Pass inferior down.  Assert that it is equal to
11854         the current inferior.
11855         * aix-thread.c (aix_thread_detach): Pass inferior down.
11856         * corefile.c (core_file_command): Pass current_inferior() down.
11857         * corelow.c (core_detach): Add inferior parameter.
11858         * darwin-nat.c (darwin_detach): Likewise.
11859         * gnu-nat.c (gnu_detach): Likewise.
11860         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11861         * infcmd.c (detach_command): Pass current_inferior() down to
11862         target_detach.
11863         * infrun.c (follow_fork_inferior): Pass parent_inf to
11864         target_detach.
11865         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11866         target_detach.
11867         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11868         * linux-thread-db.c (thread_db_detach): Likewise.
11869         * nto-procfs.c (procfs_detach): Likewise.
11870         * procfs.c (procfs_detach): Likewise.
11871         * record.c (record_detach): Likewise.
11872         * record.h (struct inferior): Forward-declare.
11873         (record_detach): Add inferior parameter.
11874         * remote-sim.c (gdbsim_detach): Likewise.
11875         * remote.c (remote_detach_1): Likewise.
11876         (remote_detach): Likewise.
11877         (extended_remote_detach): Likewise.
11878         * sol-thread.c (sol_thread_detach): Likewise.
11879         * target-debug.h (target_debug_print_inferior_p): New macro.
11880         * target-delegates.c: Re-generate.
11881         * top.c (kill_or_detach): Pass inferior down to target_detach.
11882         * windows-nat.c (windows_detach): Add inferior parameter.
11883
11884 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11885
11886         * target.h (struct target_ops) <to_detach>: Remove args
11887         parameter.
11888         (target_detach): Likewise.
11889         * target.c (dispose_inferior): Adjust.
11890         (target_detach): Remove args parameter, adjust.
11891         * aix-thread.c (aix_thread_detach): Adjust.
11892         * corefile.c (core_file_command): Adjust.
11893         * corelow.c (core_detach): Adjust.
11894         * darwin-nat.c (darwin_detach): Adjust.
11895         * gnu-nat.c (gnu_detach): Adjust.
11896         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11897         * infcmd.c (detach_command): Adjust
11898         * infrun.c (follow_fork_inferior): Adjust.
11899         (handle_vfork_child_exec_or_exit): Adjust.
11900         * linux-fork.c (linux_fork_detach): Remove args parameter.
11901         * linux-fork.h (linux_fork_detach): Likewise.
11902         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11903         * linux-thread-db.c (thread_db_detach): Likewise.
11904         * nto-procfs.c (procfs_detach): Likewise.
11905         * procfs.c (procfs_detach): Likewise.
11906         (do_detach): Remove signo parameter.
11907         * record.c (record_detach): Remove args parameter.
11908         * record.h (record_detach): Likewise.
11909         * remote-sim.c (gdbsim_detach): Likewise.
11910         * remote.c (remote_detach_1): Likewise.
11911         (remote_detach): Likewise.
11912         (extended_remote_detach): Likewise.
11913         * sol-thread.c (sol_thread_detach): Likewise.
11914         * target-delegates.c: Re-generate.
11915         * top.c (struct qt_args) <args>: Remove field.
11916         (kill_or_detach): Don't pass args.
11917         (quit_force): Don't set args.
11918         * windows-nat.c (windows_detach): Remove args parameter.
11919
11920 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11921
11922         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11923         (arm_linux_init_abi): Install it.
11924
11925 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11926
11927         * osabi.c (gdb_osabi_names): Extend the regexp for
11928         arm-linux-gnueabihf.
11929
11930 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11931
11932         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11933         m_abbrevs.
11934         (abbrev_table::add_abbrev): Update.
11935         (abbrev_table::lookup_abbrev): Update.
11936
11937 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11938
11939         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11940
11941 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11942
11943         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11944         to "std::string".
11945
11946 2018-01-17  Tom Tromey  <tom@tromey.com>
11947
11948         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11949
11950 2018-01-17  Tom Tromey  <tom@tromey.com>
11951
11952         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11953         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11954         (create_array_type_with_stride): Update.
11955         * dwarf2read.c (set_die_type): Update.
11956
11957 2018-01-17  Tom Tromey  <tom@tromey.com>
11958
11959         * dwarf2read.c (delayed_method_info): Remove typedef.
11960         (dwarf2_cu::method_info): Now a std::vector.
11961         (add_to_method_list): Update.
11962         (free_delayed_list): Remove.
11963         (compute_delayed_physnames): Update.
11964         (process_full_comp_unit, process_full_type_unit): Clear the method
11965         list.  Remove cleanups.
11966         (psymtab_include_file_name): Add name_holder parameter.  Use
11967         unique_xmalloc_ptr.
11968         (dwarf_decode_lines): Update.
11969
11970 2018-01-17  Tom Tromey  <tom@tromey.com>
11971             Simon Marchi  <simon.marchi@ericsson.com>
11972
11973         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11974         (dwarf2_per_objfile::free_cached_comp_units)
11975         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11976         (init_cutu_and_read_dies_no_follow): Update.
11977         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11978         (dwarf2_cu::~dwarf2_cu): New.
11979         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11980         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11981
11982 2018-01-17  Tom Tromey  <tom@tromey.com>
11983             Simon Marchi  <simon.marchi@ericsson.com>
11984
11985         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11986         (struct die_reader_specs) <abbrev_table>: New member.
11987         (struct abbrev_table): Add constructor.
11988         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11989         <abbrev_obstack>: Now an auto_obstack.
11990         (abbrev_table_up): New typedef.
11991         (init_cu_die_reader): Add abbrev_table parameter.
11992         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11993         Add result_dwo_abbrev_table.
11994         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11995         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11996         Update.
11997         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11998         parameter.
11999         (skip_children): Update.
12000         (abbrev_table::alloc_abbrev): Rename from
12001         abbrev_table_alloc_abbrev.
12002         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12003         (abbrev_table::lookup_abbrev): Rename from
12004         abbrev_table_lookup_abbrev.
12005         (abbrev_table_read_table): Return abbrev_table_up.
12006         (abbrev_table_free, abbrev_table_free_cleanup)
12007         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12008         (load_partial_dies): Update.
12009
12010 2018-01-17  Tom Tromey  <tom@tromey.com>
12011
12012         * dwarf2read.c (dwarf2_compute_name): Update comment.
12013         (read_func_scope, read_variable): Update.
12014         (new_symbol): Remove.
12015         (new_symbol_full): Rename to new_symbol.
12016
12017 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
12018
12019         PR gdb/16577
12020         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12021         a warning instead of throwing an error, set section size to 0 and return
12022         NULL.
12023         * gdb_bfd.h (gdb_bfd_map_section): Update description.
12024
12025 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12026
12027         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12028         std::string.
12029         (linux_ptrace_attach_fail_reason_string): Likewise.
12030         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12031         Likewise.
12032         (linux_ptrace_attach_fail_reason_string): Likewise.
12033         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12034
12035 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12036
12037         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12038
12039 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
12040
12041         PR gdb/21559
12042         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12043         checking for fs_base/gs_base fields in struct user_regs_struct.
12044         * configure: Regenerate.
12045
12046 2018-01-17  Yao Qi  <yao.qi@linaro.org>
12047
12048         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12049         function.
12050         (aarch64_linux_init_abi): Install it to gdbarch hook
12051         gcc_target_options.
12052
12053 2018-01-15  Pedro Alves  <palves@redhat.com>
12054
12055         * common/signals-state-save-restore.c
12056         (save_original_signals_state): Fix typos.
12057
12058 2017-01-12  Tom Tromey  <tom@tromey.com>
12059             Sergio Durigan Junior  <sergiodj@redhat.com>
12060
12061         * Makefile.in (install-only): Install gdb-add-index.
12062
12063 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12064
12065         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12066
12067 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12068
12069         * infrun.c (keep_going_pass_signal): Clear step-over info when
12070         insert_breakpoints fails.
12071
12072 2018-01-11  Pedro Alves  <palves@redhat.com>
12073
12074         PR gdb/22583
12075         * infrun.c (resume): Rename to ...
12076         (resume_1): ... this.
12077         (resume): Reimplement as wrapper around resume_1.
12078
12079 2018-01-11  Pedro Alves  <palves@redhat.com>
12080
12081         PR remote/22597
12082         * remote.c (remote_parse_stop_reply): Default to the last-set
12083         general thread instead of to 'magic_null_ptid'.
12084
12085 2018-01-10  Pedro Alves  <palves@redhat.com>
12086
12087         * language.h (language_get_symbol_name_matcher): Rename ...
12088         (get_symbol_name_matcher): ... this.
12089         * language.c (language_get_symbol_name_matcher): Ditto.
12090         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12091         callers adjusted.
12092
12093 2018-01-10  Pedro Alves  <palves@redhat.com>
12094
12095         PR gdb/22670
12096         * dwarf2read.c
12097         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12098         Adjust to use language_get_symbol_name_matcher instead of
12099         language_defn::la_get_symbol_name_matcher.
12100         * language.c (language_get_symbol_name_matcher): If in Ada mode
12101         and the lookup name is a verbatim match, return Ada's matcher.
12102         * language.h (language_get_symbol_name_matcher): Adjust comment.
12103         (ada_lookup_name_info::verbatim_p):: New method.
12104
12105 2018-01-10  Pedro Alves  <palves@redhat.com>
12106
12107         PR gdb/22670
12108         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12109         minsym's language is language_auto or language_cplus, pass down
12110         language_ada instead.
12111         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12112
12113 2018-01-10  Pedro Alves  <palves@redhat.com>
12114
12115         PR gdb/22670
12116         * minsyms.c (linkage_name_str): New function.
12117         (iterate_over_minimal_symbols): Use it.
12118
12119 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12120
12121         * NEWS: Document that 'info proc' now works on FreeBSD.
12122
12123 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12124
12125         * configure.ac: Check for kinfo_getfile in libutil.
12126         * configure: Regenerate.
12127         * config.in: Regenerate.
12128         * fbsd-nat.c: Include "fbsd-tdep.h".
12129         (fbsd_fetch_cmdline): New.
12130         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12131         rather than calling error.
12132         (fbsd_info_proc): New.
12133         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12134         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12135         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12136
12137 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12138
12139         * fbsd-nat.c (struct free_deleter): Remove.
12140         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12141
12142 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12143
12144         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12145         NULL for an empty pathname.
12146
12147 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12148
12149         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12150         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12151         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12152         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12153         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12154         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12155         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12156         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12157         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12158         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12159         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12160         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12161         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12162         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12163         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12164
12165 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12166
12167         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12168         (gnu_xfer_auxv): New function.
12169         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12170         TARGET_OBJECT_AUXV.
12171
12172 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12173             Simon Marchi  <simon.marchi@ericsson.com>
12174
12175         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12176         common/selftest.c.
12177         (COMMON_OBS): Remove selftest.o.
12178         * configure.ac: Append selftest-arch.c and common/selftest.c to
12179         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12180         * configure: Re-generated.
12181         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12182         GDB_SELF_TEST.
12183         (maintenance_info_selftests): Likewise.
12184
12185 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12186
12187         * ada-valprint.c (val_print_packed_array_elements): Use
12188         proper number of elements when printing an array indexed
12189         by an enumeration type.
12190
12191 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12192
12193         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12194         (dw2_get_file_names_reader): Adjust.
12195         (lookup_dwo_signatured_type): Adjust.
12196         (lookup_dwp_signatured_type): Adjust.
12197         (lookup_signatured_type): Adjust.
12198         (create_type_unit_group): Adjust.
12199         (get_type_unit_group): Adjust.
12200         (process_psymtab_comp_unit_reader): Adjust.
12201         (build_type_psymtabs_reader): Adjust.
12202         (scan_partial_symbols): Adjust.
12203         (add_partial_symbol): Adjust.
12204         (add_partial_subprogram): Adjust.
12205         (peek_die_abbrev): Adjust.
12206         (fixup_go_packaging): Adjust.
12207         (process_imported_unit_die): Adjust.
12208         (dwarf2_compute_name): Adjust.
12209         (dwarf2_physname): Adjust.
12210         (read_import_statement): Adjust.
12211         (handle_DW_AT_stmt_list): Adjust.
12212         (read_file_scope): Adjust.
12213         (read_func_scope): Adjust.
12214         (read_lexical_block_scope): Adjust.
12215         (read_call_site_scope): Adjust.
12216         (read_variable): Adjust.
12217         (dwarf2_rnglists_process): Adjust.
12218         (dwarf2_ranges_process): Adjust.
12219         (dwarf2_ranges_read): Adjust.
12220         (dwarf2_get_pc_bounds): Adjust.
12221         (dwarf2_record_block_ranges): Adjust.
12222         (dwarf2_add_field): Adjust.
12223         (dwarf2_add_member_fn): Adjust.
12224         (read_structure_type): Adjust.
12225         (process_structure_scope): Adjust.
12226         (read_enumeration_type): Adjust.
12227         (read_array_type): Adjust.
12228         (mark_common_block_symbol_computed): Adjust.
12229         (read_common_block): Adjust.
12230         (read_namespace_type): Adjust.
12231         (read_namespace): Adjust.
12232         (read_module_type): Adjust.
12233         (read_tag_pointer_type): Adjust.
12234         (read_tag_ptr_to_member_type): Adjust.
12235         (read_tag_string_type): Adjust.
12236         (read_subroutine_type): Adjust.
12237         (read_typedef): Adjust.
12238         (read_base_type): Adjust.
12239         (attr_to_dynamic_prop): Adjust.
12240         (read_subrange_type): Adjust.
12241         (read_unspecified_type): Adjust.
12242         (dwarf2_read_abbrevs): Adjust.
12243         (load_partial_dies): Adjust.
12244         (read_partial_die): Adjust.
12245         (find_partial_die): Adjust.
12246         (guess_partial_die_structure_name): Adjust.
12247         (fixup_partial_die): Adjust.
12248         (read_attribute_value): Adjust.
12249         (read_addr_index): Adjust.
12250         (read_addr_index_from_leb128): Adjust.
12251         (read_str_index): Adjust.
12252         (dwarf2_string_attr): Adjust.
12253         (get_debug_line_section): Adjust.
12254         (dwarf_decode_line_header): Adjust.
12255         (lnp_state_machine::check_line_address): Adjust.
12256         (dwarf_decode_lines_1): Adjust.
12257         (dwarf_decode_lines): Adjust.
12258         (dwarf2_start_symtab): Adjust.
12259         (var_decode_location): Adjust.
12260         (new_symbol_full): Adjust.
12261         (dwarf2_const_value_data): Adjust.
12262         (dwarf2_const_value_attr): Adjust.
12263         (dwarf2_const_value): Adjust.
12264         (die_type): Adjust.
12265         (die_containing_type): Adjust.
12266         (build_error_marker_type): Adjust.
12267         (lookup_die_type): Adjust.
12268         (guess_full_die_structure_name): Adjust.
12269         (anonymous_struct_prefix): Adjust.
12270         (determine_prefix): Adjust.
12271         (dwarf2_name): Adjust.
12272         (follow_die_ref_or_sig): Adjust.
12273         (follow_die_offset): Adjust.
12274         (follow_die_ref): Adjust.
12275         (follow_die_sig_1): Adjust.
12276         (follow_die_sig): Adjust.
12277         (get_signatured_type): Adjust.
12278         (get_DW_AT_signature_type): Adjust.
12279         (decode_locdesc): Adjust.
12280         (dwarf_decode_macros): Adjust.
12281         (cu_debug_loc_section): Adjust.
12282         (fill_in_loclist_baton): Adjust.
12283         (dwarf2_symbol_mark_computed): Adjust.
12284         (init_one_comp_unit): Don't assign
12285         dwarf2_cu::dwarf2_per_objfile.
12286         (set_die_type): Adjust.
12287
12288 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12289
12290         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12291         <dwarf2_per_objfile>: New field.
12292         (dwarf2_per_objfile): Remove global.
12293         (get_dwarf2_per_objfile): New function.
12294         (set_dwarf2_per_objfile): New function.
12295         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12296         dwarf2_per_objfile.
12297         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12298         (read_abbrev_offset): Likewise.
12299         (read_indirect_string): Likewise.
12300         (read_indirect_line_string): Likewise.
12301         (read_indirect_string_at_offset): Likewise.
12302         (read_indirect_string_from_dwz): Likewise.
12303         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12304         dwarf2_per_objfile.
12305         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12306         (create_all_comp_units): Change objfile parameter to
12307         dwarf2_per_objfile.
12308         (create_all_type_units): Likewise.
12309         (process_queue): Add dwarf2_per_objfile parameter.
12310         (read_and_check_comp_unit_head): Likewise.
12311         (lookup_dwo_unit_in_dwp): Likewise.
12312         (get_dwp_file): Likewise.
12313         (process_cu_includes): Likewise.
12314         (struct free_dwo_file_cleanup_data): New struct.
12315         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12316         set_dwarf2_per_objfile.
12317         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12318         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12319         context, adjust calls.
12320         (dw2_instantiate_symtab): Likewise.
12321         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12322         (dw2_get_cu): Likewise.
12323         (create_cu_from_index_list): Change objfile parameter to
12324         dwarf2_per_objfile.
12325         (create_cus_from_index_list): Get dwarf2_per_objfile from
12326         context, adjust calls.
12327         (create_cus_from_index): Likewise.
12328         (create_signatured_type_table_from_index): Change objfile
12329         parameter to dwarf2_per_objfile.
12330         (create_signatured_type_table_from_debug_names): Change objfile
12331         parameter to dwarf2_per_objfile.
12332         (create_addrmap_from_index): Likewise.
12333         (create_addrmap_from_aranges): Likewise.
12334         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12335         (dw2_setup): Remove.
12336         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12337         context.
12338         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12339         get_dwarf2_per_objfile.
12340         (dw2_forget_cached_source_info): Likewise.
12341         (dw2_map_symtabs_matching_filename): Likewise.
12342         (struct dw2_symtab_iterator) <index>: Remove.
12343         <dwarf2_per_objfile>: New field.
12344         (dw2_symtab_iter_init): Replace index parameter with
12345         dwarf2_per_objfile.
12346         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12347         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12348         (dw2_print_stats): Likewise.
12349         (dw2_dump): Likewise.
12350         (dw2_expand_symtabs_for_function): Likewise.
12351         (dw2_expand_all_symtabs): Likewise.
12352         (dw2_expand_symtabs_with_fullname): Likewise.
12353         (dw2_expand_marked_cus): Replace index and objfile parameters
12354         with dwarf2_per_objfile.
12355         (dw_expand_symtabs_matching_file_matcher): Add
12356         dwarf2_per_objfile parameter and adjust calls.
12357         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12358         adjust calls.
12359         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12360         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12361         adjust calls.
12362         (create_cus_from_debug_names_list): Replace objfile parameter
12363         with dwarf2_per_objfile and adjust calls.
12364         (create_cus_from_debug_names): Likewise.
12365         (dwarf2_read_debug_names): Likewise.
12366         (mapped_debug_names::namei_to_name): Adjust call.
12367         (dw2_debug_names_iterator::next): Likewise.
12368         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12369         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12370         (dw2_debug_names_dump): Likewise.
12371         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12372         (dw2_debug_names_expand_symtabs_matching): Likewise.
12373         (dwarf2_initialize_objfile): Likewise.
12374         (dwarf2_build_psymtabs): Likewise.
12375         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12376         this_cu.
12377         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12378         (read_and_check_comp_unit_head): Likewise.
12379         (read_abbrev_offset): Likewise.
12380         (create_debug_type_hash_table): Likewise.
12381         (create_debug_types_hash_table): Likewise.
12382         (create_all_type_units): Replace objfile parameter with
12383         dwarf2_per_objfile.
12384         (add_type_unit): Add dwarf2_per_objfile parameter.
12385         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12386         with dwarf2_per_objfile.
12387         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12388         (lookup_dwp_signatured_type): Likewise.
12389         (lookup_signatured_type): Likewise.
12390         (read_cutu_die_from_dwo): Likewise.
12391         (init_tu_and_read_dwo_dies): Likewise.
12392         (init_cutu_and_read_dies): Likewise.
12393         (init_cutu_and_read_dies_no_follow): Likewise.
12394         (allocate_type_unit_groups_table): Add objfile parameter.
12395         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12396         (get_type_unit_group): Likewise.
12397         (process_psymtab_comp_unit): Update call.
12398         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12399         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12400         (print_tu_stats): Likewise.
12401         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12402         in void* parameter.
12403         (build_type_psymtabs): Change objfile parameter to
12404         dwarf2_per_objfile.
12405         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12406         passed in void* parameter.
12407         (process_skeletonless_type_units): Change objfile parameter to
12408         dwarf2_per_objfile.
12409         (set_partial_user): Likewise.
12410         (dwarf2_build_psymtabs_hard): Likewise.
12411         (read_comp_units_from_section): Likewise.
12412         (create_all_comp_units): Likewise.
12413         (scan_partial_symbols): Update calls.
12414         (add_partial_symbol): Likewise.
12415         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12416         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12417         (process_queue): Add dwarf2_per_objfile parameter.
12418         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12419         (compute_compunit_symtab_includes): Likewise.
12420         (process_cu_includes): Add dwarf2_per_objfile parameter.
12421         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12422         (process_full_type_unit): Likewise.
12423         (process_imported_unit_die): Update call.
12424         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12425         (read_file_scope): Likewise.
12426         (allocate_dwo_file_hash_table): Add objfile parameter.
12427         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12428         (create_cus_hash_table): Likewise.
12429         (create_dwp_hash_table): Likewise.
12430         (create_dwo_unit_in_dwp_v1): Likewise.
12431         (create_dwp_v2_section): Likewise.
12432         (create_dwo_unit_in_dwp_v2): Likewise.
12433         (lookup_dwo_unit_in_dwp): Likewise.
12434         (try_open_dwop_file): Likewise.
12435         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12436         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12437         cleanup to include a reference to dwarf2_per_objfile.
12438         (open_dwp_file): Add dwarf2_per_objfile parameter.
12439         (open_and_init_dwp_file): Likewise.
12440         (get_dwp_file): Likewise.
12441         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12442         (queue_and_load_all_dwo_tus): Update call.
12443         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12444         data.
12445         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12446         (dwarf2_ranges_process): Likewise.
12447         (dwarf2_get_pc_bounds): Likewise.
12448         (mark_common_block_symbol_computed): Likewise.
12449         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12450         (dwarf2_read_abbrevs): Update call.
12451         (read_partial_die): Use dwarf2_per_objfile from cu.
12452         (find_partial_die): Likewise.
12453         (fixup_partial_die): Likewise.
12454         (read_attribute_value): Likewise.
12455         (read_indirect_string_at_offset_from): Add objfile parameter.
12456         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12457         parameter.
12458         (read_indirect_string_from_dwz): Add objfile parameter.
12459         (read_indirect_string): Add objfile parameter.
12460         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12461         (read_addr_index): Use dwarf2_per_objfile from cu.
12462         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12463         call dw2_setup.
12464         (read_str_index): Use dwarf2_per_objfile from cu.
12465         (get_debug_line_section): Likewise.
12466         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12467         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12468         (new_symbol_full): Use dwarf2_per_objfile from cu.
12469         (build_error_marker_type): Likewise.
12470         (lookup_die_type): Likewise.
12471         (determine_prefix): Likewise.
12472         (follow_die_offset): Likewise.
12473         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12474         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12475         (dwarf2_fetch_die_type_sect_off): Likewise.
12476         (dwarf2_get_die_type): Likewise.
12477         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12478         (get_signatured_type): Likewise.
12479         (get_DW_AT_signature_type): Likewise.
12480         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12481         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12482         (cu_debug_loc_section): Likewise.
12483         (fill_in_loclist_baton): Likewise.
12484         (dwarf2_symbol_mark_computed): Likewise.
12485         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12486         dwarf2_per_objfile.
12487         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12488         parameter.
12489         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12490         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12491         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12492         (set_die_type): Use dwarf2_free_objfile from cu.
12493         (get_die_type_at_offset): Likewise.
12494         (dwarf2_per_objfile_free): Don't assign global variable.
12495         (debug_names) <constructor>: Add dwarf2_per_objfile
12496         parameter, update m_debugstrlookup construction.
12497         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12498         parameter.
12499         <m_dwarf2_per_objfile>: New field.
12500         <lookup>: Use m_dwarf2_per_objfile.
12501         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12502         (psyms_seen_size): Likewise.
12503         (write_gdbindex): Replace objfile parameter with
12504         dwarf2_per_objfile.
12505         (write_debug_names): Likewise.
12506         (write_psymtabs_to_index): Likewise.
12507         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12508         calls.
12509
12510 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12511
12512         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12513         <dwarf2_per_objfile>: New field.
12514         (struct dwarf2_per_cu_data) <objfile>: Remove.
12515         <dwarf2_per_objfile>: New field.
12516         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12517         of objfile.
12518         (create_signatured_type_table_from_index): Likewise.
12519         (create_debug_type_hash_table): Likewise.
12520         (fill_in_sig_entry_from_dwo_entry): Likewise.
12521         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12522         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12523         objfile.
12524         (create_partial_symtab): Access objfile through
12525         dwarf2_per_objfile.
12526         (process_psymtab_comp_unit_reader): Likewise.
12527         (read_comp_units_from_section): Likewise.
12528         (scan_partial_symbols): Likewise.
12529         (add_partial_symbol): Likewise.
12530         (add_partial_subprogram): Likewise.
12531         (peek_die_abbrev): Likewise.
12532         (fixup_go_packaging): Likewise.
12533         (process_full_comp_unit): Likewise.
12534         (process_full_type_unit): Likewise.
12535         (process_imported_unit_die): Likewise.
12536         (dwarf2_compute_name): Likewise.
12537         (dwarf2_physname): Likewise.
12538         (read_import_statement): Likewise.
12539         (create_cus_hash_table): Assign dwarf2_physname instead of
12540         objfile.
12541         (read_func_scope): Access objfile through dwarf2_per_objfile.
12542         (read_lexical_block_scope): Likewise.
12543         (read_call_site_scope): Likewise.
12544         (read_variable): Likewise.
12545         (dwarf2_rnglists_process): Likewise.
12546         (dwarf2_ranges_process): Likewise.
12547         (dwarf2_ranges_read): Likewise.
12548         (dwarf2_record_block_ranges): Likewise.
12549         (dwarf2_add_field): Likewise.
12550         (dwarf2_add_member_fn): Likewise.
12551         (read_structure_type): Likewise.
12552         (process_structure_scope): Likewise.
12553         (read_enumeration_type): Likewise.
12554         (read_array_type): Likewise.
12555         (read_common_block): Likewise.
12556         (read_namespace_type): Likewise.
12557         (read_namespace): Likewise.
12558         (read_module_type): Likewise.
12559         (read_tag_pointer_type): Likewise.
12560         (read_tag_ptr_to_member_type): Likewise.
12561         (read_tag_string_type): Likewise.
12562         (read_subroutine_type): Likewise.
12563         (read_typedef): Likewise.
12564         (read_base_type): Likewise.
12565         (attr_to_dynamic_prop): Likewise.
12566         (read_subrange_type): Likewise.
12567         (read_unspecified_type): Likewise.
12568         (load_partial_dies): Likewise.
12569         (read_partial_die): Likewise.
12570         (find_partial_die): Likewise.
12571         (guess_partial_die_structure_name): Likewise.
12572         (fixup_partial_die): Likewise.
12573         (read_attribute_value): Likewise.
12574         (read_addr_index_from_leb128): Likewise.
12575         (dwarf2_read_addr_index): Likewise.
12576         (dwarf2_string_attr): Likewise.
12577         (lnp_state_machine::check_line_address): Likewise.
12578         (dwarf_decode_lines_1): Likewise.
12579         (dwarf_decode_lines): Likewise.
12580         (dwarf2_start_symtab): Likewise.
12581         (var_decode_location): Likewise.
12582         (new_symbol_full): Likewise.
12583         (dwarf2_const_value_data): Likewise.
12584         (dwarf2_const_value_attr): Likewise.
12585         (dwarf2_const_value): Likewise.
12586         (die_type): Likewise.
12587         (die_containing_type): Likewise.
12588         (lookup_die_type): Likewise.
12589         (guess_full_die_structure_name): Likewise.
12590         (anonymous_struct_prefix): Likewise.
12591         (dwarf2_name): Likewise.
12592         (follow_die_ref_or_sig): Likewise.
12593         (follow_die_offset): Likewise.
12594         (follow_die_ref): Likewise.
12595         (dwarf2_fetch_die_loc_sect_off): Likewise.
12596         (dwarf2_fetch_constant_bytes): Likewise.
12597         (dwarf2_fetch_die_type_sect_off): Likewise.
12598         (dwarf2_get_die_type): Likewise.
12599         (follow_die_sig): Likewise.
12600         (decode_locdesc): Likewise.
12601         (dwarf2_per_cu_objfile): Likewise.
12602         (dwarf2_per_cu_text_offset): Likewise.
12603         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12604         objfile.
12605         (set_die_type): Access objfile through
12606         dwarf2_per_objfile.
12607
12608 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12609
12610         * valprint.c (converted_character_d): Remove typedef.
12611         (DEF_VEC_O (converted_character_d)): Remove.
12612         (count_next_character): Use std::vector.
12613         (print_converted_chars_to_obstack): Likewise.
12614         (generic_printstr): Likewise.
12615
12616 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12617
12618         * xml-support.h (struct gdb_xml_value): Add constructor.
12619         <value>: Change type to unique_xmalloc_ptr.
12620         (gdb_xml_value_s): Remove typedef.
12621         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12622         (gdb_xml_element_start_handler): Change parameter type to
12623         std::vector.
12624         (xml_find_attribute): Likewise.
12625         * xml-support.c (xml_find_attribute): Change parameter type to
12626         std::vector and adjust.
12627         (gdb_xml_values_cleanup): Remove.
12628         (gdb_xml_parser::start_element): Adjust to std::vector.
12629         (xinclude_start_include): Change paraeter type to std::vector
12630         and adjust.
12631         * btrace.c (check_xml_btrace_version): Likewise.
12632         (parse_xml_btrace_block): Likewise.
12633         (parse_xml_btrace_pt_config_cpu): Likewise.
12634         (parse_xml_btrace_pt): Likewise.
12635         (parse_xml_btrace_conf_bts): Likewise.
12636         (parse_xml_btrace_conf_pt): Likewise.
12637         * memory-map.c (memory_map_start_memory): Likewise.
12638         (memory_map_start_property): Likewise.
12639         * osdata.c (osdata_start_osdata): Likewise.
12640         (osdata_start_item): Likewise.
12641         (osdata_start_column): Likewise.
12642         * remote.c (start_thread): Likewise.
12643         * solib-aix.c (library_list_start_library): Likewise.
12644         (library_list_start_list): Likewise.
12645         * solib-svr4.c (library_list_start_library): Likewise.
12646         (svr4_library_list_start_list): Likewise.
12647         * solib-target.c (library_list_start_segment): Likewise.
12648         (library_list_start_section): Likewise.
12649         (library_list_start_library): Likewise.
12650         (library_list_start_list): Likewise.
12651         * tracepoint.c (traceframe_info_start_memory): Likewise.
12652         (traceframe_info_start_tvar): Likewise.
12653         * xml-syscall.c (syscall_start_syscall): Likewise.
12654         * xml-tdesc.c (tdesc_start_target): Likewise.
12655         (tdesc_start_feature): Likewise.
12656         (tdesc_start_reg): Likewise.
12657         (tdesc_start_union): Likewise.
12658         (tdesc_start_struct): Likewise.
12659         (tdesc_start_flags): Likewise.
12660         (tdesc_start_enum): Likewise.
12661         (tdesc_start_field): Likewise.
12662         (tdesc_start_enum_value): Likewise.
12663         (tdesc_start_vector): Likewise.
12664
12665 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12666
12667         * extension.h (struct xmethod_worker) <clone>: Remove.
12668         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12669         Remove.
12670         (python_xmethod_worker::clone): Remove.
12671         * valops.c (find_overload_match): Use std::move instead of
12672         clone.
12673
12674 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12675
12676         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12677         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12678         <free_xmethod_worker_data>: Remove.
12679         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12680         <get_xmethod_arg_types>: Remove.
12681         <get_xmethod_result_type>: Remove.
12682         <invoke_xmethod>: Remove.
12683         * extension.c (new_xmethod_worker): Remove.
12684         (clone_xmethod_worker): Remove.
12685         (get_matching_xmethod_workers): Return void, pass std::vector by
12686         pointer.
12687         (get_xmethod_arg_types): Rename to...
12688         (xmethod_worker::get_arg_types): ... this, and adjust.
12689         (get_xmethod_result_type): Rename to...
12690         (xmethod_worker::get_result_type): ... this, and adjust.
12691         (invoke_xmethod): Remove.
12692         (free_xmethod_worker): Remove.
12693         (free_xmethod_worker_vec): Remove.
12694         * extension.h (enum ext_lang_rc): Move here from
12695         extension-priv.h.
12696         (struct xmethod_worker): Add constructor and destructor.
12697         <data>: Remove.
12698         <value>: Remove.
12699         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12700         virtual pure methods.
12701         <get_arg_types, get_result_type>: New methods.
12702         (xmethod_worker_ptr): Remove typedef.
12703         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12704         (xmethod_worker_vec): Remove typedef.
12705         (xmethod_worker_up): New typedef.
12706         (invoke_xmethod): Remove.
12707         (clone_xmethod_worker): Remove.
12708         (free_xmethod_worker): Remove.
12709         (free_xmethod_worker_vec): Remove.
12710         (get_xmethod_arg_types): Remove.
12711         (get_xmethod_result_type): Remove.
12712         * valops.c (find_method_list): Use std::vector, don't use
12713         intermediate vector.
12714         (value_find_oload_method_list): Use std::vector.
12715         (find_overload_match): Use std::vector.
12716         (find_oload_champ): Use std::vector.
12717         * value.c (value_free): Use operator delete.
12718         (value_of_xmethod): Rename to...
12719         (value_from_xmethod): ... this.  Don't assign
12720         xmethod_worker::value, take rvalue-reference.
12721         (result_type_of_xmethod): Adjust.
12722         (call_xmethod): Adjust.
12723         * value.h: Include extension.h.
12724         (struct xmethod_worker): Don't forward-declare.
12725         (value_of_xmethod): Rename to...
12726         (value_from_xmethod): ... this, take rvalue-reference.
12727         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12728         (struct python_xmethod_worker): ... this, add constructor and
12729         destructor.
12730         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12731         (gdbpy_free_xmethod_worker_data): Rename to...
12732         (python_xmethod_worker::~python_xmethod_worker): ... this and
12733         adjust.
12734         (gdbpy_clone_xmethod_worker_data): Rename to...
12735         (python_xmethod_worker::clone): ... this and adjust.
12736         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12737         temporary vector.
12738         (gdbpy_get_xmethod_arg_types): Rename to...
12739         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12740         (gdbpy_get_xmethod_result_type): Rename to...
12741         (python_xmethod_worker::do_get_result_type): ... this and
12742         adjust.
12743         (gdbpy_invoke_xmethod): Rename to...
12744         (python_xmethod_worker::invoke): ... this and adjust.
12745         (new_python_xmethod_worker): Rename to...
12746         (python_xmethod_worker::python_xmethod_worker): ... this and
12747         adjust.
12748         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12749         Remove.
12750         (gdbpy_free_xmethod_worker_data): Remove.
12751         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12752         (gdbpy_get_xmethod_arg_types): Remove.
12753         (gdbpy_get_xmethod_result_type): Remove.
12754         (gdbpy_invoke_xmethod): Remove.
12755         * python/python.c (python_extension_ops): Remove obsolete
12756         callbacks.
12757
12758 2018-01-05  Pedro Alves  <palves@redhat.com>
12759
12760         PR gdb/18653
12761         * common/signals-state-save-restore.c
12762         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12763         find a custom handler preinstalled, instead of internal erroring.
12764         But only warn if !quiet.
12765         * common/signals-state-save-restore.h
12766         (save_original_signals_state): New parameter 'quiet'.
12767         * main.c (captured_main_1): Move save_original_signals_state call
12768         after option handling, and pass QUIET.
12769
12770 2018-01-05  Pedro Alves  <palves@redhat.com>
12771
12772         * spu-tdep.c (spu_catch_start): Pass
12773         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12774
12775 2018-01-05  Pedro Alves  <palves@redhat.com>
12776
12777         PR gdb/22670
12778         * ada-lang.c (literal_symbol_name_matcher): New function.
12779         (ada_get_symbol_name_matcher): Use it for
12780         symbol_name_match_type::SEARCH_NAME.
12781         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12782         it down instead of assuming symbol_name_match_type::FULL.
12783         * block.h (block_lookup_symbol): New parameter 'match_type'.
12784         * c-valprint.c (print_unpacked_pointer): Use
12785         lookup_symbol_search_name instead of lookup_symbol.
12786         * compile/compile-object-load.c (get_out_value_type): Pass down
12787         symbol_name_match_type::SEARCH_NAME.
12788         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12789         symbol_name_match_type::FULL.
12790         * cp-support.c (cp_get_symbol_name_matcher): Handle
12791         symbol_name_match_type::SEARCH_NAME.
12792         * infrun.c (insert_exception_resume_breakpoint): Use
12793         lookup_symbol_search_name.
12794         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12795         * psymtab.c (maintenance_check_psymtabs): Use
12796         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12797         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12798         SYMBOL_SEARCH_NAME.
12799         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12800         if symbol_name_match_type::SEARCH_NAME.
12801         (lookup_symbol_in_language): Pass down
12802         symbol_name_match_type::FULL.
12803         (lookup_symbol_search_name): New.
12804         (lookup_language_this): Pass down
12805         symbol_name_match_type::SEARCH_NAME.
12806         (lookup_symbol_aux, lookup_local_symbol): New parameter
12807         'match_type'.  Pass it down.
12808         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12809         (lookup_symbol_search_name): New declaration.
12810         (lookup_symbol_in_block): New 'match_type' parameter.
12811
12812 2018-01-05  Pedro Alves  <palves@redhat.com>
12813
12814         PR gdb/22670
12815         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12816         ada_lookup_symbol.
12817         (ada_lookup_symbol): Reimplement in terms of
12818         ada_lookup_symbol_list, bits factored out from
12819         ada_lookup_encoded_symbol.
12820
12821 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12822
12823         * ada-exp.y (write_object_renaming): When subscripting an array
12824         using a symbol as the index, pass the block in call to
12825         ada_lookup_encoded_symbol when looking that symbol up.
12826
12827 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12828
12829         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12830         TYPE_INDEX_TYPE.
12831
12832 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12833
12834         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12835         the case where VALUE_LVAL (val0) is not lval_memory.
12836
12837 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12838
12839         * ada-valprint.c (print_optional_low_bound): Handle
12840         character-indexed array printing like boolean-indexed array
12841         printing.
12842
12843 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12844
12845         * NEWS: Create a new section for the next release branch.
12846         Rename the section of the current branch, now that it has
12847         been cut.
12848
12849 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12850
12851         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12852         * version.in: Bump version to 8.1.50.DATE-git.
12853
12854 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12855
12856         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12857         Add field.
12858         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12859         Add field.
12860         (default_exception_support_info) <catch_handlers_sym>: Add field.
12861         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12862         (ada_exception_name_addr_1): Add "catch handlers" handling.
12863         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12864         Update all callers.
12865         (create_excep_cond_exprs) <ex>: Add parameter.
12866         (re_set_exception): Update create_excep_cond_exprs call.
12867         (print_it_exception, print_one_exception, print_mention_exception)
12868         (print_recreate_exception): Add "catch handler" handling.
12869         (allocate_location_catch_handlers, re_set_catch_handlers)
12870         (check_status_catch_handlers, print_it_catch_handlers)
12871         (print_one_catch_handlers, print_mention_catch_handlers)
12872         (print_recreate_catch_handlers): New function.
12873         (catch_handlers_breakpoint_ops): New variable.
12874         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12875         Add parameter.  Add "catch handler" handling.
12876         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12877         Add "catch handler" handling.
12878         (ada_exception_catchpoint_cond_string): Add "catch handler"
12879         handling.
12880         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12881         call.
12882         (catch_ada_handlers_command): New function.
12883         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12884         operations structure.
12885         (_initialize_ada_language): Add "catch handlers" command entry.
12886         * NEWS: Document "catch handlers" feature.
12887
12888 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12889
12890         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12891         account when creating the array type of the slice.
12892         (ada_value_slice): Likewise.
12893
12894 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12895
12896         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12897         New enum value.
12898         (create_array_type_with_stride): Add byte_stride_prop parameter.
12899         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12900         New parameter.  Update all callers in this file.
12901         (array_type_has_dynamic_stride): New function.
12902         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12903         of arrays with dynamic byte strides.
12904         * dwarf2read.c (read_array_type): Add support for dynamic
12905         DW_AT_byte_stride attributes.
12906
12907 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12908
12909         * dwarf2read.c (read_unspecified_type): Treat
12910         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12911
12912 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12913
12914         Update copyright year range in all GDB files.
12915
12916 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12917
12918         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12919         and gdb/testsuite/gdb.base/step-line.c.
12920
12921 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12922
12923         * copyright.py (main): Dump the contents of
12924         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12925         even if BY_HAND is empty.
12926
12927 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12928
12929         * top.c (print_gdb_version): Update Copyright year in version
12930         message.
12931
12932 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12933
12934         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12935
12936 For older changes see ChangeLog-2017.
12937 \f
12938 Local Variables:
12939 mode: change-log
12940 left-margin: 8
12941 fill-column: 74
12942 version-control: never
12943 coding: utf-8
12944 End: