Generate NT_PROCSTAT_{AUXV,VMMAP,PS_STRINGS} in FreeBSD coredumps
[external/binutils.git] / gdb / ChangeLog
1 2018-09-06  Simon Ser  <contact@emersion.fr>
2
3         PR gdb/23105
4         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
5         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
6         * fbsd-tdep.c (fbsd_make_note_desc): New.
7         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
8         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
9         * target.h (enum target_object) Add FreeBSD-specific
10         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
11
12 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
13
14         * compile/compile-c.h (generate_c_for_variable_locations):
15         Change reference to pointer.
16         * compile/compile-c-support.c (compile_program) <compute>:
17         Likewise.
18         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
19         (generate_c_for_for_one_variable): Likewise
20         (generate_c_for_variable_locations): Likewise
21         * compile/compile-c-types.c (compile_c_instance::convert_type):
22         Likewise
23         * compile/compile-cplus-symbols.c (convert_one_symbol):
24         std::move the scope passed to enter_scope.
25         * compile/compile-cplus-types.c
26         (compile_cplus_instance::enter_scope): Make parameter
27         rvalue-reference.
28         (compile_cplus_instance::new_scope): Change reference to
29         pointer.
30         (compile_cplus_instance::convert_type): Likewise
31         (compile_cplus_convert_typedef): std::move the scope passed to
32         enter_scope.
33         (compile_cplus_convert_struct_or_union): Likewise.
34         (compile_cplus_convert_enum): Likewise.
35         (compile_cplus_convert_namespace): Likewise.
36         * compile/compile-cplus.h (compile_cplus_instance)
37         <enter_scope>: Make parameter rvalue-reference.
38         * compile/compile-internal.h (compile_instance)
39         <get_cached_type>: Likewise
40         * compile/compile-loc2c.c (push): Likewise
41         (pushf): Likewise
42         (unary): Likewise
43         (binary): Likewise
44         (print_label): Likewise
45         (pushf_register_address): Likewise
46         (pushf_register): Likewise
47         (do_compile_dwarf_expr_to_c): Likewise
48         (compile_dwarf_expr_to_c): Likewise
49         (compile_dwarf_bounds_to_c): Likewise
50         * compile/compile.c (compile_instance::get_cached_type):
51         Likewise
52         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
53         (compile_dwarf_bounds_to_c): Likewise
54         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
55         (dwarf2_compile_property_to_c): Likewise
56         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
57         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
58         Likewise
59
60 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
61
62         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
63         * tui/tui-data.c (init_content_element): Don't initialize it.
64
65 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
66
67         * tui/tui-data.h (struct tui_win_info)
68         <detail::opaque>: Remove.
69         * tui/tui-data.c (init_win_info): Remove assignment.
70
71 2018-09-05  Tom Tromey  <tom@tromey.com>
72
73         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
74         -Wformat-nonliteral.
75         * target-float.c (host_float_ops<T>::to_string)
76         (host_float_ops<T>::from_string): Use
77         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
78         * configure: Rebuild.
79
80 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
81
82         * printcmd.c (printf_c_string): Use
83         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
84         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
85
86 2018-09-05  Tom Tromey  <tom@tromey.com>
87
88         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
89
90 2018-09-05  Tom de Vries  <tdevries@suse.de>
91
92         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
93         with resolve_abstract_p == true.
94         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
95         defaulting to false. Propagate resolve_abstract_p to
96         dwarf2_fetch_die_loc_sect_off.
97         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
98         parameter, defaulting to false.
99         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
100         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
101         parameter.
102         * dwarf2read.h (struct die_info): Forward-declare.
103         (die_info_ptr): New typedef.
104         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
105
106 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
107
108         GDB 8.2 released.
109
110 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
111             Pedro Alves  <palves@redhat.com>
112
113         * gnulib/Makefile.in (aclocal_m4_deps): Move to
114         "aclocal-m4-deps.mk".  Include file here.
115         $(srcdir)/aclocal.m4: Add "configure.ac".
116         * gnulib/aclocal-m4-deps.mk: New file.
117         * gnulib/update-gnulib.sh: Automatically update
118         "aclocal-m4-deps.mk".
119
120 2018-09-04  Tom Tromey  <tom@tromey.com>
121
122         * configure: Rebuild.
123         * configure.ac: Remove multi-ice code.
124
125 2018-09-04  Tom Tromey  <tom@tromey.com>
126
127         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
128         (ada-exp.o): Update.
129
130 2018-09-04  Tom Tromey  <tom@tromey.com>
131
132         * Makefile.in (printcmd.o, target-float.o): Remove.
133         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
134
135 2018-09-04  Tom Tromey  <tom@tromey.com>
136
137         * gnulib/Makefile.in: Remove obsolete comment.
138         * Makefile.in: Remove obsolete comment.
139
140 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
141
142         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
143         line with '+'.
144
145 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
146
147         * riscv-tdep.c: Add 'prologue-value.h' include.
148         (struct riscv_unwind_cache): New struct.
149         (riscv_debug_unwinder): New global.
150         (riscv_scan_prologue): Update arguments, capture register details
151         from prologue scan.
152         (riscv_skip_prologue): Reformat arguments line, move end of
153         prologue calculation into riscv_scan_prologue.
154         (riscv_frame_cache): Update return type, create
155         riscv_unwind_cache, scan the prologue, and fill in remaining cache
156         details.
157         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
158         (riscv_frame_prev_register): Use the trad_frame within the
159         riscv_unwind_cache.
160         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
161         flag.
162
163 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
164
165         * trad-frame.h (trad_frame_set_realreg): Declare.
166         (trad_frame_set_addr): Declare.
167         * trad-frame.c (trad_frame_set_realreg): Define new function.
168         (trad_frame_set_addr): Define new function.
169         (trad_frame_set_reg_realreg): Use new function.
170         (trad_frame_set_reg_addr): Use new function.
171
172 2018-09-01  Keith Seitz  <keiths@redhat.com>
173
174         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
175         pulongest instead of "%lld".
176         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
177         ATTRIBUTE_UNUSED.
178
179 2018-08-31  Tom Tromey  <tom@tromey.com>
180
181         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
182         variant part type.
183
184 2018-08-31  Pedro Alves  <palves@redhat.com>
185
186         * gdbarch.h: Regenerate.
187
188 2018-08-31  Pedro Alves  <palves@redhat.com>
189
190         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
191         * target.h (Hardware watchpoint interfaces): Describe
192         continuable/steppable/non-steppable watchpoints.
193         * gdbarch.h, gdbarch.c: Regenerate.
194
195 2018-08-31  Pedro Alves  <palves@redhat.com>
196
197         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
198         Delete.
199         * s390-linux-nat.c
200         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
201         * target.h (target_ops::have_continuable_watchpoint): Delete.
202         (target_have_continuable_watchpoint): Delete.
203         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
204         * target-delegates.c: Regenerate.
205
206 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
207
208         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
209         the files present in "gnulib/import/m4/".
210
211 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
212
213         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
214         c.sw, c.swsp, and c.sdsp.
215
216 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
217
218         * riscv-tdep.c (struct riscv_inferior_data): Delete.
219         (riscv_read_misa_reg): Don't cache value read into inferior data.
220         (riscv_new_inferior_data): Delete.
221         (riscv_inferior_data_cleanup): Delete.
222         (riscv_inferior_data): Delete.
223         (riscv_invalidate_inferior_data): Delete.
224         (_initialize_riscv_tdep): Remove initialisation of inferior data.
225
226 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
227
228         * compile/compile-cplus-types.c
229         (compile_cplus_instance::leave_scope): Take the address of scope
230         object.
231         (compile_cplus_instance::convert_qualified_base): Compare quals
232         to 0.
233
234 2018-08-30  Keith Seitz  <keiths@redhat.com>
235
236         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
237         Use "%s" and host_address_to_string instead of "%p" in printf.
238
239 2018-08-29  Keith Seitz  <keiths@redhat.com>
240
241         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
242         and compile-cplus-types.c.
243         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
244         * c-lang.c (cplus_language_defn): Set C++ compile functions.
245         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
246         Declare.
247         * compile/compile-c-support.c: Include compile-cplus.h.
248         (load_libcompile): Templatize.
249         (get_compile_context): "New" function.
250         (c_get_compile_context): Use get_compile_context.
251         (cplus_get_compile_context): New function.
252         (cplus_push_user_expression, cplus_pop_user_expression)
253         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
254         (cplus_compute_program): Define new structs/functions.
255         * compile/compile-cplus-symmbols.c: New file.
256         * compile/compile-cplus-types.c: New file.
257         * compile/compile-cplus.h: New file.
258         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
259         Declare.
260         * compile/compile-object-load.c (get_out_value_type): Use
261         strncmp_iw when comparing symbol names.
262         (compile_object_load): Add mst_bss and mst_data.
263         * compile/compile.c (_initialize_compile): Remove
264         -Wno-implicit-function-declaration from `compile_args'.
265         * compile/gcc-cp-plugin.h: New file.
266         * NEWS: Mention C++ compile support and new debug options.
267
268 2018-08-29  Keith Seitz  <keiths@redhat.com>
269
270         * linespec.c (collect_info::add_symbol): Make virtual.
271         (struct symbol_searcher_collect_info): New struct.
272         (symbol_searcher::find_all_symbols): New method.
273         * symtab.h (class symbol_searcher): New class.
274
275 2018-08-29  Keith Seitz  <keiths@redhat.com>
276
277         * linespec.c (struct linespec) <function_symbols, label_symbols>:
278         Change to vector of block_symbol.  Update all users.
279         (struct collect_info) <symbols>: Likewise.
280         (collect_info::add_symbol): Take block_symbol as argument.
281         Update all callers.
282         (decode_compound_collector) <m_symbols>: Change type to vector
283         of block_symbol.  Update all users.
284         (decode_compound_collector::operator ()): Change parameter type
285         to block_symbol.
286         (find_method, find_function_symbols, find_linespec_symbols)
287         (find_label_symbols_in_block, find_label_symbols): Change symbol
288         vectors to block_symbol vectors.
289         * symtab.h (symbol_found_callback_ftype): Change parameter type to
290         block_symbol.
291
292 2018-08-29  Keith Seitz  <keiths@redhat.com>
293
294         * linespec.c (symbolp): Remove typedef and VEC definitions.
295         (bound_minimal_symbol_d): Likewise.
296
297 2018-08-29  Keith Seitz  <keiths@redhat.com>
298
299         * linespec.c (decode_compound_collector::decode_compound_collector):
300         Remove initialization for `m_symtabs'.
301         (decode_compound_collector::release_symbols): Change return type
302         to std::vector.  Update all callers.
303         (class decode_compound_collector) <m_symbols>: Change type to
304         std::vector.
305         (lookup_prefix_sym): Change return type to std::vector.  Update all
306         callers.
307         (compare_symbols): Remove.
308         (std_compare_symbols): Rename to `compare_symbols'.
309         (find_method): Change `sym_classes' parameter to std::vector.
310         Update all callers.  Use std::sort to sort sym_classes.
311         (find_linespec_symbols): Remove cleanup.
312
313 2018-08-29  Keith Seitz  <keiths@redhat.com>
314
315         * linespec.c (struct linespec) <minimal_symbols>: Change type to
316         std::vector.  Update all users.
317         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
318         (struct collect_info) <minimal_symbols>: Likewise.
319         (compare_msymbols): Return bool.  Change parameters to const
320         bound_minimal_symbol references.
321         (find_method, find_function_symbols, find_linespec_symbols): Change
322         `minsyms' parameter to std::vector.  Update all callers.
323
324 2018-08-29  Keith Seitz  <keiths@redhat.com>
325
326         * linespec.c (struct linespec) <label_symbols>: Change type to
327         std::vector.  Update all users.
328         (find_label_symbols_in_block): Change `result' parameter to
329         std::vector.  Update all callers.
330         (find_label_symbols): Return std::vector.  Update all callers.
331
332 2018-08-29  Keith Seitz  <keiths@redhat.com>
333
334         * linespec.c (struct linespec) <function_symbols>: Change type to
335         std::vector.  Update all users.
336         (struct collect_info) <function_symbols>: Likewise.
337         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
338         (std_compare_symbols): New function.
339         (find_method, find_function_symbols, find_linespec_symbols)
340         (find_label_symbols_in_block): Change `symbols' parameter to
341         std::vector.  Update all callers.
342         (find_label_symbols): Likewise for `function_symbols' and
343         `label_funcs_ret'.
344
345 2018-08-29  Keith Seitz  <keiths@redhat.com>
346
347         * linespec.c (symtab_vector_up): Define.
348         (struct linespec) <file_symtabs>: Change type to std::vector *.
349         Update all uses.
350         (struct collect_info) <file_symtabs>: Likewise.
351         (collect_symtabs_from_filename): Return symtab_vector_up.
352         Update all callers.
353         (decode_objc): Remove cleanup.
354         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
355         (symtab_collector::release_symtabs): Return symtab_vector_up.
356         Update all callers.
357         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
358         Update all users.
359         (collect_symtabs_from_filename, symtabs_from_filename): Return
360         symtab_vector_up.  Update all callers.
361
362 2018-08-29  Tom Tromey  <tom@tromey.com>
363
364         * csky-tdep.c (csky_analyze_prologue): Use
365         core_addr_to_string_nz.
366
367 2018-08-29  Tom Tromey  <tom@tromey.com>
368
369         * windows-nat.c (struct xlate_exception) <them>: Change type to
370         DWORD.
371         (xlate): Fix formatting.  Remove last entry.
372         (struct xlate_exception, xlate): Comment out.
373         (windows_nat_target::resume): Use ranged for.
374
375 2018-08-29  Jim Wilson  <jimw@sifive.com>
376
377         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
378         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
379         of NT_PRFPREG.
380         (riscv_linux_nat_target::store_registers): Likewise.
381
382 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
383
384         PR gdb/23555
385         PR gdb/23558
386         * gnulib/aclocal.m4: Regenerate.
387         * gnulib/config.in: Regenerate.
388         * gnulib/configure: Regenerate.
389         * gnulib/import/Makefile.am: Update.
390         * gnulib/import/Makefile.in: Update.
391         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
392         * gnulib/import/_Noreturn.h: ... this.
393         * gnulib/import/alloca.in.h: Update.
394         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
395         * gnulib/import/arg-nonnull.h: ... this.
396         * gnulib/import/assure.h: Update.
397         * gnulib/import/at-func.c: Update.
398         * gnulib/import/basename-lgpl.c: Update.
399         * gnulib/import/extra/snippet/c++defs.h: Rename to...
400         * gnulib/import/c++defs.h: ... this.
401         * gnulib/import/canonicalize-lgpl.c: Update.
402         * gnulib/import/cdefs.h: Update.
403         * gnulib/import/chdir-long.c: Update.
404         * gnulib/import/chdir-long.h: Update.
405         * gnulib/import/cloexec.c: Update.
406         * gnulib/import/cloexec.h: Update.
407         * gnulib/import/close.c: Update.
408         * gnulib/import/closedir.c: Update.
409         * gnulib/import/config.charset: Update.
410         * gnulib/import/dirent-private.h: Update.
411         * gnulib/import/dirent.in.h: Update.
412         * gnulib/import/dirfd.c: Update.
413         * gnulib/import/dirname-lgpl.c: Update.
414         * gnulib/import/dirname.h: Update.
415         * gnulib/import/dosname.h: Update.
416         * gnulib/import/dup-safer-flag.c: Update.
417         * gnulib/import/dup-safer.c: Update.
418         * gnulib/import/dup.c: Update.
419         * gnulib/import/dup2.c: Update.
420         * gnulib/import/errno.in.h: Update.
421         * gnulib/import/error.c: Update.
422         * gnulib/import/error.h: Update.
423         * gnulib/import/exitfail.c: Update.
424         * gnulib/import/exitfail.h: Update.
425         * gnulib/import/extra/update-copyright: Update.
426         * gnulib/import/fchdir.c: Update.
427         * gnulib/import/fcntl.c: Update.
428         * gnulib/import/fcntl.in.h: Update.
429         * gnulib/import/fd-hook.c: Update.
430         * gnulib/import/fd-hook.h: Update.
431         * gnulib/import/fd-safer-flag.c: Update.
432         * gnulib/import/fd-safer.c: Update.
433         * gnulib/import/fdopendir.c: Update.
434         * gnulib/import/filename.h: Update.
435         * gnulib/import/filenamecat-lgpl.c: Update.
436         * gnulib/import/filenamecat.h: Update.
437         * gnulib/import/flexmember.h: Update.
438         * gnulib/import/float+.h: Update.
439         * gnulib/import/float.c: Update.
440         * gnulib/import/float.in.h: Update.
441         * gnulib/import/fnmatch.c: Update.
442         * gnulib/import/fnmatch.in.h: Update.
443         * gnulib/import/fnmatch_loop.c: Update.
444         * gnulib/import/fpucw.h: Update.
445         * gnulib/import/frexp.c: Update.
446         * gnulib/import/frexpl.c: Update.
447         * gnulib/import/fstat.c: Update.
448         * gnulib/import/fstatat.c: Update.
449         * gnulib/import/getcwd-lgpl.c: Update.
450         * gnulib/import/getcwd.c: Update.
451         * gnulib/import/getdtablesize.c: Update.
452         * gnulib/import/getlogin_r.c: Update.
453         * gnulib/import/getprogname.c: Update.
454         * gnulib/import/getprogname.h: Update.
455         * gnulib/import/gettext.h: Update.
456         * gnulib/import/gettimeofday.c: Update.
457         * gnulib/import/glob-libc.h: Update.
458         * gnulib/import/glob.c: Update.
459         * gnulib/import/glob.in.h: Update.
460         * gnulib/import/glob_internal.h: Update.
461         * gnulib/import/glob_pattern_p.c: Update.
462         * gnulib/import/globfree.c: Update.
463         * gnulib/import/hard-locale.c: Update.
464         * gnulib/import/hard-locale.h: Update.
465         * gnulib/import/intprops.h: Update.
466         * gnulib/import/inttypes.in.h: Update.
467         * gnulib/import/isnan.c: Update.
468         * gnulib/import/isnand-nolibm.h: Update.
469         * gnulib/import/isnand.c: Update.
470         * gnulib/import/isnanl-nolibm.h: Update.
471         * gnulib/import/isnanl.c: Update.
472         * gnulib/import/itold.c: Update.
473         * gnulib/import/libc-config.h: Update.
474         * gnulib/import/limits.in.h: Update.
475         * gnulib/import/localcharset.c: Update.
476         * gnulib/import/localcharset.h: Update.
477         * gnulib/import/localtime-buffer.c: Update.
478         * gnulib/import/localtime-buffer.h: Update.
479         * gnulib/import/lstat.c: Update.
480         * gnulib/import/m4/00gnulib.m4: Update.
481         * gnulib/import/m4/__inline.m4: Update.
482         * gnulib/import/m4/absolute-header.m4: Update.
483         * gnulib/import/m4/alloca.m4: Update.
484         * gnulib/import/m4/builtin-expect.m4: Update.
485         * gnulib/import/m4/canonicalize.m4: Update.
486         * gnulib/import/m4/chdir-long.m4: Update.
487         * gnulib/import/m4/close.m4: Update.
488         * gnulib/import/m4/closedir.m4: Update.
489         * gnulib/import/m4/configmake.m4: Update.
490         * gnulib/import/m4/d-ino.m4: Update.
491         * gnulib/import/m4/d-type.m4: Update.
492         * gnulib/import/m4/dirent_h.m4: Update.
493         * gnulib/import/m4/dirfd.m4: Update.
494         * gnulib/import/m4/dirname.m4: Update.
495         * gnulib/import/m4/double-slash-root.m4: Update.
496         * gnulib/import/m4/dup.m4: Update.
497         * gnulib/import/m4/dup2.m4: Update.
498         * gnulib/import/m4/eealloc.m4: Update.
499         * gnulib/import/m4/environ.m4: Update.
500         * gnulib/import/m4/errno_h.m4: Update.
501         * gnulib/import/m4/error.m4: Update.
502         * gnulib/import/m4/exponentd.m4: Update.
503         * gnulib/import/m4/exponentl.m4: Update.
504         * gnulib/import/m4/extensions.m4: Update.
505         * gnulib/import/m4/extern-inline.m4: Update.
506         * gnulib/import/m4/fchdir.m4: Update.
507         * gnulib/import/m4/fcntl-o.m4: Update.
508         * gnulib/import/m4/fcntl.m4: Update.
509         * gnulib/import/m4/fcntl_h.m4: Update.
510         * gnulib/import/m4/fdopendir.m4: Update.
511         * gnulib/import/m4/filenamecat.m4: Update.
512         * gnulib/import/m4/flexmember.m4: Update.
513         * gnulib/import/m4/float_h.m4: Update.
514         * gnulib/import/m4/fnmatch.m4: Update.
515         * gnulib/import/m4/fnmatch_h.m4: Update.
516         * gnulib/import/m4/fpieee.m4: Update.
517         * gnulib/import/m4/frexp.m4: Update.
518         * gnulib/import/m4/frexpl.m4: Update.
519         * gnulib/import/m4/fstat.m4: Update.
520         * gnulib/import/m4/fstatat.m4: Update.
521         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
522         * gnulib/import/m4/getcwd-path-max.m4: Update.
523         * gnulib/import/m4/getcwd.m4: Update.
524         * gnulib/import/m4/getdtablesize.m4: Update.
525         * gnulib/import/m4/getlogin.m4: Update.
526         * gnulib/import/m4/getlogin_r.m4: Update.
527         * gnulib/import/m4/getpagesize.m4: Update.
528         * gnulib/import/m4/getprogname.m4: Update.
529         * gnulib/import/m4/gettimeofday.m4: Update.
530         * gnulib/import/m4/glibc21.m4: Update.
531         * gnulib/import/m4/glob.m4: Update.
532         * gnulib/import/m4/glob_h.m4: Update.
533         * gnulib/import/m4/gnulib-cache.m4: Update.
534         * gnulib/import/m4/gnulib-common.m4: Update.
535         * gnulib/import/m4/gnulib-comp.m4: Update.
536         * gnulib/import/m4/gnulib-tool.m4: Update.
537         * gnulib/import/m4/hard-locale.m4: Update.
538         * gnulib/import/m4/include_next.m4: Update.
539         * gnulib/import/m4/inttypes-pri.m4: Update.
540         * gnulib/import/m4/inttypes.m4: Update.
541         * gnulib/import/m4/isnand.m4: Update.
542         * gnulib/import/m4/isnanl.m4: Update.
543         * gnulib/import/m4/largefile.m4: Update.
544         * gnulib/import/m4/limits-h.m4: Update.
545         * gnulib/import/m4/localcharset.m4: Update.
546         * gnulib/import/m4/locale-fr.m4: Update.
547         * gnulib/import/m4/locale-ja.m4: Update.
548         * gnulib/import/m4/locale-zh.m4: Update.
549         * gnulib/import/m4/localtime-buffer.m4: Update.
550         * gnulib/import/m4/longlong.m4: Update.
551         * gnulib/import/m4/lstat.m4: Update.
552         * gnulib/import/m4/malloc.m4: Update.
553         * gnulib/import/m4/malloca.m4: Update.
554         * gnulib/import/m4/math_h.m4: Update.
555         * gnulib/import/m4/mbrtowc.m4: Update.
556         * gnulib/import/m4/mbsinit.m4: Update.
557         * gnulib/import/m4/mbsrtowcs.m4: Update.
558         * gnulib/import/m4/mbstate_t.m4: Update.
559         * gnulib/import/m4/memchr.m4: Update.
560         * gnulib/import/m4/memmem.m4: Update.
561         * gnulib/import/m4/mempcpy.m4: Update.
562         * gnulib/import/m4/memrchr.m4: Update.
563         * gnulib/import/m4/mkdir.m4: Update.
564         * gnulib/import/m4/mkstemp.m4: Update.
565         * gnulib/import/m4/mmap-anon.m4: Update.
566         * gnulib/import/m4/mode_t.m4: Update.
567         * gnulib/import/m4/msvc-inval.m4: Update.
568         * gnulib/import/m4/msvc-nothrow.m4: Update.
569         * gnulib/import/m4/multiarch.m4: Update.
570         * gnulib/import/m4/nocrash.m4: Update.
571         * gnulib/import/m4/off_t.m4: Update.
572         * gnulib/import/m4/onceonly.m4: Update.
573         * gnulib/import/m4/open-cloexec.m4: Update.
574         * gnulib/import/m4/open.m4: Update.
575         * gnulib/import/m4/openat.m4: Update.
576         * gnulib/import/m4/opendir.m4: Update.
577         * gnulib/import/m4/pathmax.m4: Update.
578         * gnulib/import/m4/rawmemchr.m4: Update.
579         * gnulib/import/m4/readdir.m4: Update.
580         * gnulib/import/m4/readlink.m4: Update.
581         * gnulib/import/m4/realloc.m4: Update.
582         * gnulib/import/m4/rename.m4: Update.
583         * gnulib/import/m4/rewinddir.m4: Update.
584         * gnulib/import/m4/rmdir.m4: Update.
585         * gnulib/import/m4/save-cwd.m4: Update.
586         * gnulib/import/m4/secure_getenv.m4: Update.
587         * gnulib/import/m4/setenv.m4: Update.
588         * gnulib/import/m4/signal_h.m4: Update.
589         * gnulib/import/m4/ssize_t.m4: Update.
590         * gnulib/import/m4/stat-time.m4: Update.
591         * gnulib/import/m4/stat.m4: Update.
592         * gnulib/import/m4/std-gnu11.m4: Update.
593         * gnulib/import/m4/stdbool.m4: Update.
594         * gnulib/import/m4/stddef_h.m4: Update.
595         * gnulib/import/m4/stdint.m4: Update.
596         * gnulib/import/m4/stdio_h.m4: Update.
597         * gnulib/import/m4/stdlib_h.m4: Update.
598         * gnulib/import/m4/strchrnul.m4: Update.
599         * gnulib/import/m4/strdup.m4: Update.
600         * gnulib/import/m4/strerror.m4: Update.
601         * gnulib/import/m4/string_h.m4: Update.
602         * gnulib/import/m4/strstr.m4: Update.
603         * gnulib/import/m4/strtok_r.m4: Update.
604         * gnulib/import/m4/sys_socket_h.m4: Update.
605         * gnulib/import/m4/sys_stat_h.m4: Update.
606         * gnulib/import/m4/sys_time_h.m4: Update.
607         * gnulib/import/m4/sys_types_h.m4: Update.
608         * gnulib/import/m4/tempname.m4: Update.
609         * gnulib/import/m4/time_h.m4: Update.
610         * gnulib/import/m4/unistd-safer.m4: Update.
611         * gnulib/import/m4/unistd_h.m4: Update.
612         * gnulib/import/m4/warn-on-use.m4: Update.
613         * gnulib/import/m4/wchar_h.m4: Update.
614         * gnulib/import/m4/wchar_t.m4: Update.
615         * gnulib/import/m4/wctype_h.m4: Update.
616         * gnulib/import/m4/wint_t.m4: Update.
617         * gnulib/import/malloc.c: Update.
618         * gnulib/import/malloc/scratch_buffer.h: Update.
619         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
620         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
621         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
622         * gnulib/import/malloca.c: Update.
623         * gnulib/import/malloca.h: Update.
624         * gnulib/import/malloca.valgrind: Update.
625         * gnulib/import/math.in.h: Update.
626         * gnulib/import/mbrtowc.c: Update.
627         * gnulib/import/mbsinit.c: Update.
628         * gnulib/import/mbsrtowcs-impl.h: Update.
629         * gnulib/import/mbsrtowcs-state.c: Update.
630         * gnulib/import/mbsrtowcs.c: Update.
631         * gnulib/import/memchr.c: Update.
632         * gnulib/import/memmem.c: Update.
633         * gnulib/import/mempcpy.c: Update.
634         * gnulib/import/memrchr.c: Update.
635         * gnulib/import/mkdir.c: Update.
636         * gnulib/import/mkstemp.c: Update.
637         * gnulib/import/msvc-inval.c: Update.
638         * gnulib/import/msvc-inval.h: Update.
639         * gnulib/import/msvc-nothrow.c: Update.
640         * gnulib/import/msvc-nothrow.h: Update.
641         * gnulib/import/open.c: Update.
642         * gnulib/import/openat-die.c: Update.
643         * gnulib/import/openat-priv.h: Update.
644         * gnulib/import/openat-proc.c: Update.
645         * gnulib/import/openat.c: Update.
646         * gnulib/import/openat.h: Update.
647         * gnulib/import/opendir.c: Update.
648         * gnulib/import/pathmax.h: Update.
649         * gnulib/import/pipe-safer.c: Update.
650         * gnulib/import/rawmemchr.c: Update.
651         * gnulib/import/readdir.c: Update.
652         * gnulib/import/readlink.c: Update.
653         * gnulib/import/realloc.c: Update.
654         * gnulib/import/ref-add.sin: Update.
655         * gnulib/import/ref-del.sin: Update.
656         * gnulib/import/rename.c: Update.
657         * gnulib/import/rewinddir.c: Update.
658         * gnulib/import/rmdir.c: Update.
659         * gnulib/import/same-inode.h: Update.
660         * gnulib/import/save-cwd.c: Update.
661         * gnulib/import/save-cwd.h: Update.
662         * gnulib/import/scratch_buffer.h: Update.
663         * gnulib/import/secure_getenv.c: Update.
664         * gnulib/import/setenv.c: Update.
665         * gnulib/import/signal.in.h: Update.
666         * gnulib/import/stat-time.c: Update.
667         * gnulib/import/stat-time.h: Update.
668         * gnulib/import/stat-w32.c: Update.
669         * gnulib/import/stat-w32.h: Update.
670         * gnulib/import/stat.c: Update.
671         * gnulib/import/stdbool.in.h: Update.
672         * gnulib/import/stddef.in.h: Update.
673         * gnulib/import/stdint.in.h: Update.
674         * gnulib/import/stdio.in.h: Update.
675         * gnulib/import/stdlib.in.h: Update.
676         * gnulib/import/str-two-way.h: Update.
677         * gnulib/import/strchrnul.c: Update.
678         * gnulib/import/strdup.c: Update.
679         * gnulib/import/streq.h: Update.
680         * gnulib/import/strerror-override.c: Update.
681         * gnulib/import/strerror-override.h: Update.
682         * gnulib/import/strerror.c: Update.
683         * gnulib/import/string.in.h: Update.
684         * gnulib/import/stripslash.c: Update.
685         * gnulib/import/strnlen1.c: Update.
686         * gnulib/import/strnlen1.h: Update.
687         * gnulib/import/strstr.c: Update.
688         * gnulib/import/strtok_r.c: Update.
689         * gnulib/import/sys_stat.in.h: Update.
690         * gnulib/import/sys_time.in.h: Update.
691         * gnulib/import/sys_types.in.h: Update.
692         * gnulib/import/tempname.c: Update.
693         * gnulib/import/tempname.h: Update.
694         * gnulib/import/time.in.h: Update.
695         * gnulib/import/unistd--.h: Update.
696         * gnulib/import/unistd-safer.h: Update.
697         * gnulib/import/unistd.in.h: Update.
698         * gnulib/import/unsetenv.c: Update.
699         * gnulib/import/verify.h: Update.
700         * gnulib/import/extra/snippet/warn-on-use.h: Update.
701         * gnulib/import/wchar.in.h: Update.
702         * gnulib/import/wctype.in.h: Update.
703         * gnulib/import/xalloc-oversized.h: Update.
704         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
705         "53e2c179f26a890fa6685af4b6c1397ee370433b".
706
707 2018-08-16  Gary Benson <gbenson@redhat.com>
708
709         PR gdb/13000:
710         * gdb/main.c (captured_main_1): Exit with nonzero status
711         in batch mode if the last command to be executed failed.
712         * NEWS: Mention the above.
713
714 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
715
716         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
717         end of warning message.
718
719 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
720
721         PR gdb/22943:
722         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
723         (aarch64_extract_return_value): Use
724         aapcs_is_vfp_call_or_return_candidate.
725         (aarch64_return_in_memory): Likewise.
726         (aarch64_store_return_value): Likewise.
727
728 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
729
730         * aarch64-tdep.c
731         (aapcs_is_vfp_call_or_return_candidate): Make static
732         (pass_in_v_or_stack): Remove function.
733         (pass_in_v_vfp_candidate): New function.
734         (aarch64_push_dummy_call): Check for float register candidates.
735
736 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
737
738         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
739         (aapcs_is_vfp_call_or_return_candidate_1): New function.
740         (aapcs_is_vfp_call_or_return_candidate): Likewise.
741
742 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
743
744         PR build/23399
745         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
746         (struct ipa_sym_addresses): Rename to...
747         (struct ipa_sym_addresses_common): ... this.
748         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
749
750 2018-08-28  Tom Tromey  <tom@tromey.com>
751
752         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
753         (token_fifo): Now a std::vector.
754         (yylex, c_parse): Update.
755         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
756         (token_fifo): Now a std::vector.
757         (yylex, d_parse): Update.
758         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
759         (token_fifo): Now a std::vector.
760         (yylex, go_parse): Update.
761
762 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
763
764         * parser-defs.h (struct type_stack) <elements>: Change type to
765         std::vector<union type_stack_elt>.
766         <depth, size>: Remove.
767         * parse.c (parse_exp_in_context_1): Adjust.
768         (type_stack_reserve): Remove.
769         (check_type_stack_depth): Remove.
770         (insert_into_type_stack): Adjust to std::vector.
771         (insert_type): Likewise.
772         (push_type): Likewise.
773         (push_type_int): Likewise.
774         (insert_type_address_space): Likewise.
775         (pop_type): Likewise.
776         (pop_type_int): Likewise.
777         (pop_typelist): Likewise.
778         (pop_type_stack): Likewise.
779         (append_type_stack): Likewise.
780         (push_type_stack): Likewise.
781         (get_type_stack): Likewise.
782         (type_stack_cleanup): Likewise.
783         (push_typelist): Likewise.
784         (follow_types): Likewise.
785         (_initialize_parse): Likewise.
786
787 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
788
789         * NEWS: Mention csky target.
790
791 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
792             Hafiz Abid Qadeer  <abidh@codesourcery.com>
793             Don Breazeal  <donb@codesourcery.com>
794
795         * csky-linux-tdep.c: New file.
796         * csky-tdep.c: Likewise.
797         * csky-tdep.h: Likewise.
798         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
799         csky-tdep.o.
800         (HFILES_NO_SRCDIR): Add csky-tdep.h.
801         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
802         * configure.tgt: Add csky support.
803
804 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
805
806         * python/py-framefilter.c (py_print_frame): Print frame architecture
807         when printing on an MI output.
808
809 2018-08-27  Tom Tromey  <tom@tromey.com>
810
811         PR build/23087:
812         * configure: Rebuild.
813         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
814
815 2018-08-27  Tom Tromey  <tom@tromey.com>
816
817         * aarch64-linux-tdep.c
818         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
819         casts to int.
820
821 2018-08-27  Tom Tromey  <tom@tromey.com>
822
823         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
824         unsigned.
825         (ppc64_standard_linkage1, ppc64_standard_linkage2)
826         (ppc64_standard_linkage3, ppc64_standard_linkage4)
827         (ppc64_standard_linkage5, ppc64_standard_linkage6)
828         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
829         unsigned.
830
831 2018-08-27  Tom Tromey  <tom@tromey.com>
832
833         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
834         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
835
836 2018-08-27  Tom Tromey  <tom@tromey.com>
837
838         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
839         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
840         ULONGEST_MAX.
841         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
842         ULONGEST_MAX.
843         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
844         ULONGEST_MAX.
845         * sparc-linux-tdep.c (sparc32_linux_sigframe)
846         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
847         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
848         ULONGEST_MAX.
849         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
850         (ppc64_linux_sigaction_tramp_frame)
851         (ppc32_linux_sighandler_tramp_frame)
852         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
853         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
854         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
855         * mn10300-linux-tdep.c (am33_linux_sigframe)
856         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
857         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
858         * mips-linux-tdep.c (mips_linux_o32_sigframe)
859         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
860         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
861         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
862         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
863         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
864         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
865         * microblaze-linux-tdep.c
866         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
867         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
868         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
869         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
870         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
871         * common/common-types.h (ULONGEST_MAX): New define.
872         (CORE_ADDR_MAX): Fix formatting.
873         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
874         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
875         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
876         (arm_linux_rt_sigreturn_tramp_frame)
877         (arm_eabi_linux_sigreturn_tramp_frame)
878         (arm_eabi_linux_rt_sigreturn_tramp_frame)
879         (thumb2_eabi_linux_sigreturn_tramp_frame)
880         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
881         (arm_linux_restart_syscall_tramp_frame)
882         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
883         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
884         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
885         ULONGEST_MAX.
886         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
887
888 2018-08-27  Tom Tromey  <tom@tromey.com>
889
890         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
891         CORE_ADDR_MAX.
892         * mips-tdep.c (mips_deal_with_atomic_sequence)
893         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
894         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
895         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
896         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
897         CORE_ADDR_MAX.
898         * aarch64-tdep.c (aarch64_software_single_step): Use
899         CORE_ADDR_MAX.
900
901 2018-08-27  Tom Tromey  <tom@tromey.com>
902
903         * linespec.c (complete_linespec_component): Add cast to "char".
904         * completer.c (completion_tracker::build_completion_result): Add
905         cast to "char".
906
907 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
908
909         * solist.h (struct solist, struct target_so_ops): Fix
910         indentation.
911
912 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
913
914         * ada-tasks.c (ada_task_info_s): Remove typedef.
915         (DEF_VEC_O(ada_task_info_s)): Remove.
916         (struct ada_tasks_inferior_data): Initialize fields.
917         <task_list>: Make an std::vector.
918         (get_ada_tasks_inferior_data): Allocate with new.
919         (ada_get_task_number): Adjust.
920         (get_task_number_from_id): Likewise.
921         (valid_task_id): Likewise.
922         (ada_get_task_info_from_ptid): Likewise.
923         (iterate_over_live_ada_tasks): Likewise.
924         (add_ada_task): Likewise.
925         (read_known_tasks): Likewise.
926         (ada_build_task_list): Likewise.
927         (print_ada_task_info): Likewise.
928         (info_task): Likewise.
929         (task_command_1): Likewise.
930
931 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
932
933         * ada-lang.c (add_angle_brackets): Return std::string.
934
935 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
936
937         * python/py-threadevent.c (py_get_event_thread): Initialize
938         pythread.
939
940 2018-08-24  Pedro Alves  <palves@redhat.com>
941
942         * python/py-bpevent.c (create_breakpoint_event_object): Use
943         copy-initialization.
944         * python/py-continueevent.c (emit_continue_event): Use
945         copy-initialization.
946         * python/py-exitedevent.c (create_exited_event_object): Return a
947         gdbpy_ref<>.
948         (emit_exited_event): Use copy-initialization.
949         * python/py-inferior.c (python_new_inferior)
950         (python_inferior_deleted, add_thread_object): Use
951         copy-initialization.
952         * python/py-infevents.c (create_inferior_call_event_object)
953         (create_register_changed_event_object)
954         (create_memory_changed_event_object): Return a gdbpy_ref<>.
955         (emit_inferior_call_event, emit_memory_changed_event)
956         (emit_register_changed_event): Use copy-initialization.
957         * python/py-newobjfileevent.c (create_new_objfile_event_object):
958         Return a gdbpy_ref<>.
959         (emit_new_objfile_event): Use copy-initialization.
960         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
961         (emit_clear_objfiles_event): Use copy-initialization.
962         * python/py-signalevent.c (create_signal_event_object): Use
963         copy-initialization.
964         * python/py-threadevent.c (create_thread_event_object): Use
965         copy-initialization.
966
967 2018-08-24  Pedro Alves  <palves@redhat.com>
968             Simon Marchi  <simon.marchi@ericsson.com>
969
970         PR gdb/23379
971         * python/py-continueevent.c: Include "gdbthread.h".
972         (create_continue_event_object): Add intro comment.  Add 'ptid'
973         parameter.  Use it to find thread to pass to
974         create_thread_event_object.
975         (emit_continue_event): Pass PTID down to
976         create_continue_event_object.
977         * python/py-event.h (py_get_event_thread): Declare.
978         (create_thread_event_object): Remove default from 'thread'
979         parameter.
980         * python/py-stopevent.c (create_stop_event_object): Use
981         py_get_event_thread.
982         * python/py-threadevent.c (get_event_thread): Rename to ...
983         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
984         and use it to find the thread.
985         (create_thread_event_object): Assert that THREAD isn't null.
986         Don't find the event thread here.
987
988 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
989
990         * block.h (blockrange, blockranges): New struct declarations.
991         (struct block): Add new field named `ranges'.
992         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
993         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
994         macros for accessing ranges in struct block.
995         (make_blockranges): New declaration.
996         block.c (make_blockranges): New function.
997         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
998         for block.
999         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1000         * blockframe.c (cache_pc_function_block): New static global.
1001         (clear_pc_function_cache): Clear cache_pc_function_block.
1002         (find_pc_partial_function): Move comment to symtab.h.  Add
1003         support for non-contiguous blocks.
1004         * cli/cli-cmds.c (block.h): Include.
1005         (print_disassembly): Handle printing of non-contiguous blocks.
1006         (disassemble_current_function): Likewise.
1007         (disassemble_command): Likewise.
1008
1009         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1010         BLOCK_START.
1011         * blockframe.c (get_pc_function_start): Likewise.
1012         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1013         (gcc_symbol_address): Likewise.
1014         * compile/compile-object-run.c (compile_object_run): Likewise.
1015         * compile/compile.c (get_expr_block_and_pc): Likewise.
1016         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1017         (func_addr_to_tail_call_list): Likewise.
1018         * findvar.c (default_read_var_value): Likewise.
1019         * inline-frame.c (inline_frame_this_id): Likewise.
1020         (skip-inline_frames): Likewise.
1021         * infcmd.c (until_next_command): Likewise.
1022         * linespec.c (convert_linespec_to_sals): Likewise.
1023         * parse.c (parse_exp_in_context_1): Likewise.
1024         * printcmd.c (build_address_symbolic): likewise.
1025         (info_address_command): Likewise.
1026         symtab.c (find_function_start_sal): Likewise.
1027         (skip_prologue_sal): Likewise.
1028         (find_function_alias_target): Likewise.
1029         (find_gnu_ifunc): Likewise.
1030         * stack.c (find_frame_funname): Likewise.
1031         * symtab.c (fixup_symbol_section): Likewise.
1032         (find_function_start_sal): Likewise.
1033         (skip_prologue_sal): Likewsie.
1034         (find_function_alias_target): Likewise.
1035         (find_gnu_ifunc): Likewise.
1036         * tracepoint.c (info_scope_command): Likewise.
1037         * value.c (value_fn_field): Likewise.
1038
1039         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1040         in place of find_pc_partial_function.
1041         * blockframe.c (find_function_entry_range_from_pc): New function.
1042         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1043         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1044         for each range in a block.
1045
1046
1047 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1048
1049         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1050         incrementation.
1051
1052 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1053
1054         * solib-svr4.c (read_program_headers_from_bfd): Return
1055         gdb::optional<gdb::byte_vector>.
1056         (svr4_exec_displacement): Adjust.
1057
1058 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1059
1060         * solib-svr4.c (read_program_header): Return
1061         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1062         (find_program_interpreter): Return
1063         gdb::optional<gdb::byte_vector>.
1064         (scan_dyntag_auxv): Adjust.
1065         (enable_break): Adjust.
1066         (svr4_exec_displacement): Adjust.
1067
1068 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1069
1070         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1071         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1072
1073 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1074
1075         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1076         string_vprintf.
1077         * guile/scm-utils.c (gdbscm_printf): Likewise.
1078         * serial.c (serial_printf): Likewise.
1079         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1080
1081 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1082
1083         * stack.c (print_frame): Print frame architecture when printing on
1084         an MI output.
1085         * NEWS: Mention new "arch" attribute in frame output.
1086
1087 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1088
1089         * arch/aarch64.h (aarch64_regnum): Update comment.
1090
1091 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1092
1093         * NEWS: Add SVE to 8.2 section.
1094
1095 2018-08-21  Pedro Alves  <palves@redhat.com>
1096
1097         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1098         out from gdbscm_parse_function_args.
1099         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1100         gdbscm_parse_function_args_1.
1101
1102 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1103
1104         PR gdb/17816
1105         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1106         operator.
1107
1108 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1109
1110         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1111
1112 2018-08-19  Michael Spang  <spang@google.com>
1113
1114         PR gdb/11786
1115         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1116         for PT_TLS segments.
1117
1118 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1119
1120         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1121         dwarf_variable_value.
1122         * dwarf2-frame.c (class dwarf_expr_executor):
1123         Add override for dwarf_variable_value.
1124         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1125         (class symbol_needs_eval_context): Likewise.
1126         (indirect_synthetic_pointer): Add forward declaration.
1127         (sect_variable_value): New function.
1128         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1129         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1130         for DW_OP_GNU_variable_value.
1131
1132 2018-08-16  Tom Tromey  <tom@tromey.com>
1133
1134         * top.c (read_command_file): Update.
1135         (command_line_input): Remove "repeat" argument.
1136         * ada-lang.c (get_selections): Update.
1137         * linespec.c (decode_line_2): Update.
1138         * defs.h (command_line_input): Remove argument.
1139         * cli/cli-script.c (read_next_line): Update.
1140         * python/py-gdb-readline.c: Update.
1141
1142 2018-08-17  Tom Tromey  <tom@tromey.com>
1143
1144         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1145         command_line_input.
1146
1147 2018-08-15  Tom Tromey  <tom@tromey.com>
1148
1149         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1150
1151 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1152
1153         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1154         If used, use find_pc_partial_function to find address range
1155         to disassemble.
1156         * mi/mi-main.c (mi_cmd_list_features): Report
1157         "data-disassemble-a-option" feature.
1158         * NEWS: Mention new -data-disassemble option -a.
1159
1160 2018-08-13  Tom Tromey  <tom@tromey.com>
1161
1162         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1163
1164 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1165
1166         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1167         (aarch64_linux_collect_sve_regset): Likewise.
1168         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1169         * regcache.h (regcache_map_entry_size): New function.
1170
1171 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1172
1173         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1174         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1175         (SVE_HEADER_VL_LENGTH): Likewise.
1176         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1177         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1178         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1179         (SVE_HEADER_SIZE_OFFSET): Likewise.
1180         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1181         (SVE_HEADER_VL_OFFSET): Likewise.
1182         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1183         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1184         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1185         (SVE_HEADER_SIZE): Likewise.
1186         (aarch64_linux_core_read_vq): Add function.
1187         (aarch64_linux_core_read_description): Check for SVE section.
1188
1189 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1190
1191         * aarch64-fbsd-tdep.c
1192         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1193         collect_size.
1194         * aarch64-linux-tdep.c
1195         (aarch64_linux_iterate_over_regset_sections): Likewise.
1196         * alpha-linux-tdep.c
1197         (alpha_linux_iterate_over_regset_sections):
1198         * alpha-nbsd-tdep.c
1199         (alphanbsd_iterate_over_regset_sections): Likewise.
1200         * amd64-fbsd-tdep.c
1201         (amd64fbsd_iterate_over_regset_sections): Likewise.
1202         * amd64-linux-tdep.c
1203         (amd64_linux_iterate_over_regset_sections): Likewise.
1204         * arm-bsd-tdep.c
1205         (armbsd_iterate_over_regset_sections): Likewise.
1206         * arm-fbsd-tdep.c
1207         (arm_fbsd_iterate_over_regset_sections): Likewise.
1208         * arm-linux-tdep.c
1209         (arm_linux_iterate_over_regset_sections): Likewise.
1210         * corelow.c (get_core_registers_cb): Likewise.
1211         (core_target::fetch_registers): Likewise.
1212         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1213         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1214         * gdbarch.h (void): Regenerate.
1215         * gdbarch.sh: Add supply_size and collect_size.
1216         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1217         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1218         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1219         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1220         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1221         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1222         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1223         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1224         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1225         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1226         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1227         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1228         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1229         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1230         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1231         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1232         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1233         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1234         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1235         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1236         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1237         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1238         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1239         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1240         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1241         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1242         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1243         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1244         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1245         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1246
1247 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1248
1249         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1250         with string_printf.
1251
1252 2018-08-10  Keith Seitz  <keiths@redhat.com>
1253
1254         * compile/compile-c-support.c (add_code_header, add_code_footer):
1255         Move into policy class.
1256         (c_push_user_expression, pop_user_expression_nop)
1257         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1258         (compile_program): New host class.
1259         (c_compile_program): New typedef.
1260         (c_compute_porgram): Use c_compile_program.
1261
1262 2018-08-10  Keith Seitz  <keiths@redhat.com>
1263
1264         * compile/compile-internal.h (compile_instance::~compile_instance):
1265         Remove calls to htab_delete.
1266         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1267         * compile.c (compile_instance::compile_instance): Initialize
1268         htab unique pointers.
1269         (compile_instance::get_cached_type, compile_instance::insert_type)
1270         (compile_instance::error_symbol_once): Update for unique_ptr.
1271
1272 2018-08-10  Keith Seitz  <keiths@redhat.com>
1273
1274         * compile/compile-c-symbols.c (struct symbol_error)
1275         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1276         (compile_instance::insert_symbol_error)
1277         (compile_instance::error_symbol_once): Move to ...
1278         * compile/compile.c: ... here.
1279
1280 2018-08-10  Keith Seitz  <keiths@redhat.com>
1281
1282         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1283         instead of `new_compile_instance'.
1284         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1285         Update description.
1286         If the symbol error map is not initialized, create it.
1287         (generate_c_for_for_one_symbol): Do not check/initialize
1288         the symbol error map.
1289         * compile/compile-c-types.c (compile_c_instance): Make a class.
1290         Update all callers.
1291         (compile_instance::compile_instance): Initialize the type cache.
1292         (get_cached_type): New function.
1293         (insert_type): Update description.
1294         (compile_c_instance::m_default_cflags): Define.
1295         (convert_type): Update description.  Use get_cached_type.
1296         (delete_instance): Moved to destructor.
1297         (new_compile_instance): Moved to constructor.
1298         * compile/compile-c.h (compile_c_instance): Make class inheriting
1299         from compile_instance.
1300         <base>: Remove field.
1301         <type_map, symbol_err_map>: Move to base class.
1302         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1303         * compile/compile-internal.h (compile_instance): Make class.
1304         <type_map_t, symbol_err_map_t>: Define.
1305         <fe>: Rename to `m_gcc_fe'.
1306         <scope, block, gcc_target_options>: Add `m_' prefix.
1307         <m_type_map, m_symbol_err_map>: New fields, moved from
1308         compile_c_instance.
1309         <destroy>: Remove.
1310         (convert_type, new_compile_instance): Remove.
1311         * compile/compile.c (cleanup_compile_instance): Remove.
1312         (compile_to_object): Use unique_ptr to eliminate cleanups.
1313         (compile_instance::set_print_callback, compile_instance::version)
1314         (compile_instance::set_verbose)
1315         (compile_instance::set_driver_filename)
1316         (compile_instance::set_triplet_regexp)
1317         (compile_instance::set_arguments)
1318         (compile_instance::set_source_file)
1319         (compile_instance::compile): Define.
1320
1321 2018-08-10  Keith Seitz  <keiths@redhat.com>
1322
1323         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1324         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1325         gcc-c-fe.def to define C plugin.
1326         (delete_instance): Delete `c_plugin'.
1327         (new_compile_instance): Initialize `c_plugin'.
1328         * compile/compile-c.h: Include gcc_c_plugin.h.
1329         (struct compile_c_instance) <c_plugin>: New member.
1330         * gcc-c-plugin.h: New file.
1331         Update all callers with API change.
1332
1333 2018-08-10  Keith Seitz  <keiths@redhat.com>
1334
1335         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1336         (HFILES_NO_SRCDIR): ... to here.
1337         Add compile-internal.h and compile-c.h.
1338         * compile/compile-c-support.c: Include compile-c.h.
1339         * compile/compile-c-symbols.c: Include compile-c.h.
1340         (generate_c_for_variable_locations): Update comment.
1341         * compile/compile-c-types.c: Include compile-c.h.
1342         * compile/compile-c.h: New file -- moved C language declarations
1343         from other files here.
1344         * compile/compile-internal.h: Do not include hashtab.h or
1345         common/enum-flags.h.
1346         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1347         (gcc_convert_symbol, gcc_symbol_address)
1348         (generate_c_for_variable_locations, c_get_mode_for_size)
1349         (c_get_range_decl_name): Definitions moved to compile-c.h.
1350         * compile/compile-loc2c.c: Include compile-c.h.
1351
1352 2018-08-10  Keith Seitz  <keiths@redhat.com>
1353
1354         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1355         (c_symbol_substitution_name): ... this.
1356         Update all callers.
1357
1358 2018-08-10  Keith Seitz  <keiths@redhat.com>
1359
1360         * compile/compile-c-support.c (c_compute_program): Use
1361         unique_xmalloc_ptr to eliminate cleanup.
1362         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1363         Return a unique_xmalloc_ptr and eliminate cleanup.
1364         * compile/compile-internal.h (generate_c_for_variable_locations):
1365         Return unique_xmalloc_ptr and update description.
1366
1367 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1368
1369         * corelow.c (core_target::get_core_register_section): Rename
1370         min_size to section_min_size.
1371
1372 2018-08-09  Jim Wilson  <jimw@sifive.com>
1373
1374         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1375         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1376         * NEWS: Mention new GNU/Linux RISC-V target.
1377         * configure.host: Add riscv*-*-linux*.
1378         * configure.nat: Add riscv*.
1379         * configure.tgt: Add riscv*-*-linux*.
1380         * riscv-linux-nat.c: New file.
1381         * riscv-linux-tdep.c: New file.
1382
1383 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1384
1385         * infrun.c (resume): Make static, add forward declaration.
1386         (proceed): Update header comment.
1387         * infrun.h (resume): Delete declaration.
1388
1389 2018-08-09  Tom Tromey  <tom@tromey.com>
1390
1391         * riscv-tdep.h: Minor formatting fixes.
1392
1393 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1394
1395         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1396         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1397         (test_mkdir_recursive): Likewise.
1398         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1399
1400 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1401
1402         * valarith.c (value_subscripted_rvalue): If an array is not in
1403         memory, and we don't know the upper bound, then we can't know that
1404         the requested element exists or not.
1405
1406 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1407
1408         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1409         (target_options_to_string): Add comment.
1410
1411 2018-08-08  Tom Tromey  <tom@tromey.com>
1412
1413         * unittests/scoped_mmap-selftests.c: Check result of "write".
1414
1415 2018-08-08  Jim Wilson  <jimw@sifive.com>
1416
1417         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1418         (decode_register_index_short): New.
1419         (decode_j_type_insn, decode_cj_type_insn): New.
1420         (decode_b_type_insn, decode_cb_type_insn): New.
1421         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1422         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1423         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1424         is_c_sw_insn instead of is_sw_insn.
1425         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1426         (riscv_software_single_step): New.
1427         * riscv-tdep.h (riscv_software_single_step): Declare.
1428
1429         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1430         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1431
1432 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1433
1434         PR gdb/18050:
1435         * target.c (dispose_inferior): Don't dispose of inferiors that are
1436         already killed.
1437
1438 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1439
1440         * remote.c (remote_target::download_tracepoint): Change char* to
1441         const char*.
1442
1443 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1444
1445         * target.h (target_options_to_string): Return an std::string.
1446         * target.c (str_comma_list_concat_elem): Return void, use
1447         std::string.
1448         (do_option): Likewise.
1449         (target_options_to_string): Return an std::string.
1450         * linux-nat.c (linux_nat_target::wait): Adjust.
1451         * target-debug.h (target_debug_print_options): Adjust.
1452
1453 2018-08-07  Tom Tromey  <tom@tromey.com>
1454
1455         * Makefile.in (CPPFLAGS): New variable.
1456         (INTERNAL_CPPFLAGS): Use it.
1457
1458 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1459
1460         * NEWS: Mention the index cache.
1461
1462 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1463
1464         * common/pathstuff.h (get_standard_cache_dir): New.
1465         * common/pathstuff.c (get_standard_cache_dir): New.
1466         * build-id.h (build_id_to_string): New.
1467         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1468         DEBUG_STR_SUFFIX): Move to here.
1469         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1470         DEBUG_STR_SUFFIX): Move from there.
1471         (write_psymtabs_to_index): Make non-static, add basename
1472         parameter.  Write to temporary files, rename when done.
1473         (save_gdb_index_command): Adjust call to
1474         write_psymtabs_to_index.
1475         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1476         field.
1477         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1478         (get_gdb_index_contents_from_cache): New.
1479         (get_gdb_index_contents_from_cache_dwz): New.
1480         (dwarf2_initialize_objfile): Read index from cache.
1481         (dwarf2_build_psymtabs): Save to index.
1482         * dwarf-index-cache.h: New file.
1483         * dwarf-index-cache.c: New file.
1484         * dwarf-index-write.h: New file.
1485
1486 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1487
1488         * gnulib/aclocal.m4: Re-generate.
1489         * gnulib/config.in: Re-generate.
1490         * gnulib/configure: Re-generate.
1491         * gnulib/import/Makefile.am: Re-generate.
1492         * gnulib/import/Makefile.in: Re-generate.
1493         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1494         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1495         * gnulib/import/m4/mkdir.m4: New file.
1496         * gnulib/import/mkdir.c: New file.
1497         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1498         module.
1499
1500 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1501
1502         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1503         * common/scoped_mmap.c: New file.
1504         * common/scoped_mmap.h (destroy): New method.
1505         (~scoped_mmap, reset): Use destroy.
1506         (scoped_mmap): New move constructor.
1507         (mmap_file): New declaration.
1508         * unittests/scoped_mmap-selftests.c (test_normal,
1509         test_invalid_filename, run_tests): New functions.
1510         (_initialize_scoped_mmap_selftests): Register selftest.
1511
1512 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1513
1514         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1515         (read_gdb_index_from_buffer): ... this.  Remove section
1516         parameter, add buffer parameter.
1517         (get_gdb_index_contents_ftype,
1518         get_gdb_index_contents_dwz_ftype): New typedefs.
1519         (dwarf2_read_gdb_index): Add callback parameters to get the
1520         index contents.
1521         (get_gdb_index_contents_from_section): New.
1522         (dwarf2_initialize_objfile): Update call to
1523         dwarf2_read_gdb_index.
1524
1525 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1526
1527         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1528         (gdb_open_cloexec): Likewise.
1529         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1530         (commandline_from_pid): Likewise.
1531         (linux_xfer_osdata_threads): Likewise.
1532         (linux_xfer_osdata_fds): Likewise.
1533         * ada-lang.c (is_package_name): Likewise.
1534         * auxv.c (procfs_xfer_auxv): Likewise.
1535         * breakpoint.c (print_one_breakpoint_location): Use
1536         uiout::field_fmt.
1537         (print_one_catch_solib): Use string_printf.
1538         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1539         (add_pe_forwarded_sym): Likewise.
1540         * dwarf2read.c (create_type_unit_group): Likewise.
1541         (build_error_marker_type): Likewise.
1542         * infcall.c (get_function_name): Likewise.
1543         * valprint.c (print_converted_chars_to_obstack): Likewise.
1544         * xtensa-tdep.c (xtensa_register_type): Likewise.
1545
1546 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1547
1548         * remote.c (remote_target::download_tracepoint): Fix format
1549         string errors.
1550
1551 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1552
1553         * tracefile.c: Include common/byte-vector.h.
1554         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1555         with trace_regblock_size if needed.  Update uses of buf.
1556
1557 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1558
1559         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1560         std::vector<unsigned char>.
1561         * tracepoint.c (collection_list::collection_list): Remove
1562         m_regs_mask initializer from initializer list.  Resize
1563         m_regs_mask using the largest remote register number.
1564         (collection_list::add_remote_register): Remove size check on
1565         m_regs_mask.  Use at to access element.
1566         (collection_list::stringify): Change type of temp_buf to
1567         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1568         stringify the register mask.  Use pack_hex_byte for the register
1569         mask.
1570
1571 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1572
1573         * tracepoint.h (class collection_list) <add_register>: Remove.
1574         <add_remote_register, add_ax_registers, add_local_register>:
1575         Declare.
1576         <add_memrange>: Add scope parameter.
1577         * tracepoint.c (encode_actions_1): Likewise.
1578         (collection_list::add_register): Rename to ...
1579         (collection_list::add_remote_register): ... this.  Update
1580         comment.
1581         (collection_list::add_ax_registers, add_local_register): New
1582         methods.
1583         (collection_list::add_memrange): Add scope parameter.  Call
1584         add_local_register instead of add_register.
1585         (finalize_tracepoint_aexpr): New function.
1586         (collection_list::collect_symbol): Update calls to add_memrange.
1587         Call add_local_register instead of add_register.  Call
1588         add_ax_registers.  Call finalize_tracepoint_aexpr.
1589         (encode_actions_1): Get remote regnos for $reg action.  Call
1590         add_remote_register, add_ax_registers, and add_local_register.
1591         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1592         (validate_actionline): Call finalize_tracepoint_aexpr.
1593
1594 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1595
1596         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1597         Replace array buf with gdb::char_vector buf, of size
1598         get_remote_packet_size ().  Replace references to buf and
1599         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1600         and xsnprintf with snprintf.  Raise errors if the buffer is too
1601         small.
1602
1603 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1604
1605         * remote.c (remote_target::download_tracepoint): Fix the has_more
1606         predicate in the QTDP action list iteration.
1607
1608 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1609
1610         * remote.c (remote_target::download_tracepoint): Fix indentation
1611         in for block.
1612
1613 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1614
1615         * proc-api.c (_initialize_proc_api): Remove c, unused.
1616         * procfs.c (procfs_init_inferior): Remove signals, unused.
1617         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1618         unused.
1619
1620 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1621             Andrew Burgess  <andrew.burgess@embecosm.com>
1622
1623         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1624         'W_STOPCODE (0)' as this could be ambiguous.
1625
1626 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1627
1628         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1629         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1630         "ai_socktype").
1631
1632 2018-08-02  Tom Tromey  <tom@tromey.com>
1633
1634         PR symtab/16842.
1635         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1636         symbols.
1637         (process_structure_scope): Likewise.
1638
1639 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1640
1641         PR gdb/22629:
1642         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1643         kill inferior.
1644
1645 2018-08-02  Tom Tromey  <tom@tromey.com>
1646
1647         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1648         (darwin_suspend_inferior, darwin_resume_inferior)
1649         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1650         (darwin_check_new_threads): Check result of get_darwin_inferior.
1651
1652 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1653
1654         GDB 8.1.1 released.
1655
1656 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1657
1658         * varobj.c (varobj_get_path_expr_parent): Report an error if
1659         parent is a dynamic varobj.
1660
1661 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1662
1663         * gnulib/aclocal.m4: Re-generate.
1664         * gnulib/config.in: Re-generate.
1665         * gnulib/configure: Re-generate.
1666         * gnulib/import/Makefile.in: Re-generate.
1667         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1668         * gnulib/import/m4/onceonly.m4: Re-generate.
1669
1670 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1671
1672         * target-descriptions.c (struct xml_test_tdesc): New.
1673         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1674         (record_xml_tdesc): Update.
1675         (maintenance_check_xml_descriptions): Update.
1676         * target-descriptions.h (record_xml_tdesc): Update comment.
1677
1678 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1679
1680         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1681         checking array bounds are defined.
1682
1683 2018-07-30  Tom Tromey  <tom@tromey.com>
1684
1685         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1686         irreflexivity violation.
1687
1688 2018-07-30  Tom Tromey  <tom@tromey.com>
1689
1690         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1691         * value.c (unpack_long): Remove lint code.
1692         * valops.c (value_ind): Remove lint code.
1693         * valarith.c (value_x_binop, value_x_unop, value_equal)
1694         (value_pos): Remove lint code.
1695
1696 2018-07-28  Tom de Vries  <tdevries@suse.de>
1697
1698         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1699         with undefined upper bound as <optimized out>.
1700
1701 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1702
1703         * gcore.in: Rename variable "name" to "prefix".  Expand
1704         "usage" text.
1705
1706 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1707
1708         * windows-nat.c (windows_nat_target::create_inferior): Update to
1709         call close() in global namespace.
1710
1711 2018-07-26  Tom Tromey  <tom@tromey.com>
1712
1713         * dwarf-index-write.c (add_address_entry): Don't add objfile
1714         offsets.
1715         * dbxread.c (find_stab_function): Rename from
1716         find_stab_function_addr.  Return a bound_minimal_symbol.
1717         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1718         Don't add objfile offsets.
1719         (end_psymtab): Use raw_text_low, raw_text_high,
1720         MSYMBOL_VALUE_RAW_ADDRESS.
1721         (read_ofile_symtab): Update.
1722         (process_one_symbol): Update.
1723         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1724         offsets.
1725         (dw2_relocate): Remove.
1726         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1727         searching addrmap.
1728         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1729         Update.
1730         (process_psymtab_comp_unit_reader, add_partial_symbol)
1731         (add_partial_subprogram, dwarf2_ranges_read): Update.
1732         (load_partial_dies): Update.
1733         (add_address_entry): Don't add objfile offsets.
1734         (dwarf2_build_include_psymtabs): Update.
1735         (create_addrmap_from_aranges): Don't add objfile offsets.
1736         (dw2_find_pc_sect_compunit_symtab): Update.
1737         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1738         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1739         Update.
1740         (parse_partial_symbols): Don't add objfile offsets.  Use
1741         raw_text_low, raw_text_high.  Update.
1742         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1743         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1744         or call 'relocate' quick function.  Clear psymbol_map.
1745         * psympriv.h (struct partial_symbol) <address>: Add section
1746         offset.
1747         <set_unrelocated_address>: Rename from set_address.
1748         <raw_text_low, raw_text_high>: New methods.
1749         <text_low, text_high>: Add objfile parameter.
1750         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1751         set_unrelocated_address.
1752         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1753         (find_pc_psymbol): Update.
1754         (fixup_psymbol_section, relocate_psymtabs): Remove.
1755         (dump_psymtab, psym_functions): Update.
1756         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1757         parameter.
1758         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1759         (start_psymtab_common): Update.
1760         * symfile-debug.c (debug_qf_relocate): Remove.
1761         (debug_sym_quick_functions): Update.
1762         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1763         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1764         Update.
1765
1766 2018-07-26  Tom Tromey  <tromey@redhat.com>
1767
1768         * dbxread.c (end_psymtab): Use text_high_valid and
1769         text_low_valid.
1770         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1771         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1772         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1773         Update comment.
1774         <text_low_valid, text_high_valid>: New fields.
1775         <set_text_low, set_text_high>: Update.
1776         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1777
1778 2018-07-26  Tom Tromey  <tom@tromey.com>
1779
1780         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1781         Update.
1782         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1783         textlow and texthigh fields.
1784         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1785         Update.
1786         * mdebugread.c (parse_lines, parse_partial_symbols)
1787         (psymtab_to_symtab_1): Update.
1788         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1789         Rename fields.  Update comment.  Now private.
1790         <text_low, text_high, set_text_low, set_text_high>: New methods.
1791         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1792         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1793         (start_psymtab_common, maintenance_info_psymtabs)
1794         (maintenance_check_psymtabs): Update.
1795         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1796         texthigh fields.
1797         (scan_xcoff_symtab): Update.
1798
1799 2018-07-26  Tom Tromey  <tromey@redhat.com>
1800
1801         * psympriv.h (struct partial_symbol) <unrelocated_address,
1802         address, set_address>: New methods.
1803         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1804         (fixup_psymbol_section, relocate_psymtabs): Update.
1805         (print_partial_symbols): Add 'objfile' parameter.  Update.
1806         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1807         Update.
1808
1809 2018-07-26  Tom Tromey  <tom@tromey.com>
1810
1811         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1812         (debug_names::write_psymbols): Update.
1813         * psympriv.h (struct partial_symbol): Derive from
1814         general_symbol_info.
1815         <obj_section>: New method.
1816         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1817         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1818         (find_pc_sect_psymbol, fixup_psymbol_section)
1819         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1820         (print_partial_symbols, recursively_search_psymtabs)
1821         (compare_psymbols, psymbol_hash, psymbol_compare)
1822         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1823         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1824
1825 2018-07-26  Tom Tromey  <tromey@redhat.com>
1826
1827         * dbxread.c (end_psymtab): Remove dead code.
1828
1829 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1830
1831         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1832         DWARF unwinders are disabled.
1833         * dwarf2-frame.c: Add dwarf2read.h include.
1834         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1835         disabled.
1836         (dwarf2_frame_unwinders_enabled_p): Define.
1837         (show_dwarf_unwinders_enabled_p): New function.
1838         (_initialize_dwarf2_frame): Register switch to control DWARF
1839         unwinder use.
1840         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1841         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1842         (show_dwarf_cmdlist): Remove static keyword.
1843         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1844         (show_dwarf_cmdlist): Declare.
1845         * NEWS: Document new feature.
1846
1847 2018-07-26  Tom de Vries  <tdevries@suse.de>
1848
1849         PR breakpoints/23366
1850         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1851
1852 2018-07-26  Tom de Vries  <tdevries@suse.de>
1853
1854         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1855         DW_AT_count can't be translated to a dynamic prop.
1856
1857 2018-07-25  Tom de Vries  <tdevries@suse.de>
1858
1859         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1860         try/catch.
1861
1862 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1863
1864         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1865
1866 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1867
1868         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1869
1870 2018-07-24  Keith Seitz  <keiths@redhat.comt
1871
1872         PR symtab/23010
1873         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1874         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1875         instead of add_symbol_to_list.
1876         (read_file_scope): Call prepare_one_comp_unit before reading
1877         any other DIEs.
1878
1879 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1880
1881         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1882
1883 2018-07-24  Tom Tromey  <tom@tromey.com>
1884
1885         * utils.c (malloc, realloc, free): Don't declare.
1886         * configure, config.in: Rebuild.
1887         * configure.ac: Don't check for declarations of free, malloc, or
1888         realloc.
1889
1890 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1891
1892         * aarch64-linux-nat.c
1893         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1894         variable.
1895         * arm-linux-nat.c (fetch_regs): Likewise.
1896         (store_regs): Likewise.
1897         (fetch_vfp_regs): Likewise.
1898         (store_vfp_regs): Likewise.
1899         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1900         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1901         (arm_linux_nat_target::insert_watchpoint): Likewise.
1902         (arm_linux_nat_target::remove_watchpoint): Likewise.
1903         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1904         Likewise.
1905         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1906         Likewise.
1907         * ppc-linux-nat.c (fetch_register): Likewise.
1908         (fetch_all_gp_regs): Likewise.
1909         (fetch_ppc_registers): Likewise.
1910         (store_all_gp_regs): Likewise.
1911         (store_ppc_registers): Likewise.
1912         (hwdebug_insert_point): Likewise.
1913         (can_use_watchpoint_cond_accel): Likewise.
1914         * remote-sim.c (gdb_os_write_stdout): Likewise.
1915
1916 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1917             Tom Tromey  <tom@tromey.com>
1918
1919         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1920         test for it.
1921         * configure: Rebuild.
1922
1923 2018-07-22  Tom Tromey  <tom@tromey.com>
1924
1925         * regformats/regdat.sh: Define xmltarget_${name} inside
1926         #ifndef IN_PROCESS_AGENT.
1927
1928 2018-07-22  Tom Tromey  <tom@tromey.com>
1929
1930         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1931
1932 2018-07-22  Tom Tromey  <tom@tromey.com>
1933
1934         * symfile.c (reread_symbols): Notify iter, not objfile.
1935
1936 2018-07-22  Tom Tromey  <tom@tromey.com>
1937
1938         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1939         Use arch_ops.
1940         (ravenscar_thread_target::prepare_to_store): Likewise.
1941
1942 2018-07-22  Tom Tromey  <tom@tromey.com>
1943
1944         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1945         unused variable.  Call value_fetch_lazy when needed.
1946         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1947         Remove unused variable.  Call value_fetch_lazy when needed.
1948
1949 2018-07-22  Tom Tromey  <tom@tromey.com>
1950
1951         * m32c-tdep.c (mark_dma): Return void.
1952         (make_regs): Remove unused declarations.
1953
1954 2018-07-22  Tom Tromey  <tom@tromey.com>
1955
1956         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1957         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1958         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1959         bkscm_get_valid_block_smob_arg_unsafe for effect.
1960
1961 2018-07-22  Tom Tromey  <tom@tromey.com>
1962
1963         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1964         value_type.
1965
1966 2018-07-22  Tom Tromey  <tom@tromey.com>
1967
1968         * windows-nat.c (saved_context): Conditionally define.
1969         * remote.c (remote_target::remote_btrace_maybe_reopen):
1970         Conditionally declare "warned".
1971         * inflow.c (sigquit_ours): Conditionally define.
1972         (new_tty): Move "tty" declaration inside #if.
1973         * guile/guile.c (guile_datadir): Conditionally define.
1974         * charset.c (set_be_le_names): Move some declarations inside #if.
1975         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1976         #if.
1977         (parse_xml_btrace_conf): Likewise.
1978
1979 2018-07-22  Tom Tromey  <tom@tromey.com>
1980
1981         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1982
1983 2018-07-22  Tom Tromey  <tom@tromey.com>
1984
1985         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1986         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1987         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1988         * buildsym-legacy.c (get_macro_table): Remove unused variable.
1989         * stack.c (frame_apply_level_command): Remove unused variable.
1990         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1991         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1992         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1993         unused variable.
1994         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1995         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1996         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1997         variable.
1998         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1999         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2000         variable.
2001         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2002         Remove unused variable.
2003         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2004         variable.
2005         * common/tdesc.c (print_xml_feature::visit): Remove unused
2006         variable.
2007         * compile/compile-object-load.c (store_regs): Remove unused
2008         variables.
2009         * complaints.c (clear_complaints): Remove unused variable.
2010         * corelow.c (core_target_open): Remove unused variable.
2011         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2012         variable.
2013         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2014         variable.
2015         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2016         variable.
2017         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2018         variable.
2019         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2020         variable.
2021         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2022         variable.
2023         * ia64-tdep.c (examine_prologue): Remove unused variable.
2024         * infcall.c (run_inferior_call): Remove unused variable.
2025         * inferior.c (exit_inferior): Remove unused variable.
2026         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2027         * linespec.c (decode_line_2): Remove unused variable.
2028         * linux-nat.c (super_close): Remove.
2029         * linux-tdep.c (linux_info_proc): Remove unused variable.
2030         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2031         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2032         Remove unused variable.
2033         * parse.c (find_minsym_type_and_address): Remove unused variable.
2034         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2035         variable.
2036         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2037         variable.
2038         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2039         variables.
2040         * record-btrace.c (record_btrace_target::store_registers): Remove
2041         unused variable.
2042         (cmd_show_record_btrace_cpu): Remove unused variable.
2043         * riscv-tdep.c (riscv_register_reggroup_p)
2044         (riscv_push_dummy_call, riscv_return_value): Remove unused
2045         variable.
2046         * rust-exp.y (literal): Remove unused variable.
2047         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2048         unused variable.
2049         <STRUCTOP_ANONYMOUS>: Likewise.
2050         * s390-linux-tdep.c (s390_linux_init_abi_31)
2051         (s390_linux_init_abi_64): Remove unused variable.
2052         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2053         (file_select_thread, net_windows_open, _initialize_ser_windows):
2054         Remove unused variables.
2055         * symtab.c (find_pc_sect_line): Remove unused variable.
2056         * target-memory.c (compute_garbled_blocks): Remove unused
2057         variable.
2058         (target_write_memory_blocks): Remove unused variable.
2059         * target.c (target_stack::unpush): Remove unused variables.
2060         * tracepoint.c (start_tracing, all_tracepoint_actions)
2061         (merge_uploaded_trace_state_variables)
2062         (print_one_static_tracepoint_marker): Remove unused variable.
2063         * unittests/basic_string_view/element_access/char/1.cc (test01):
2064         Remove unused variable.
2065         * windows-nat.c (windows_continue, windows_add_all_dlls)
2066         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2067         Remove unused variables.
2068
2069 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2070
2071         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2072         attr_profile in HAVE_ELF.
2073         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2074         HAVE_ELF.
2075
2076 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2077
2078         * frame.c (frame_register_unwind): Change parameter name.
2079         (frame_unwind_register): Likewise.
2080         (frame_unwind_register_value): Likewise.
2081         (frame_unwind_register_signed): Likewise.
2082         (frame_unwind_register_unsigned): Likewise.
2083         * frame.h (frame_register_unwind): Likewise.
2084         (frame_unwind_register): Likewise.
2085         (frame_unwind_register_value): Likewise.
2086         (frame_unwind_register_signed): Likewise.
2087         (frame_unwind_register_unsigned): Likewise.
2088         (frame_unwind_arch): Likewise.
2089
2090 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2091
2092         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2093         ISA maintenance.
2094
2095 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2096
2097         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2098         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2099         hand.
2100
2101 2018-07-20  Keith Seitz  <keiths@redhat.com>
2102
2103         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2104         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2105         m_compunit_symtab, m_language>: Add "m_" prefix.
2106         Update all uses.
2107         * buildsym.c: Update all uses.
2108
2109 2018-07-20  Tom Tromey  <tom@tromey.com>
2110
2111         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2112         * buildsym.h (record_line_ftype): Remove typedef.
2113
2114 2018-07-20  Tom Tromey  <tom@tromey.com>
2115
2116         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2117         (end_expandable_symtab): Likewise.
2118         (end_symtab_get_static_block): Likewise.
2119         (end_symtab_from_static_block): Likewise.
2120         * buildsym-legacy.c (augment_type_symtab): Remove.
2121         (end_expandable_symtab): Remove.
2122         (end_symtab_get_static_block): Remove.
2123         (end_symtab_from_static_block): Remove.
2124
2125 2018-07-20  Tom Tromey  <tom@tromey.com>
2126
2127         * dwarf2read.c: Include buildsym.h.
2128         (struct dwarf2_cu) <builder>: New method.
2129         (fixup_go_packaging): Update.
2130         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2131         use scoped_free_pendings.
2132         (using_directives): Add "cu" parameter, remove "language".
2133         (read_import_statement, setup_type_unit_groups, )
2134         (read_func_scope, read_lexical_block_scope)
2135         (dwarf2_record_block_ranges, read_namespace): Update.
2136         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2137         (lnp_state_machine::handle_end_sequence): Update.
2138         (class lnp_state_machine) <m_cu>: New member.
2139         <m_record_line_callback>: Remove.
2140         <m_currently_recording_lines>: New member.
2141         (lnp_state_machine::handle_set_file): Update.
2142         (noop_record_line): Remove.
2143         (dwarf_record_line_p): Add cu parameter.
2144         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2145         (lnp_state_machine::record_line)
2146         (lnp_state_machine::lnp_state_machine)
2147         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2148         (dwarf_decode_lines): Update.
2149         (dwarf2_start_subfile): Add cu parameter.
2150         (dwarf2_start_symtab, new_symbol): Update.
2151         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2152         Remove dwarf2_per_objfile parameter.
2153         (dwarf_decode_macros): Update.
2154
2155 2018-07-20  Tom Tromey  <tom@tromey.com>
2156
2157         * stabsread.c (define_symbol): Update.
2158         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2159         * dwarf2read.c (new_symbol): Update.
2160         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2161         * cp-namespace.c: Include buildsym.h.
2162         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2163         * buildsym-legacy.c (get_buildsym_compunit): New function.
2164
2165 2018-07-20  Tom Tromey  <tom@tromey.com>
2166
2167         * xcoffread.c: Include buildsym-legacy.h.
2168         * windows-nat.c: Include buildsym-legacy.h.
2169         * stabsread.c: Include buildsym-legacy.h.
2170         * mdebugread.c: Include buildsym-legacy.h.
2171         * buildsym-legacy.h: New file.
2172         * buildsym-legacy.c: New file, from buildsym.c.
2173         * go32-nat.c: Include buildsym-legacy.h.
2174         * dwarf2read.c: Include buildsym-legacy.h.
2175         * dbxread.c: Include buildsym-legacy.h.
2176         * cp-namespace.c: Include buildsym-legacy.h.
2177         * coffread.c: Include buildsym-legacy.h.
2178         * buildsym.h: Move some contents to buildsym-legacy.h.
2179         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2180         buildsym-legacy.c.
2181         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2182
2183 2018-07-20  Tom Tromey  <tom@tromey.com>
2184
2185         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2186         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2187         (buildsym_compunit::buildsym_compunit)
2188         (buildsym_compunit::~buildsym_compunit)
2189         (buildsym_compunit::get_macro_table): Define.
2190
2191 2018-07-20  Tom Tromey  <tom@tromey.com>
2192
2193         * buildsym.c (reset_symtab_globals): Remove.
2194         (buildsym_compunit::end_symtab_from_static_block): Update.
2195         (buildsym_compunit::augment_type_symtab): Update.
2196         (end_symtab_from_static_block): Call free_buildsym_compunit.
2197         (augment_type_symtab, end_symtab, end_expandable_symtab):
2198         Likewise.
2199
2200 2018-07-20  Tom Tromey  <tom@tromey.com>
2201
2202         * arch-utils.c: Do not include buildsym.h.
2203         * mipsread.c: Do not include buildsym.h.
2204         * machoread.c: Do not include buildsym.h.
2205         * elfread.c: Do not include buildsym.h.
2206
2207 2018-07-20  Tom Tromey  <tom@tromey.com>
2208
2209         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2210         initialization.
2211         (buildsym_compunit): Add new constructor.
2212         (struct buildsym_compunit) <get_last_source_file, finish_block,
2213         record_block_range, start_subfile, patch_subfile_names,
2214         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2215         set_last_source_start_addr, get_last_source_start_addr,
2216         get_local_using_directives, set_local_using_directives,
2217         get_global_using_directives, outermost_context_p,
2218         get_current_context_stack, get_context_stack_depth,
2219         get_current_subfile, get_local_symbols, get_file_symbols,
2220         get_global_symbols, record_debugformat, record_producer,
2221         push_context, pop_context, end_symtab_get_static_block,
2222         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2223         New public methods.
2224         <record_pending_block, finish_block_internal, make_blockvector,
2225         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2226         private methods.
2227         Update all users.
2228
2229 2018-05-22  Tom Tromey  <tom@tromey.com>
2230
2231         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2232         parameter.
2233         (finish_block_internal): Update.
2234
2235 2018-07-20  Tom Tromey  <tom@tromey.com>
2236
2237         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2238         parameter.
2239         (finish_block_internal): Update.
2240
2241 2018-07-20  Tom Tromey  <tom@tromey.com>
2242
2243         * buildsym.h (EXTERN): Don't define or undef.
2244         * buildsym.c (EXTERN): Don't define.
2245
2246 2018-07-20  Tom Tromey  <tom@tromey.com>
2247
2248         * buildsym.c: Remove TODO comment.
2249
2250 2018-07-20  Tom Tromey  <tom@tromey.com>
2251
2252         * coffread.c (coff_symtab_read): Update.
2253         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2254         (xcoff_new_init): Update.
2255         * mipsread.c (mipscoff_new_init): Update.
2256         * mdebugread.c (mdebug_build_psymtabs): Update.
2257         * elfread.c (elf_new_init): Update.
2258         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2259         Update.
2260         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2261         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2262         (stabsect_build_psymtabs): Update.
2263         * buildsym.h (buildsym_init): Don't declare.
2264         * buildsym.c: Update comment.
2265         (prepare_for_building): Remove.
2266         (start_symtab, restart_symtab): Update.
2267         (reset_symtab_globals): Update comment.
2268         (buildsym_init): Remove.
2269
2270 2018-07-20  Tom Tromey  <tom@tromey.com>
2271
2272         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2273         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2274         (read_enum_type, common_block_start, common_block_end)
2275         (cleanup_undefined_types_1, finish_global_stabs): Update.
2276         * mdebugread.c (psymtab_to_symtab_1): Update.
2277         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2278         (read_lexical_block_scope, new_symbol): Update.
2279         * dbxread.c (process_one_symbol): Update.
2280         * coffread.c (coff_symtab_read, process_coff_symbol)
2281         (coff_read_enum_type): Update.
2282         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2283         declare.
2284         (get_local_symbols, get_file_symbols, get_global_symbols): New
2285         functions.
2286         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2287         m_global_symbols.
2288         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2289         (~scoped_free_pendings): Update.
2290         (finish_block, prepare_for_building, reset_symtab_globals)
2291         (end_symtab_get_static_block, end_symtab_with_blockvector)
2292         (augment_type_symtab, push_context): Update.
2293         (get_local_symbols, get_file_symbols, get_global_symbols): New
2294         functions.
2295         (buildsym_init): Update.
2296
2297 2018-07-20  Tom Tromey  <tom@tromey.com>
2298
2299         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2300         (process_full_type_unit): Likewise.
2301         (dwarf2_start_symtab): Set list_in_scope.
2302
2303 2018-07-20  Tom Tromey  <tom@tromey.com>
2304
2305         * dwarf2read.c (process_psymtab_comp_unit_reader)
2306         (build_type_psymtabs_reader): Do not set list_in_scope.
2307
2308 2018-07-20  Tom Tromey  <tom@tromey.com>
2309
2310         * buildsym.c (free_pendings): Remove.
2311         (add_symbol_to_list, scoped_free_pendings)
2312         (finish_block_internal, buildsym_init): Update.
2313
2314 2018-07-20  Tom Tromey  <tom@tromey.com>
2315
2316         * xcoffread.c (read_xcoff_symtab): Update.
2317         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2318         Update.
2319         * dbxread.c (process_one_symbol): Update.
2320         * coffread.c (coff_symtab_read): Update.
2321         * buildsym.h (finish_block): Update.
2322         * buildsym.c (finish_block): Remove "listhead" argument.
2323         (end_symtab_get_static_block): Update.
2324
2325 2018-07-20  Tom Tromey  <tom@tromey.com>
2326
2327         * buildsym.h (class scoped_free_pendings): Remove constructor.
2328         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2329         method.
2330         <m_pending_block_obstack, m_pending_blocks>: New members.
2331         (pending_block_obstack, pending_blocks): Remove.
2332         (scoped_free_pendings::scoped_free_pendings): Default.
2333         (~scoped_free_pendings): Update.
2334         (free_pending_blocks): Remove.
2335         (finish_block_internal, record_pending_block, make_blockvector)
2336         (end_symtab_get_static_block, augment_type_symtab, push_context)
2337         (buildsym_init): Update.
2338
2339 2018-07-20  Tom Tromey  <tom@tromey.com>
2340
2341         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2342         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2343         members.
2344         (pending_addrmap, pending_addrmap_obstack)
2345         (pending_addrmap_interesting): Remove.
2346         (scoped_free_pendings, record_block_range, make_blockvector)
2347         (prepare_for_building, reset_symtab_globals, buildsym_init):
2348         Update.
2349
2350 2018-07-20  Tom Tromey  <tom@tromey.com>
2351
2352         * xcoffread.c (process_linenos): Update.
2353         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2354         * mdebugread.c (psymtab_to_symtab_1): Update.
2355         * dwarf2read.c (setup_type_unit_groups)
2356         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2357         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2358         * dbxread.c (process_one_symbol): Update.
2359         * coffread.c (coff_symtab_read, enter_linenos)
2360         (process_coff_symbol): Update.
2361         * buildsym.h (current_subfile): Don't declare.
2362         (get_current_subfile): Declare.
2363         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2364         member.
2365         (start_subfile, free_buildsym_compunit, push_subfile)
2366         (prepare_for_building, start_symtab): Update.
2367         (get_current_subfile): New function.
2368
2369 2018-07-20  Tom Tromey  <tom@tromey.com>
2370
2371         * coffread.c (coff_symtab_read): Update.
2372         * xcoffread.c (read_xcoff_symtab): Update.
2373         * dwarf2read.c (new_symbol): Update.
2374         (read_func_scope, read_lexical_block_scope): Update.
2375         * dbxread.c (process_one_symbol): Update.
2376         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2377         (outermost_context_p): Remove macro.
2378         (outermost_context_p, get_current_context_stack)
2379         (get_context_stack_depth): Declare.
2380         (pop_context): Return struct context_stack.
2381         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2382         member.
2383         (context_stack_size): Remove.
2384         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2385         (prepare_for_building, end_symtab_get_static_block)
2386         (augment_type_symtab, push_context): Update.
2387         (pop_context): Return struct context_stack.
2388         (outermost_context_p, get_current_context_stack)
2389         (get_context_stack_depth): New functions.
2390         (buildsym_init): Update.
2391
2392 2018-07-20  Tom Tromey  <tom@tromey.com>
2393
2394         * rust-exp.y: Now a pure parser.  Update all rules.
2395         (%union): Move earlier.
2396         (current_parser, work_obstack): Remove globals.
2397         (rust_parser, ~rust_parser): Update.
2398         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2399         lex_character, lex_number, lex_string, lex_identifier,
2400         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2401         convert_name, convert_params_to_expression,
2402         convert_ast_to_expression, ast_basic_type, ast_operation,
2403         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2404         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2405         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2406         ast_array_type, ast_slice_type, ast_reference_type,
2407         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2408         (rust_parse): Update.
2409         (rustyyerror, rustyylex): Add parser parameter.
2410         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2411         (rust_lex_stringish_test, rust_lex_test_sequence)
2412         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2413         (rust_lex_test_push_back, rust_lex_tests): Update.
2414
2415 2018-07-19  Pedro Alves  <palves@redhat.com>
2416
2417         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2418         gdb::unique_xmalloc_ptr.
2419         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2420         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2421         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2422         copy-initialization.
2423         * guile/scm-pretty-print.c (ppscm_print_children): Use
2424         gdb::unique_xmalloc_ptr instead of cleanups.
2425         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2426         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2427         gdb::unique_xmalloc_ptr.
2428         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2429         Adjust to use gdb::unique_xmalloc_ptr.
2430         * guile/scm-utils.c (extract_arg): Adjust.
2431         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2432         gdb::unique_xmalloc_ptr instead of a cleanup.
2433
2434 2018-07-19  Tom Tromey  <tom@tromey.com>
2435
2436         * utils.c (do_value_free_to_mark)
2437         (make_cleanup_value_free_to_mark): Remove.
2438         * utils.h (make_cleanup_value_free_to_mark): Remove.
2439
2440 2018-07-19  Pedro Alves  <palves@redhat.com>
2441
2442         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2443         forwarding reference.
2444
2445 2018-07-18  Pedro Alves  <palves@redhat.com>
2446
2447         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2448         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2449         cleanup.
2450
2451 2018-07-18  Pedro Alves  <palves@redhat.com>
2452
2453         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2454         exceptions.
2455         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2456         (gdbscm_wrap): New.
2457         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2458         directly instead of a cleanup.
2459         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2460         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2461         (vlscm_binop_gdbthrow): New, factored out from ...
2462         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2463         (vlscm_rich_compare): Use gdbscm_wrap.
2464         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2465         instead of a cleanup.
2466         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2467         cleanup.
2468         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2469         Use xfree directly instead of a cleanup.
2470         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2471         Adjust to use gdbscm_wrap and scoped_value_mark.
2472         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2473         (gdbscm_value_address, gdbscm_value_dereference)
2474         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2475         scoped_value_mark.
2476         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2477         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2478         scoped_value_mark.
2479         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2480         gdbscm_wrap and scoped_value_mark.
2481         (gdbscm_value_to_string): Use xfree directly instead of a
2482         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2483         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2484         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2485         scoped_value_mark.
2486         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2487         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2488         scoped_value_mark.
2489         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2490         gdbscm_wrap.
2491
2492 2018-07-18  Tom de Vries  <tdevries@suse.de>
2493
2494         * findvar.c (default_read_var_value): Also resolve dynamic type for
2495         LOC_OPTIMIZED_OUT vars.
2496
2497 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2498
2499         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2500         decoding.
2501
2502 2018-07-17  Tom Tromey  <tom@tromey.com>
2503
2504         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2505         (compute_enum_list, pascm_set_param_value_x)
2506         (gdbscm_parameter_value): Update.
2507         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2508         (gdbscm_scm_to_host_string): Update.
2509         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2510         Update.
2511         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2512         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2513         * guile/scm-string.c (gdbscm_scm_to_string): Return
2514         unique_xmalloc_ptr.
2515         (gdbscm_scm_to_host_string): Likewise.
2516
2517 2018-07-17  Tom Tromey  <tom@tromey.com>
2518
2519         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2520         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2521         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2522         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2523         unique_xmalloc_ptr.
2524
2525 2018-07-17  Tom Tromey  <tom@tromey.com>
2526
2527         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2528         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2529         Update.
2530         * guile/scm-cmd.c (cmdscm_function): Update.
2531         * guile/scm-pretty-print.c
2532         (ppscm_print_exception_unless_memory_error): Update.
2533         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2534         Return unique_xmalloc_ptr.
2535
2536 2018-07-17  Tom Tromey  <tom@tromey.com>
2537
2538         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2539         Use string_printf.
2540
2541 2018-07-17  Jim Wilson  <jimw@sifive.com>
2542
2543         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2544         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2545         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2546         unecessary braces after EF_RISCV_RVC test.  Delete call to
2547         set_gdbarch_decr_pc_after_break.
2548
2549         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2550         RISCV_LAST_FP_REGNUM + 1.
2551         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2552
2553 2018-07-17  Tom Tromey  <tom@tromey.com>
2554
2555         * configure.ac: Remove --disable-gdbcli.
2556         * configure: Rebuild.
2557         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2558         (SUBDIR_CLI_CFLAGS): Remove.
2559         (SFILES): Use SUBDIR_CLI_SRCS.
2560         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2561
2562 2018-07-17  Tom Tromey  <tom@tromey.com>
2563
2564         PR gdb/18624:
2565         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2566
2567 2018-07-16  Jim Wilson  <jimw@sifive.com>
2568
2569         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2570
2571 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2572
2573         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2574         variable.
2575         (libunwind_frame_sniffer): Likewise.
2576         (libunwind_frame_prev_register): Likewise.
2577         (libunwind_sigtramp_frame_sniffer): Likewise.
2578         * ia64-tdep.c (ia64_access_reg): Likewise.
2579         (ia64_access_rse_reg): Likewise.
2580         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2581         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2582
2583 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2584
2585         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2586
2587 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2588
2589         * remote-sim.c (gdbsim_target::close,
2590         gdbsim_target::mourn_inferior): Remove unused variables.
2591
2592 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2593
2594         * ia64-tdep.c (ktab_buf): New global.
2595         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2596         (get_kernel_table): Adjust.
2597
2598 2018-07-16  Tom Tromey  <tom@tromey.com>
2599
2600         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2601         * dwarf2read.c (using_directives, new_symbol): Use
2602         outermost_context_p.
2603         * dbxread.c (process_one_symbol): Use outermost_context_p.
2604         * coffread.c (coff_symtab_read): Use outermost_context_p.
2605
2606 2018-07-16  Tom Tromey  <tom@tromey.com>
2607
2608         * dwarf2read.c (using_directives, read_func_scope)
2609         (read_lexical_block_scope): Update.
2610         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2611         * buildsym.h (local_using_directives, global_using_directives):
2612         Don't declare.
2613         (get_local_using_directives, set_local_using_directives)
2614         (get_global_using_directives): Declare.
2615         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2616         m_global_using_directives>: New members.
2617         (finish_block_internal, prepare_for_building)
2618         (reset_symtab_globals, end_symtab_get_static_block)
2619         (push_context): Update.
2620         (get_local_using_directives, set_local_using_directives)
2621         (get_global_using_directives): New functions.
2622         (buildsym_init): Update.
2623
2624 2018-07-16  Tom Tromey  <tom@tromey.com>
2625
2626         * xcoffread.c (xcoff_initial_scan): Don't call
2627         free_pending_blocks.
2628         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2629         * buildsym.h (class scoped_free_pendings): Add constructor.
2630         (free_pending_blocks): Don't declare.
2631         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2632         (free_pending_blocks): Now static.
2633
2634 2018-07-16  Tom Tromey  <tom@tromey.com>
2635
2636         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2637         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2638         member.
2639         (struct subfile_stack): Remove.
2640         (subfile_stack): Remove.
2641         (push_subfile, pop_subfile, buildsym_init): Update.
2642
2643 2018-07-16  Tom Tromey  <tom@tromey.com>
2644
2645         * buildsym.c (push_subfile): Use gdb_assert.
2646         (pop_subfile): Use gdb_assert.
2647
2648 2018-07-16  Tom Tromey  <tom@tromey.com>
2649
2650         * buildsym.h (merge_symbol_lists): Remove.
2651         * buildsym.c (merge_symbol_lists): Remove.
2652
2653 2018-07-16  Tom Tromey  <tom@tromey.com>
2654
2655         * stabsread.c (scan_file_globals): Update comment.
2656         * stabsread.h (scan_file_globals): Move from buildsym.h.
2657         * buildsym.h (scan_file_globals): Move to stabsread.h.
2658
2659 2018-07-16  Tom Tromey  <tom@tromey.com>
2660
2661         * xcoffread.c (xcoff_new_init): Update.
2662         * mipsread.c (mipscoff_new_init): Update.
2663         * mdebugread.c (mdebug_build_psymtabs): Update.
2664         * elfread.c (elf_new_init): Update.
2665         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2666         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2667         * buildsym.h (buildsym_new_init): Don't declare.
2668         * buildsym.c (buildsym_new_init): Remove.
2669
2670 2018-07-16  Tom Tromey  <tom@tromey.com>
2671
2672         * stabsread.h (within_function): Move from buildsym.h.
2673         * stabsread.c (start_stabs): Clear within_function.
2674         * coffread.c (coff_start_symtab): Clear within_function.
2675         * buildsym.h (within_function): Move to stabsread.h.
2676         * buildsym.c (prepare_for_building): Update.
2677
2678 2018-07-16  Tom Tromey  <tom@tromey.com>
2679
2680         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2681         * dwarf2read.c (dwarf2_start_symtab): Don't set
2682         processing_gcc_compilation.
2683         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2684
2685 2018-07-16  Tom Tromey  <tom@tromey.com>
2686
2687         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2688         (next_symbol_text_func): Move from buildsym.h.
2689         * stabsread.c (hashname): Move from buildsym.c.
2690         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2691         (next_symbol_text_func, hashname): Move to stabsread.h.
2692         * buildsym.c: Don't include bcache.h
2693         (hashname): Move to stasbread.c.
2694
2695 2018-07-16  Tom Tromey  <tom@tromey.com>
2696
2697         * buildsym.h (context_stack_size): Don't declare.
2698         * buildsym.c (context_stack_size): New global.
2699
2700 2018-07-16  Tom Tromey  <tom@tromey.com>
2701
2702         * dbxread.c (processing_acc_compilation): New global.
2703         * buildsym.h (processing_acc_compilation): Don't declare.
2704
2705 2018-07-16  Tom Tromey  <tom@tromey.com>
2706
2707         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2708         * dbxread.c (read_ofile_symtab): Update.
2709         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2710         * buildsym.h (last_source_start_addr): Remove.
2711         (set_last_source_start_addr, get_last_source_start_addr):
2712         Declare.
2713         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2714         parameter.
2715         (struct buildsym_compunit) <m_last_source_start_addr>: New
2716         member.
2717         (prepare_for_building): Remove start_addr parameter.
2718         (start_symtab, restart_symtab, end_symtab_get_static_block)
2719         (end_symtab_with_blockvector): Update.
2720         (set_last_source_start_addr, get_last_source_start_addr): New
2721         functions.
2722
2723 2018-07-16  Tom Tromey  <tom@tromey.com>
2724
2725         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2726         member.
2727         (have_line_numbers): Remove.
2728         (record_line, prepare_for_building, end_symtab_get_static_block)
2729         (augment_type_symtab): Update.
2730
2731 2018-07-16  Tom Tromey  <tom@tromey.com>
2732
2733         * buildsym.c (~buildsym_compunit): Free the macro table.
2734         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2735         methods.
2736         <m_pending_macros>: New member.
2737         (pending_macros): Remove.
2738         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2739         (reset_symtab_globals, end_symtab_get_static_block)
2740         (end_symtab_with_blockvector, augment_type_symtab)
2741         (buildsym_init): Update.
2742
2743 2018-07-16  Tom Tromey  <tom@tromey.com>
2744
2745         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2746         parameter.
2747         (buildsym_compunit::set_last_source_file): New method.
2748         <m_last_source_file>: New member.
2749         (prepare_for_building): Remove "name" parameter.
2750         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2751         (last_source_file): Remove.
2752         (set_last_source_file, get_last_source_file): Update.
2753
2754 2018-07-16  Tom Tromey  <tom@tromey.com>
2755
2756         * buildsym.c (prepare_for_building): Add assert.
2757
2758 2018-07-16  Tom Tromey  <tom@tromey.com>
2759
2760         * buildsym.c (~buildsym_compunit): Update.
2761         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2762         (start_subfile, patch_subfile_names)
2763         (end_symtab_with_blockvector): Update.
2764
2765 2018-07-16  Tom Tromey  <tom@tromey.com>
2766
2767         * buildsym.c (struct buildsym_compunit): Add constructor,
2768         destructor, initializers.
2769         (start_buildsym_compunit): Remove.
2770         (free_buildsym_compunit): Use "delete".
2771         (start_symtab, restart_symtab): Use "new".
2772
2773 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2774
2775         * symfile.c (set_objfile_default_section_offset): Remove struct
2776         keyword.
2777
2778 2018-07-14  Stafford Horne  <shorne@gmail.com>
2779
2780         * (Responsible Maintainers): Add myself as or1k maintainer.
2781
2782 2018-07-13  Tom Tromey  <tom@tromey.com>
2783
2784         * symfile.c (set_objfile_default_section_offset): Use extra braces
2785         around initializer.
2786
2787 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2788
2789         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2790         non-branching basr.
2791
2792 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2793
2794         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2795         unittests/cli-utils-selftests.c
2796         * unittests/cli-utils-selftests.c: New file.
2797
2798 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2799
2800         * NEWS: Mention new commands. Mention change to 'thread apply'.
2801
2802 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2803
2804         * thread.c (thr_try_catch_cmd): New function.
2805         (thread_apply_all_command): Handle qcs flags.
2806         (thread_apply_command): Handle qcs flags.
2807         (taas_command): New function.
2808         (tfaas_command): New function.
2809         (_initialize_thread): Update to setup the new commands 'taas
2810         and 'tfaas'. Change doc string for 'thread apply'.
2811
2812 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2813
2814         * stack.c: (trailing_outermost_frame): New function, mostly
2815         extracted from backtrace_command_1.
2816         (leading_innermost_frame): New function.
2817         (backtrace_command_1): Update to call trailing_outermost_frame.
2818         (frame_apply_command_count): New function.
2819         (frame_apply_level_command): New function.
2820         (frame_apply_all_command): New function.
2821         (frame_apply_command): New function.
2822         (faas_command): New function.
2823         (frame_cmd_list): New variable.
2824         (_initialize_stack): Update to setup the new commands 'frame apply'
2825         and 'faas'.
2826
2827 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2828
2829         * cli-utils.c (number_or_range_parser::get_number): Only handle
2830         numbers or convenience var as numbers.
2831         (parse_flags): New function.
2832         (parse_flags_qcs): New function.
2833         (number_or_range_parser::finished): Ensure parsing end is detected
2834         before end of string.
2835         * cli-utils.h (parse_flags): New function.
2836         (parse_flags_qcs): New function.
2837         (number_or_range_parser): Remove m_finished bool.
2838         (number_or_range_parser::skip_range): Set m_in_range to false.
2839
2840 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2841
2842         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2843         on Windows.
2844
2845 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2846             Jan Kratochvil  <jan.kratochvil@redhat.com>
2847             Paul Fertser  <fercerpav@gmail.com>
2848             Tsutomu Seki  <sekiriki@gmail.com>
2849             Pedro Alves  <palves@redhat.com>
2850
2851         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2852         'unittests/parse-connection-spec-selftests.c'.
2853         (COMMON_SFILES): Add 'common/netstuff.c'.
2854         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2855         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2856         * common/netstuff.c: New file.
2857         * common/netstuff.h: New file.
2858         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2859         (wait_for_connect): Update comment.  New parameter
2860         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2861         Use 'sock' directly instead of 'scb->fd'.
2862         (try_connect): New function, with code from 'net_open'.
2863         (net_open): Rewrite main loop to deal with multiple
2864         sockets/addresses.  Handle IPv6-style hostnames; implement
2865         support for IPv6 connections.
2866         * unittests/parse-connection-spec-selftests.c: New file.
2867
2868 2018-07-11  Pedro Alves  <palves@redhat.com>
2869
2870         PR gdb/23377
2871         * remote.c (remote_target::remote_detach_pid): Call
2872         set_current_process.
2873
2874 2018-07-11  Pedro Alves  <palves@redhat.com>
2875
2876         * h8300-tdep.c (h8300_gdbarch_init): Remove
2877         set_gdbarch_ecoff_reg_to_regnum calls.
2878
2879 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2880
2881         PR c++/23373
2882         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2883         offsets/sizes for static members of a class/struct.
2884
2885 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2886
2887         * target-descriptions.c (tdesc_register_bitsize): Rename.
2888         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2889         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2890         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2891
2892 2018-07-10  Tom Tromey  <tom@tromey.com>
2893
2894         * breakpoint.c (moribund_locations): Now static and a
2895         std::vector.
2896         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2897         (build_bpstat_chain, update_global_location_list)
2898         (breakpoint_retire_moribund): Update.
2899         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2900         VEC.
2901
2902 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2903
2904         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2905         (riscv_register_reggroup_p): Use new function, remove unneeded
2906         parenthesis.
2907         (riscv_push_dummy_call): Extend assert to compare against xlen or
2908         flen based on register type.
2909
2910 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2911
2912         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2913
2914 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2915
2916         * remote.c (show_hardware_watchpoint_limit): New function.
2917         (show_hardware_watchpoint_length_limit): New function.
2918         (show_hardware_breakpoint_limit): New function.
2919         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2920         where appropriate, update help text.
2921
2922 2018-07-09  Tom Tromey  <tom@tromey.com>
2923
2924         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2925         (CLIBS): Don't mention NAT_CLIBS.
2926
2927 2018-07-09  Tom Tromey  <tom@tromey.com>
2928
2929         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2930         (LIBGDB_OBS, clean mostlyclean): Update.
2931         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2932
2933 2018-07-09  Tom Tromey  <tom@tromey.com>
2934
2935         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2936         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2937         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2938
2939 2018-07-09  Tom Tromey  <tom@tromey.com>
2940
2941         * Makefile.in (ALLDEPFILES): Remove exec.c.
2942         (COMMON_OBS): Remove exec.o.
2943         (COMMON_SFILES): Add exec.c.
2944
2945 2018-07-09  Tom Tromey  <tom@tromey.com>
2946
2947         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2948
2949 2018-07-09  Tom Tromey  <tom@tromey.com>
2950
2951         * Makefile.in (clean mostlyclean): Remove stamp-version.
2952         (version.c): Depend on stamp-version.
2953         (stamp-version): New rule, from version.c rule.
2954
2955 2018-07-09  Tom Tromey  <tom@tromey.com>
2956
2957         * Makefile.in (init.c): Depend on stamp-init.
2958         (stamp-init): New rule, from init.c rule.
2959         (clean mostlyclean): Remove stamp-init.
2960
2961 2018-07-09  Tom Tromey  <tom@tromey.com>
2962
2963         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2964         SUBDIR_GCC_COMPILE_SRCS.
2965
2966 2018-07-09  Tom Tromey  <tom@tromey.com>
2967
2968         * Makefile.in (init.c): Remove some unused sed rules.
2969
2970 2018-07-09  Tom Tromey  <tom@tromey.com>
2971
2972         * Makefile.in (TSOBS): Remove.
2973         (INIT_FILES): Update.
2974         (LIBGDB_OBS): Update.
2975         (COMMON_SFILES): Add inflow.c.
2976         (SFILES): Remove inflow.c.
2977
2978 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2979
2980         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2981
2982 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
2983
2984         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2985         get_saveloc_name, is_signal_frame_name, step_name,
2986         init_remote_name, create_addr_space_name,
2987         destroy_addr_space_name, search_unwind_table_name,
2988         find_dyn_list_name): Constify.
2989
2990 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
2991
2992         * darwin-nat.c (darwin_pthread_kill): New function.
2993         (darwin_resume_thread): Use darwin_pthread_kill.
2994
2995 2018-07-05  Tom de Vries  <tdevries@suse.de>
2996
2997         * macroexp.c (macro_buffer) <operator=>: New member function.
2998
2999 2018-07-04  Tom Tromey  <tom@tromey.com>
3000
3001         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3002
3003 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3004
3005         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3006         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3007         * maint.c: Likewise.
3008         * top.c: Likewise.
3009
3010 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3011
3012         * NEWS: Create a new section for the next release branch.
3013         Rename the section of the current branch, now that it has
3014         been cut.
3015
3016 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3017
3018         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3019         * version.in: Bump version to 8.2.50.DATE-git.
3020
3021 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3022             Pedro Alves  <palves@redhat.com>
3023
3024         * linux-nat.c (linux_init_ptrace): Rename to ...
3025         (linux_init_ptrace_procfs): ... this.  Call
3026         linux_proc_init_warnings.
3027         (linux_nat_target::post_attach)
3028         (linux_nat_target::post_startup_inferior): Adjust.
3029         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3030         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3031
3032 2018-07-04  Tom de Vries  <tdevries@suse.de>
3033
3034         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3035         check ...
3036         (read_comp_unit_head): ... here.
3037
3038 2018-07-03  Tom Tromey  <tom@tromey.com>
3039
3040         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3041         (stop_tracing, tstatus_command)
3042         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3043         (print_one_static_tracepoint_marker): Update.
3044         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3045         std::vector.
3046         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3047         VEC.
3048         (all_tracepoints, static_tracepoints_here): Return std::vector.
3049
3050 2018-07-03  Tom Tromey  <tom@tromey.com>
3051
3052         * common/ptid.c (ptid_equal): Remove.
3053         * common/ptid.h (ptid_equal): Don't declare.
3054         * ada-tasks.c: Update.
3055         * breakpoint.c: Update.
3056         * common/agent.c: Update.
3057         * corelow.c: Update.
3058         * darwin-nat-info.c: Update.
3059         * darwin-nat.c: Update.
3060         * dcache.c: Update.
3061         * dtrace-probe.c: Update.
3062         * dummy-frame.c: Update.
3063         * fbsd-nat.c: Update.
3064         * frame.c: Update.
3065         * gdbthread.h: Update.
3066         * gnu-nat.c: Update.
3067         * go32-nat.c: Update.
3068         * inf-loop.c: Update.
3069         * inf-ptrace.c: Update.
3070         * infcall.c: Update.
3071         * infcmd.c: Update.
3072         * inflow.c: Update.
3073         * infrun.c: Update.
3074         * linux-fork.c: Update.
3075         * linux-nat.c: Update.
3076         * linux-thread-db.c: Update.
3077         * mi/mi-cmd-var.c: Update.
3078         * mi/mi-interp.c: Update.
3079         * mi/mi-main.c: Update.
3080         * nto-procfs.c: Update.
3081         * ppc-linux-tdep.c: Update.
3082         * procfs.c: Update.
3083         * python/py-inferior.c: Update.
3084         * python/py-record-btrace.c: Update.
3085         * python/py-record.c: Update.
3086         * ravenscar-thread.c: Update.
3087         * regcache.c: Update.
3088         * remote-sim.c: Update.
3089         * remote.c: Update.
3090         * sol-thread.c: Update.
3091         * solib.c: Update.
3092         * target.c: Update.
3093         * tui/tui-stack.c: Update.
3094         * varobj.c: Update.
3095         * windows-nat.c: Update.
3096         * windows-tdep.c: Update.
3097
3098 2018-07-03  Tom Tromey  <tom@tromey.com>
3099
3100         * common/ptid.c (ptid_match): Remove.
3101         * common/ptid.h (ptid_match): Don't declare.
3102         * fbsd-nat.c: Update.
3103         * infcmd.c: Update.
3104         * infrun.c: Update.
3105         * linux-nat.c: Update.
3106         * record-btrace.c: Update.
3107         * regcache.c: Update.
3108         * remote.c: Update.
3109
3110 2018-07-03  Tom Tromey  <tom@tromey.com>
3111
3112         * common/ptid.c (ptid_tid_p): Remove.
3113         * common/ptid.h (ptid_tid_p): Don't declare.
3114         * sol-thread.c: Update.
3115
3116 2018-07-03  Tom Tromey  <tom@tromey.com>
3117
3118         * common/ptid.c (ptid_lwp_p): Remove.
3119         * common/ptid.h (ptid_lwp_p): Don't declare.
3120         * fbsd-nat.c: Update.
3121         * linux-nat.c: Update.
3122         * nat/linux-procfs.c: Update.
3123         * nat/x86-linux-dregs.c: Update.
3124         * sol-thread.c: Update.
3125
3126 2018-07-03  Tom Tromey  <tom@tromey.com>
3127
3128         * common/ptid.c (ptid_is_pid): Remove.
3129         * common/ptid.h (ptid_is_pid): Don't declare.
3130         * infrun.c: Update.
3131         * linux-nat.c: Update.
3132         * mi/mi-interp.c: Update.
3133         * remote.c: Update.
3134         * thread.c: Update.
3135
3136 2018-07-03  Tom Tromey  <tom@tromey.com>
3137
3138         * common/ptid.c (ptid_get_tid): Remove.
3139         * common/ptid.h (ptid_get_tid): Don't declare.
3140         * ada-tasks.c: Update.
3141         * aix-thread.c: Update.
3142         * bsd-uthread.c: Update.
3143         * darwin-nat.c: Update.
3144         * fbsd-nat.c: Update.
3145         * i386-darwin-nat.c: Update.
3146         * infrun.c: Update.
3147         * linux-tdep.c: Update.
3148         * nto-procfs.c: Update.
3149         * ppc-ravenscar-thread.c: Update.
3150         * python/py-infthread.c: Update.
3151         * ravenscar-thread.c: Update.
3152         * sol-thread.c: Update.
3153         * sparc-ravenscar-thread.c: Update.
3154         * windows-nat.c: Update.
3155
3156 2018-07-03  Tom Tromey  <tom@tromey.com>
3157
3158         * common/ptid.c (ptid_get_lwp): Remove.
3159         * common/ptid.h (ptid_get_lwp): Don't declare.
3160         * aarch64-linux-nat.c: Update.
3161         * ada-tasks.c: Update.
3162         * aix-thread.c: Update.
3163         * amd64-linux-nat.c: Update.
3164         * arm-linux-nat.c: Update.
3165         * corelow.c: Update.
3166         * fbsd-nat.c: Update.
3167         * fbsd-tdep.c: Update.
3168         * gnu-nat.c: Update.
3169         * i386-cygwin-tdep.c: Update.
3170         * i386-gnu-nat.c: Update.
3171         * i386-linux-nat.c: Update.
3172         * ia64-linux-nat.c: Update.
3173         * inf-ptrace.c: Update.
3174         * infrun.c: Update.
3175         * linux-fork.c: Update.
3176         * linux-nat.c: Update.
3177         * linux-tdep.c: Update.
3178         * linux-thread-db.c: Update.
3179         * mips-linux-nat.c: Update.
3180         * nat/aarch64-linux-hw-point.c: Update.
3181         * nat/aarch64-linux.c: Update.
3182         * nat/linux-btrace.c: Update.
3183         * nat/linux-osdata.c: Update.
3184         * nat/linux-procfs.c: Update.
3185         * nat/x86-linux-dregs.c: Update.
3186         * obsd-nat.c: Update.
3187         * ppc-fbsd-nat.c: Update.
3188         * ppc-linux-nat.c: Update.
3189         * procfs.c: Update.
3190         * python/py-infthread.c: Update.
3191         * ravenscar-thread.c: Update.
3192         * remote.c: Update.
3193         * s390-linux-nat.c: Update.
3194         * sol-thread.c: Update.
3195         * sol2-tdep.c: Update.
3196         * spu-linux-nat.c: Update.
3197         * x86-linux-nat.c: Update.
3198         * xtensa-linux-nat.c: Update.
3199
3200 2018-07-03  Tom Tromey  <tom@tromey.com>
3201
3202         * common/ptid.c (ptid_get_pid): Remove.
3203         * common/ptid.h (ptid_get_pid): Don't declare.
3204         * aarch64-linux-nat.c: Update.
3205         * ada-lang.c: Update.
3206         * aix-thread.c: Update.
3207         * alpha-bsd-nat.c: Update.
3208         * amd64-fbsd-nat.c: Update.
3209         * amd64-linux-nat.c: Update.
3210         * arm-linux-nat.c: Update.
3211         * arm-nbsd-nat.c: Update.
3212         * auxv.c: Update.
3213         * break-catch-syscall.c: Update.
3214         * breakpoint.c: Update.
3215         * bsd-uthread.c: Update.
3216         * corelow.c: Update.
3217         * ctf.c: Update.
3218         * darwin-nat.c: Update.
3219         * fbsd-nat.c: Update.
3220         * fbsd-tdep.c: Update.
3221         * gcore.c: Update.
3222         * gnu-nat.c: Update.
3223         * hppa-nbsd-nat.c: Update.
3224         * hppa-obsd-nat.c: Update.
3225         * i386-fbsd-nat.c: Update.
3226         * ia64-linux-nat.c: Update.
3227         * inf-ptrace.c: Update.
3228         * infcmd.c: Update.
3229         * inferior.c: Update.
3230         * inferior.h: Update.
3231         * inflow.c: Update.
3232         * infrun.c: Update.
3233         * linux-fork.c: Update.
3234         * linux-nat.c: Update.
3235         * linux-tdep.c: Update.
3236         * linux-thread-db.c: Update.
3237         * m68k-bsd-nat.c: Update.
3238         * mi/mi-interp.c: Update.
3239         * mi/mi-main.c: Update.
3240         * mips-linux-nat.c: Update.
3241         * mips-nbsd-nat.c: Update.
3242         * mips64-obsd-nat.c: Update.
3243         * nat/aarch64-linux-hw-point.c: Update.
3244         * nat/aarch64-linux.c: Update.
3245         * nat/linux-btrace.c: Update.
3246         * nat/linux-osdata.c: Update.
3247         * nat/linux-procfs.c: Update.
3248         * nat/x86-linux-dregs.c: Update.
3249         * nto-procfs.c: Update.
3250         * obsd-nat.c: Update.
3251         * ppc-linux-nat.c: Update.
3252         * ppc-nbsd-nat.c: Update.
3253         * ppc-obsd-nat.c: Update.
3254         * proc-service.c: Update.
3255         * procfs.c: Update.
3256         * python/py-inferior.c: Update.
3257         * python/py-infthread.c: Update.
3258         * ravenscar-thread.c: Update.
3259         * record.c: Update.
3260         * remote-sim.c: Update.
3261         * remote.c: Update.
3262         * rs6000-nat.c: Update.
3263         * s390-linux-nat.c: Update.
3264         * sh-nbsd-nat.c: Update.
3265         * sol-thread.c: Update.
3266         * sparc-nat.c: Update.
3267         * sparc64-tdep.c: Update.
3268         * spu-linux-nat.c: Update.
3269         * spu-tdep.c: Update.
3270         * target-debug.h: Update.
3271         * target.c: Update.
3272         * thread.c: Update.
3273         * tid-parse.c: Update.
3274         * tracefile-tfile.c: Update.
3275         * vax-bsd-nat.c: Update.
3276         * windows-nat.c: Update.
3277         * x86-linux-nat.c: Update.
3278         * x86-nat.c: Update.
3279
3280 2018-07-03  Tom Tromey  <tom@tromey.com>
3281
3282         * common/ptid.c (pid_to_ptid): Remove.
3283         * common/ptid.h (pid_to_ptid): Don't declare.
3284         * aix-thread.c: Update.
3285         * arm-linux-nat.c: Update.
3286         * common/ptid.c: Update.
3287         * common/ptid.h: Update.
3288         * corelow.c: Update.
3289         * ctf.c: Update.
3290         * darwin-nat.c: Update.
3291         * fbsd-nat.c: Update.
3292         * fork-child.c: Update.
3293         * gnu-nat.c: Update.
3294         * go32-nat.c: Update.
3295         * inf-ptrace.c: Update.
3296         * infcmd.c: Update.
3297         * inferior.c: Update.
3298         * infrun.c: Update.
3299         * linux-fork.c: Update.
3300         * linux-nat.c: Update.
3301         * nat/aarch64-linux-hw-point.c: Update.
3302         * nat/fork-inferior.c: Update.
3303         * nat/x86-linux-dregs.c: Update.
3304         * nto-procfs.c: Update.
3305         * obsd-nat.c: Update.
3306         * procfs.c: Update.
3307         * progspace.c: Update.
3308         * remote.c: Update.
3309         * rs6000-nat.c: Update.
3310         * s390-linux-nat.c: Update.
3311         * sol-thread.c: Update.
3312         * spu-linux-nat.c: Update.
3313         * target.c: Update.
3314         * top.c: Update.
3315         * tracefile-tfile.c: Update.
3316         * windows-nat.c: Update.
3317
3318 2018-07-03  Tom Tromey  <tom@tromey.com>
3319
3320         * common/ptid.h (ptid_build): Don't declare.
3321         * common/ptid.c (ptid_build): Remove.
3322         * aix-thread.c: Update.
3323         * bsd-kvm.c: Update.
3324         * bsd-uthread.c: Update.
3325         * common/agent.c: Update.
3326         * common/ptid.c: Update.
3327         * common/ptid.h: Update.
3328         * corelow.c: Update.
3329         * darwin-nat.c: Update.
3330         * fbsd-nat.c: Update.
3331         * gnu-nat.c: Update.
3332         * linux-fork.c: Update.
3333         * linux-nat.c: Update.
3334         * linux-thread-db.c: Update.
3335         * nat/linux-osdata.c: Update.
3336         * nat/linux-procfs.c: Update.
3337         * nto-procfs.c: Update.
3338         * obsd-nat.c: Update.
3339         * proc-service.c: Update.
3340         * procfs.c: Update.
3341         * ravenscar-thread.c: Update.
3342         * remote-sim.c: Update.
3343         * remote.c: Update.
3344         * sol-thread.c: Update.
3345         * target.c: Update.
3346         * windows-nat.c: Update.
3347
3348 2018-07-03  Tom Tromey  <tom@tromey.com>
3349
3350         * infrun.c (follow_exec): Use exit_inferior_silent.
3351         * inferior.c (exit_inferior_num_silent): Remove.
3352         * inferior.h (exit_inferior_num_silent): Don't declare.
3353
3354 2018-07-03  Tom Tromey  <tom@tromey.com>
3355
3356         PR cli/23340:
3357         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3358         inferior_ptid on error.
3359
3360 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3361             Simon Marchi  <simon.marchi@polymtl.ca>
3362
3363         PR tdep/8282
3364         * disasm.h (gdb_disassembler): Add
3365         `m_disassembler_options_holder'. member
3366         * disasm.c (get_all_disassembler_options): New function.
3367         (gdb_disassembler::gdb_disassembler): Use it.
3368         (gdb_buffered_insn_length_init_dis): Likewise.
3369         (gdb_buffered_insn_length): Adjust accordingly.
3370         (set_disassembler_options): Handle options with arguments.
3371         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3372         line if showing options with descriptions.
3373         (disassembler_options_completer): Adapt to using the
3374         `disasm_options_and_args_t' structure.
3375         * mips-tdep.c (mips_disassembler_options): New variable.
3376         (mips_disassembler_options_o32): Likewise.
3377         (mips_disassembler_options_n32): Likewise.
3378         (mips_disassembler_options_n64): Likewise.
3379         (gdb_print_insn_mips): Don't set `disassembler_options'.
3380         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3381         functions.
3382         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3383         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3384         `gdbarch_disassembler_options_implicit' and
3385         `gdbarch_valid_disassembler_options'.
3386         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3387         `disasm_options_and_args_t' structure.
3388         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3389         method.
3390         (valid_disassembler_options): Switch from `disasm_options_t' to
3391         the `disasm_options_and_args_t' structure.
3392         * NEWS: Document `set disassembler-options' support for the MIPS
3393         target.
3394         * gdbarch.h: Regenerate.
3395         * gdbarch.c: Regenerate.
3396
3397 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3398
3399         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3400
3401 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3402
3403         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3404         parameter in call to amd64_target_description.
3405         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3406         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3407         (amd64fbsd_init_abi): Likewise.
3408         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3409         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3410         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3411         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3412
3413 2018-06-29  Pedro Alves  <palves@redhat.com>
3414
3415         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3416         "segments" parameter.
3417         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3418         (_initialize_amd64_tdep): Update call to
3419         amd64_create_target_description.
3420         (amd64_target_description): Add "segments" parameter.  Adjust
3421         the implementation to use it.
3422         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3423         call to amd64_create_target_description.
3424         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3425         * gdb/arch/amd64.h (amd64_create_target_description): Add
3426         "segments" register.
3427         * gdb/arch/amd64.c (amd64_create_target_description): Add
3428         "segments" parameter.  Call create_feature_i386_64bit_segments
3429         only if SEGMENTS is true.
3430         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3431         call to amd64_create_target_description.
3432
3433 2018-06-29  Pedro Alves  <palves@redhat.com>
3434
3435         * thread.c (thread_target_id_str): New, factored out from ...
3436         (print_thread_info_1): ... here.  Use it to compute the max
3437         "Target Id" column width.
3438
3439 2018-06-29  Pedro Alves  <palves@redhat.com>
3440
3441         * remote.c (remote_target::extra_thread_info): Delete
3442         'display_buf' and 'n' locals.  from the cache, regardless of
3443         packet mechanims is in use.  Use cache for qThreadExtra and qP
3444         methods too.
3445
3446 2018-06-29  Pedro Alves  <palves@redhat.com>
3447
3448         * blockframe.c (find_pc_sect_containing_function): New function.
3449         * breakpoint.c (print_breakpoint_location): Don't call
3450         find_pc_sect_function.
3451         * linespec.c (create_sals_line_offset): Record the location's
3452         symbol in the sal.
3453         * linespec.c (convert_address_location_to_sals): Fill in sal's
3454         symbol with find_pc_sect_containing_function.
3455         * symtab.c (find_function_start_sal): Rename to ...
3456         (find_function_start_sal_1): ... this.
3457         (find_function_start_sal): Reimplement as wrapper around
3458         find_function_start_sal_1, and use
3459         find_pc_sect_containing_function to fill in the sal's symbol.
3460         (find_function_start_sal(symbol*, bool)): Adjust.
3461         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3462         comments.
3463         (find_pc_sect_containing_function): Declare.
3464
3465 2018-06-29  Pedro Alves  <palves@redhat.com>
3466
3467         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3468         true if the the location has no symbol.
3469
3470 2018-06-28  Tom Tromey  <tom@tromey.com>
3471
3472         * NEWS: Mention --enable-codesign.
3473         * silent-rules.mk (ECHO_SIGN): New variable.
3474         * configure.ac: Add --enable-codesign.
3475         * configure: Rebuild.
3476         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3477         (gdb$(EXEEXT)): Optionally invoke codesign.
3478
3479 2018-06-28  Pedro Alves  <palves@redhat.com>
3480
3481         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3482         comments.
3483         (switch_to_thread_no_regs): Adjust comment.
3484         * infcmd.c (stop_pc): Delete.
3485         (post_create_inferior, info_program_command): Replace references
3486         to stop_pc with references to thread_info->suspend.stop_pc.
3487         * inferior.h (stop_pc): Delete declaration.
3488         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3489         (handle_inferior_event_1, handle_signal_stop)
3490         (process_event_stop_test, keep_going_stepped_thread)
3491         (handle_step_into_function, handle_step_into_function_backward)
3492         (print_stop_location): Replace references to stop_pc with
3493         references to thread_info->suspend.stop_pc.
3494         (struct infcall_suspend_state) <stop_pc>: Delete field.
3495         (save_infcall_suspend_state, restore_infcall_suspend_state):
3496         Remove references to inf_stat->stop_pc.
3497         * linux-fork.c (fork_load_infrun_state): Likewise.
3498         * record-btrace.c (record_btrace_set_replay): Likewise.
3499         * record-full.c (record_full_goto_entry): Likewise.
3500         * remote.c (print_one_stopped_thread): Likewise.
3501         * target.c (target_resume): Extend comment.
3502         * thread.c (set_executing_thread): New.
3503         (set_executing): Use it.
3504         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3505         Remove references to stop_pc.
3506
3507 2018-06-28  Pedro Alves  <palves@redhat.com>
3508
3509         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3510         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3511
3512 2018-06-28  Tom Tromey  <tom@tromey.com>
3513
3514         * coffread.c (coff_symfile_finish): Update.
3515         * xcoffread.c (xcoff_symfile_finish): Update.
3516         * elfread.c (elf_symfile_finish): Update.
3517         * symfile.h (dwarf2_free_objfile): Don't declare.
3518         * dwarf2read.c (_initialize_dwarf2_read): Use
3519         register_objfile_data_with_cleanup.
3520         (dwarf2_free_objfile): Now static.  Change signature.
3521
3522 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3523
3524         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3525         option "-o" to add-symbol-file-load to add an offset to each
3526         section's load address.
3527         * symfile.c (set_objfile_default_section_offset): New function.
3528
3529 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3530
3531         * symfile.c (add_symbol_file_command): Make sure that sections
3532         with the same name are sorted in the same order.
3533
3534 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3535
3536         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3537         require the second argument.  If omitted, load sections at the
3538         addresses specified in the file.
3539
3540 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3541
3542         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3543         (_initialize_symfile): Add option "-o" to symbol-file to add an
3544         offset to each section of the symbol file.
3545
3546 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3547
3548         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3549
3550 2018-06-27  Tom Tromey  <tom@tromey.com>
3551
3552         * stack.c (_initialize_stack): Update "func" help text.
3553
3554 2018-06-27  Tom Tromey  <tom@tromey.com>
3555
3556         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3557         std::vector.
3558         (unwind_infopy_str, pyuw_create_unwind_info)
3559         (unwind_infopy_add_saved_register, pyuw_sniffer)
3560         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3561         Update.
3562         (struct saved_reg): Add constructor.
3563         <value>: Now a gdbpy_ref<>.
3564
3565 2018-06-27  Tom Tromey  <tom@tromey.com>
3566
3567         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3568
3569 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3570
3571         * gdb-gdb.py.in: Format using autopep8.
3572
3573 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3574
3575         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3576         (type_lookup_function): Recognize CORE_ADDR values.
3577
3578 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3579
3580         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3581         print tag_name.
3582
3583 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3584
3585         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3586         <__lt__>: Add.
3587
3588 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3589
3590         * gdb-gdb.py: Move to...
3591         * gdb-gdb.py.in: ... here.
3592         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3593         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3594         dependencies.
3595         (distclean): Remove gdb-gdb.py when cleaning.
3596         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3597         * configure: Re-generate.
3598
3599 2018-06-27  Pedro Alves  <palves@redhat.com>
3600
3601         * proc-service.c (get_ps_regcache): New.
3602         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3603         (ps_lsetfpregs): Use it.
3604
3605 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3606
3607         PR gdb/21695
3608         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3609         (dwarf_decode_lines_1): Adjust.
3610
3611 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3612
3613         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3614         override.
3615         <info_proc>: Likewise.
3616
3617 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3618
3619         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3620         to windows_fetch_one_register, and only handle the case of
3621         fetching one register.  Move the code that reloads the context
3622         and iterates over all registers if R is negative to...
3623         (windows_nat_target::fetch_registers): ... here.
3624         (do_windows_store_inferior_registers): Rename to
3625         windows_store_one_register, and only handle the case of storing
3626         one register.  Move the code that handles the case where r is
3627         negative to...
3628         (windows_nat_target::store_registers) ... here.
3629
3630 2018-06-26  Tom Tromey  <tom@tromey.com>
3631
3632         PR rust/22574:
3633         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3634         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3635         Update.
3636         (rust_internal_print_type): Add podata parameter.
3637         (rust_print_type): Update.
3638
3639 2018-06-26  Tom Tromey  <tom@tromey.com>
3640
3641         * typeprint.h (struct print_offset_data) <update, finish,
3642         maybe_print_hole>: New methods.
3643         <indentation>: New constant.
3644         * typeprint.c (print_offset_data::indentation): Define.
3645         (print_offset_data::maybe_print_hole, print_offset_data::update)
3646         (print_offset_data::finish): Move from c-typeprint.c and rename.
3647         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3648         (print_spaces_filtered_with_print_options): Update.
3649         (c_print_type_union_field_offset, maybe_print_hole)
3650         (c_print_type_struct_field_offset): Move to typeprint.c and
3651         rename.
3652         (c_type_print_base_struct_union): Update.
3653
3654 2018-06-25  Pedro Alves  <palves@redhat.com>
3655
3656         * gdbthread.h (thread_info_ref, delete_thread)
3657         (delete_thread_silent, first_thread_of_inferior)
3658         (any_thread_of_inferior, switch_to_thread)
3659         (enable_thread_stack_temporaries)
3660         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3661         (get_last_thread_stack_temporary)
3662         (value_in_thread_stack_temporaries, can_access_registers_thread):
3663         Spell out "struct thread_info" instead of just "thread_info".
3664         * inferior.h (notice_new_inferior): Likewise.
3665
3666 2018-06-25  Pedro Alves  <palves@redhat.com>
3667
3668         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3669         pass thread_info pointer to delete_thread.
3670         (windows_nat_target::detach): Pass inferior pointer to
3671         detach_inferior.
3672         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3673         delete_thread.
3674         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3675         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3676         and pass a thread_info pointer to delete_thread.
3677         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3678         pass thread_info pointer to delete_thread.
3679         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3680         delete_thread_silent call.
3681         * procfs.c (procfs_target::detach): Pass inferior pointer to
3682         detach_inferior.
3683         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3684         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3685         delete_thread_silent call.
3686         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3687         pass thread_info pointer to delete_thread.
3688         (windows_nat_target::detach): Pass inferior pointer to
3689         delete_inferior.
3690
3691 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3692
3693         * regcache.c (readable_regcache::read_part): Fix asserts.
3694         (reg_buffer::raw_collect_part): New function.
3695         (regcache::write_part): Fix asserts.
3696         (reg_buffer::raw_supply_part): New function.
3697         (regcache::transfer_regset_register): New helper function.
3698         (regcache::transfer_regset): Call new functions.
3699         (regcache_supply_regset): Use gdb_byte*.
3700         (regcache::supply_regset): Likewise.
3701         (regcache_collect_regset): Likewise.
3702         (regcache::collect_regset): Likewise.
3703         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3704         (reg_buffer::raw_supply_part): Likewise.
3705         (regcache::transfer_regset_register): Likewise.
3706         (regcache::transfer_regset): Use gdb_byte*.
3707
3708 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3709
3710         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3711
3712 2018-06-21  Pedro Alves  <palves@redhat.com>
3713
3714         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3715         instead of a ptid_t.  All callers adjusted.
3716         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3717         adjusted.
3718         (print_ada_task_info, display_current_task_id, task_command_1):
3719         Adjust.
3720         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3721         inferior_thread.
3722         (breakpoint_kind): Adjust.
3723         (remove_breakpoints_pid): Rename to ...
3724         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3725         pointer.  All callers adjusted.
3726         (bpstat_clear_actions): Use inferior_thread.
3727         (get_bpstat_thread): New.
3728         (bpstat_do_actions): Use it.
3729         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3730         to take a thread_info pointer.  All callers adjusted.
3731         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3732         (breakpoint_re_set_thread): Use inferior_thread.
3733         * breakpoint.h (struct inferior): Forward declare.
3734         (bpstat_stop_status): Update.
3735         (remove_breakpoints_pid): Delete.
3736         (remove_breakpoints_inf): New.
3737         * bsd-uthread.c (bsd_uthread_target::wait)
3738         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3739         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3740         (maint_btrace_packet_history_cmd)
3741         (maint_btrace_clear_packet_history_cmd): Adjust.
3742         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3743         inferior_thread.
3744         * cli/cli-interp.c: Include "inferior.h".
3745         * common/refcounted-object.h (struct
3746         refcounted_object_ref_policy): New.
3747         * compile/compile-object-load.c: Include gdbthread.h.
3748         (store_regs): Use inferior_thread.
3749         * corelow.c (core_target::close): Use current_inferior.
3750         (core_target_open): Adjust to use first_thread_of_inferior and use
3751         the current inferior.
3752         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3753         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3754         <thread>: ... this new field.  All references adjusted.
3755         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3756         Take a thread_info pointer instead of a ptid_t.
3757         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3758         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3759         thread_info pointer instead of a ptid_t.
3760         * elfread.c: Include "inferior.h".
3761         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3762         Use inferior_thread.
3763         * eval.c (evaluate_subexp): Likewise.
3764         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3765         inferior_thread.
3766         * gdb_proc_service.h (struct thread_info): Forward declare.
3767         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3768         <thread>: ... this new field.  All references adjusted.
3769         * gdbarch.h, gdbarch.c: Regenerate.
3770         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3771         'thread' parameter.  All implementations and callers adjusted.
3772         * gdbthread.h (thread_info) <set_running>: New method.
3773         (delete_thread, delete_thread_silent): Take a thread_info pointer
3774         instead of a ptid.
3775         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3776         (first_thread_of_process): Delete, replaced by ...
3777         (first_thread_of_inferior): ... this new function.  All callers
3778         adjusted.
3779         (any_live_thread_of_process): Delete, replaced by ...
3780         (any_live_thread_of_inferior): ... this new function.  All callers
3781         adjusted.
3782         (switch_to_thread, switch_to_no_thread): Declare.
3783         (is_executing): Delete.
3784         (enable_thread_stack_temporaries): Update comment.
3785         <enable_thread_stack_temporaries>: Take a thread_info pointer
3786         instead of a ptid_t.  Incref the thread.
3787         <~enable_thread_stack_temporaries>: Decref the thread.
3788         <m_ptid>: Delete
3789         <m_thr>: New.
3790         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3791         (get_last_thread_stack_temporary)
3792         (value_in_thread_stack_temporaries, can_access_registers_thread):
3793         Take a thread_info pointer instead of a ptid_t.  All callers
3794         adjusted.
3795         * infcall.c (get_call_return_value): Use inferior_thread.
3796         (run_inferior_call): Work with thread pointers instead of ptid_t.
3797         (call_function_by_hand_dummy): Work with thread pointers instead
3798         of ptid_t.  Use thread_info_ref.
3799         * infcmd.c (proceed_thread_callback): Access thread's state
3800         directly.
3801         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3802         access thread's state directly.
3803         (continue_command): Use inferior_thread.
3804         (info_program_command): Use find_thread_ptid and access thread
3805         state directly.
3806         (proceed_after_attach_callback): Use thread state directly.
3807         (notice_new_inferior): Take a thread_info pointer instead of a
3808         ptid_t.  All callers adjusted.
3809         (exit_inferior): Take an inferior pointer instead of a pid.  All
3810         callers adjusted.
3811         (exit_inferior_silent): New.
3812         (detach_inferior): Delete.
3813         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3814         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3815         (detach_inferior_command, kill_inferior_command): Use
3816         find_inferior_id instead of valid_gdb_inferior_id and
3817         gdb_inferior_id_to_pid.
3818         (inferior_command): Use inferior and thread pointers.
3819         * inferior.h (struct thread_info): Forward declare.
3820         (notice_new_inferior): Take a thread_info pointer instead of a
3821         ptid_t.  All callers adjusted.
3822         (detach_inferior): Delete declaration.
3823         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3824         instead of a pid.  All callers adjusted.
3825         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3826         (valid_gdb_inferior_id): Delete.
3827         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3828         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3829         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3830         ...
3831         <inf>: ... this new field.
3832         <step_ptid>: Delete, replaced by ...
3833         <step_thread>: ... this new field.
3834         (get_displaced_stepping_state): Take an inferior pointer instead
3835         of a pid.  All callers adjusted.
3836         (displaced_step_in_progress_any_inferior): Adjust.
3837         (displaced_step_in_progress_thread): Take a thread pointer instead
3838         of a ptid_t.  All callers adjusted.
3839         (displaced_step_in_progress, add_displaced_stepping_state): Take
3840         an inferior pointer instead of a pid.  All callers adjusted.
3841         (get_displaced_step_closure_by_addr): Adjust.
3842         (remove_displaced_stepping_state): Take an inferior pointer
3843         instead of a pid.  All callers adjusted.
3844         (displaced_step_prepare_throw, displaced_step_prepare)
3845         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3846         All callers adjusted.
3847         (start_step_over): Adjust.
3848         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3849         displaced step queue.
3850         (do_target_resume): Adjust.
3851         (fetch_inferior_event): Use inferior_thread.
3852         (context_switch, get_inferior_stop_soon): Take an
3853         execution_control_state pointer instead of a ptid_t.  All callers
3854         adjusted.
3855         (switch_to_thread_cleanup): Delete.
3856         (stop_all_threads): Use scoped_restore_current_thread.
3857         * inline-frame.c: Include "gdbthread.h".
3858         (inline_state) <inline_state>: Take a thread pointer instead of a
3859         ptid_t.  All callers adjusted.
3860         <ptid>: Delete, replaced by ...
3861         <thread>: ... this new field.
3862         (find_inline_frame_state): Take a thread pointer instead of a
3863         ptid_t.  All callers adjusted.
3864         (skip_inline_frames, step_into_inline_frame)
3865         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3866         pointer instead of a ptid_t.  All callers adjusted.
3867         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3868         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3869         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3870         pointers directly.
3871         * linux-nat.c (get_detach_signal): Likewise.
3872         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3873         (thread_db_notice_clone): Adjust.
3874         (thread_db_find_new_threads_silently)
3875         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3876         a thread pointer instead of a ptid_t.  All callers adjusted.
3877         * mi/mi-cmd-var.c: Include "inferior.h".
3878         (mi_cmd_var_update_iter): Update to use thread pointers.
3879         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3880         inferior directly.
3881         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3882         out to ...
3883         (mi_output_running): ... this new function.
3884         (mi_on_resume_1): Adjust to use it.
3885         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3886         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3887         directly.
3888         (interrupt_thread_callback): : Adjust to use thread and inferior
3889         pointers.
3890         * proc-service.c: Include "gdbthread.h".
3891         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3892         * progspace-and-thread.c: Include "inferior.h".
3893         * progspace.c: Include "inferior.h".
3894         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3895         hold a reference to an inferior_object.
3896         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3897         inferior_thread.
3898         * python/py-inferior.c (struct inferior_object): Give the type a
3899         tag name instead of a typedef.
3900         (python_on_normal_stop): No need to check if the current thread is
3901         listed.
3902         (inferior_to_inferior_object): Change return type to
3903         inferior_object.  All callers adjusted.
3904         (find_thread_object): Delete, bits factored out to ...
3905         (thread_to_thread_object): ... this new function.
3906         * python/py-infthread.c (create_thread_object): Use
3907         inferior_to_inferior_object.
3908         (thpy_is_stopped): Use thread pointer directly.
3909         (gdbpy_selected_thread): Use inferior_thread.
3910         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3911         field, replaced with ...
3912         <thread>: ... this new field.  All users adjusted.
3913         (btpy_insn_or_gap_new): Drop const.
3914         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3915         callers adjusted.
3916         * python/py-record.c: Include "gdbthread.h".
3917         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3918         a ptid_t.  All callers adjusted.
3919         (gdbpy_current_recording): Use inferior_thread.
3920         * python/py-record.h (recpy_record_object) <ptid>: Delete
3921         field, replaced with ...
3922         <thread>: ... this new field.  All users adjusted.
3923         (recpy_element_object) <ptid>: Delete
3924         field, replaced with ...
3925         <thread>: ... this new field.  All users adjusted.
3926         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3927         a ptid_t.  All callers adjusted.
3928         * python/py-threadevent.c: Include "gdbthread.h".
3929         (get_event_thread): Use thread_to_thread_object.
3930         * python/python-internal.h (struct inferior_object): Forward
3931         declare.
3932         (find_thread_object, find_inferior_object): Delete declarations.
3933         (thread_to_thread_object, inferior_to_inferior_object): New
3934         declarations.
3935         * record-btrace.c: Include "inferior.h".
3936         (require_btrace_thread): Use inferior_thread.
3937         (record_btrace_frame_sniffer)
3938         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3939         (get_thread_current_frame): Use scoped_restore_current_thread and
3940         switch_to_thread.
3941         (get_thread_current_frame): Use thread pointer directly.
3942         (record_btrace_replay_at_breakpoint): Use thread's inferior
3943         pointer directly.
3944         * record-full.c: Include "inferior.h".
3945         * regcache.c: Include "gdbthread.h".
3946         (get_thread_arch_regcache): Use the inferior's address space
3947         directly.
3948         (get_thread_regcache, registers_changed_thread): New.
3949         * regcache.h (get_thread_regcache(thread_info *thread)): New
3950         overload.
3951         (registers_changed_thread): New.
3952         (remote_target) <remote_detach_1>: Swap order of parameters.
3953         (remote_add_thread): <remote_add_thread>: Return the new thread.
3954         (get_remote_thread_info(ptid_t)): New overload.
3955         (remote_target::remote_notice_new_inferior): Use thread pointers
3956         directly.
3957         (remote_target::process_initial_stop_replies): Use
3958         thread_info::set_running.
3959         (remote_target::remote_detach_1, remote_target::detach)
3960         (extended_remote_target::detach): Adjust.
3961         * stack.c (frame_show_address): Use inferior_thread.
3962         * target-debug.h (target_debug_print_thread_info_pp): New.
3963         * target-delegates.c: Regenerate.
3964         * target.c (default_thread_address_space): Delete.
3965         (memory_xfer_partial_1): Use current_inferior.
3966         (target_detach): Use current_inferior.
3967         (target_thread_address_space): Delete.
3968         (generic_mourn_inferior): Use current_inferior.
3969         * target.h (struct target_ops) <thread_address_space>: Delete.
3970         (target_thread_address_space): Delete.
3971         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
3972         pointers directly.
3973         (delete_thread_1, delete_thread, delete_thread_silent): Take a
3974         thread pointer instead of a ptid_t.  Adjust all callers.
3975         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3976         (first_thread_of_process): Delete, replaced by ...
3977         (first_thread_of_inferior): ... this new function.  All callers
3978         adjusted.
3979         (any_thread_of_process): Rename to ...
3980         (any_thread_of_inferior): ... this, and take an inferior pointer.
3981         (any_live_thread_of_process): Rename to ...
3982         (any_live_thread_of_inferior): ... this, and take an inferior
3983         pointer.
3984         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3985         (value_in_thread_stack_temporaries)
3986         (get_last_thread_stack_temporary): Take a thread pointer instead
3987         of a ptid_t.  Adjust all callers.
3988         (thread_info::set_running): New.
3989         (validate_registers_access): Use inferior_thread.
3990         (can_access_registers_ptid): Rename to ...
3991         (can_access_registers_thread): ... this, and take a thread
3992         pointer.
3993         (print_thread_info_1): Adjust to compare thread pointers instead
3994         of ptids.
3995         (switch_to_no_thread, switch_to_thread): Make extern.
3996         (scoped_restore_current_thread::~scoped_restore_current_thread):
3997         Use m_thread pointer directly.
3998         (scoped_restore_current_thread::scoped_restore_current_thread):
3999         Use inferior_thread.
4000         (thread_command): Use thread pointer directly.
4001         (thread_num_make_value_helper): Use inferior_thread.
4002         * top.c (execute_command): Use inferior_thread.
4003         * tui/tui-interp.c: Include "inferior.h".
4004         * varobj.c (varobj_create): Use inferior_thread.
4005         (value_of_root_1): Use find_thread_global_id instead of
4006         global_thread_id_to_ptid.
4007
4008 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4009
4010         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4011         possible.
4012         (regcache::write_part): Likewise.
4013         (readable_regcache::cooked_read_part): Update comment.
4014         (readable_regcache::cooked_write_part): Likewise.
4015         * regcache.h: (readable_regcache::read_part): Likewise.
4016         (regcache::write_part): Likewise.
4017
4018 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4019             Dirk Schubert  <dirk.schubert@arm.com>
4020
4021         * aarch64-linux-nat.c (post_attach): New.
4022         (aarch64_linux_nat_target::post_attach): Override post_attach to
4023         record the number of hardware debug registers.
4024
4025 2018-06-20  Tom Tromey  <tom@tromey.com>
4026
4027         * python/py-param.c (add_setshow_generic): Make parameters const.
4028         (parmpy_init): Update.
4029
4030 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4031
4032         * regcache.h (regcache_cooked_read_ftype): Rename to...
4033         (register_read_ftype): ...this, change type to function_view.
4034         (class reg_buffer) <save>: Remove src parameter.
4035         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4036         parameter non-const in first overload.  Remove src parameter in
4037         second overload.
4038         * regcache.c (do_cooked_read): Remove.
4039         (readonly_detached_regcache::readonly_detached_regcache): Make
4040         parameter non-const, adjust call to other constructor.
4041         (reg_buffer::save): Remove src parameter.
4042         * frame.c (do_frame_register_read): Remove.
4043         (frame_save_as_regcache): Use lambda function.
4044         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4045         parameter to ppu2spu_data *.
4046         (ppu2spu_sniffer): Use lambda function.
4047
4048 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4049
4050         * record-full.c (record_full_target::insert_breakpoint): Remove
4051         "struct" keyword, add const.
4052
4053 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4054
4055         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4056         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4057         * configure.ac: Remove AC_PREREQ, add missing quoting.
4058         * gnulib/configure.ac: Modernize usage of
4059         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4060         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4061         (AUTOMAKE_VERSION): Bump to 1.15.1.
4062         * configure: Re-generate.
4063         * config.in: Re-generate.
4064         * aclocal.m4: Re-generate.
4065         * gnulib/aclocal.m4: Re-generate.
4066         * gnulib/config.in: Re-generate.
4067         * gnulib/configure: Re-generate.
4068         * gnulib/import/Makefile.in: Re-generate.
4069
4070 2018-06-19  Pedro Alves  <palves@redhat.com>
4071
4072         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4073         (lookup_minimal_symbol_by_pc_section): ... here with
4074         gdb_assert_not_reached added.
4075
4076 2018-06-19  Pedro Alves  <palves@redhat.com>
4077
4078         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4079         parameter with a block parameter.  Compare location's block symbol
4080         with the frame's block instead of addresses.
4081         (skip_inline_frames): Pass the current block instead of the
4082         frame's address.  Break out as soon as we determine the frame
4083         should not be skipped.
4084
4085 2018-06-18  Tom Tromey  <tom@tromey.com>
4086
4087         * solib-aix.c (solib_aix_get_section_offsets): Return
4088         unique_xmalloc_ptr.
4089         (solib_aix_solib_create_inferior_hook): Update.
4090
4091 2018-06-18  Tom Tromey  <tom@tromey.com>
4092
4093         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4094
4095 2018-06-18  Tom Tromey  <tom@tromey.com>
4096
4097         * solib-frv.c (frv_relocate_main_executable): Use
4098         unique_xmalloc_ptr.
4099         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4100         unique_xmalloc_ptr.
4101
4102 2018-06-18  Tom Tromey  <tom@tromey.com>
4103
4104         * objfiles.h (inhibit_section_map_updates): Update.
4105         (resume_section_map_updates, resume_section_map_updates_cleanup):
4106         Remove.
4107         * solib-svr4.c (svr4_handle_solib_event): Update.
4108         * objfiles.c (inhibit_section_map_updates): Return
4109         scoped_restore_tmpl<int>.
4110         (resume_section_map_updates, resume_section_map_updates_cleanup):
4111         Remove.
4112
4113 2018-06-18  Tom Tromey  <tom@tromey.com>
4114
4115         * valprint.h (read_string): Update.
4116         * valprint.c (read_string): Change type of "buffer".
4117         (val_print_string): Update.
4118         * python/py-value.c (valpy_string): Update.
4119         * language.h (struct language_defn) <la_get_string>: Change
4120         type of "buffer".
4121         (default_get_string, c_get_string): Update.
4122         * language.c (default_get_string): Change type of "buffer".
4123         * guile/scm-value.c (gdbscm_value_to_string): Update.
4124         * c-lang.c (c_get_string): Change type of "buffer".
4125
4126 2018-06-18  Tom Tromey  <tom@tromey.com>
4127
4128         * ser-mingw.c (struct pipe_state_destroyer): New.
4129         (pipe_state_up): New typedef.
4130         (cleanup_pipe_state): Remove.
4131         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4132
4133 2018-06-18  Tom Tromey  <tom@tromey.com>
4134
4135         * rust-lang.h (rust_yyerror): Don't declare.
4136         * rust-lang.c (rust_language_defn): Update.
4137         * rust-exp.y (yyerror): Now static.
4138         * parse.c (parse_exp_in_context_1): Update.
4139         * p-lang.h (p_yyerror): Don't declare.
4140         * p-lang.c (p_language_defn): Update.
4141         * p-exp.y (yyerror): Now static.
4142         * opencl-lang.c (opencl_language_defn): Update.
4143         * objc-lang.c (objc_language_defn): Update.
4144         * m2-lang.h (m2_yyerror): Don't declare.
4145         * m2-lang.c (m2_language_defn): Update.
4146         * m2-exp.y (yyerror): Now static.
4147         * language.h (struct language_defn) <la_error>: Remove.
4148         * language.c (unk_lang_error): Remove.
4149         (unknown_language_defn, auto_language_defn): Remove.
4150         * go-lang.h (go_yyerror): Don't declare.
4151         * go-lang.c (go_language_defn): Update.
4152         * go-exp.y (yyerror): Now static.
4153         * f-lang.h (f_yyerror): Don't declare.
4154         * f-lang.c (f_language_defn): Update.
4155         * f-exp.y (yyerror): Now static.
4156         * d-lang.h (d_yyerror): Don't declare.
4157         * d-lang.c (d_language_defn): Update.
4158         * d-exp.y (yyerror): Now static.
4159         * c-lang.h (c_yyerror): Don't declare.
4160         * c-lang.c (c_language_defn, cplus_language_defn)
4161         (asm_language_defn, minimal_language_defn): Update.
4162         * c-exp.y (yyerror): Now static.
4163         * ada-lang.h (ada_yyerror): Don't declare.
4164         * ada-lang.c (ada_language_defn): Update.
4165         * ada-exp.y (yyerror): Now static.
4166
4167 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4168
4169         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4170         (store_sveregs_to_thread): Likewise.
4171         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4172         (aarch64_linux_store_inferior_registers): Likewise.
4173         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4174         function.
4175         (aarch64_sve_regs_copy_to_regcache): Likewise.
4176         (aarch64_sve_regs_copy_from_regcache): Likewise.
4177         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4178         declaration.
4179         (aarch64_sve_regs_copy_to_regcache): Likewise.
4180         (aarch64_sve_regs_copy_from_regcache): Likewise.
4181         (sve_context): Structure from Linux headers.
4182         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4183         (SVE_SIG_ZREG_SIZE): Likewise.
4184         (SVE_SIG_PREG_SIZE): Likewise.
4185         (SVE_SIG_FFR_SIZE): Likewise.
4186         (SVE_SIG_REGS_OFFSET): Likewise.
4187         (SVE_SIG_ZREGS_OFFSET): Likewise.
4188         (SVE_SIG_ZREG_OFFSET): Likewise.
4189         (SVE_SIG_ZREGS_SIZE): Likewise.
4190         (SVE_SIG_PREGS_OFFSET): Likewise.
4191         (SVE_SIG_PREG_OFFSET): Likewise.
4192         (SVE_SIG_PREGS_SIZE): Likewise.
4193         (SVE_SIG_FFR_OFFSET): Likewise.
4194         (SVE_SIG_REGS_SIZE): Likewise.
4195         (SVE_SIG_CONTEXT_SIZE): Likewise.
4196         (SVE_PT_REGS_MASK): Likewise.
4197         (SVE_PT_REGS_FPSIMD): Likewise.
4198         (SVE_PT_REGS_SVE): Likewise.
4199         (SVE_PT_VL_INHERIT): Likewise.
4200         (SVE_PT_VL_ONEXEC): Likewise.
4201         (SVE_PT_REGS_OFFSET): Likewise.
4202         (SVE_PT_FPSIMD_OFFSET): Likewise.
4203         (SVE_PT_FPSIMD_SIZE): Likewise.
4204         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4205         (SVE_PT_SVE_PREG_SIZE): Likewise.
4206         (SVE_PT_SVE_FFR_SIZE): Likewise.
4207         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4208         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4209         (__SVE_SIG_TO_PT): Likewise.
4210         (SVE_PT_SVE_OFFSET): Likewise.
4211         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4212         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4213         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4214         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4215         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4216         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4217         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4218         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4219         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4220         (SVE_PT_SVE_SIZE): Likewise.
4221         (SVE_PT_SIZE): Likewise.
4222         (HAS_SVE_STATE): New define.
4223
4224 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4225
4226         * nat/aarch64-sve-linux-sigcontext.h: New file.
4227         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4228         new files.
4229         (SVE_VQ_MIN): Likewise.
4230         (SVE_VQ_MAX): Likewise.
4231         (SVE_VL_MIN): Likewise.
4232         (SVE_VL_MAX): Likewise.
4233         (SVE_NUM_ZREGS): Likewise.
4234         (SVE_NUM_PREGS): Likewise.
4235         (sve_vl_valid): Likewise.
4236         (struct user_sve_header): Likewise.
4237
4238 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4239             Richard Bunt <Richard.Bunt@arm.com>
4240
4241         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4242         was requested by GDB.
4243
4244 2018-06-15  Tom de Vries  <tdevries@suse.de>
4245
4246         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4247
4248 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4249
4250         * gnulib/update-gnulib.sh: Print expected versions of
4251         autoconf/aclocal.
4252
4253 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4254
4255         * arch-utils.c (default_type_align): Use type_length_units.
4256         * gdbtypes.c (type_align): Use type_length_units.
4257
4258 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4259
4260         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4261         of 'define' command.
4262
4263 2018-06-14  Tom de Vries  <tdevries@suse.de>
4264
4265         PR cli/22573
4266         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4267         get_no_prettyformat_print_options.
4268
4269 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4270
4271         * sparc-nat.h: Include target.h.
4272         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4273         <fetch_registers>: Remove this argument in function call.
4274         <store_registers>: Remove this argument in function call, remove
4275         extra semicolon.
4276         <low_forget_process>: Call sparc64_forget_process instead of
4277         sparc_forget_process.
4278
4279 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4280
4281         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4282         (procfs_target::make_corefile_notes): Adjust to new
4283         target_read_alloc return type.
4284
4285 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4286             Stephen Roberts  <stephen.roberts@arm.com>
4287
4288         PR gdb/22882
4289         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4290         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4291         Move should_notify_stop local into more inner scope.
4292
4293 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4294             Stephen Roberts  <stephen.roberts@arm.com>
4295
4296         PR gdb/22882
4297         * infrun.c (resume_1): Add call to mark_async_event_handler.
4298
4299 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4300
4301         * infrun.c (do_target_wait): Change old version of $pc printed.
4302
4303 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4304
4305         * dwarf2read.c (read_index_from_section): Rename to...
4306         (read_gdb_index_from_section): ... this, update all callers.
4307         (dwarf2_read_index): Rename to...
4308         (dwarf2_read_gdb_index): ... this, update all callers.
4309
4310 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4311
4312         * gdb/hppa-linux-nat.c
4313         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4314         hppa_linux_nat_target::fetch_registers.
4315
4316 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4317
4318         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4319         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4320         (AARCH64_DWARF_SVE_FFR): Likewise.
4321         (AARCH64_DWARF_SVE_P0): Likewise.
4322         (AARCH64_DWARF_SVE_Z0): Likewise.
4323
4324 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4325
4326         * common/common-regcache.h (raw_compare): New function.
4327         * regcache.c (regcache::raw_compare): Likewise.
4328         * regcache.h (regcache::raw_compare): New declaration.
4329
4330 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4331
4332         * common/common-regcache.h (reg_buffer_common): New structure.
4333         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4334         (reg_buffer::raw_supply): Likewise.
4335         (reg_buffer::raw_supply_integer): Likewise.
4336         (reg_buffer::raw_supply_zeroed): Likewise.
4337         (reg_buffer::raw_collect): Likewise.
4338         (reg_buffer::raw_collect_integer): Likewise.
4339         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4340         (reg_buffer::raw_supply): Likewise.
4341         (reg_buffer::raw_supply_integer): Likewise.
4342         (reg_buffer::raw_supply_zeroed): Likewise.
4343         (reg_buffer::raw_collect): Likewise.
4344         (reg_buffer::raw_collect_integer): Likewise.
4345
4346 2018-06-10  Tom Tromey  <tom@tromey.com>
4347
4348         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4349         (class remote_state) <stop_reply_queue>: Now std::vector.
4350         (remote_state::~remote_state)
4351         (remote_target::stop_reply_queue_length): Update.
4352         (struct queue_iter_param, remove_child_of_pending_fork)
4353         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4354         (check_pending_event_prevents_wildcard_vcont_callback)
4355         (remove_stop_reply_for_inferior)
4356         (remove_stop_reply_of_remote_state)
4357         (remote_notif_remove_once_on_match)
4358         (stop_reply_match_ptid_and_ws)
4359         (remote_kill_child_of_pending_fork): Remove.
4360         (remote_target::remove_new_fork_children)
4361         (remote_target::check_pending_events_prevent_wildcard_vcont)
4362         (remote_target::discard_pending_stop_replies)
4363         (remote_target::discard_pending_stop_replies_in_queue)
4364         (remote_target::remote_notif_remove_queued_reply)
4365         (remote_target::queued_stop_reply)
4366         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4367         (remote_target::wait, remote_target::kill_new_fork_children)
4368         (remote_target::async): Update.
4369
4370 2018-06-10  Tom Tromey  <tom@tromey.com>
4371
4372         * record-full.c (record_full_arch_list_cleanups): Remove.
4373         (record_full_message): Use try/catch.
4374         (record_full_wait_cleanups): Remove.
4375         (record_full_wait_1): Use try/catch.
4376         (record_full_restore): Likewise.
4377
4378 2018-06-10  Tom Tromey  <tom@tromey.com>
4379
4380         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4381         declare VEC.  Add constructor.
4382         <in_target_beneath>: Now bool.
4383         (record_full_breakpoints): Now a std::vector, static.
4384         (record_full_sync_record_breakpoints)
4385         (record_full_init_record_breakpoints)
4386         (record_full_target::insert_breakpoint)
4387         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4388
4389 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4390
4391         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4392         * serial.c (serial_interface_lookup): Remove struct keyword.
4393
4394 2018-06-10  Tom Tromey  <tom@tromey.com>
4395
4396         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4397         method.
4398         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4399         a method.
4400         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4401         method.
4402         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4403         "beneath" as a method.
4404         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4405         Use "beneath" as a method.
4406
4407 2018-06-10  Tom Tromey  <tom@tromey.com>
4408
4409         * tracefile.c (struct trace_file_writer_deleter): New.
4410         <operator()>: Rename from trace_file_writer_xfree.
4411         (trace_file_writer_up): New typedef.
4412         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4413
4414 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4415
4416         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4417         <m_registers, m_register_status>: Change type to
4418         std::unique_ptr.
4419         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4420         XCNEWVEC.
4421
4422 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4423
4424         * common/common-regcache.h (enum register_status): Add
4425         underlying type "signed char".
4426         * regcache.h (reg_buffer) <m_register_status>: Change type to
4427         register_status *.
4428         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4429         register_status instead of signed char.
4430         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4431         (reg_buffer::get_register_status): Remove cast.
4432         (readable_regcache::raw_read): Remove cast.
4433         (readable_regcache::cooked_read): Remove cast.
4434
4435 2018-06-09  Tom Tromey  <tom@tromey.com>
4436
4437         * source.c (reverse_search_command, forward_search_command): Use
4438         scoped_fd.
4439
4440 2018-06-09  Tom Tromey  <tom@tromey.com>
4441
4442         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4443         (serial_ops_list): Now static, std::vector.
4444         (serial_interface_lookup, serial_add_interface): Update.
4445
4446 2018-06-09  Tom Tromey  <tom@tromey.com>
4447
4448         * dwarf2read.c (process_cu_includes): Update.
4449         (process_full_comp_unit): Update.
4450         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4451         std::vector.
4452
4453 2018-06-08  Paul Koning  <paul_koning@dell.com>
4454
4455         PR gdb/23252
4456
4457         * python/python.c (do_start_initialization):
4458         Avoid call to internal Python API.
4459         (init__gdb_module): New function.
4460
4461 2018-06-08  Gary Benson <gbenson@redhat.com>
4462
4463         * linux-thread-db.c (valprint.h): New include.
4464         (struct check_thread_db_info): New structure.
4465         (check_thread_db_on_load, tdb_testinfo): New static globals.
4466         (check_thread_db, check_thread_db_callback): New functions.
4467         (try_thread_db_load_1): Run integrity checks if requested.
4468         (maintenance_check_libthread_db): New function.
4469         (_initialize_thread_db): Register "maint check libthread-db"
4470         and "maint set/show check-libthread-db".
4471         * NEWS: Mention the above new commands.
4472
4473 2018-06-08  Tom Tromey  <tom@tromey.com>
4474
4475         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4476         now a method.
4477
4478 2018-06-08  Tom Tromey  <tom@tromey.com>
4479
4480         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4481
4482 2018-06-08  Tom Tromey  <tom@tromey.com>
4483
4484         * common/btrace-common.h (struct btrace_data): Add constructor,
4485         destructor, move assignment operator.
4486         <empty, clear, fini>: New methods.
4487         <format>: Initialize.
4488         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4489         (btrace_data_empty): Don't declare.
4490         * common/btrace-common.c (btrace_data_init): Remove.
4491         (btrace_data::fini): Rename from btrace_data_fini.
4492         (btrace_data::empty): Rename from btrace_data_empty.
4493         (btrace_data::clear): Rename from btrace_data_clear.  Return
4494         bool.
4495         * btrace.h (make_cleanup_btrace_data): Don't declare.
4496         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4497         (parse_xml_btrace): Update.
4498         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4499         (maint_btrace_clear_packet_history_cmd): Update.
4500
4501 2018-06-07  Pedro Alves  <palves@redhat.com>
4502
4503         * target.h (target_ops) <beneath>: Now a method.  All references
4504         updated.
4505         (class target_stack): New.
4506         * target.c (g_target_stack): New.
4507         (g_current_top_target): Delete.
4508         (current_top_target): Get the top target out of g_target_stack.
4509         (target_stack::push, target_stack::unpush): New.
4510         (push_target, unpush_target): Reimplement.
4511         (target_is_pushed): Reimplement in terms of g_target_stack.
4512         (target_ops::beneath, target_stack::find_beneath): New.
4513
4514 2018-06-07  Pedro Alves  <palves@redhat.com>
4515
4516         * target.h (find_target_beneath): Delete declaration.
4517         * target.c (find_target_beneath): Delete definition.
4518         * aix-thread.c: All callers of find_target_beneath adjusted to
4519         call target_ops::beneath instead.
4520         * bsd-uthread.c: Likewise.
4521         * linux-thread-db.c: Likewise.
4522         * ravenscar-thread.c: Likewise.
4523         * sol-thread.c: Likewise.
4524         * spu-multiarch.c: Likewise.
4525
4526 2018-06-07  Pedro Alves  <palves@redhat.com>
4527
4528         * target.h (target_ops) <beneath>: Now a method.  All references
4529         updated.
4530         (target_ops) <m_beneath>: New.
4531         * target.c (target_ops::beneath): New.
4532         * corelow.c: Adjust all references to target_ops::beneath.
4533         * linux-thread-db.c: Likewise.
4534         * make-target-delegates: Likewise.
4535         * record-btrace.c: Likewise.
4536         * record-full.c: Likewise.
4537         * remote.c: Likewise.
4538         * target.c: Likewise.
4539         * target-delegates.c: Regenerate.
4540
4541 2018-06-07  Pedro Alves  <palves@redhat.com>
4542
4543         * target.h (target_stack): Delete.
4544         (current_top_target): Declare function.
4545         * target.c (target_stack): Delete.
4546         (g_current_top_target): New.
4547         (current_top_target): New function.
4548         * auxv.c: Use current_top_target instead of target_stack
4549         throughout.
4550         * avr-tdep.c: Likewise.
4551         * breakpoint.c: Likewise.
4552         * corefile.c: Likewise.
4553         * elfread.c: Likewise.
4554         * eval.c: Likewise.
4555         * exceptions.c: Likewise.
4556         * frame.c: Likewise.
4557         * gdbarch-selftests.c: Likewise.
4558         * gnu-v3-abi.c: Likewise.
4559         * ia64-tdep.c: Likewise.
4560         * ia64-vms-tdep.c: Likewise.
4561         * infcall.c: Likewise.
4562         * infcmd.c: Likewise.
4563         * infrun.c: Likewise.
4564         * linespec.c: Likewise.
4565         * linux-tdep.c: Likewise.
4566         * minsyms.c: Likewise.
4567         * ppc-linux-nat.c: Likewise.
4568         * ppc-linux-tdep.c: Likewise.
4569         * procfs.c: Likewise.
4570         * regcache.c: Likewise.
4571         * remote.c: Likewise.
4572         * rs6000-tdep.c: Likewise.
4573         * s390-linux-nat.c: Likewise.
4574         * s390-tdep.c: Likewise.
4575         * solib-aix.c: Likewise.
4576         * solib-darwin.c: Likewise.
4577         * solib-dsbt.c: Likewise.
4578         * solib-spu.c: Likewise.
4579         * solib-svr4.c: Likewise.
4580         * solib-target.c: Likewise.
4581         * sparc-tdep.c: Likewise.
4582         * sparc64-tdep.c: Likewise.
4583         * spu-tdep.c: Likewise.
4584         * symfile.c: Likewise.
4585         * symtab.c: Likewise.
4586         * target-descriptions.c: Likewise.
4587         * target-memory.c: Likewise.
4588         * target.c: Likewise.
4589         * target.h: Likewise.
4590         * tracefile-tfile.c: Likewise.
4591         * tracepoint.c: Likewise.
4592         * valops.c: Likewise.
4593         * valprint.c: Likewise.
4594         * value.c: Likewise.
4595         * windows-tdep.c: Likewise.
4596         * mi/mi-main.c: Likewise.
4597
4598 2018-06-07  Tom Tromey  <tom@tromey.com>
4599
4600         * valprint.h (build_address_symbolic): Declare.
4601         * printcmd.c (print_address_symbolic): Update.
4602         (build_address_symbolic): Change "name" and "filename" to
4603         std::string.
4604         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4605         Update.
4606         * defs.h (build_address_symbolic): Remove declaration.
4607
4608 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4609
4610         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4611         (aarch64_vnv_type): Add function.
4612         (aarch64_pseudo_register_name): Add V regs for SVE.
4613         (aarch64_pseudo_register_type): Likewise.
4614         (aarch64_pseudo_register_reggroup_p): Likewise.
4615         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4616         (aarch64_pseudo_read_value): Add V regs for SVE.
4617         (aarch64_pseudo_write_2): Use V0 offset for SVE
4618         (aarch64_pseudo_write): Add V regs for SVE.
4619         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4620
4621 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4622
4623         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4624         (sve_vl_from_vq): Likewise.
4625
4626 2018-06-05  Tom Tromey  <tom@tromey.com>
4627
4628         * cli/cli-cmds.c (show_version): Update.
4629         * top.c (print_gdb_version): Add "interactive" parameter.
4630         Update.
4631         * main.c (captured_main_1): Update.
4632         * top.h (print_gdb_version): Add "interactive" parameter and a
4633         comment.
4634
4635 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4636
4637         * common/enum-flags.h: Add trailing semicolon to example in
4638         comment.
4639
4640 2018-06-05  Tom Tromey  <tom@tromey.com>
4641
4642         PR cli/12326:
4643         * NEWS: Add entry about pager.
4644         * utils.c (pagination_disabled_for_command): New global.
4645         (prompt_for_continue): Allow "c" response to prompt.
4646         (reinitialize_more_filter): Clear
4647         pagination_disabled_for_command.
4648         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4649
4650 2018-06-04  Tom Tromey  <tom@tromey.com>
4651
4652         * ada-lang.h (ada_lookup_symbol_list): Update.
4653         * ada-lang.c (resolve_subexp): Update.
4654         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4655         parameter.
4656         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4657         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4658         results parameter to std::vector.
4659         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4660         Update.
4661         * ada-exp.y (block_lookup): Update.
4662         (select_possible_type_sym): Change type of syms.  Remove nsyms
4663         parameter.
4664         (write_var_or_type, write_name_assoc): Update.
4665
4666 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4667
4668         * windows-nat.c (windows_nat_target::xfer_partial): Return
4669         TARGET_XFER_E_IO if we need to delegate to the target beneath
4670         but BENEATH is NULL.
4671
4672 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4673
4674         * Makefile.in (config.status): Add configure.nat as a
4675         dependency.
4676
4677 2018-06-04  Tom Tromey  <tom@tromey.com>
4678
4679         * cp-name-parser.y (cpname_state): Add method declarations.
4680         (HANDLE_QUAL): Update.
4681         (cpname_state::d_grab, cpname_state::fill_comp)
4682         (cpname_state::make_operator, cpname_state::make_dtor)
4683         (cpname_state::make_builtin_type, cpname_state::make_name)
4684         (cpname_state::d_qualify, cpname_state::d_int_type)
4685         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4686         (%union): Move earlier.
4687
4688 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4689
4690         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4691
4692 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4693
4694         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4695         (aarch64_pseudo_write_1): Likewise.
4696         (aarch64_pseudo_read_value): Use helper.
4697         (aarch64_pseudo_write): Likewise.
4698
4699 2018-06-04  Pedro Alves  <palves@redhat.com>
4700
4701         * darwin-nat.c (darwin_ops): Delete.
4702         (darwin_attach_pid): Use get_native_target.
4703
4704 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4705
4706         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4707         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4708
4709 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4710
4711         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4712         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4713         (aarch64_gdbarch_init): Check for SVE.
4714         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4715
4716 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4717
4718         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4719         * aarch64-tdep.h (aarch64_read_description): Likewise.
4720         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4721         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4722         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4723         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4724         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4725
4726 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4727
4728         * value.c (value_fetch_lazy_bitfield): New.
4729         (value_fetch_lazy_memory): New.
4730         (value_fetch_lazy_register): New.
4731         (value_fetch_lazy): Factor out to smaller functions.
4732
4733 2018-06-01  Tom Tromey  <tom@tromey.com>
4734
4735         * cp-name-parser.y (backslashable, represented): Now const.
4736
4737 2018-06-01  Tom Tromey  <tom@tromey.com>
4738
4739         * cp-name-parser.y: Include parser-defs.h.
4740         (parser_fprintf): Remove declaration.
4741
4742 2018-06-01  Tom Tromey  <tom@tromey.com>
4743
4744         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4745         %parse-param.
4746         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4747         (global_result): Remove globals.
4748         (struct cpname_state): New.
4749         (yyparse): Don't declare.
4750         (yylex, yyerror): Move declarations after %union.
4751         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4752         (make_name): Add state parameter.
4753         Update all callers.
4754         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4755         parameter.
4756         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4757         Update.
4758         (yylex): Add lvalp, state parameters.
4759         (yyerror): Add state parameter.
4760         (cp_demangled_name_to_comp): Update.
4761
4762 2018-06-01  Tom Tromey  <tom@tromey.com>
4763
4764         * cp-name-parser.y (parser_fprintf): Declare.
4765         (GDB_YY_REMAP_PREFIX): Define.
4766         Include yy-remap.h.  Don't redefine yy* identifiers.
4767
4768 2018-06-01  Tom Tromey  <tom@tromey.com>
4769
4770         * python/py-type.c (typy_legacy_template_argument): Update.
4771         * cp-support.h (cp_demangled_name_to_comp): Update.
4772         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4773         parameter to be a "std::string *".
4774         (main): Update.
4775
4776 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4777
4778         * ada-lex.l: Include "diagnostics.h" instead of
4779         "common/diagnostics.h".
4780         * unittests/environ-selftests.c: Likewise.
4781         * common/diagnostics.h: Moved to ../include.
4782
4783 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4784
4785         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4786         to language_mode_manual while calling breakpoint_re_set_one.
4787
4788 2018-06-01  Tom Tromey  <tom@tromey.com>
4789
4790         * valops.c (value_cast_structs, destructor_name_p): Update.
4791         * symtab.c (gdb_mangle_name): Update.
4792         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4793         Update.
4794         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4795         (pascal_object_print_value_fields, pascal_object_print_value):
4796         Update.
4797         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4798         * linespec.c (find_methods): Update.
4799         * gdbtypes.h (type_name_no_tag): Remove.
4800         (type_name_or_error): Rename from type_name_no_tag_or_error.
4801         * gdbtypes.c (type_name_no_tag): Remove.
4802         (type_name_or_error): Rename from type_name_no_tag_or_error.
4803         (lookup_struct_elt_type, check_typedef): Update.
4804         * expprint.c (print_subexp_standard): Update.
4805         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4806         * d-namespace.c (d_lookup_nested_symbol): Update.
4807         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4808         (cp_print_class_member): Update.
4809         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4810         * completer.c (add_struct_fields): Update.
4811         * c-typeprint.c (cp_type_print_derivation_info)
4812         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4813         Update.
4814         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4815         (ada_prefer_type, ada_is_exception_sym): Update.
4816
4817 2018-06-01  Tom Tromey  <tom@tromey.com>
4818
4819         * valops.c (enum_constant_from_type, value_namespace_elt)
4820         (value_maybe_namespace_elt): Update.
4821         * valarith.c (find_size_for_pointer_math): Update.
4822         * target-descriptions.c (make_gdb_type): Update.
4823         * symmisc.c (print_symbol): Update.
4824         * stabsread.c (define_symbol, read_type)
4825         (complain_about_struct_wipeout, add_undefined_type)
4826         (cleanup_undefined_types_1): Update.
4827         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4828         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4829         (rust_internal_print_type, rust_composite_type)
4830         (rust_evaluate_funcall, rust_evaluate_subexp)
4831         (rust_inclusive_range_type_p): Update.
4832         * python/py-type.c (typy_get_tag): Update.
4833         * p-typeprint.c (pascal_type_print_base): Update.
4834         * mdebugread.c (parse_symbol, parse_type): Update.
4835         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4836         Update.
4837         * guile/scm-type.c (gdbscm_type_tag): Update.
4838         * go-lang.c (sixg_string_p): Update.
4839         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4840         Update.
4841         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4842         (TYPE_TAG_NAME): Remove.
4843         * gdbtypes.c (type_name_no_tag): Simplify.
4844         (check_typedef, check_types_equal, recursive_dump_type)
4845         (copy_type_recursive, arch_composite_type): Update.
4846         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4847         in summary mode when needed.
4848         * eval.c (evaluate_funcall): Update.
4849         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4850         (process_structure_scope, read_enumeration_type)
4851         (read_namespace_type, read_module_type, determine_prefix): Update.
4852         * cp-support.c (inspect_type): Update.
4853         * coffread.c (process_coff_symbol, decode_base_type): Update.
4854         * c-varobj.c (c_is_path_expr_parent): Update.
4855         * c-typeprint.c (c_type_print_base_struct_union): Update.
4856         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4857         summary when using C language.
4858         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4859         (gen_maybe_namespace_elt): Update.
4860         * ada-lang.c (ada_type_name): Simplify.
4861         (empty_record, ada_template_to_fixed_record_type_1)
4862         (template_to_static_fixed_type)
4863         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4864
4865 2018-06-01  Tom Tromey  <tom@tromey.com>
4866
4867         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4868         c_print_type.
4869         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4870         (c_print_type): Update.
4871         (c_print_type): New overload.
4872         (c_type_print_varspec_prefix, c_type_print_args)
4873         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4874         (c_type_print_base_struct_union, c_type_print_base_1)
4875         (cp_type_print_method_args): Add "language" parameter.
4876         (c_type_print_base): Update.
4877         * c-lang.h (c_print_type): Add new overload.
4878
4879 2018-06-01  Tom Tromey  <tom@tromey.com>
4880
4881         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4882         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4883
4884 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4885
4886         * aarch64-tdep.c (aarch64_sve_register_names): New const
4887         var.
4888         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4889         (AARCH64_SVE_Z_REGS_NUM): New define.
4890         (AARCH64_SVE_P_REGS_NUM): Likewise.
4891         (AARCH64_SVE_NUM_REGS): Likewise.
4892
4893 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4894
4895         * nat/linux-ptrace.h [__alpha__]
4896         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4897         definitions.
4898
4899 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4900
4901         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4902         the endianness selected.
4903         * NEWS: Document `set endian auto' mode operation update.
4904
4905 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4906
4907         * Makefile.in: Add new header.
4908         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4909         (sve_vl_from_vg): Likewise.
4910         (sve_vq_from_vl): Likewise.
4911         (sve_vl_from_vq): Likewise.
4912         (sve_vq_from_vg): Likewise.
4913         (sve_vg_from_vq): Likewise.
4914         * configure.nat: Add new c file.
4915         * nat/aarch64-sve-linux-ptrace.c: New file.
4916         * nat/aarch64-sve-linux-ptrace.h: New file.
4917
4918 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4919
4920         * aarch64-linux-nat.c (aarch64_linux_read_description):
4921         Add parmeter zero.
4922         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4923         Likewise.
4924         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4925         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4926         (aarch64_gdbarch_init): Add parmeter zero.
4927         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4928         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4929         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4930         parmeter.
4931         * doc/gdb.texinfo: Describe SVE feature
4932         * features/aarch64-sve.c: New file.
4933
4934 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4935
4936         PR gdb/23210
4937         * gdbarch.sh (significant_addr_bit): Default to zero when
4938         not set by target architecture.
4939         * gdbarch.c: Re-generated.
4940         * utils.c (address_significant): Update.
4941
4942 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4943
4944         * stack.c (func_command): Remove trailing newline in call to error.
4945
4946 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4947
4948         * regcache.h (regcache_raw_collect): Remove, update callers to
4949         use regcache::raw_collect.
4950         * regcache.c (regcache_raw_collect): Remove.
4951
4952 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4953
4954         * regcache.h (regcache_raw_supply): Remove, update callers to
4955         use detached_regcache::raw_supply.
4956         * regcache.c (regcache_raw_supply): Remove.
4957
4958 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4959
4960         * regcache.h (regcache_cooked_write_part): Remove, update
4961         callers to use regcache::cooked_write_part.
4962         * regcache.c (regcache_cooked_write_part): Remove.
4963
4964 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4965
4966         * regcache.h (regcache_cooked_read_part): Remove, update callers
4967         to use readable_regcache::cooked_read_part.
4968         * regcache.c (regcache_cooked_read_part): Remove.
4969
4970 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4971
4972         * regcache.h (regcache_cooked_read_value): Remove, update
4973         callers to use readable_regcache::cooked_read_value.
4974         * regcache.c (regcache_cooked_read_value): Remove.
4975
4976 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4977
4978         * regcache.h (regcache_cooked_write): Remove, update callers to
4979         use regcache::cooked_write.
4980         * regcache.c (regcache_cooked_write): Remove.
4981
4982 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4983
4984         * regcache.h (regcache_invalidate): Remove, update callers to
4985         use detached_regcache::invalidate instead.
4986         * regcache.c (regcache_invalidate): Remove.
4987
4988 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4989
4990         * regcache.h (regcache_raw_write_part): Remove, update callers
4991         to use regcache::raw_write_part instead.
4992         * regcache.c (regcache_raw_write_part): Remove.
4993
4994 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4995
4996         * regcache.h (regcache_raw_read_part): Remove, update callers to
4997         use readable_regcache::raw_read_part instead.
4998         * regcache.c (regcache_raw_read_part): Remove.
4999
5000 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5001
5002         * regcache.h (regcache_cooked_read): Remove, update callers to
5003         use readable_regcache::cooked_read instead.
5004         * regcache.c (regcache_cooked_read): Remove.
5005
5006 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5007
5008         * regcache.h (regcache_raw_write): Remove, update callers to use
5009         regcache::raw_write instead.
5010         * regcache.c (regcache_raw_write): Remove.
5011
5012 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5013
5014         * regcache.h (regcache_raw_read): Remove, update callers to use
5015         readable_regcache::raw_read instead.
5016         * regcache.c (regcache_raw_read): Remove.
5017
5018 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5019
5020         * regcache.h (regcache_raw_update): Remove, update callers to
5021         use readable_regcache::raw_update instead.
5022         * regcache.c (regcache_raw_update): Remove.
5023
5024 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5025
5026         * regcache.h (regcache_register_status): Remove, update callers
5027         to use reg_buffer::get_register_status directly instead.
5028         * regcache.c (regcache_register_status): Remove.
5029
5030 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5031
5032         * regcache.h (regcache_get_ptid): Remove, update all callers to
5033         call regcache::ptid instead.
5034         * regcache.c (regcache_get_ptid): Remove.
5035
5036 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5037
5038         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5039
5040 2018-05-30  Pedro Alves  <palves@redhat.com>
5041
5042         * common/common-exceptions.h (exception_rethrow): Use
5043         ATTRIBUTE_NORETURN.
5044
5045 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5046
5047         * breakpoint.c (print_solib_event, check_status_catch_solib):
5048         Remove struct keyword in range-based for loops.
5049         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5050         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5051         Likewise.
5052         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5053         Likewise.
5054         * symfile.c (addr_info_make_relative): Likewise.
5055         * thread.c (value_in_thread_stack_temporaries): Likewise.
5056
5057 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5058
5059         PR gdb/16841
5060         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5061         aggregate type to get its real type before accessing it.
5062
5063 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5064
5065         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5066         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5067         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5068         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5069         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5070         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5071         * printcmd.c (info_address_command): Likewise.
5072
5073 2018-05-29  Tom Tromey  <tom@tromey.com>
5074
5075         * windows-nat.c (handle_exception): Update fall-through comment.
5076
5077 2018-05-29  Tom Tromey  <tom@tromey.com>
5078
5079         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5080         (struct program_space) <added_solibs>: Now a std::vector.
5081         * breakpoint.c (print_solib_event): Update.
5082         (check_status_catch_solib): Update.
5083         * progspace.c (clear_program_space_solib_cache): Update.
5084         * solib.c (update_solib_list): Update.
5085
5086 2018-05-29  Tom Tromey  <tom@tromey.com>
5087
5088         * python/py-type.c (typy_richcompare): Update.
5089         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5090         * gdbtypes.h (types_deeply_equal): Return bool.
5091         (types_equal): Likewise.
5092         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5093         declare VEC.
5094         (check_types_equal): Change worklist to std::vector.  Return
5095         bool.
5096         (struct type_equality_entry): Add constructor.
5097         (compare_maybe_null_strings): Return bool.
5098         (check_types_worklist): Return bool.  Change worklist to
5099         std::vector.
5100         (types_deeply_equal): Use std::vector.
5101         (types_equal): Return bool.
5102         (compare_maybe_null_strings): Simplify.
5103
5104 2018-05-29  Tom Tromey  <tom@tromey.com>
5105
5106         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5107
5108 2018-05-29  Tom Tromey  <tom@tromey.com>
5109
5110         * objc-lang.h: Don't include cp-support.h.
5111         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5112         declare VEC.
5113
5114 2018-05-27  Tom Tromey  <tom@tromey.com>
5115
5116         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5117
5118 2018-05-25  Tom Tromey  <tom@tromey.com>
5119
5120         * value.c (value::location): Initialize.
5121
5122 2018-05-25  Tom Tromey  <tom@tromey.com>
5123
5124         * dbxread.c (init_bincl_list): Remove.
5125         (bincl_list): Now a std::vector.
5126         (bincls_allocated, next_bincl): Remove.
5127         (free_bincl_list, do_free_bincl_list_cleanup)
5128         (make_cleanup_free_bincl_list): Remove.
5129         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5130         unique_xmalloc_ptr.
5131         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5132         (struct header_file_location): Add constructor.
5133         (add_bincl_to_list): Remove.
5134
5135 2018-05-25  Tom Tromey  <tom@tromey.com>
5136
5137         * tui/tui.c (tui_enable): Update.
5138         * mi/mi-interp.c (mi_interp::init): Update.
5139         * interps.h (class interp) <name>: New method.
5140         <m_name>: Rename from name.
5141         (~scoped_restore_interp): Update.
5142         * interps.c (interp::interp): Update.
5143         (interp_add, interp_set, interp_lookup_existing)
5144         (current_interp_named_p): Update.
5145
5146 2018-05-25  Tom Tromey  <tom@tromey.com>
5147
5148         * interps.c (interp_name): Remove.
5149         * mi/mi-interp.c (mi_interp::init): Update.
5150         * interps.h (interp_name): Remove.
5151         (~scoped_restore_interp): Update.
5152         * tui/tui.c (tui_enable): Update.
5153
5154 2018-05-25  Tom Tromey  <tom@tromey.com>
5155
5156         * utils.c (fputs_maybe_filtered): Update.
5157         * linespec.c (decode_line_full): Update.
5158         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5159         (mi_print_breakpoint_for_event, mi_solib_loaded)
5160         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5161         (mi_user_selected_context_changed): Update.
5162         * mi/mi-main.c (mi_execute_command): Update.
5163         * cli/cli-script.c (execute_control_command): Update.
5164         * python/python.c (execute_gdb_command): Update.
5165         * solib.c (info_sharedlibrary_command): Update.
5166         * interps.c (interp_ui_out): Remove.
5167         * interps.h (interp_ui_out): Remove.
5168
5169 2018-05-25  Tom Tromey  <tom@tromey.com>
5170
5171         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5172         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5173         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5174
5175 2018-05-25  Tom Tromey  <tom@tromey.com>
5176
5177         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5178         * interps.c (interp_exec): Use scoped_restore.
5179
5180 2018-05-25  Tom Tromey  <tom@tromey.com>
5181
5182         * remote.c (remote_target::remote_file_get): Use
5183         gdb::byte_vector.
5184         (remote_target::remote_file_put): Likewise.
5185
5186 2018-05-25  Tom Tromey  <tom@tromey.com>
5187
5188         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5189         a std::string.
5190         (get_pe_section_index, add_pe_exported_sym): Update.
5191         (read_pe_exported_syms): Use gdb::def_vector.
5192
5193 2018-05-25  Tom Tromey  <tom@tromey.com>
5194
5195         * frame.c (remove_prev_frame): Remove.
5196         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5197
5198 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5199
5200         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5201         Remove prototypes.
5202         * mips-linux-nat.c (supply_fpregset): Always call
5203         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5204         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5205         `mips_fill_fpregset'.
5206         * mips-linux-tdep.c (mips_supply_fpregset)
5207         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5208         (mips_fill_fpregset_wrapper): Remove functions.
5209         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5210         (mips_linux_fpregset): Remove variable.
5211         (mips_linux_iterate_over_regset_sections): Use
5212         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5213         (mips_linux_o32_sigframe_init): Remove comment.
5214
5215 2018-05-25  Pedro Alves  <palves@redhat.com>
5216
5217         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5218         (struct readahead_cache, struct packet_reg, struct
5219         remote_arch_state, class remote_state): Move higher up in the
5220         file.
5221         (remote_target::m_remote_state): Now an object instead of a pointer.
5222         (remote_target::get_remote_state): Adjust.
5223
5224 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5225
5226         * stack.c (select_and_print_frame): Delete.
5227         (struct function_bounds): Move struct within function.
5228         (func_command): Most content moved into new function
5229         find_frame_for_function, use new function, print result, add
5230         function comment.
5231         (find_frame_for_function): New function, now returns a result.
5232
5233 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5234
5235         * stack.c (iterate_over_block_arg_vars): Fix comment.
5236         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5237
5238 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5239
5240         PR gdb/23203
5241         * frame.c
5242         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5243         Define.
5244         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5245         Define.
5246         * frame.h (class scoped_restore_selected_frame): New class.
5247         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5248         of any exception, use scoped_restore_selected_frame to restore the
5249         frame instead.
5250
5251 2018-05-24  Pedro Alves  <palves@redhat.com>
5252
5253         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5254         override.
5255
5256 2018-05-23  Tom Tromey  <tom@tromey.com>
5257
5258         * complaints.c (struct complaints): Remove.
5259         (symfile_complaint_book): Remove.
5260         (series): New global.
5261         (complaint_internal): Update.
5262         (clear_complaints): Update.
5263
5264 2018-05-23  Tom Tromey  <tom@tromey.com>
5265
5266         * complaints.c (counters): New global.
5267         (struct complain): Remove.
5268         (struct complaints) <root>: Remove.
5269         (complaint_sentinel): Remove.
5270         (symfile_complaint_book): Update.
5271         (find_complaint) Remove.
5272         (complaint_internal, clear_complaints): Update.
5273
5274 2018-05-23  Tom Tromey  <tom@tromey.com>
5275
5276         * complaints.c (struct complain) <file, line>: Remove.
5277         (find_complaint): Remove file, line parameters.
5278         (complaint_internal): Update.
5279
5280 2018-05-23  Tom Tromey  <tom@tromey.com>
5281
5282         * complaints.c (vcomplaint): Remove.
5283         (complaint_internal) Merge in contents of vcomplaint.
5284
5285 2018-05-23  Tom Tromey  <tom@tromey.com>
5286
5287         * complaints.c (struct complaints) <explanation>: Remove.
5288         (symfile_explanations): Remove.
5289         (symfile_complaint_book): Update.
5290         (vcomplaint): Update.
5291         (struct explanation): Remove.
5292
5293 2018-05-23  Tom Tromey  <tom@tromey.com>
5294
5295         * complaints.c (symfile_complaints): Remove.
5296         (complaint_internal): Remove "complaints" parameter.
5297         (clear_complaints, vcomplaint): Remove "c" parameter.
5298         (get_complaints): Remove.
5299         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5300         (dwarf2_debug_line_missing_file_complaint)
5301         (dwarf2_debug_line_missing_end_sequence_complaint)
5302         (dwarf2_complex_location_expr_complaint)
5303         (dwarf2_const_value_length_mismatch_complaint)
5304         (dwarf2_section_buffer_overflow_complaint)
5305         (dwarf2_macro_malformed_definition_complaint)
5306         (dwarf2_invalid_attrib_class_complaint)
5307         (create_addrmap_from_index, dw2_symtab_iter_next)
5308         (dw2_expand_marked_cus)
5309         (dw2_debug_names_iterator::find_vec_in_debug_names)
5310         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5311         (create_debug_type_hash_table, init_cutu_and_read_dies)
5312         (partial_die_parent_scope, add_partial_enumeration)
5313         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5314         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5315         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5316         (create_cus_hash_table, create_dwp_hash_table)
5317         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5318         (dwarf2_rnglists_process, dwarf2_ranges_process)
5319         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5320         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5321         (handle_struct_member_die, process_structure_scope)
5322         (read_array_type, read_common_block, read_module_type)
5323         (read_tag_pointer_type, read_typedef, read_base_type)
5324         (read_subrange_type, load_partial_dies, partial_die_info::read)
5325         (partial_die_info::read, partial_die_info::read)
5326         (partial_die_info::read, read_checked_initial_length_and_offset)
5327         (dwarf2_string_attr, read_formatted_entries)
5328         (dwarf_decode_line_header)
5329         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5330         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5331         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5332         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5333         (get_signatured_type, get_DW_AT_signature_type)
5334         (decode_locdesc, file_file_name, consume_improper_spaces)
5335         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5336         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5337         (dwarf2_symbol_mark_computed, set_die_type)
5338         (read_attribute_value): Update.
5339         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5340         Update.
5341         * dbxread.c (unknown_symtype_complaint)
5342         (lbrac_mismatch_complaint, repeated_header_complaint)
5343         (set_namestring, function_outside_compilation_unit_complaint)
5344         (read_dbx_symtab, process_one_symbol): Update.
5345         * gdbtypes.c (stub_noname_complaint): Update.
5346         * windows-nat.c (handle_unload_dll): Update.
5347         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5348         (decode_base_type): Update.
5349         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5350         (eb_complaint, record_include_begin, record_include_end)
5351         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5352         (process_xcoff_symbol, read_symbol)
5353         (function_outside_compilation_unit_complaint)
5354         (scan_xcoff_symtab): Update.
5355         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5356         * buildsym.c (finish_block_internal, make_blockvector)
5357         (end_symtab_get_static_block, augment_type_symtab): Update.
5358         * dtrace-probe.c (dtrace_process_dof)
5359         (dtrace_static_probe_ops::get_probes): Update.
5360         * complaints.h (struct complaint): Don't declare.
5361         (symfile_complaints): Remove.
5362         (complaint_internal): Remove "complaints" parameter.
5363         (complaint): Likewise.
5364         (clear_complaints): Likewise.
5365         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5366         (reread_symbols): Update.
5367         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5368         (dwarf2_frame_cache, decode_frame_entry): Update.
5369         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5370         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5371         (info_selectors_command): Update.
5372         * macrotab.c (macro_include, check_for_redefinition)
5373         (macro_undef): Update.
5374         * objfiles.c (filter_overlapping_sections): Update.
5375         * stabsread.c (invalid_cpp_abbrev_complaint)
5376         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5377         (define_symbol, error_type, read_type, rs6000_builtin_type)
5378         (stabs_method_name_from_physname, read_member_functions)
5379         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5380         (attach_fields_to_type, complain_about_struct_wipeout)
5381         (read_range_type, read_args, common_block_start)
5382         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5383         Update.
5384         * mdebugread.c (index_complaint, unknown_ext_complaint)
5385         (basic_type_complaint, bad_tag_guess_complaint)
5386         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5387         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5388         (parse_procedure, parse_lines)
5389         (function_outside_compilation_unit_complaint)
5390         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5391         (bad_tag_guess_complaint, reg_value_complaint): Update.
5392         * cp-support.c (demangled_name_complaint): Update.
5393         * macroscope.c (sal_macro_scope): Update.
5394         * dwarf-index-write.c (class debug_names): Update.
5395
5396 2018-05-23  Tom Tromey  <tom@tromey.com>
5397
5398         * complaints.c (clear_complaints): Remove "noisy" parameter.
5399         * complaints.h (clear_complaints): Update.
5400         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5401         (reread_symbols): Update.
5402
5403 2018-05-23  Tom Tromey  <tom@tromey.com>
5404
5405         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5406         SUBSEQUENT_MESSAGE.
5407         (vcomplaint, clear_complaints): Update.
5408         (symfile_explanations): Remove some messages.
5409
5410 2018-05-23  Tom Tromey  <tom@tromey.com>
5411
5412         * complaints.c (internal_complaint): Remove.
5413         * complaints.h (internal_complaint): Remove.
5414
5415 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5416
5417         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5418
5419 2018-05-22  Pedro Alves  <palves@redhat.com>
5420
5421         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5422         (remote_fileio_badfd, remote_fileio_return_errno)
5423         (remote_fileio_return_success, remote_fileio_func_open)
5424         (remote_fileio_func_open, remote_fileio_func_close)
5425         (remote_fileio_func_read, remote_fileio_func_write)
5426         (remote_fileio_func_lseek, remote_fileio_func_rename)
5427         (remote_fileio_func_unlink, remote_fileio_func_stat)
5428         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5429         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5430         remote_target parameter.
5431         (remote_fio_func_map) <func>: Add remote_target parameter.
5432         (do_remote_fileio_request, remote_fileio_request):
5433         * remote-fileio.h (remote_fileio_request):
5434         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5435         remote_target parameter.
5436         (remote_notif_process, handle_notification): Adjust to pass down
5437         the remote.
5438         (remote_notif_state_allocate): Add remote_target parameter.  Save
5439         it.
5440         * remote-notif.h (struct remote_target): Forward declare.
5441         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5442         remote_target parameter.
5443         (struct remote_notif_state) <remote>: New field.
5444         (remote_notif_ack, remote_notif_parse): Add remote_target
5445         parameter.
5446         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5447         remote_target parameter.
5448         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5449         (threads_listing_context, rmt_thread_action, protocol_feature)
5450         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5451         (packet_result, struct threads_listing_context, remote_state):
5452         Move definitions and declarations higher up.
5453         (remote_target) <~remote_target>: Declare.
5454         (remote_download_command_source, remote_file_put, remote_file_get)
5455         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5456         (remote_hostio_pread_vFile, remote_hostio_send_command)
5457         (remote_hostio_set_filesystem, remote_hostio_open)
5458         (remote_hostio_close, remote_hostio_unlink, remote_state)
5459         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5460         (get_memory_write_packet_size, get_memory_read_packet_size)
5461         (append_pending_thread_resumptions, remote_detach_1)
5462         (append_resumption, remote_resume_with_vcont)
5463         (add_current_inferior_and_thread, wait_ns, wait_as)
5464         (process_stop_reply, remote_notice_new_inferior)
5465         (process_initial_stop_replies, remote_add_thread)
5466         (btrace_sync_conf, remote_btrace_maybe_reopen)
5467         (remove_new_fork_children, kill_new_fork_children)
5468         (discard_pending_stop_replies, stop_reply_queue_length)
5469         (check_pending_events_prevent_wildcard_vcont)
5470         (discard_pending_stop_replies_in_queue, stop_reply)
5471         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5472         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5473         (remote_interrupt_as, remote_interrupt_ns)
5474         (remote_get_noisy_reply, remote_query_attached)
5475         (remote_add_inferior, remote_current_thread, get_current_thread)
5476         (set_thread, set_general_thread, set_continue_thread)
5477         (set_general_process, write_ptid)
5478         (remote_unpack_thread_info_response, remote_get_threadinfo)
5479         (parse_threadlist_response, remote_get_threadlist)
5480         (remote_threadlist_iterator, remote_get_threads_with_ql)
5481         (remote_get_threads_with_qxfer)
5482         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5483         (get_offsets, remote_check_symbols, remote_supported_packet)
5484         (remote_query_supported, remote_packet_size)
5485         (remote_serial_quit_handler, remote_detach_pid)
5486         (remote_vcont_probe, remote_resume_with_hc)
5487         (send_interrupt_sequence, interrupt_query)
5488         (remote_notif_get_pending_events, fetch_register_using_p)
5489         (send_g_packet, process_g_packet, fetch_registers_using_g)
5490         (store_register_using_P, store_registers_using_G)
5491         (set_remote_traceframe, check_binary_download)
5492         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5493         (remote_xfer_live_readonly_partial, remote_read_bytes)
5494         (remote_send_printf, remote_flash_write, readchar)
5495         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5496         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5497         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5498         (extended_remote_disable_randomization, extended_remote_run)
5499         (send_environment_packet, extended_remote_environment_support)
5500         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5501         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5502         (packet_command): Now methods of ...
5503         (remote_target): ... this class.
5504         (m_remote_state) <remote_target>: New field.
5505         (struct remote_state) <stop_reply_queue,
5506         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5507         fields.
5508         (remote_state::remote_state): Allocate stop_reply_queue.
5509         (remote_state): Delete global.
5510         (get_remote_state_raw): Delete.
5511         (remote_target::get_remote_state): Allocate m_remote_state on
5512         demand.
5513         (get_current_remote_target): New.
5514         (remote_ops, extended_remote_ops): Delete.
5515         (wait_forever_enabled_p, remote_async_inferior_event_token):
5516         Delete, moved to struct remote_state.
5517         (remote_target::close): Delete self.  Destruction bits split to
5518         ...
5519         (remote_target::~remote_target): ... this.
5520         (show_memory_packet_size): Adjust to use
5521         get_current_remote_target.
5522         (struct protocol_feature) <func>: Add remote_target parameter.
5523         All callers adjusted.
5524         (curr_quit_handler_target): New.
5525         (remote_serial_quit_handler): Reimplement.
5526         (remote_target::open_1): Adjust to use get_current_remote_target.
5527         Heap-allocate remote_target/extended_remote_target instances.
5528         (vcont_builder::vcont_builder): Add remote_target parameter, and
5529         save it in m_remote.  All callers adjusted.
5530         (vcont_builder::m_remote): New field.
5531         (vcont_builder::restart, vcont_builder::flush)
5532         (vcont_builder::push_action): Use it.
5533         (remote_target::commit_resume): Use it.
5534         (struct queue_iter_param) <remote>: New field.
5535         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5536         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5537         (check_pending_event_prevents_wildcard_vcont_callback)
5538         (remote_target::check_pending_events_prevent_wildcard_vcont)
5539         (remote_target::discard_pending_stop_replies)
5540         (remote_target::discard_pending_stop_replies_in_queue)
5541         (remote_target::remote_notif_remove_queued_reply): Fill in
5542         'remote' field.
5543         (remote_notif_get_pending_events): New.
5544         (remote_target::readchar, remote_target::remote_serial_write):
5545         Save/restore curr_quit_handler_target.
5546         (putpkt): New.
5547         (kill_new_fork_children): Fill in 'remote' field.
5548         (packet_command): Use get_current_remote_target, defer to
5549         remote_target method of same name.
5550         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5551         parameter, and save it in m_remote.  All callers adjusted.
5552         (scoped_remote_fd::release): Use m_remote.
5553         (scoped_remote_fd::m_remote): New field.
5554         (remote_file_put, remote_file_get, remote_file_delete): Use
5555         get_current_remote_target, defer to remote_target method of same
5556         name.
5557         (remote_btrace_reset): Add remote_state paremeter.  Update all
5558         callers.
5559         (remote_async_inferior_event_handler). Pass down 'data'.
5560         (remote_new_objfile): Use get_current_remote_target.
5561         (remote_target::vcont_r_supported): New.
5562         (set_range_stepping): Use get_current_remote_target and
5563         remote_target::vcont_r_supported.
5564         (_initialize_remote): Don't allocate 'remote_state' and
5565         'stop_reply_queue' globals.
5566         * remote.h (struct remote_target): Forward declare.
5567         (getpkt, putpkt, remote_notif_get_pending_events): Add
5568         'remote_target' parameter.
5569
5570 2018-05-22  Pedro Alves  <palves@redhat.com>
5571
5572         * remote.c (vcont_builder): Now a class.  Make all data members
5573         private.
5574         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5575         Declare methods.
5576         (vcont_builder_restart): Rename to ...
5577         (vcont_builder::restart): ... this.
5578         (vcont_builder_flush): Rename to ...
5579         (vcont_builder::flush): ... this.
5580         (vcont_builder_push_action): Rename to ...
5581         (vcont_builder::push_action): ... this.
5582         (remote_target::commit_resume): Adjust.
5583
5584 2018-05-22  Pedro Alves  <palves@redhat.com>
5585
5586         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5587         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5588         (get_fixed_memory_packet_size): New.
5589         (get_memory_packet_size): Use it.
5590         (set_memory_packet_size): Don't override the config size with
5591         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5592         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5593         Don't refer to get_memory_packet_size if not connected to a remote
5594         target.  Show "(default)" if configured size is 0.
5595
5596 2018-05-22  Pedro Alves  <palves@redhat.com>
5597
5598         * remote.c (remote_target::mourn_inferior): Move
5599         discard_pending_stop_replies call here from ...
5600         (_initialize_remote): ... here.
5601
5602 2018-05-22  Pedro Alves  <palves@redhat.com>
5603
5604         * remote.c (compare_section_command): Remove set_general_process
5605         call.
5606
5607 2018-05-22  Pedro Alves  <palves@redhat.com>
5608
5609         * remote.c (struct packet_reg, struct remote_arch_state):
5610         Move higher up in the file.
5611         (remote_state) <m_arch_states>: Store remote_arch_state values
5612         instead of remote_arch_state pointers.
5613         (remote_state::get_remote_arch_state): Adjust.
5614
5615 2018-05-22  Pedro Alves  <palves@redhat.com>
5616
5617         * remote.c: Include <unordered_map>.
5618         (remote_state): Now a class.
5619         (remote_state) <get_remote_arch_state>: Declare method.
5620         <get_remote_arch_state>: New field.
5621         (remote_arch_state) <remote_arch_state>: Declare ctor.
5622         <regs>: Now a unique_ptr.
5623         (remote_gdbarch_data_handle): Delete.
5624         (get_remote_arch_state): Delete.
5625         (remote_state::get_remote_arch_state): New.
5626         (get_remote_state): Adjust to call remote_state's
5627         get_remote_arch_state method.
5628         (init_remote_state): Delete, bits factored out to ...
5629         (remote_arch_state::remote_arch_state): ... this new method.
5630         (get_remote_packet_size, get_memory_packet_size)
5631         (process_g_packet, remote_target::fetch_registers)
5632         (remote_target::prepare_to_store, store_registers_using_G)
5633         (remote_target::store_registers, remote_target::get_trace_status):
5634         Adjust to call remote_state's method.
5635         (_initialize_remote): Remove reference to
5636         remote_gdbarch_data_handle.
5637
5638 2018-05-22  Pedro Alves  <palves@redhat.com>
5639
5640         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5641         pread>: New method declarations.
5642         (remote_target::open_1): Adjust.
5643         (readahead_cache_invalidate): Rename to ...
5644         (readahead_cache::invalidate): ... this, and adjust to be a class
5645         method.
5646         (readahead_cache_invalidate_fd): Rename to ...
5647         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5648         class method.
5649         (remote_hostio_pwrite): Adjust.
5650         (remote_hostio_pread_from_cache): Rename to ...
5651         (readahead_cache::pread): ... this, and adjust to be a class
5652         method.
5653         (remote_hostio_close): Adjust.
5654
5655 2018-05-22  Pedro Alves  <palves@redhat.com>
5656
5657         * remote.c (remote_hostio_close_cleanup): Delete.
5658         (class scoped_remote_fd): New.
5659         (remote_file_put, remote_file_get): Use it.
5660
5661 2018-05-22  Pedro Alves  <palves@redhat.com>
5662
5663         (struct vCont_action_support): Use bool and initialize all fields.
5664         (struct readahead_cache): Initialize all fields.
5665         (remote_state): Use bool and initialize all fields.
5666         (remote_state::remote_state, remote_state::~remote_state): New.
5667         (new_remote_state): Delete.
5668         (_initialize_remote): Use new to allocate remote_state.
5669
5670 2018-05-22  Pedro Alves  <palves@redhat.com>
5671             張俊芝  <zjz@zjz.name>
5672
5673         PR gdb/22973
5674         * c-exp.y: Include "c-support.h".
5675         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5676         of tolower.  Use c_ident_is_alpha to scan names.
5677         * c-lang.c: Include "c-support.h".
5678         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5679         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5680         * c-support.h: New file, with bits factored out from ...
5681         * cp-name-parser.y: ... this file.
5682         Include "c-support.h".
5683         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5684         c-support.h and renamed.
5685         (symbol_end, yylex): Adjust.
5686
5687 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5688
5689         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5690         parameter type to CORE_ADDR.
5691         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5692         parameter type in declaration to CORE_ADDR.
5693         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5694         target_auxv_search to get AT_HWCAP and use the result to get the
5695         target description.
5696         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5697         to CORE_ADDR. Remove the cast of the return value to unsigned
5698         long. Fix error predicate of target_auxv_search.
5699         (ppc_linux_nat_target::read_description): Change the type of the
5700         hwcap variable to CORE_ADDR.
5701
5702 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5703
5704         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5705         if the size of fpscr is larger than 32 bits.
5706
5707 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5708
5709         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5710         (ppc32_linux_vsxregmap): New global.
5711         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5712         regcache_supply_regset, and regcache_collect_regset.
5713         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5714         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5715         (fetch_vsx_register, store_vsx_register): Remove.
5716         (fetch_vsx_registers): Add regno parameter. Get regset using
5717         ppc_linux_vsxregset. Use regset to supply registers.
5718         (store_vsx_registers): Add regno parameter. Get regset using
5719         ppc_linux_vsxregset. Use regset to collect registers.
5720         (fetch_register): Call fetch_vsx_registers instead of
5721         fetch_vsx_register.
5722         (store_register): Call store_vsx_registers instead of
5723         store_vsx_register.
5724         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5725         new regno parameter.
5726         (store_ppc_registers): Call store_vsx_registers with -1 for the
5727         new regno parameter.
5728         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5729         (ppc_collect_vsxregset): Remove.
5730
5731 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5732
5733         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5734         offset fields.
5735         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5736         for vector register offset fields.
5737         (ppc64_fbsd_reg_offsets): Likewise.
5738         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5739         to vector register offset fields.
5740         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5741         to vector register offset fields.
5742         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5743         vector register offset fields.
5744         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5745         initializers for vector register offset fields.
5746         (rs6000_aix64_reg_offsets): Likewise.
5747         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5748         (ppc_supply_vrregset): Remove.
5749         (ppc_collect_vrregset): Remove.
5750         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5751         (ppc_linux_vrregset) : New function.
5752         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5753         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5754         (ppc32_linux_vrregset): Remove.
5755         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5756         and use result instead of ppc32_linux_vrregset.
5757         (ppc32_linux_reg_offsets): Remove initializers for vector register
5758         offset fields.
5759         (ppc64_linux_reg_offsets): Likewise.
5760         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5761         * ppc-linux-nat.c: Include regset.h.
5762         (gdb_vrregset_t): Adjust comment to account for little-endian
5763         mode.
5764         (supply_vrregset, fill_vrregset): Remove.
5765         (fetch_altivec_register, store_altivec_register): Remove.
5766         (fetch_altivec_registers): Add regno parameter. Get regset using
5767         ppc_linux_vrregset. Use regset to supply registers.
5768         (store_altivec_registers): Add regno parameter. Get regset using
5769         ppc_linux_vrregset. Use regset to collect registers.
5770         (fetch_register): Call fetch_altivec_registers instead of
5771         fetch_altivec_register.
5772         (store_register): Call store_altivec_registers instead of
5773         store_altivec_register.
5774         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5775         the new regno parameter.
5776         (store_ppc_registers): Call store_altivec_registers with -1 for
5777         the new regno parameter.
5778
5779 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5780
5781         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5782         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5783         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5784         (gdb_vrregset_t): Change array type size to
5785         PPC_LINUX_SIZEOF_VRREGSET.
5786         (gdb_vsxregset_t): Change array type size to
5787         PPC_LINUX_SIZEOF_VSXREGSET.
5788         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5789         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5790         PPC_LINUX_SIZEOF_VSXREGSET.
5791
5792 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5793
5794         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5795         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5796         nat/ppc-linux.c.
5797         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5798         ppc_linux_target_wordsize with tid.
5799         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5800         wordsize with tid.
5801         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5802         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5803         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5804         tid parameter. Remove static specifier.
5805         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5806         (ppc_linux_target_wordsize): New declaration.
5807
5808 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5809
5810         * arch/ppc-linux-common.c: New file.
5811         * arch/ppc-linux-common.h: New file.
5812         * arch/ppc-linux-tdesc.h: New file.
5813         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5814         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5815         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5816         arch/ppc-linux-tdesc.h.
5817         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5818         arch/ppc-linux-tdesc.h.
5819         (ppc_linux_nat_target::read_description): Remove target
5820         description matching code. Fill a ppc_linux_features struct and
5821         call ppc_linux_match_description with it. Move comment about ISA
5822         2.05 to ppc-linux-common.c.
5823         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5824         arch/ppc-linux-tdesc.h.
5825         (ppc_linux_core_read_description): Remove target description
5826         matching code. Fill a ppc_linux_features struct and call
5827         ppc_linux_match_description with it.
5828         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5829         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5830         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5831         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5832         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5833         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5834         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5835         (tdesc_powerpc_e500l): Remove.
5836
5837 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5838
5839         * ada-lang.c (catch_assert_command): Pass empty string instead
5840         of NULL for excep_string argument.
5841
5842 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5843
5844         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5845         the width of the requested register exceeds the width of the
5846         `ptrace' data type.
5847
5848 2018-05-21  Tom Tromey  <tom@tromey.com>
5849
5850         * printcmd.c (output_command): Remove.
5851         (output_command_const): Rename to output_command.
5852         * valprint.h (output_command): Rename from output_command_const.
5853         * tracepoint.c (trace_dump_actions): Call output_command.
5854
5855 2018-05-21  Tom Tromey  <tom@tromey.com>
5856
5857         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5858         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5859         * ada-lang.h (create_ada_exception_catchpoint): Update.
5860         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5861         std::string.
5862         (create_excep_cond_exprs, ~ada_catchpoint)
5863         (should_stop_exception, print_one_exception)
5864         (print_mention_exception, print_recreate_exception): Update.
5865         (ada_get_next_arg): Remove.
5866         (catch_ada_exception_command_split): Use std::string.  Change type
5867         of "excep_string", "cond_string".
5868         (catch_ada_exception_command): Update.
5869         (create_ada_exception_catchpoint): Change type of excep_string.
5870         (ada_exception_sal): Remove excep_string parameter.
5871         (~ada_catchpoint): Remove.
5872
5873 2018-05-21  Tom Tromey  <tom@tromey.com>
5874
5875         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5876         cleanup.
5877
5878 2018-05-21  Tom Tromey  <tom@tromey.com>
5879
5880         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5881         Return unique_xmalloc_ptr.
5882         (print_it_exception): Update.
5883
5884 2018-05-21  Tom Tromey  <tom@tromey.com>
5885
5886         * tracepoint.c (trace_dump_actions): Use std::string.
5887
5888 2018-05-21  Tom Tromey  <tom@tromey.com>
5889
5890         * symfile.c (reread_symbols): Use std::string for original_name.
5891
5892 2018-05-21  Tom Tromey  <tom@tromey.com>
5893
5894         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5895         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5896         constructor.
5897
5898 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5899
5900         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5901         instance to...
5902         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5903         * objfiles.c (get_objfile_bfd_data): Allocate
5904         objfile_per_bfd_storage with obstack_new when allocating on
5905         obstack.
5906
5907 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5908
5909         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5910         OBSTACK_ZALLOC.
5911         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5912         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5913         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5914         (add_pending): Likewise.
5915         (parse_symbol): Likewise.
5916         (parse_partial_symbols): Likewise.
5917         (psymtab_to_symtab_1): Likewise.
5918         (new_psymtab): Likewise.
5919         (elfmdebug_build_psymtabs): Likewise.
5920         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5921         * objfiles.c (get_objfile_bfd_data): Likewise.
5922         (objfile_register_static_link): Likewise.
5923         * psymtab.c (allocate_psymtab): Likewise.
5924         * stabsread.c (read_member_functions): Likewise.
5925         * xcoffread.c (xcoff_end_psymtab): Likewise.
5926
5927 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5928
5929         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5930         compiler supports std::is_trivially_constructible.
5931         * common/poison.h: Include obstack.h.
5932         (IsMallocable): Define to is_trivially_constructible if the
5933         compiler supports it, define to true_type otherwise.
5934         (xobnew): New.
5935         (XOBNEW): Redefine.
5936         (xobnewvec): New.
5937         (XOBNEWVEC): Redefine.
5938         * gdb_obstack.h (obstack_zalloc): New.
5939         (OBSTACK_ZALLOC): Redefine.
5940         (obstack_calloc): New.
5941         (OBSTACK_CALLOC): Redefine.
5942         (obstack_new): New.
5943         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5944         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5945         gdbarch.c.
5946         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5947         obstack_calloc/obstack_zalloc.
5948         (gdbarch_obstack_zalloc): Remove.
5949         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5950
5951 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5952
5953         * stack.c (backtrace_command_1): Remove useless variable int i.
5954
5955 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5956
5957         * stack.c (print_frame_info): Fix comment.
5958
5959 2018-05-18  Tom Tromey  <tom@tromey.com>
5960
5961         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5962         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5963         (~dwarf2_per_objfile): Update
5964         (dwarf2_get_dwz_file): Use new.
5965         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5966         unique_ptr.
5967
5968 2018-05-18  Tom Tromey  <tom@tromey.com>
5969
5970         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5971         unique_ptr.
5972         * dwarf2read.c (struct dwp_file): Add constructor and
5973         initializers.
5974         (open_and_init_dwp_file): Return a unique_ptr.
5975         (dwarf2_per_objfile, create_dwp_hash_table)
5976         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5977         (lookup_dwo_unit_in_dwp): Update.
5978         (open_and_init_dwp_file, get_dwp_file): Update.
5979
5980 2018-05-18  Tom Tromey  <tom@tromey.com>
5981
5982         * dwarf2read.c (dwarf2_per_objfile): Update.
5983         (struct mapped_index): Add initializers.
5984         (dwarf2_read_index): Use new.
5985         (dw2_symtab_iter_init): Update.
5986         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5987         unique_ptr.
5988
5989 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5990
5991         * dwarf2read.c (mapped_index) <total_size>: Remove.
5992
5993 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5994
5995         * unittests/format_pieces-selftests.c (test_format_specifier):
5996         Add ARI comments.
5997
5998 2018-05-18  Tom Tromey  <tom@tromey.com>
5999
6000         * c-typeprint.c (maybe_print_hole): New function.
6001         (c_print_type_struct_field_offset): Update.
6002         (c_type_print_base_struct_union): Call maybe_print_hole.
6003
6004 2018-05-17  Keith Seitz  <keiths@redhat.com>
6005
6006         * breakpoint.c (build_bpstat_chain): New function, moved from
6007         bpstat_stop_status.
6008         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6009         If no stop chain is passed, call build_bpstat_chain to build it.
6010         * breakpoint.h (build_bpstat_chain): Declare.
6011         (bpstat_stop_status): Move documentation here from breakpoint.c.
6012         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6013         build the stop chain and pass it to skip_inline_frames.
6014         Pass this stop chain to bpstat_stop_status.
6015         * inline-frame.c: Include breakpoint.h.
6016         (stopped_by_user_bp_inline_frame): New function.
6017         (skip_inline_frames): Add parameter `stop_chain'.
6018         Move documention to inline-frame.h.
6019         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6020         whether the frame should be elided.
6021         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6022         Add moved documentation and update for new parameter.
6023
6024 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6025
6026         PR cli/14975
6027         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6028         unittests/format_pieces-selftests.c.
6029         * common/format.h (format_piece) <operator==>: New.
6030         (format_pieces) <operator[]>: Remove.
6031         * common/format.c (format_pieces::format_pieces): Handle \e.
6032         * unittests/format_pieces-selftests.c: New.
6033
6034 2018-05-17  Tom Tromey  <tom@tromey.com>
6035
6036         PR symtab/23010:
6037         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6038         (dw2_instantiate_symtab): Add skip_partial parameter.
6039         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6040         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6041         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6042         (dw2_expand_symtabs_matching_one)
6043         (dw2_find_pc_sect_compunit_symtab)
6044         (dw2_debug_names_lookup_symbol)
6045         (dw2_debug_names_expand_symtabs_for_function): Update.
6046         (init_cutu_and_read_dies): Add skip_partial parameter.
6047         (process_psymtab_comp_unit, build_type_psymtabs_1)
6048         (process_skeletonless_type_unit, load_partial_comp_unit)
6049         (psymtab_to_symtab_1): Update.
6050         (load_full_comp_unit): Add skip_partial parameter.
6051         (process_imported_unit_die, dwarf2_read_addr_index)
6052         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6053         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6054         (read_signatured_type): Update.
6055
6056 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6057
6058         * value.c (release_value): Remove unused variable.
6059         (record_latest_value): Likewise.
6060         (access_value_history): Likewise.
6061         (preserve_values): Likewise.
6062
6063 2018-05-17  Tom Tromey  <tom@tromey.com>
6064
6065         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6066         Initialize.
6067
6068 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6069
6070         PR gdb/22286
6071         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6072         Also handle registers whose width is not a multiple of
6073         PTRACE_TYPE_RET.
6074         (linux_nat_trad_target::store_register): Likewise.
6075
6076 2018-05-16  Tom Tromey  <tom@tromey.com>
6077
6078         * gdbcore.h (core_bfd): Redefine.
6079         * corelow.c (core_target::close): Update.
6080         (core_target_open): Update.
6081         * progspace.h (struct program_space) <cbfd>: Now a
6082         gdb_bfd_ref_ptr.
6083
6084 2018-05-16  Tom Tromey  <tom@tromey.com>
6085
6086         PR cli/19551:
6087         * symfile-add-flags.h (enum symfile_add_flags)
6088         <SYMFILE_NOT_FILENAME>: New constant.
6089         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6090         objfile name from BFD.
6091         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6092         * minidebug.c (find_separate_debug_file_in_section): Put
6093         ".gnu_debugdata" into BFD's file name.
6094
6095 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6096
6097         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6098         Remove.
6099
6100 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6101
6102         PR binutils/21446
6103         * aarch64-tdep.c (aarch64_analyze_prologue,
6104         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6105         Indicate not interested in errors.
6106
6107 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6108
6109         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6110         Supply the MIPS_ZERO_REGNUM register.
6111
6112 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6113
6114         * mips-tdep.c (mask_address_var): Make variable static.
6115
6116 2018-05-14  Tom Tromey  <tom@tromey.com>
6117
6118         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6119
6120 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6121
6122         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6123         FXSAVE_ADDR for the mxcsr register.
6124
6125 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6126
6127         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6128
6129 2018-05-11  Pedro Alves  <palves@redhat.com>
6130
6131         * corelow.c (core_target) <core_target>: No longer inline.
6132         Initialize m_core_gdbarch, m_core_vec and build the section table
6133         here.
6134         <~core_target>: New.
6135         <core_gdbarch, get_core_register_section>: New methods.
6136         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6137         factored out from ...
6138         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6139         (core_ops): Delete.
6140         (sniff_core_bfd): Add gdbarch parameter.
6141         (core_close): Delete, merged into ...
6142         (core_target::close): ... here.  Delete self.
6143         (core_close_cleanup): Delete.
6144         (core_target_open): Allocate a core_target on the heap.  Use a
6145         unique_ptr instead of a cleanup.  Bits moved into the core_target
6146         ctor.  Adjust to use core_target methods instead of globals.
6147         (get_core_register_section): Rename to ...
6148         (core_target::get_core_register_section): ... this and adjust.
6149         (struct get_core_registers_cb_data): New.
6150         (get_core_registers_cb): Use it.  Use bool.
6151         (core_target::fetch_registers, core_target::files_info)
6152         (core_target::xfer_partial, core_target::read_description)
6153         (core_target::pid_to, core_target::thread_name): Adjust to
6154         reference class fields instead of globals.
6155         * target.h (struct target_ops_deleter, target_ops_up): New.
6156
6157 2018-05-11  Pedro Alves  <palves@redhat.com>
6158
6159         * corefile.c (core_file_command): Move to corelow.c.
6160         * corelow.c (the_core_target): Delete.
6161         (core_file_command): Moved from corefile.c.  Check exec_bfd
6162         instead of the_core_target.  Use target_detach instead of calling
6163         into the_core_target directly.
6164         (maybe_say_no_core_file_now): New.
6165         (core_target::detach): Use it.
6166         (_initialize_corelow): Remove references to the_core_target.
6167         * gdbcore.h (the_core_target): Delete.
6168
6169 2018-05-11  Tom Tromey  <tromey@redhat.com>
6170             Pedro Alves  <palves@redhat.com>
6171
6172         * corefile.c (core_bfd): Remove.
6173         * gdbcore.h (core_bfd): Now a macro.
6174         * progspace.h (struct program_space) <cbfd>: New field.
6175
6176 2018-05-11  Tom Tromey  <tom@tromey.com>
6177
6178         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6179         gdb::def_vector.
6180
6181 2018-05-10  Tom Tromey  <tom@tromey.com>
6182
6183         * configure: Rebuild.
6184         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6185
6186 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6187
6188         PR server/23158:
6189         * regformats/regdat.sh: Adjust script, following the addition
6190         of the new expedite_regs parameter to init_target_desc.
6191
6192 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6193     
6194         PR gdb/23127
6195         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6196         set_gdbarch_significant_addr_bit.
6197         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6198         set_gdbarch_significant_addr_bit.
6199         * utils.c (address_significant): Update to sign extend addr.
6200
6201 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6202
6203         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6204         (xtensa_linux_init_abi): Limit tdep->num_regs by
6205         tdep->num_nopriv_regs.
6206         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6207         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6208         not initialized.
6209
6210 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6211
6212         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6213
6214 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6215
6216         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6217         (I387_MXCSR_INIT_VAL): New constant.
6218         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6219         buffer if it was supplied by the inferior.
6220         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6221         (i387_xsave_get_clear_bv): New function.
6222         (i387_supply_xsave): Only read x87 control registers from the
6223         xsave buffer if the feature is enabled, and the state will have
6224         been written, otherwise, provide a suitable default.
6225         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6226         including x87 control registers.  Update control registers if they
6227         have changed from the default value, and mark features as enabled
6228         as required.
6229         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6230
6231 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6232
6233         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6234
6235 2018-05-07  Tom Tromey  <tom@tromey.com>
6236
6237         * configure: Rebuild.
6238         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6239
6240 2018-05-07  Tom Tromey  <tom@tromey.com>
6241
6242         PR tdep/20362:
6243         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6244         bit.  Use correct value for VDIV.
6245
6246 2018-05-04  Tom Tromey  <tom@tromey.com>
6247
6248         * configure: Rebuild.
6249         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6250
6251 2018-05-04  Tom Tromey  <tom@tromey.com>
6252
6253         * linux-record.c (record_linux_system_call) <case
6254         RECORD_SYS_RECVFROM>: Add "break".
6255
6256 2018-05-04  Tom Tromey  <tom@tromey.com>
6257
6258         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6259         Add missing "break".
6260         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6261         Add missing "break".
6262
6263 2018-05-04  Tom Tromey  <tom@tromey.com>
6264
6265         * rs6000-tdep.c (ppc_process_record_op4)
6266         (ppc_process_record_op63): Add fall-through comment.
6267
6268 2018-05-04  Tom Tromey  <tom@tromey.com>
6269
6270         * i386-tdep.c (i386_process_record): Add fall-through comment.
6271
6272 2018-05-04  Tom Tromey  <tom@tromey.com>
6273
6274         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6275         comment.
6276
6277 2018-05-04  Tom Tromey  <tom@tromey.com>
6278
6279         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6280         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6281         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6282         comment.
6283         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6284         comment.
6285         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6286         comment.
6287
6288 2018-05-04  Tom Tromey  <tom@tromey.com>
6289
6290         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6291
6292 2018-05-04  Tom Tromey  <tom@tromey.com>
6293
6294         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6295         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6296         * symfile.c (section_is_mapped): Fix fall-through comment.
6297         * stabsread.c (define_symbol, read_member_functions): Fix
6298         fall-through comment.
6299         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6300         comment.
6301         * remote.c (remote_wait_as): Fix fall-through comment.
6302         * p-exp.y (yylex): Fix fall-through comment.
6303         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6304         comment.
6305         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6306         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6307         * jv-exp.y (yylex): Fix fall-through comment.
6308         * go-exp.y (lex_one_token): Fix fall-through comment.
6309         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6310         fall-through comment.
6311         * f-exp.y (yylex): Fix fall-through comment.
6312         * dwarf2read.c (process_die): Fix fall-through comments.
6313         * dbxread.c (process_one_symbol): Fix fall-through comment.
6314         * d-exp.y (lex_one_token): Fix fall-through comment.
6315         * cp-name-parser.y (yylex): Fix fall-through comment.
6316         * coffread.c (coff_symtab_read): Fix fall-through comment.
6317         * c-exp.y (lex_one_token): Fix fall-through comment.
6318         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6319         comment.
6320         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6321         comment.
6322
6323 2018-05-04  Tom Tromey  <tom@tromey.com>
6324
6325         PR python/22730:
6326         * NEWS: Mention gdb.execute change.
6327         * gdbcmd.h (execute_control_command): Don't declare.
6328         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6329         execute_control_commands, execute_control_commands_to_string.
6330         * cli/cli-script.h (execute_control_commands)
6331         (execute_control_commands_to_string): Declare.
6332         (execute_control_command): Add from_tty parameter.
6333         * cli/cli-script.c (execute_control_commands)
6334         (execute_control_commands_to_string): New functions.
6335         (execute_user_command): Use execute_control_commands.
6336         (execute_control_command_1): Add "from_tty" parameter.  Update.
6337         (execute_control_command): Likewise.
6338
6339 2018-05-04  Tom Tromey  <tom@tromey.com>
6340
6341         PR python/22731:
6342         * NEWS: Mention that breakpoint commands are writable.
6343         * python/py-breakpoint.c (bppy_set_commands): New function.
6344         (breakpoint_object_getset) <"commands">: Use it.
6345
6346 2018-05-04  Tom Tromey  <tom@tromey.com>
6347
6348         * tracepoint.c (actions_command): Update.
6349         * mi/mi-cmd-break.c (mi_command_line_array)
6350         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6351         (mi_read_next_line): Remove.
6352         (mi_cmd_break_commands): Update.
6353         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6354         function_view.
6355         * cli/cli-script.c (get_command_line): Update.
6356         (process_next_line): Use function_view.  Constify.
6357         (recurse_read_control_structure, read_command_lines)
6358         (read_command_lines_1): Change argument types to function_view.
6359         (do_define_command, document_command): Update.
6360         * breakpoint.h (check_tracepoint_command): Don't declare.
6361         * breakpoint.c (check_tracepoint_command): Remove.
6362         (commands_command_1, create_tracepoint_from_upload): Update.
6363
6364 2018-05-04  Tom Tromey  <tom@tromey.com>
6365
6366         PR gdb/11750:
6367         * cli/cli-script.h (enum command_control_type) <define_control>:
6368         New constant.
6369         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6370         (build_command_line, execute_control_command_1)
6371         (process_next_line): Likewise.
6372         (do_define_command): New function, extracted from define_command.
6373         (define_command): Use it.
6374
6375 2018-05-04  Tom Tromey  <tom@tromey.com>
6376
6377         * tracepoint.c (actions_command): Update.
6378         * cli/cli-script.h (read_command_lines): Update.
6379         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6380         (MAX_TMPBUF): Remove define.
6381         (define_command): Use string_printf.
6382         (document_command): Likewise.
6383         * breakpoint.c (commands_command_1): Update.
6384
6385 2018-05-04  Tom Tromey  <tom@tromey.com>
6386
6387         * top.c (execute_command): Update.
6388         * cli/cli-script.h (print_command_lines): Now varargs.
6389         * cli/cli-script.c (print_command_lines): Now varargs.
6390         (execute_control_command_1) <case while_control, case if_control>:
6391         Update.
6392
6393 2018-05-04  Tom Tromey  <tom@tromey.com>
6394
6395         * tracepoint.c (all_tracepoint_actions): Rename from
6396         all_tracepoint_actions_and_cleanup.  Change return type.
6397         (actions_command, encode_actions_1, encode_actions)
6398         (trace_dump_actions, tdump_command): Update.
6399         * remote.c (remote_download_command_source): Update.
6400         * python/python.c (gdbpy_eval_from_control_command)
6401         (python_command, python_interactive_command): Update.
6402         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6403         * guile/guile.c (guile_command)
6404         (gdbscm_eval_from_control_command, guile_command): Update.
6405         * compile/compile.c (compile_code_command)
6406         (compile_print_command, compile_to_object): Update.
6407         * cli/cli-script.h (struct command_lines_deleter): New.
6408         (counted_command_line): New typedef.
6409         (struct command_line): Add constructor, destructor.
6410         <body_list>: Remove.
6411         <body_list_0, body_list_1>: New members.
6412         (command_line_up): Remove typedef.
6413         (read_command_lines, read_command_lines_1, get_command_line):
6414         Update.
6415         (copy_command_lines): Don't declare.
6416         * cli/cli-script.c (build_command_line): Use "new".
6417         (get_command_line): Return counted_command_line.
6418         (print_command_lines, execute_user_command)
6419         (execute_control_command_1, while_command, if_command): Update.
6420         (realloc_body_list): Remove.
6421         (process_next_line, recurse_read_control_structure): Update.
6422         (read_command_lines, read_command_lines_1): Return counted_command_line.
6423         (free_command_lines): Use "delete".
6424         (copy_command_lines): Remove.
6425         (define_command, document_command, show_user_1): Update.
6426         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6427         a counted_command_line.
6428         * breakpoint.h (counted_command_line): Remove typedef.
6429         (breakpoint_set_commands): Update.
6430         * breakpoint.c (check_no_tracepoint_commands)
6431         (validate_commands_for_breakpoint): Update.
6432         (breakpoint_set_commands): Change commands to be a
6433         counted_command_line.
6434         (commands_command_1, update_dprintf_command_list)
6435         (create_tracepoint_from_upload): Update.
6436
6437 2018-05-04  Tom Tromey  <tom@tromey.com>
6438
6439         * cli/cli-decode.h (cmd_list_element): New constructor.
6440         (~cmd_list_element): New destructor.
6441         (struct cmd_list_element): Add initializers.
6442         * cli/cli-decode.c (do_add_cmd): Use "new".
6443         (delete_cmd): Use "delete".
6444
6445 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6446             Pedro Alves <palves@redhat.com>
6447
6448         PR breakpoints/19806 and support for PR external/20207.
6449         * NEWS: Mention Aarch64 watchpoint improvements.
6450         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6451         watchpoints and PR external/20207 watchpoints.
6452         * nat/aarch64-linux-hw-point.c
6453         (kernel_supports_any_contiguous_range): New.
6454         (aarch64_watchpoint_offset): New.
6455         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6456         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6457         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6458         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6459         next_addr_orig_p.  Support PR external/20207 watchpoints.
6460         (aarch64_downgrade_regs): New.
6461         (aarch64_dr_state_insert_one_point): New parameters offset and
6462         addr_orig.
6463         (aarch64_dr_state_remove_one_point): Likewise.
6464         (aarch64_handle_breakpoint): Update caller.
6465         (aarch64_handle_aligned_watchpoint): Likewise.
6466         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6467         aligned_offset.
6468         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6469         aarch64_downgrade_regs.
6470         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6471         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6472         (DR_CONTROL_MASK): ... this.
6473         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6474         (unsigned int aarch64_watchpoint_offset): New prototype.
6475         (aarch64_linux_set_debug_regs): Remove const from state.
6476         * utils.c (align_up, align_down): Move to ...
6477         * common/common-utils.c (align_up, align_down): ... here.
6478         * utils.h (align_up, align_down): Move to ...
6479         * common/common-utils.h (align_up, align_down): ... here.
6480
6481 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6482
6483         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6484         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6485         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6486         Re-implement to match the ABI as summarized in GCC's
6487         gcc/config/sparc/sparc.c.  All callers updated.
6488         (sparc32_store_arguments): Remove assertion.
6489
6490 2018-05-04  Tom Tromey  <tom@tromey.com>
6491
6492         * printcmd.c: Don't include tui.h.
6493         (decode_format): Use skip_spaces.
6494
6495 2018-05-04  Tom Tromey  <tom@tromey.com>
6496
6497         PR gdb/22619:
6498         * printcmd.c (last_count): New global.
6499         (x_command): Use saved count when repeating.
6500
6501 2018-05-04  Tom Tromey  <tom@tromey.com>
6502
6503         * nto-procfs.c (do_closedir_cleanup): Remove.
6504         (procfs_pidlist): Use gdb_dir_up.
6505         * procfs.c (do_closedir_cleanup): Remove.
6506         (proc_update_threads): Use gdb_dir_up.
6507         * common/filestuff.h (struct gdb_dir_deleter): New.
6508         (gdb_dir_up): New typedef.
6509
6510 2018-05-04  Tom Tromey  <tom@tromey.com>
6511
6512         * ada-lang.c (print_mention_exception): Use std::string.
6513
6514 2018-05-04  Tom Tromey  <tom@tromey.com>
6515
6516         * ada-lang.c (create_excep_cond_exprs): Update.
6517         (ada_exception_catchpoint_cond_string): Use std::string.
6518
6519 2018-05-04  Tom Tromey  <tom@tromey.com>
6520
6521         * ada-lang.c (xget_renaming_scope): Return std::string.
6522         (old_renaming_is_invisible): Update.
6523
6524 2018-05-04  Tom Tromey  <tom@tromey.com>
6525
6526         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6527         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6528
6529 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6530
6531         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6532
6533 2018-05-04  Tom Tromey  <tom@tromey.com>
6534
6535         * remote.c (remote_query_supported_append): Change type.
6536         (remote_check_symbols): Update.
6537
6538 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6539
6540         PR gdb/11420
6541         * configure.ac: Prepend libpython.
6542         * python/python-config.py: Likewise.
6543         * configure: Regenerate.
6544
6545 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6546
6547         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6548
6549 2018-05-03  Pedro Alves  <palves@redhat.com>
6550
6551         * s390-linux-nat.c
6552         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6553         override.  Write 'true' instead of '1'.
6554         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6555         declaration.
6556
6557 2018-05-02  Pedro Alves  <palves@redhat.com>
6558
6559         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6560         add_inf_child_target.
6561         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6562         add_inf_child_target.
6563         * aix-thread.c (aix_thread_target_info): New.
6564         (aix_thread_target) <shortname, longname, doc>: Delete.
6565         <info>: New.
6566         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6567         add_inf_child_target.
6568         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6569         add_inf_child_target.
6570         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6571         add_inf_child_target.
6572         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6573         add_inf_child_target.
6574         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6575         add_inf_child_target.
6576         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6577         add_inf_child_target.
6578         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6579         add_inf_child_target.
6580         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6581         add_inf_child_target.
6582         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6583         add_inf_child_target.
6584         * bfd-target.c (target_bfd_target_info): New.
6585         (target_bfd) <shortname, longname, doc>: Delete.
6586         <info>: New.
6587         * bsd-kvm.c (bsd_kvm_target_info): New.
6588         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6589         <info>: New.
6590         (bsd_kvm_target::open): Rename to ...
6591         (bsd_kvm_target_open): ... this.  Adjust.
6592         * bsd-uthread.c (bsd_uthread_target_info): New.
6593         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6594         <info>: New.
6595         * corefile.c (core_file_command): Adjust.
6596         * corelow.c (core_target_info): New.
6597         (core_target) <shortname, longname, doc>: Delete.
6598         <info>: New.
6599         (core_target::open): Rename to ...
6600         (core_target_open): ... this.  Adjust.
6601         * ctf.c (ctf_target_info): New.
6602         (ctf_target) <shortname, longname, doc>: Delete.
6603         <info>: New.
6604         (ctf_target::open): Rename to ...
6605         (ctf_target_open): ... this.
6606         (_initialize_ctf): Adjust.
6607         * exec.c (exec_target_info): New.
6608         (exec_target) <shortname, longname, doc>: Delete.
6609         <info>: New.
6610         (exec_target::open): Rename to ...
6611         (exec_target_open): ... this.
6612         * gdbcore.h (core_target_open): Declare.
6613         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6614         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6615         add_inf_child_target.
6616         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6617         add_inf_child_target.
6618         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6619         add_inf_child_target.
6620         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6621         add_inf_child_target.
6622         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6623         add_inf_child_target.
6624         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6625         add_inf_child_target.
6626         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6627         add_inf_child_target.
6628         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6629         add_inf_child_target.
6630         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6631         add_inf_child_target.
6632         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6633         add_inf_child_target.
6634         * inf-child.c (inf_child_target_info): New.
6635         (inf_child_target::info): New.
6636         (inf_child_open_target): Remove 'target' parameter.  Use
6637         get_native_target instead.
6638         (inf_child_target::open): Delete.
6639         (add_inf_child_target): New.
6640         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6641         Delete.
6642         <info>: New.
6643         (add_inf_child_target): Declare.
6644         (inf_child_open_target): Declare.
6645         * linux-thread-db.c (thread_db_target_info): New.
6646         (thread_db_target) <shortname, longname, doc>: Delete.
6647         <info>: New.
6648         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6649         add_inf_child_target.
6650         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6651         add_inf_child_target.
6652         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6653         add_inf_child_target.
6654         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6655         add_inf_child_target.
6656         * make-target-delegates (print_class): Adjust.
6657         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6658         add_inf_child_target.
6659         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6660         add_inf_child_target.
6661         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6662         add_inf_child_target.
6663         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6664         add_inf_child_target.
6665         * nto-procfs.c (nto_native_target_info): New.
6666         (nto_procfs_target_native) <shortname, longname, doc>:
6667         Delete.
6668         <info>: New.
6669         (nto_procfs_target_info): New.
6670         (nto_procfs_target_procfs) <shortname, longname, doc>:
6671         Delete.
6672         <info>: New.
6673         (init_procfs_targets): Adjust.
6674         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6675         add_inf_child_target.
6676         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6677         add_inf_child_target.
6678         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6679         add_inf_child_target.
6680         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6681         add_inf_child_target.
6682         * ravenscar-thread.c (ravenscar_target_info): New.
6683         (ravenscar_thread_target) <shortname, longname, doc>:
6684         Delete.
6685         <info>: New.
6686         * record-btrace.c (record_btrace_target_info):
6687         (record_btrace_target) <shortname, longname, doc>: Delete.
6688         <info>: New.
6689         (record_btrace_target::open): Rename to ...
6690         (record_btrace_target_open): ... this.  Adjust.
6691         * record-full.c (record_longname, record_doc): New.
6692         (record_full_base_target) <shortname, longname, doc>: Delete.
6693         <info>: New.
6694         (record_full_target_info): New.
6695         (record_full_target): <shortname>: Delete.
6696         <info>: New.
6697         (record_full_core_open_1, record_full_open_1): Update comments.
6698         (record_full_base_target::open): Rename to ...
6699         (record_full_open): ... this.
6700         (cmd_record_full_restore): Update.
6701         (_initialize_record_full): Update.
6702         * remote-sim.c (remote_sim_target_info): New.
6703         (gdbsim_target) <shortname, longname, doc>: Delete.
6704         <info>: New.
6705         (gdbsim_target::open): Rename to ...
6706         (gdbsim_target_open): ... this.
6707         (_initialize_remote_sim): Adjust.
6708         * remote.c (remote_doc): New.
6709         (remote_target_info): New.
6710         (remote_target) <shortname, longname, doc>: Delete.
6711         <info>: New.
6712         (extended_remote_target_info): New.
6713         (extended_remote_target) <shortname, longname, doc>: Delete.
6714         <info>: New.
6715         (remote_target::open_1): Make static.  Adjust.
6716         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6717         * s390-linux-nat.c (_initialize_s390_nat): Use
6718         add_inf_child_target.
6719         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6720         add_inf_child_target.
6721         * sol-thread.c (thread_db_target_info): New.
6722         (sol_thread_target) <shortname, longname, doc>: Delete.
6723         <info>: New.
6724         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6725         add_inf_child_target.
6726         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6727         add_inf_child_target.
6728         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6729         add_inf_child_target.
6730         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6731         add_inf_child_target.
6732         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6733         add_inf_child_target.
6734         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6735         add_inf_child_target.
6736         * spu-linux-nat.c (_initialize_spu_nat): Use
6737         add_inf_child_target.
6738         * spu-multiarch.c (spu_multiarch_target_info): New.
6739         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6740         <info>: New.
6741         * target-delegates.c: Regenerate.
6742         * target.c: Include <unordered_map>.
6743         (target_ops_p): Delete.
6744         (DEF_VEC_P(target_ops_p)): Delete.
6745         (target_factories): New.
6746         (test_target_info): New.
6747         (test_target_ops::info): New.
6748         (open_target): Adjust to use target_factories.
6749         (add_target_with_completer): Rename to ...
6750         (add_target): ... this.  Change prototype.  Register target_info
6751         and open callback in target_factories.  Register target_info in
6752         command context instead of target_ops.
6753         (add_target): Delete old implementation.
6754         (add_deprecated_target_alias): Change prototype.  Adjust.
6755         (the_native_target): New.
6756         (set_native_target, get_native_target): New.
6757         (find_default_run_target): Use the_native_target.
6758         (find_attach_target, find_run_target): Simplify.
6759         (target_ops::open): Delete.
6760         (dummy_target_info): New.
6761         (dummy_target::shortname, dummy_target::longname)
6762         (dummy_target::doc): Delete.
6763         (dummy_target::info): New.
6764         (debug_target::shortname, debug_target::longname)
6765         (debug_target::doc): Delete.
6766         (debug_target::info): New.
6767         * target.h (struct target_info): New.
6768         (target_ops::~target_ops): Add comment.
6769         (target_ops::info): New.
6770         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6771         longer virtual.  Implement in terms of target_info.
6772         (set_native_target, get_native_target): Declare.
6773         (target_open_ftype): New.
6774         (add_target, add_target_with_completer)
6775         (add_deprecated_target_alias): Change prototype.
6776         (test_target) <shortname, longname, doc>: Delete.
6777         <info>: New.
6778         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6779         add_inf_child_target.
6780         * tracefile-tfile.c (tfile_target_info): New.
6781         (tfile_target) <shortname, longname, doc>: Delete.
6782         <info>: New.
6783         (tfile_target::open): Rename to ...
6784         (tfile_target_open): ... this.
6785         (_initialize_tracefile_tfile): Adjust.
6786         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6787         add_inf_child_target.
6788         * windows-nat.c (_initialize_windows_nat): Use
6789         add_inf_child_target.
6790         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6791         add_inf_child_target.
6792
6793 2018-05-02  Pedro Alves  <palves@redhat.com>
6794
6795         * linux-nat.h (linux_nat_target) <low_new_thread,
6796         low_delete_thread, low_new_fork, low_forget_process,
6797         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6798         New virtual methods.
6799         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6800         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6801         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6802         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6803         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6804         Delete.
6805         * linux-fork.c (delete_fork): Adjust to call low method.
6806         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6807         (linux_nat_new_fork, linux_nat_forget_process_hook)
6808         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6809         (linux_nat_status_is_event):
6810         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6811         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6812         to call low method.
6813         (sigtrap_is_event): Rename to ...
6814         (linux_nat_target::low_status_is_event): ... this.
6815         (linux_nat_set_status_is_event): Delete.
6816         (save_stop_reason, linux_nat_wait_1)
6817         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6818         low methods.
6819         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6820         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6821         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6822         (linux_nat_set_prepare_to_resume): Delete.
6823         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6824         low virtual methods.
6825         * amd64-linux-nat.c: Likewise.
6826         * arm-linux-nat.c: Likewise.
6827         * i386-linux-nat.c: Likewise.
6828         * ia64-linux-nat.c: Likewise.
6829         * mips-linux-nat.c: Likewise.
6830         * ppc-linux-nat.c: Likewise.
6831         * s390-linux-nat.c: Likewise.
6832         * sparc64-linux-nat.c: Likewise.
6833         * x86-linux-nat.c: Likewise.
6834         * x86-linux-nat.h: Include "nat/x86-linux.h".
6835         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6836         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6837         Override methods.
6838
6839 2018-05-02  Pedro Alves  <palves@redhat.com>
6840
6841         * target.h (target_ops)
6842         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6843         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6844         stopped_by_watchpoint, have_continuable_watchpoint,
6845         stopped_data_address, watchpoint_addr_within_range,
6846         can_accel_watchpoint_condition, can_run, thread_alive,
6847         has_all_memory, has_memory, has_stack, has_registers,
6848         has_execution, can_async_p, is_async_p, supports_non_stop,
6849         always_non_stop_p, can_execute_reverse, supports_multi_process,
6850         supports_enable_disable_tracepoint,
6851         supports_disable_randomization, supports_string_tracing,
6852         supports_evaluation_of_breakpoint_conditions,
6853         can_run_breakpoint_commands, filesystem_is_local,
6854         can_download_tracepoint, get_trace_state_variable_value,
6855         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6856         record_is_replaying, record_will_replay,
6857         augmented_libraries_svr4_read>: Adjust to return bool.
6858         * aarch64-linux-nat.c: All implementations adjusted.
6859         * aix-thread.c: All implementations adjusted.
6860         * arm-linux-nat.c: All implementations adjusted.
6861         * breakpoint.c: All implementations adjusted.
6862         * bsd-kvm.c: All implementations adjusted.
6863         * bsd-uthread.c: All implementations adjusted.
6864         * corelow.c: All implementations adjusted.
6865         * ctf.c: All implementations adjusted.
6866         * darwin-nat.c: All implementations adjusted.
6867         * darwin-nat.h: All implementations adjusted.
6868         * exec.c: All implementations adjusted.
6869         * fbsd-nat.c: All implementations adjusted.
6870         * fbsd-nat.h: All implementations adjusted.
6871         * gnu-nat.c: All implementations adjusted.
6872         * gnu-nat.h: All implementations adjusted.
6873         * go32-nat.c: All implementations adjusted.
6874         * ia64-linux-nat.c: All implementations adjusted.
6875         * inf-child.c: All implementations adjusted.
6876         * inf-child.h: All implementations adjusted.
6877         * inf-ptrace.c: All implementations adjusted.
6878         * inf-ptrace.h: All implementations adjusted.
6879         * linux-nat.c: All implementations adjusted.
6880         * linux-nat.h: All implementations adjusted.
6881         * mips-linux-nat.c: All implementations adjusted.
6882         * nto-procfs.c: All implementations adjusted.
6883         * ppc-linux-nat.c: All implementations adjusted.
6884         * procfs.c: All implementations adjusted.
6885         * ravenscar-thread.c: All implementations adjusted.
6886         * record-btrace.c: All implementations adjusted.
6887         * record-full.c: All implementations adjusted.
6888         * remote-sim.c: All implementations adjusted.
6889         * remote.c: All implementations adjusted.
6890         * s390-linux-nat.c: All implementations adjusted.
6891         * sol-thread.c: All implementations adjusted.
6892         * spu-multiarch.c: All implementations adjusted.
6893         * target-delegates.c: All implementations adjusted.
6894         * target.c: All implementations adjusted.
6895         * target.h: All implementations adjusted.
6896         * tracefile-tfile.c: All implementations adjusted.
6897         * tracefile.c: All implementations adjusted.
6898         * tracefile.h: All implementations adjusted.
6899         * windows-nat.c: All implementations adjusted.
6900         * x86-linux-nat.h: All implementations adjusted.
6901         * x86-nat.h: All implementations adjusted.
6902
6903 2018-05-02  Pedro Alves  <palves@redhat.com>
6904
6905         * make-target-delegates (scan_target_h): Don't trim lines here.
6906         Replace sequences of tabs and/or whitespace with a single
6907         whitespace.
6908         (top level, parsing methods): Trim each line before processing it
6909         here.
6910
6911 2018-05-02  Pedro Alves  <palves@redhat.com>
6912             John Baldwin  <jhb@freebsd.org>
6913
6914         * target.h (enum strata) <debug_stratum>: New.
6915         (struct target_ops) <all delegation methods>: Replace by C++
6916         virtual methods, and drop "to_" prefix.  All references updated
6917         throughout.
6918         <to_shortname, to_longname, to_doc, to_data,
6919         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6920         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6921         virtual methods.  All references updated throughout.
6922         <can_attach, supports_terminal_ours, can_create_inferior,
6923         get_thread_control_capabilities, attach_no_wait>: New
6924         virtual methods.
6925         <insert_breakpoint, remove_breakpoint>: Now
6926         TARGET_DEFAULT_NORETURN methods.
6927         <info_proc>: Now returns bool.
6928         <to_magic>: Delete.
6929         (OPS_MAGIC): Delete.
6930         (current_target): Delete.  All references replaced by references
6931         to ...
6932         (target_stack): ... this.  New.
6933         (target_shortname, target_longname): Adjust.
6934         (target_can_run): Now a function declaration.
6935         (default_child_has_all_memory, default_child_has_memory)
6936         (default_child_has_stack, default_child_has_registers)
6937         (default_child_has_execution): Remove target_ops parameter.
6938         (complete_target_initialization): Delete.
6939         (memory_breakpoint_target): New template class.
6940         (test_target_ops): Refactor as a C++ class with virtual methods.
6941         * make-target-delegates (NAME_PART): Tighten.
6942         (POINTER_PART, CP_SYMBOL): New.
6943         (SIMPLE_RETURN_PART): Reimplement.
6944         (VEC_RETURN_PART): Expect less.
6945         (RETURN_PART, VIRTUAL_PART): New.
6946         (METHOD): Adjust to C++ virtual methods.
6947         (scan_target_h): Remove reference to C99.
6948         (dname): Output "target_ops::" prefix.
6949         (write_function_header): Adjust to output a C++ class method.
6950         (write_declaration): New.
6951         (write_delegator): Adjust to output a C++ class method.
6952         (tdname): Output "dummy_target::" prefix.
6953         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6954         method.
6955         (tdefault_names, debug_names): Delete.
6956         (return_types, tdefaults, styles, argtypes_array): New.
6957         (top level): All methods are delegators.
6958         (print_class): New.
6959         (top level): Print dummy_target and debug_target classes.
6960         * target-delegates.c: Regenerate.
6961         * target-debug.h (target_debug_print_enum_info_proc_what)
6962         (target_debug_print_thread_control_capabilities)
6963         (target_debug_print_thread_info_p): New.
6964         * target.c (dummy_target): Delete.
6965         (the_dummy_target, the_debug_target): New.
6966         (target_stack): Now extern.
6967         (set_targetdebug): Push/unpush debug target.
6968         (default_child_has_all_memory, default_child_has_memory)
6969         (default_child_has_stack, default_child_has_registers)
6970         (default_child_has_execution): Remove target_ops parameter.
6971         (complete_target_initialization): Delete.
6972         (add_target_with_completer): No longer call
6973         complete_target_initialization.
6974         (target_supports_terminal_ours): Use regular delegation.
6975         (update_current_target): Delete.
6976         (push_target): No longer check magic number.  Don't call
6977         update_current_target.
6978         (unpush_target): Don't call update_current_target.
6979         (target_is_pushed): No longer check magic number.
6980         (target_require_runnable): Skip for all stratums over
6981         process_stratum.
6982         (target_ops::info_proc): New.
6983         (target_info_proc): Use find_target_at and
6984         find_default_run_target.
6985         (target_supports_disable_randomization): Use regular delegation.
6986         (target_get_osdata): Use find_target_at.
6987         (target_ops::open, target_ops::close, target_ops::can_attach)
6988         (target_ops::attach, target_ops::can_create_inferior)
6989         (target_ops::create_inferior, target_ops::can_run)
6990         (target_can_run): New.
6991         (default_fileio_target): Use regular delegation.
6992         (target_ops::fileio_open, target_ops::fileio_pwrite)
6993         (target_ops::fileio_pread, target_ops::fileio_fstat)
6994         (target_ops::fileio_close, target_ops::fileio_unlink)
6995         (target_ops::fileio_readlink): New.
6996         (target_fileio_open_1, target_fileio_unlink)
6997         (target_fileio_readlink): Always call the target method.  Handle
6998         FILEIO_ENOSYS.
6999         (return_zero, return_zero_has_execution): Delete.
7000         (init_dummy_target): Delete.
7001         (dummy_target::dummy_target, dummy_target::shortname)
7002         (dummy_target::longname, dummy_target::doc)
7003         (debug_target::debug_target, debug_target::shortname)
7004         (debug_target::longname, debug_target::doc): New.
7005         (target_supports_delete_record): Use regular delegation.
7006         (setup_target_debug): Delete.
7007         (maintenance_print_target_stack): Skip debug_stratum.
7008         (initialize_targets): Instantiate the_dummy_target and
7009         the_debug_target.
7010         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7011         use target_stack.
7012         (target_auxv_search, fprint_target_auxv): Adjust.
7013         (info_auxv_command): Adjust to use target_stack.
7014         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7015         * exceptions.c (print_flush): Handle a NULL target_stack.
7016         * regcache.c (target_ops_no_register): Refactor as class with
7017         virtual methods.
7018
7019         * exec.c (exec_target): New class.
7020         (exec_ops): Now an exec_target.
7021         (exec_open, exec_close_1, exec_get_section_table)
7022         (exec_xfer_partial, exec_files_info, exec_has_memory)
7023         (exec_make_note_section): Refactor as exec_target methods.
7024         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7025         Delete.
7026         (exec_target::find_memory_regions): New.
7027         (_initialize_exec): Don't call init_exec_ops.
7028         * gdbcore.h (exec_file_clear): Delete.
7029
7030         * corefile.c (core_target): Delete.
7031         (core_file_command): Adjust.
7032         * corelow.c (core_target): New class.
7033         (the_core_target): New.
7034         (core_close): Remove target_ops parameter.
7035         (core_close_cleanup): Adjust.
7036         (core_target::close): New.
7037         (core_open, core_detach, get_core_registers, core_files_info)
7038         (core_xfer_partial, core_thread_alive, core_read_description)
7039         (core_pid_to_str, core_thread_name, core_has_memory)
7040         (core_has_stack, core_has_registers, core_info_proc): Rework as
7041         core_target methods.
7042         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7043         (_initialize_corelow): Initialize the_core_target.
7044         * gdbcore.h (core_target): Delete.
7045         (the_core_target): New.
7046
7047         * ctf.c: (ctf_target): New class.
7048         (ctf_ops): Now a ctf_target.
7049         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7050         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7051         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7052         methods.
7053         (init_ctf_ops): Delete.
7054         (_initialize_ctf): Don't call it.
7055         * tracefile-tfile.c (tfile_target): New class.
7056         (tfile_ops): Now a tfile_target.
7057         (tfile_open, tfile_close, tfile_files_info)
7058         (tfile_get_tracepoint_status, tfile_trace_find)
7059         (tfile_fetch_registers, tfile_xfer_partial)
7060         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7061         Refactor as tfile_target methods.
7062         (tfile_xfer_partial_features): Remove target_ops parameter.
7063         (init_tfile_ops): Delete.
7064         (_initialize_tracefile_tfile): Don't call it.
7065         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7066         (tracefile_has_stack, tracefile_has_registers)
7067         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7068         tracefile_target methods.
7069         (init_tracefile_ops): Delete.
7070         (tracefile_target::tracefile_target): New.
7071         * tracefile.h: Include "target.h".
7072         (tracefile_target): New class.
7073         (init_tracefile_ops): Delete.
7074
7075         * spu-multiarch.c (spu_multiarch_target): New class.
7076         (spu_ops): Now a spu_multiarch_target.
7077         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7078         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7079         (spu_search_memory, spu_mourn_inferior): Refactor as
7080         spu_multiarch_target methods.
7081         (init_spu_ops): Delete.
7082         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7083         complete_target_initialization.
7084
7085         * ravenscar-thread.c (ravenscar_thread_target): New class.
7086         (ravenscar_ops): Now a ravenscar_thread_target.
7087         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7088         (ravenscar_thread_alive, ravenscar_pid_to_str)
7089         (ravenscar_fetch_registers, ravenscar_store_registers)
7090         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7091         (ravenscar_stopped_by_hw_breakpoint)
7092         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7093         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7094         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7095         methods.
7096         (init_ravenscar_thread_ops): Delete.
7097         (_initialize_ravenscar): Remove references to
7098         init_ravenscar_thread_ops and complete_target_initialization.
7099
7100         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7101         (bsd_uthread_target): New class.
7102         (bsd_uthread_ops): Now a bsd_uthread_target.
7103         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7104         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7105         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7106         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7107         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7108         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7109         (bsd_uthread_target): Delete function.
7110         (_initialize_bsd_uthread): Remove reference to
7111         complete_target_initialization.
7112
7113         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7114         (target_bfd): ... this new class.
7115         (target_bfd_xfer_partial, target_bfd_get_section_table)
7116         (target_bfd_close): Refactor as target_bfd methods.
7117         (target_bfd::~target_bfd): New.
7118         (target_bfd_reopen): Adjust.
7119         (target_bfd::close): New.
7120
7121         * record-btrace.c (record_btrace_target): New class.
7122         (record_btrace_ops): Now a record_btrace_target.
7123         (record_btrace_open, record_btrace_stop_recording)
7124         (record_btrace_disconnect, record_btrace_close)
7125         (record_btrace_async, record_btrace_info)
7126         (record_btrace_insn_history, record_btrace_insn_history_range)
7127         (record_btrace_insn_history_from, record_btrace_call_history)
7128         (record_btrace_call_history_range)
7129         (record_btrace_call_history_from, record_btrace_record_method)
7130         (record_btrace_is_replaying, record_btrace_will_replay)
7131         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7132         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7133         (record_btrace_store_registers, record_btrace_prepare_to_store)
7134         (record_btrace_to_get_unwinder)
7135         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7136         (record_btrace_commit_resume, record_btrace_wait)
7137         (record_btrace_stop, record_btrace_can_execute_reverse)
7138         (record_btrace_stopped_by_sw_breakpoint)
7139         (record_btrace_supports_stopped_by_sw_breakpoint)
7140         (record_btrace_stopped_by_hw_breakpoint)
7141         (record_btrace_supports_stopped_by_hw_breakpoint)
7142         (record_btrace_update_thread_list, record_btrace_thread_alive)
7143         (record_btrace_goto_begin, record_btrace_goto_end)
7144         (record_btrace_goto, record_btrace_stop_replaying_all)
7145         (record_btrace_execution_direction)
7146         (record_btrace_prepare_to_generate_core)
7147         (record_btrace_done_generating_core): Refactor as
7148         record_btrace_target methods.
7149         (init_record_btrace_ops): Delete.
7150         (_initialize_record_btrace): Remove reference to
7151         init_record_btrace_ops.
7152         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7153         the execution_direction global.
7154         (record_full_base_target, record_full_target)
7155         (record_full_core_target): New classes.
7156         (record_full_ops): Now a record_full_target.
7157         (record_full_core_ops): Now a record_full_core_target.
7158         (record_full_target::detach, record_full_target::disconnect)
7159         (record_full_core_target::disconnect)
7160         (record_full_target::mourn_inferior, record_full_target::kill):
7161         New.
7162         (record_full_open, record_full_close, record_full_async): Refactor
7163         as methods of the record_full_base_target class.
7164         (record_full_resume, record_full_commit_resume): Refactor
7165         as methods of the record_full_target class.
7166         (record_full_wait, record_full_stopped_by_watchpoint)
7167         (record_full_stopped_data_address)
7168         (record_full_stopped_by_sw_breakpoint)
7169         (record_full_supports_stopped_by_sw_breakpoint)
7170         (record_full_stopped_by_hw_breakpoint)
7171         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7172         methods of the record_full_base_target class.
7173         (record_full_store_registers, record_full_xfer_partial)
7174         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7175         Refactor as methods of the record_full_target class.
7176         (record_full_can_execute_reverse, record_full_get_bookmark)
7177         (record_full_goto_bookmark, record_full_execution_direction)
7178         (record_full_record_method, record_full_info, record_full_delete)
7179         (record_full_is_replaying, record_full_will_replay)
7180         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7181         (record_full_stop_replaying): Refactor as methods of the
7182         record_full_base_target class.
7183         (record_full_core_resume, record_full_core_kill)
7184         (record_full_core_fetch_registers)
7185         (record_full_core_prepare_to_store)
7186         (record_full_core_store_registers, record_full_core_xfer_partial)
7187         (record_full_core_insert_breakpoint)
7188         (record_full_core_remove_breakpoint)
7189         (record_full_core_has_execution): Refactor
7190         as methods of the record_full_core_target class.
7191         (record_full_base_target::supports_delete_record): New.
7192         (init_record_full_ops): Delete.
7193         (init_record_full_core_ops): Delete.
7194         (record_full_save): Refactor as method of the
7195         record_full_base_target class.
7196         (_initialize_record_full): Remove references to
7197         init_record_full_ops and init_record_full_core_ops.
7198
7199         * remote.c (remote_target, extended_remote_target): New classes.
7200         (remote_ops): Now a remote_target.
7201         (extended_remote_ops): Now an extended_remote_target.
7202         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7203         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7204         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7205         (remote_pass_signals, remote_set_syscall_catchpoint)
7206         (remote_program_signals, )
7207         (remote_thread_always_alive): Remove target_ops parameter.
7208         (remote_thread_alive, remote_thread_name)
7209         (remote_update_thread_list, remote_threads_extra_info)
7210         (remote_static_tracepoint_marker_at)
7211         (remote_static_tracepoint_markers_by_strid)
7212         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7213         (remote_open): Refactor as methods of remote_target.
7214         (extended_remote_open, extended_remote_detach)
7215         (extended_remote_attach, extended_remote_post_attach):
7216         (extended_remote_supports_disable_randomization)
7217         (extended_remote_create_inferior): : Refactor as method of
7218         extended_remote_target.
7219         (remote_set_permissions, remote_open_1, remote_detach)
7220         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7221         (remote_resume, remote_commit_resume, remote_stop)
7222         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7223         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7224         (remote_prepare_to_store, remote_store_registers)
7225         (remote_flash_erase, remote_flash_done, remote_files_info)
7226         (remote_kill, remote_mourn, remote_insert_breakpoint)
7227         (remote_remove_breakpoint, remote_insert_watchpoint)
7228         (remote_watchpoint_addr_within_range)
7229         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7230         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7231         (remote_supports_stopped_by_sw_breakpoint)
7232         (remote_stopped_by_hw_breakpoint)
7233         (remote_supports_stopped_by_hw_breakpoint)
7234         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7235         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7236         (remote_verify_memory): Refactor as methods of remote_target.
7237         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7238         parameter.
7239         (remote_xfer_partial, remote_get_memory_xfer_limit)
7240         (remote_search_memory, remote_rcmd, remote_memory_map)
7241         (remote_pid_to_str, remote_get_thread_local_address)
7242         (remote_get_tib_address, remote_read_description): Refactor as
7243         methods of remote_target.
7244         (remote_target::fileio_open, remote_target::fileio_pwrite)
7245         (remote_target::fileio_pread, remote_target::fileio_close): New.
7246         (remote_hostio_readlink, remote_hostio_fstat)
7247         (remote_filesystem_is_local, remote_can_execute_reverse)
7248         (remote_supports_non_stop, remote_supports_disable_randomization)
7249         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7250         (remote_supports_enable_disable_tracepoint)
7251         (remote_supports_string_tracing)
7252         (remote_can_run_breakpoint_commands, remote_trace_init)
7253         (remote_download_tracepoint, remote_can_download_tracepoint)
7254         (remote_download_trace_state_variable, remote_enable_tracepoint)
7255         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7256         (remote_trace_start, remote_get_trace_status)
7257         (remote_get_tracepoint_status, remote_trace_stop)
7258         (remote_trace_find, remote_get_trace_state_variable_value)
7259         (remote_save_trace_data, remote_get_raw_trace_data)
7260         (remote_set_disconnected_tracing, remote_core_of_thread)
7261         (remote_set_circular_trace_buffer, remote_traceframe_info)
7262         (remote_get_min_fast_tracepoint_insn_len)
7263         (remote_set_trace_buffer_size, remote_set_trace_notes)
7264         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7265         (remote_disable_btrace, remote_teardown_btrace)
7266         (remote_read_btrace, remote_btrace_conf)
7267         (remote_augmented_libraries_svr4_read, remote_load)
7268         (remote_pid_to_exec_file, remote_can_do_single_step)
7269         (remote_execution_direction, remote_thread_handle_to_thread_info):
7270         Refactor as methods of remote_target.
7271         (init_remote_ops, init_extended_remote_ops): Delete.
7272         (remote_can_async_p, remote_is_async_p, remote_async)
7273         (remote_thread_events, remote_upload_tracepoints)
7274         (remote_upload_trace_state_variables): Refactor as methods of
7275         remote_target.
7276         (_initialize_remote): Remove references to init_remote_ops and
7277         init_extended_remote_ops.
7278
7279         * remote-sim.c (gdbsim_target): New class.
7280         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7281         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7282         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7283         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7284         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7285         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7286         Refactor as methods of gdbsim_target.
7287         (gdbsim_ops): Now a gdbsim_target.
7288         (init_gdbsim_ops): Delete.
7289         (gdbsim_cntrl_c): Adjust.
7290         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7291
7292         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7293         (the_amd64_linux_nat_target): New.
7294         (amd64_linux_fetch_inferior_registers)
7295         (amd64_linux_store_inferior_registers): Refactor as methods of
7296         amd64_linux_nat_target.
7297         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7298         * i386-linux-nat.c: Don't include "linux-nat.h".
7299         (i386_linux_nat_target): New class.
7300         (the_i386_linux_nat_target): New.
7301         (i386_linux_fetch_inferior_registers)
7302         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7303         as methods of i386_linux_nat_target.
7304         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7305         * inf-child.c (inf_child_ops): Delete.
7306         (inf_child_fetch_inferior_registers)
7307         (inf_child_store_inferior_registers): Delete.
7308         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7309         methods of inf_child_target.
7310         (inf_child_target::supports_terminal_ours)
7311         (inf_child_target::terminal_init)
7312         (inf_child_target::terminal_inferior)
7313         (inf_child_target::terminal_ours_for_output)
7314         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7315         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7316         New.
7317         (inf_child_open, inf_child_disconnect, inf_child_close)
7318         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7319         (inf_child_post_startup_inferior, inf_child_can_run)
7320         (inf_child_pid_to_exec_file): Refactor as methods of
7321         inf_child_target.
7322         (inf_child_follow_fork): Delete.
7323         (inf_child_target::can_create_inferior)
7324         (inf_child_target::can_attach): New.
7325         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7326         (inf_child_target::has_stack, inf_child_target::has_registers)
7327         (inf_child_target::has_execution): New.
7328         (inf_child_fileio_open, inf_child_fileio_pwrite)
7329         (inf_child_fileio_pread, inf_child_fileio_fstat)
7330         (inf_child_fileio_close, inf_child_fileio_unlink)
7331         (inf_child_fileio_readlink, inf_child_use_agent)
7332         (inf_child_can_use_agent): Refactor as methods of
7333         inf_child_target.
7334         (return_zero, inf_child_target): Delete.
7335         (inf_child_target::inf_child_target): New.
7336         * inf-child.h: Include "target.h".
7337         (inf_child_target): Delete function prototype.
7338         (inf_child_target): New class.
7339         (inf_child_open_target, inf_child_mourn_inferior)
7340         (inf_child_maybe_unpush_target): Delete.
7341         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7342         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7343         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7344         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7345         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7346         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7347         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7348         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7349         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7350         methods of inf_ptrace_target.
7351         (inf_ptrace_target): Delete function.
7352         * inf-ptrace.h: Include "inf-child.h".
7353         (inf_ptrace_target): Delete function declaration.
7354         (inf_ptrace_target): New class.
7355         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7356         * linux-nat.c (linux_target): New.
7357         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7358         (linux_nat_target::~linux_nat_target): New.
7359         (linux_child_post_attach, linux_child_post_startup_inferior)
7360         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7361         (linux_child_remove_fork_catchpoint)
7362         (linux_child_insert_vfork_catchpoint)
7363         (linux_child_remove_vfork_catchpoint)
7364         (linux_child_insert_exec_catchpoint)
7365         (linux_child_remove_exec_catchpoint)
7366         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7367         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7368         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7369         (linux_nat_stopped_data_address)
7370         (linux_nat_stopped_by_sw_breakpoint)
7371         (linux_nat_supports_stopped_by_sw_breakpoint)
7372         (linux_nat_stopped_by_hw_breakpoint)
7373         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7374         (linux_nat_kill, linux_nat_mourn_inferior)
7375         (linux_nat_xfer_partial, linux_nat_thread_alive)
7376         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7377         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7378         (linux_child_static_tracepoint_markers_by_strid)
7379         (linux_nat_is_async_p, linux_nat_can_async_p)
7380         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7381         (linux_nat_supports_multi_process)
7382         (linux_nat_supports_disable_randomization, linux_nat_async)
7383         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7384         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7385         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7386         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7387         methods of linux_nat_target.
7388         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7389         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7390         parameter.
7391         (check_stopped_by_watchpoint): Adjust.
7392         (linux_xfer_partial): Delete.
7393         (linux_target_install_ops, linux_target, linux_nat_add_target):
7394         Delete.
7395         (linux_nat_target::linux_nat_target): New.
7396         * linux-nat.h: Include "inf-ptrace.h".
7397         (linux_nat_target): New.
7398         (linux_target, linux_target_install_ops, linux_nat_add_target):
7399         Delete function declarations.
7400         (linux_target): Declare global.
7401         * linux-thread-db.c (thread_db_target): New.
7402         (thread_db_target::thread_db_target): New.
7403         (thread_db_ops): Delete.
7404         (the_thread_db_target): New.
7405         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7406         (thread_db_update_thread_list, thread_db_pid_to_str)
7407         (thread_db_extra_thread_info)
7408         (thread_db_thread_handle_to_thread_info)
7409         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7410         (thread_db_resume): Refactor as methods of thread_db_target.
7411         (init_thread_db_ops): Delete.
7412         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7413         * x86-linux-nat.c: Don't include "linux-nat.h".
7414         (super_post_startup_inferior): Delete.
7415         (x86_linux_nat_target::~x86_linux_nat_target): New.
7416         (x86_linux_child_post_startup_inferior)
7417         (x86_linux_read_description, x86_linux_enable_btrace)
7418         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7419         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7420         methods of x86_linux_nat_target.
7421         (x86_linux_create_target): Delete.  Bits folded ...
7422         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7423         pointer.
7424         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7425         (x86_linux_nat_target): New class.
7426         (x86_linux_create_target): Delete.
7427         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7428         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7429         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7430         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7431         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7432         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7433         make extern.
7434         (x86_use_watchpoints): Delete.
7435         * x86-nat.h: Include "breakpoint.h" and "target.h".
7436         (x86_use_watchpoints): Delete.
7437         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7438         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7439         (x86_insert_watchpoint, x86_remove_watchpoint)
7440         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7441         (x86_stopped_by_hw_breakpoint): New declarations.
7442         (x86_nat_target): New template class.
7443
7444         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7445         (the_ppc_linux_nat_target): New.
7446         (ppc_linux_fetch_inferior_registers)
7447         (ppc_linux_can_use_hw_breakpoint)
7448         (ppc_linux_region_ok_for_hw_watchpoint)
7449         (ppc_linux_ranged_break_num_registers)
7450         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7451         (ppc_linux_insert_mask_watchpoint)
7452         (ppc_linux_remove_mask_watchpoint)
7453         (ppc_linux_can_accel_watchpoint_condition)
7454         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7455         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7456         (ppc_linux_watchpoint_addr_within_range)
7457         (ppc_linux_masked_watch_num_registers)
7458         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7459         (ppc_linux_read_description): Refactor as methods of
7460         ppc_linux_nat_target.
7461         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7462
7463         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7464         (procfs_target): New class.
7465         (the_procfs_target): New.
7466         (procfs_target): Delete function.
7467         (procfs_auxv_parse, procfs_attach, procfs_detach)
7468         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7469         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7470         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7471         (procfs_create_inferior, procfs_update_thread_list)
7472         (procfs_thread_alive, procfs_pid_to_str)
7473         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7474         (procfs_stopped_data_address, procfs_insert_watchpoint)
7475         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7476         (proc_find_memory_regions, procfs_info_proc)
7477         (procfs_make_note_section): Refactor as methods of procfs_target.
7478         (_initialize_procfs): Adjust.
7479         * sol-thread.c (sol_thread_target): New class.
7480         (sol_thread_ops): Now a sol_thread_target.
7481         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7482         (sol_thread_fetch_registers, sol_thread_store_registers)
7483         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7484         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7485         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7486         (init_sol_thread_ops): Delete.
7487         (_initialize_sol_thread): Adjust.  Remove references to
7488         init_sol_thread_ops and complete_target_initialization.
7489
7490         * windows-nat.c (windows_nat_target): New class.
7491         (windows_fetch_inferior_registers)
7492         (windows_store_inferior_registers, windows_resume, windows_wait)
7493         (windows_attach, windows_detach, windows_pid_to_exec_file)
7494         (windows_files_info, windows_create_inferior)
7495         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7496         (windows_close, windows_pid_to_str, windows_xfer_partial)
7497         (windows_get_tib_address, windows_get_ada_task_ptid)
7498         (windows_thread_name, windows_thread_alive): Refactor as
7499         windows_nat_target methods.
7500         (do_initial_windows_stuff): Adjust.
7501         (windows_target): Delete function.
7502         (_initialize_windows_nat): Adjust.
7503
7504         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7505         (darwin_mourn_inferior, darwin_kill_inferior)
7506         (darwin_create_inferior, darwin_attach, darwin_detach)
7507         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7508         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7509         (darwin_supports_multi_process): Refactor as darwin_nat_target
7510         methods.
7511         (darwin_resume_to, darwin_files_info): Delete.
7512         (_initialize_darwin_inferior): Rename to ...
7513         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7514         * darwin-nat.h: Include "inf-child.h".
7515         (darwin_nat_target): New class.
7516         (darwin_complete_target): Delete.
7517         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7518         (darwin_target): New.
7519         (i386_darwin_fetch_inferior_registers)
7520         (i386_darwin_store_inferior_registers): Refactor as methods of
7521         darwin_nat_target.
7522         (darwin_complete_target): Delete, with ...
7523         (_initialize_i386_darwin_nat): ... bits factored out here.
7524
7525         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7526         (the_alpha_linux_nat_target): New.
7527         (alpha_linux_register_u_offset): Refactor as
7528         alpha_linux_nat_target method.
7529         (_initialize_alpha_linux_nat): Adjust.
7530         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7531         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7532         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7533         methods of linux_nat_trad_target.
7534         (linux_trad_target): Delete.
7535         * linux-nat-trad.h (linux_trad_target): Delete function.
7536         (linux_nat_trad_target): New class.
7537         * mips-linux-nat.c (mips_linux_nat_target): New class.
7538         (super_fetch_registers, super_store_registers, super_close):
7539         Delete.
7540         (the_mips_linux_nat_target): New.
7541         (mips64_linux_regsets_fetch_registers)
7542         (mips64_linux_regsets_store_registers)
7543         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7544         (mips_linux_register_u_offset, mips_linux_read_description)
7545         (mips_linux_can_use_hw_breakpoint)
7546         (mips_linux_stopped_by_watchpoint)
7547         (mips_linux_stopped_data_address)
7548         (mips_linux_region_ok_for_hw_watchpoint)
7549         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7550         (mips_linux_close): Refactor as methods of mips_linux_nat.
7551         (_initialize_mips_linux_nat): Adjust to C++ification.
7552
7553         * aix-thread.c (aix_thread_target): New class.
7554         (aix_thread_ops): Now an aix_thread_target.
7555         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7556         (aix_thread_fetch_registers, aix_thread_store_registers)
7557         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7558         (aix_thread_thread_alive, aix_thread_pid_to_str)
7559         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7560         Refactor as methods of aix_thread_target.
7561         (init_aix_thread_ops): Delete.
7562         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7563         and complete_target_initialization.
7564         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7565         (rs6000_nat_target): New class.
7566         (the_rs6000_nat_target): New.
7567         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7568         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7569         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7570         (super_create_inferior): Delete.
7571         (_initialize_rs6000_nat): Adjust to C++ification.
7572
7573         * arm-linux-nat.c (arm_linux_nat_target): New class.
7574         (the_arm_linux_nat_target): New.
7575         (arm_linux_fetch_inferior_registers)
7576         (arm_linux_store_inferior_registers, arm_linux_read_description)
7577         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7578         (arm_linux_remove_hw_breakpoint)
7579         (arm_linux_region_ok_for_hw_watchpoint)
7580         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7581         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7582         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7583         arm_linux_nat_target.
7584         (_initialize_arm_linux_nat): Adjust to C++ification.
7585
7586         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7587         (the_aarch64_linux_nat_target): New.
7588         (aarch64_linux_fetch_inferior_registers)
7589         (aarch64_linux_store_inferior_registers)
7590         (aarch64_linux_child_post_startup_inferior)
7591         (aarch64_linux_read_description)
7592         (aarch64_linux_can_use_hw_breakpoint)
7593         (aarch64_linux_insert_hw_breakpoint)
7594         (aarch64_linux_remove_hw_breakpoint)
7595         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7596         (aarch64_linux_region_ok_for_hw_watchpoint)
7597         (aarch64_linux_stopped_data_address)
7598         (aarch64_linux_stopped_by_watchpoint)
7599         (aarch64_linux_watchpoint_addr_within_range)
7600         (aarch64_linux_can_do_single_step): Refactor as methods of
7601         aarch64_linux_nat_target.
7602         (super_post_startup_inferior): Delete.
7603         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7604
7605         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7606         (the_hppa_linux_nat_target): New.
7607         (hppa_linux_fetch_inferior_registers)
7608         (hppa_linux_store_inferior_registers): Refactor as methods of
7609         hppa_linux_nat_target.
7610         (_initialize_hppa_linux_nat): Adjust to C++ification.
7611
7612         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7613         (the_ia64_linux_nat_target): New.
7614         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7615         (ia64_linux_stopped_data_address)
7616         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7617         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7618         ia64_linux_nat_target methods.
7619         (super_xfer_partial): Delete.
7620         (_initialize_ia64_linux_nat): Adjust to C++ification.
7621
7622         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7623         (the_m32r_linux_nat_target): New.
7624         (m32r_linux_fetch_inferior_registers)
7625         (m32r_linux_store_inferior_registers): Refactor as
7626         m32r_linux_nat_target methods.
7627         (_initialize_m32r_linux_nat): Adjust to C++ification.
7628
7629         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7630         (the_m68k_linux_nat_target): New.
7631         (m68k_linux_fetch_inferior_registers)
7632         (m68k_linux_store_inferior_registers): Refactor as
7633         m68k_linux_nat_target methods.
7634         (_initialize_m68k_linux_nat): Adjust to C++ification.
7635
7636         * s390-linux-nat.c (s390_linux_nat_target): New class.
7637         (the_s390_linux_nat_target): New.
7638         (s390_linux_fetch_inferior_registers)
7639         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7640         (s390_insert_watchpoint, s390_remove_watchpoint)
7641         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7642         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7643         (s390_auxv_parse, s390_read_description): Refactor as methods of
7644         s390_linux_nat_target.
7645         (_initialize_s390_nat): Adjust to C++ification.
7646
7647         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7648         (the_sparc_linux_nat_target): New.
7649         (_initialize_sparc_linux_nat): Adjust to C++ification.
7650         * sparc-nat.c (sparc_fetch_inferior_registers)
7651         (sparc_store_inferior_registers): Remove target_ops parameter.
7652         * sparc-nat.h (sparc_fetch_inferior_registers)
7653         (sparc_store_inferior_registers): Remove target_ops parameter.
7654         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7655         (the_sparc64_linux_nat_target): New.
7656         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7657
7658         * spu-linux-nat.c (spu_linux_nat_target): New class.
7659         (the_spu_linux_nat_target): New.
7660         (spu_child_post_startup_inferior, spu_child_post_attach)
7661         (spu_child_wait, spu_fetch_inferior_registers)
7662         (spu_store_inferior_registers, spu_xfer_partial)
7663         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7664         methods.
7665         (_initialize_spu_nat): Adjust to C++ification.
7666
7667         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7668         (the_tilegx_linux_nat_target): New.
7669         (fetch_inferior_registers, store_inferior_registers):
7670         Refactor as methods.
7671         (_initialize_tile_linux_nat): Adjust to C++ification.
7672
7673         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7674         (the_xtensa_linux_nat_target): New.
7675         (xtensa_linux_fetch_inferior_registers)
7676         (xtensa_linux_store_inferior_registers): Refactor as
7677         xtensa_linux_nat_target methods.
7678         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7679
7680         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7681         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7682         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7683         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7684         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7685         (fbsd_stopped_by_sw_breakpoint)
7686         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7687         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7688         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7689         (fbsd_post_startup_inferior, fbsd_post_attach)
7690         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7691         (fbsd_set_syscall_catchpoint)
7692         (super_xfer_partial, super_resume, super_wait)
7693         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7694         (fbsd_handle_debug_trap): Remove target_ops parameter.
7695         (fbsd_nat_add_target): Delete.
7696         * fbsd-nat.h: Include "inf-ptrace.h".
7697         (fbsd_nat_add_target): Delete.
7698         (USE_SIGTRAP_SIGINFO): Define.
7699         (fbsd_nat_target): New class.
7700
7701         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7702         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7703         (amd64bsd_target): Delete.
7704         * amd64-bsd-nat.h: New file.
7705         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7706         "x86-bsd-nat.h".
7707         (amd64_fbsd_nat_target): New class.
7708         (the_amd64_fbsd_nat_target): New.
7709         (amd64fbsd_read_description): Refactor as method of
7710         amd64_fbsd_nat_target.
7711         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7712         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7713         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7714         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7715         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7716         (i386bsd_target): Delete.
7717         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7718         (i386bsd_fetch_inferior_registers)
7719         (i386bsd_store_inferior_registers): Declare.
7720         (i386_bsd_nat_target): New class.
7721         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7722         (the_i386_fbsd_nat_target): New.
7723         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7724         i386_fbsd_nat_target methods.
7725         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7726         (_initialize_i386fbsd_nat): Adjust to C++ification.
7727         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7728         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7729         (_initialize_x86_bsd_nat): Adjust to C++ification.
7730         * x86-bsd-nat.h: Include "x86-nat.h".
7731         (x86bsd_target): Delete declaration.
7732         (x86bsd_nat_target): New class.
7733
7734         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7735         (the_aarch64_fbsd_nat_target): New.
7736         (aarch64_fbsd_fetch_inferior_registers)
7737         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7738         aarch64_fbsd_nat_target.
7739         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7740         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7741         (the_alpha_bsd_nat_target): New.
7742         (alphabsd_fetch_inferior_registers)
7743         (alphabsd_store_inferior_registers): Refactor as
7744         alpha_bsd_nat_target methods.
7745         (_initialize_alphabsd_nat): Refactor as methods of
7746         alpha_bsd_nat_target.
7747         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7748         (the_amd64_nbsd_nat_target): New.
7749         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7750         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7751         (the_amd64_obsd_nat_target): New.
7752         (_initialize_amd64obsd_nat): Adjust to C++ification.
7753         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7754         (the_arm_fbsd_nat_target): New.
7755         (arm_fbsd_fetch_inferior_registers)
7756         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7757         (_initialize_arm_fbsd_nat): Refactor as methods of
7758         arm_fbsd_nat_target.
7759         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7760         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7761         (the_arm_netbsd_nat_target): New.
7762         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7763         arm_netbsd_nat_target.
7764         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7765         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7766         (the_hppa_nbsd_nat_target): New.
7767         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7768         hppa_nbsd_nat_target methods.
7769         (_initialize_hppanbsd_nat): Adjust to C++ification.
7770         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7771         (the_hppa_obsd_nat_target): New.
7772         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7773         methods of hppa_obsd_nat_target.
7774         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7775         add_target.
7776         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7777         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7778         add_target.
7779         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7780         (_initialize_i386obsd_nat): Use add_target.
7781         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7782         (the_m68k_bsd_nat_target): New.
7783         (m68kbsd_fetch_inferior_registers)
7784         (m68kbsd_store_inferior_registers): Refactor as methods of
7785         m68k_bsd_nat_target.
7786         (_initialize_m68kbsd_nat): Adjust to C++ification.
7787         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7788         (the_mips_fbsd_nat_target): New.
7789         (mips_fbsd_fetch_inferior_registers)
7790         (mips_fbsd_store_inferior_registers): Refactor as methods of
7791         mips_fbsd_nat_target.
7792         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7793         add_target.
7794         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7795         (the_mips_nbsd_nat_target): New.
7796         (mipsnbsd_fetch_inferior_registers)
7797         (mipsnbsd_store_inferior_registers): Refactor as methods of
7798         mips_nbsd_nat_target.
7799         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7800         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7801         (the_mips64_obsd_nat_target): New.
7802         (mips64obsd_fetch_inferior_registers)
7803         (mips64obsd_store_inferior_registers): Refactor as methods of
7804         mips64_obsd_nat_target.
7805         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7806         add_target.
7807         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7808         nbsd_nat_target.
7809         * nbsd-nat.h: Include "inf-ptrace.h".
7810         (nbsd_nat_target): New class.
7811         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7812         (obsd_wait): Refactor as methods of obsd_nat_target.
7813         (obsd_add_target): Delete.
7814         * obsd-nat.h: Include "inf-ptrace.h".
7815         (obsd_nat_target): New class.
7816         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7817         (the_ppc_fbsd_nat_target): New.
7818         (ppcfbsd_fetch_inferior_registers)
7819         (ppcfbsd_store_inferior_registers): Refactor as methods of
7820         ppc_fbsd_nat_target.
7821         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7822         add_target.
7823         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7824         (the_ppc_nbsd_nat_target): New.
7825         (ppcnbsd_fetch_inferior_registers)
7826         (ppcnbsd_store_inferior_registers): Refactor as methods of
7827         ppc_nbsd_nat_target.
7828         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7829         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7830         (the_ppc_obsd_nat_target): New.
7831         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7832         methods of ppc_obsd_nat_target.
7833         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7834         add_target.
7835         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7836         (the_sh_nbsd_nat_target): New.
7837         (shnbsd_fetch_inferior_registers)
7838         (shnbsd_store_inferior_registers): Refactor as methods of
7839         sh_nbsd_nat_target.
7840         (_initialize_shnbsd_nat): Adjust to C++ification.
7841         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7842         (inf_ptrace_xfer_partial): Delete.
7843         (sparc_xfer_partial, sparc_target): Delete.
7844         * sparc-nat.h (sparc_fetch_inferior_registers)
7845         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7846         (sparc_target): Delete function declaration.
7847         (sparc_target): New template class.
7848         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7849         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7850         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7851         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7852         add_target.
7853         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7854         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7855         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7856         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7857         add_target.
7858         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7859         (the_vax_bsd_nat_target): New.
7860         (vaxbsd_fetch_inferior_registers)
7861         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7862         methods.
7863         (_initialize_vaxbsd_nat): Adjust to C++ification.
7864
7865         * bsd-kvm.c (bsd_kvm_target): New class.
7866         (bsd_kvm_ops): Now a bsd_kvm_target.
7867         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7868         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7869         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7870         bsd_kvm_target.
7871         (bsd_kvm_return_one): Delete.
7872         (bsd_kvm_add_target): Adjust to C++ification.
7873
7874         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7875         (nto_procfs_target_procfs): New classes.
7876         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7877         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7878         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7879         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7880         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7881         (procfs_remove_hw_breakpoint, procfs_resume)
7882         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7883         (procfs_kill_inferior, procfs_store_registers)
7884         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7885         as methods of nto_procfs_target.
7886         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7887         (nto_native_ops): Delete.
7888         (procfs_open, procfs_native_open): Delete.
7889         (nto_native_ops): Now an nto_procfs_target_native.
7890         (init_procfs_targets): Adjust to C++ification.
7891         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7892         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7893         Refactor as methods of nto_procfs_target.
7894
7895         * go32-nat.c (go32_nat_target): New class.
7896         (the_go32_nat_target): New.
7897         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7898         (go32_store_registers, go32_xfer_partial, go32_files_info)
7899         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7900         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7901         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7902         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7903         (go32_target): Delete.
7904         (_initialize_go32_nat): Adjust to C++ification.
7905
7906         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7907         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7908         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7909         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7910         gnu_nat_target.
7911         (gnu_target): Delete.
7912         * gnu-nat.h (gnu_target): Delete.
7913         (gnu_nat_target): New class.
7914         * i386-gnu-nat.c (gnu_base_target): New.
7915         (i386_gnu_nat_target): New class.
7916         (the_i386_gnu_nat_target): New.
7917         (_initialize_i386gnu_nat): Adjust to C++ification.
7918
7919 2018-05-02  Pedro Alves  <palves@redhat.com>
7920
7921         * bfd-target.c (target_bfd_xclose): Rename to ...
7922         (target_bfd_close): ... this.
7923         (target_bfd_reopen): Adjust.
7924         * target.c (target_close): Remove references to to_xclose.
7925         * target.h (target_ops::to_xclose): Delete.
7926         (target_ops::to_close): Update comments.
7927
7928 2018-05-02  Pedro Alves  <palves@redhat.com>
7929
7930         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7931         "linux-nat.h".
7932         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7933         * inf-ptrace.c (inf_ptrace_register_u_offset)
7934         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7935         (inf_ptrace_store_register, inf_ptrace_store_registers)
7936         (inf_ptrace_trad_target): Move to ...
7937         * linux-nat-trad.c: ... this new file.
7938         * linux-nat-trad.h: New file.
7939         * linux-nat.c (linux_target_install_ops): Make extern.
7940         (linux_trad_target): Delete.
7941         * linux-nat.h (linux_trad_target): Delete declaration.
7942         (linux_target_install_ops): Declare.
7943         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7944         "linux-nat.h".
7945
7946 2018-05-02  Pedro Alves  <palves@redhat.com>
7947
7948         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7949         procfs_target/add_target here.
7950         * procfs.c (procfs_target): Make static.
7951         (_initialize_procfs): Call add_target here.
7952         * procfs.h (struct target_ops): Remove forward declaration.
7953         (procfs_target): Remove declaration.
7954         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7955
7956 2018-05-02  Pedro Alves  <palves@redhat.com>
7957
7958         * procfs.c (procfs_stopped_by_watchpoint)
7959         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7960         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7961         Forward declare.
7962         (procfs_use_watchpoints): Delete, move contents...
7963         (procfs_target): ... here.
7964         * procfs.h (procfs_use_watchpoints): Delete declaration.
7965         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7966         procfs_use_watchpoints.
7967         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7968         procfs_use_watchpoints.
7969
7970 2018-05-02  Tom Tromey  <tom@tromey.com>
7971
7972         PR python/20084:
7973         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7974         and var_zuinteger_unlimited.
7975         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7976         and PARAM_ZUINTEGER_UNLIMITED.
7977         (set_parameter_value): Handle var_zuinteger and
7978         var_zuinteger_unlimited.
7979         (add_setshow_generic): Likewise.
7980         (parmpy_init): Likewise.
7981
7982 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
7983
7984         PR rust/23124
7985         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7986         pointer is not null before dereferencing it.
7987
7988 2018-04-30  Tom Tromey  <tom@tromey.com>
7989
7990         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7991         is_mi_like_p.
7992
7993 2018-04-30  Tom Tromey  <tom@tromey.com>
7994
7995         * breakpoint.c (mention): Remove use of is_mi_like_p.
7996         (print_mention_ranged_breakpoint): Likewise.
7997         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7998         of is_mi_like_p.
7999
8000 2018-04-30  Tom Tromey  <tom@tromey.com>
8001
8002         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8003
8004 2018-04-30  Tom Tromey  <tom@tromey.com>
8005
8006         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8007         (info_spu_event_command): Remove some uses of is_mi_like_p.
8008
8009 2018-04-30  Tom Tromey  <tom@tromey.com>
8010
8011         * python/py-framefilter.c (py_print_single_arg)
8012         (enumerate_locals, py_print_args, py_print_frame): Remove some
8013         uses of is_mi_like_p.
8014
8015 2018-04-30  Tom Tromey  <tom@tromey.com>
8016
8017         * ui-out.c: Update.
8018         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8019         * ui-out.h (ui_out::is_mi_like_p): Now const.
8020         (ui_out::do_is_mi_like_p): Now const.
8021         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8022
8023 2018-04-30  Tom Tromey  <tom@tromey.com>
8024
8025         * varobj.c (varobj_set_visualizer): Use new_reference.
8026         * python/python.c (gdbpy_decode_line): Use new_reference.
8027         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8028         new_reference.
8029
8030 2018-04-30  Tom Tromey  <tom@tromey.com>
8031
8032         * varobj.c (install_new_value): Use new_reference.
8033         * value.h (value_incref): Return void.  Swap intro comment with
8034         value_decref.
8035         * value.c (set_value_parent): Use new_reference.
8036         (value_incref): Return void.  Update intro comment.
8037         (release_value): Use new_reference.
8038         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8039
8040 2018-04-30  Tom Tromey  <tom@tromey.com>
8041
8042         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8043         * gdb_bfd.h (new_bfd_ref): Remove.
8044         (gdb_bfd_open): Update comment.
8045         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8046         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8047         (gdb_bfd_fdopenr): Use new_reference.
8048         * exec.c (exec_file_attach): Use new_reference.
8049
8050 2018-04-30  Tom Tromey  <tom@tromey.com>
8051
8052         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8053         method.
8054
8055 2018-04-30  Tom Tromey  <tom@tromey.com>
8056
8057         * jit.c (jit_read_code_entry): Use type_align.
8058         * i386-tdep.c (i386_gdbarch_init): Don't call
8059         set_gdbarch_long_long_align_bit.
8060         * gdbarch.sh: Remove long_long_align_bit.
8061         * gdbarch.c, gdbarch.h: Rebuild.
8062         * arc-tdep.c (arc_type_align): New function.
8063         (arc_gdbarch_init): Use arc_type_align.  Don't call
8064         set_gdbarch_long_long_align_bit.
8065
8066 2018-04-30  Tom Tromey  <tom@tromey.com>
8067
8068         * rust-lang.c (rust_type_alignment): Remove.
8069         (rust_composite_type): Use type_align.
8070
8071 2018-04-30  Tom Tromey  <tom@tromey.com>
8072
8073         * NEWS: Mention Type.align.
8074         * python/py-type.c (typy_get_alignof): New function.
8075         (type_object_getset): Add "alignof".
8076
8077 2018-04-30  Tom Tromey  <tom@tromey.com>
8078
8079         PR exp/17095:
8080         * NEWS: Update.
8081         * std-operator.def (UNOP_ALIGNOF): New operator.
8082         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8083         New.
8084         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8085         * c-lang.c (c_op_print_tab): Add alignof.
8086         * c-exp.y (ALIGNOF): New token.
8087         (exp): Add "ALIGNOF" production.
8088         (ident_tokens): Add _Alignof and alignof.
8089
8090 2018-04-30  Tom Tromey  <tom@tromey.com>
8091
8092         * i386-tdep.c (i386_type_align): New function.
8093         (i386_gdbarch_init): Update.
8094         * gdbarch.sh (type_align): New method.
8095         * gdbarch.c, gdbarch.h: Rebuild.
8096         * arch-utils.h (default_type_align): Declare.
8097         * arch-utils.c (default_type_align): New function.
8098         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8099         (struct type) <align_log2>: New field.
8100         <instance_flags>: Now a bitfield.
8101         (TYPE_RAW_ALIGN): New macro.
8102         (type_align, type_raw_align, set_type_align): Declare.
8103         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8104         functions.
8105         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8106         (get_alignment, maybe_set_alignment): New functions.
8107         (read_structure_type, read_enumeration_type, read_array_type)
8108         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8109         (read_subrange_type, read_base_type): Set type alignment.
8110
8111 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8112
8113         * dwarf2read.c (read_index_from_section): Use bool.
8114
8115 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8116
8117         PR gdb/22950
8118         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8119         with #ifdef.
8120
8121 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8122
8123         PR build/22873
8124         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8125         last step, and do it atomically.
8126
8127 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8128
8129         * compile/compile-c-types.c (convert_int, convert_float):
8130         Update for C FE v1.
8131
8132 2018-04-27  Tom Tromey  <tom@tromey.com>
8133
8134         PR rust/22545:
8135         * rust-lang.c (rust_inclusive_range_type_p): New function.
8136         (rust_range): Handle inclusive ranges.
8137         (rust_compute_range): Likewise.
8138         * rust-exp.y (struct rust_op) <inclusive>: New field.
8139         (DOTDOTEQ): New constant.
8140         (range_expr): Add "..=" productions.
8141         (operator_tokens): Add "..=" token.
8142         (ast_range): Add "inclusive" parameter.
8143         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8144         ranges.
8145         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8146         bounds values.
8147         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8148         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8149         Update comments.
8150         * expprint.c (print_subexp_standard): Handle new bounds values.
8151         (dump_subexp_body_standard): Likewise.
8152
8153 2018-04-27  Tom Tromey  <tom@tromey.com>
8154
8155         * configure: Rebuild.
8156         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8157         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8158         "OVERRIDE".
8159         (class symbol_needs_eval_context): Likewise.
8160         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8161         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8162         "virtual".
8163         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8164         "override".
8165         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8166         * aarch64-tdep.c (instruction_reader::read): Use "override".
8167         (instruction_reader_test::read): Likewise.
8168         * arm-tdep.c (instruction_reader::read): Use "override".
8169         (instruction_reader_thumb::read): Likewise.
8170
8171 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8172
8173         PR remote/9665
8174         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8175         instead of remote_send.
8176         (remote_send): Remove.
8177
8178 2018-04-26  Pedro Alves  <palves@redhat.com>
8179
8180         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8181         find_function_start_sal instead of find_pc_line.
8182
8183 2018-04-26  Pedro Alves  <palves@redhat.com>
8184
8185         * breakpoint.c (set_breakpoint_location_function): Handle
8186         mst_data_gnu_ifunc.
8187         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8188         * elfread.c (elf_symtab_read): Give data symbols with
8189         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8190         (elf_rel_plt_read): Update comment.
8191         * linespec.c (convert_linespec_to_sals): Handle
8192         mst_data_gnu_ifunc.
8193         (minsym_found): Handle mst_data_gnu_ifunc.
8194         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8195         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8196         * parse.c (find_minsym_type_and_address): Handle
8197         mst_data_gnu_ifunc.
8198         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8199         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8200         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8201         comment.
8202         <mst_data_gnu_ifunc>: New enumerator.
8203
8204 2018-04-26  Pedro Alves  <palves@redhat.com>
8205
8206         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8207         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8208         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8209         Handle it.
8210         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8211         (lookup_minimal_symbol_by_pc): Adjust.
8212         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8213         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8214         * minsyms.h (lookup_msym_prefer): New enum.
8215         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8216         parameter by a lookup_msym_prefer parameter.
8217
8218 2018-04-26  Pedro Alves  <palves@redhat.com>
8219
8220         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8221         ends in "@plt" instead of looking at the symbol's section.
8222
8223 2018-04-26  Pedro Alves  <palves@redhat.com>
8224
8225         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8226         all references.
8227         (find_pc_partial_function_gnu_ifunc): Rename to ...
8228         (find_pc_partial_function): ... this, and remove references to
8229         'is_gnu_ifunc_p'.
8230         (find_pc_partial_function): Delete old implementation.
8231         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8232
8233 2018-04-26  Pedro Alves  <palves@redhat.com>
8234
8235         * linespec.c (struct bound_minimal_symbol_search_key): New.
8236         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8237         skip first line if we found a GNU ifunc minimal symbol by name.
8238         (compare_msymbols): Change parameters to work with a destructured
8239         lhs minsym.
8240         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8241         functions.
8242
8243 2018-04-26  Pedro Alves  <palves@redhat.com>
8244
8245         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8246         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8247         address/name.
8248         (add_location_to_breakpoint): Store the minsym and the objfile in
8249         the breakpoint location.
8250         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8251         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8252         Record the minsym in the sal.
8253         * symtab.h (symtab_and_line) <msymbol>: New field.
8254
8255 2018-04-26  Pedro Alves  <palves@redhat.com>
8256
8257         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8258         unless we actually resolved the ifunc.
8259
8260 2018-04-26  Pedro Alves  <palves@redhat.com>
8261
8262         * c-exp.y (variable production): Prefer ifunc minsyms over
8263         regular function symbols.
8264         * symtab.c (find_gnu_ifunc): New function.
8265         * minsyms.h (lookup_msym_prefer): New enum.
8266         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8267         parameter by a lookup_msym_prefer parameter.
8268         * symtab.h (find_gnu_ifunc): New declaration.
8269
8270 2018-04-26  Pedro Alves  <palves@redhat.com>
8271
8272         * blockframe.c (find_gnu_ifunc_target_type): New function.
8273         (find_function_type): New.
8274         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8275         return a value with a memory address.
8276         (eval_call): For calls to GNU ifunc functions, try to find the
8277         type of the target function from the type that the resolver
8278         returns.
8279         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8280         symbols.
8281         * infcall.c (find_function_return_type): Delete.
8282         (find_function_addr): Add 'function_type' parameter.  For calls to
8283         GNU ifunc functions, try to find the type of the target function
8284         from the type that the resolver returns, and return it via
8285         FUNCTION_TYPE.
8286         (call_function_by_hand_dummy): Adjust to use the function type
8287         returned by find_function_addr.
8288         (find_function_addr): Add 'function_type' parameter and move
8289         description here.
8290         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8291         declarations.
8292
8293 2018-04-26  Pedro Alves  <palves@redhat.com>
8294
8295         * c-exp.y (variable production): Skip finding an alias for ifunc
8296         symbols.
8297
8298 2018-04-26  Pedro Alves  <palves@redhat.com>
8299
8300         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8301
8302 2018-04-25  Pedro Alves  <palves@redhat.com>
8303
8304         * infcmd.c (kill_command): Print the pid as string, not the whole
8305         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8306         message.
8307         * remote.c (remote_detach_1): Print the pid as string, not the
8308         whole thread's ptid.
8309
8310 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8311             Sergio Durigan Junior  <sergiodj@redhat.com>
8312             Pedro Alves  <palves@redhat.com>
8313
8314         * infcmd.c (kill_command): Print message when inferior has
8315         been killed.
8316         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8317         '1'.
8318         (add_inferior): Improve message printed when
8319         'print_inferior_events' is on.
8320         (exit_inferior): Remove message printed when
8321         'print_inferior_events' is on.
8322         (detach_inferior): Improve message printed when
8323         'print_inferior_events' is on.
8324         (initialize_inferiors): Use 'add_inferior_silent' to set
8325         'current_inferior_'.
8326         * inferior.h (print_inferior_events): Declare here as
8327         'extern'.
8328         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8329         '[Detaching...]' messages when 'print_inferior_events' is on.
8330         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8331         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8332         'Detaching after fork from child...', replace it by '... from
8333         parent...'.
8334         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8335         prefix/suffix when printing 'Detaching...' messages.  Print
8336         them when 'print_inferior_events' is on.
8337         * remote.c (remote_detach_1): Print message when detaching
8338         from inferior and '!is_fork_parent'.
8339
8340 2018-04-24  Tom Tromey  <tom@tromey.com>
8341
8342         * cli-out.h: Reindent.
8343
8344 2018-04-24  Tom Tromey  <tom@tromey.com>
8345
8346         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8347         (cli_ui_out::do_field_string): Use fputs_filtered.
8348         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8349
8350 2018-04-23  Tom Tromey  <tom@tromey.com>
8351
8352         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8353         gdb::unique_xmalloc_ptr.
8354
8355 2018-04-23  Tom Tromey  <tom@tromey.com>
8356
8357         * configure: Rebuild.
8358
8359 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8360
8361         PR gdb/23095
8362         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8363         prepare_for_testing.  Set normal_bp to r_debug_state if target
8364         is bsd.
8365
8366 2018-04-21  Pedro Alves  <palves@redhat.com>
8367             Rajendra SY  <rajendra.sy@gmail.com>
8368
8369         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8370         * remote.c (extended_remote_attach): In all-stop mode, mark the
8371         thread as executing.
8372
8373 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8374
8375         * thread.c (thread_apply_all_command): Fix comment.
8376         (thread_command): Fix comment.
8377
8378 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8379
8380         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8381         parameter.
8382         * features/aarch64-core.c (create_feature_aarch64_core):
8383         Regenerate.
8384         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8385         Likewise.
8386         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8387         Likewise.
8388         * features/i386/32bit-avx512.c
8389         (create_feature_i386_32bit_avx512): Likewise.
8390         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8391         Likewise.
8392         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8393         Likewise.
8394         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8395         Likewise.
8396         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8397         Likewise.
8398         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8399         Likewise.
8400         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8401         Likewise.
8402         * features/i386/64bit-avx512.c
8403         (create_feature_i386_64bit_avx512): Likewise.
8404         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8405         Likewise.
8406         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8407         Likewise.
8408         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8409         Likewise.
8410         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8411         Likewise.
8412         * features/i386/64bit-segments.c
8413         (create_feature_i386_64bit_segments): Likewise.
8414         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8415         Likewise.
8416         * features/i386/x32-core.c
8417         (create_feature_i386_x32_core): Likewise.
8418         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8419         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8420         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8421         * target-descriptions.c: In generated code, don't pass xml
8422         filename.
8423
8424 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8425
8426         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8427         (print_xml_feature::visit_post): Likewise.
8428         (print_xml_feature::visit): Likewise.
8429         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8430         (print_xml_feature): Add new class.
8431         * regformats/regdat.sh: Null xmltarget on feature targets.
8432         * target-descriptions.c (struct target_desc): Add xmltarget.
8433         (maintenance_check_tdesc_xml_convert): Add unittest function.
8434         (tdesc_get_features_xml): Add function to get xml.
8435         (maintenance_check_xml_descriptions): Test xml generation.
8436         * xml-tdesc.c (string_read_description_xml): Add function.
8437         * xml-tdesc.h (string_read_description_xml): Add declaration.
8438
8439 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8440
8441         * features/Makefile: Add feature marker to targets with new style
8442         target descriptions.
8443         * regformats/aarch64.dat: Regenerate.
8444         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8445         * regformats/i386/amd64-avx-linux.dat: Likewise.
8446         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8447         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8448         * regformats/i386/amd64-linux.dat: Likewise.
8449         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8450         * regformats/i386/amd64.dat: Likewise.
8451         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8452         * regformats/i386/i386-avx-linux.dat: Likewise.
8453         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8454         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8455         * regformats/i386/i386-linux.dat: Likewise.
8456         * regformats/i386/i386-mmx-linux.dat: Likewise.
8457         * regformats/i386/i386-mpx-linux.dat: Likewise.
8458         * regformats/i386/i386.dat: Likewise.
8459         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8460         * regformats/i386/x32-avx-linux.dat: Likewise.
8461         * regformats/i386/x32-linux.dat: Likewise.
8462         * regformats/tic6x-c62x-linux.dat: Likewise.
8463         * regformats/tic6x-c64x-linux.dat: Likewise.
8464         * regformats/tic6x-c64xp-linux.dat: Likewise.
8465         * regformats/regdat.sh: Parse feature marker.
8466
8467 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8468
8469         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8470         (tdesc_osabi_name): Likewise.
8471         * target-descriptions.c (tdesc_architecture_name): Add new
8472         function.
8473         (tdesc_osabi_name): Likewise.
8474
8475 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8476
8477         * common/tdesc.c (tdesc_predefined_type): Move to here.
8478         (tdesc_named_type): Likewise.
8479         (tdesc_create_vector): Likewise.
8480         (tdesc_create_struct): Likewise.
8481         (tdesc_set_struct_size): Likewise.
8482         (tdesc_create_union): Likewise.
8483         (tdesc_create_flags): Likewise.
8484         (tdesc_create_enum): Likewise.
8485         (tdesc_add_field): Likewise.
8486         (tdesc_add_typed_bitfield): Likewise.
8487         (tdesc_add_bitfield): Likewise.
8488         (tdesc_add_flag): Likewise.
8489         (tdesc_add_enum_value): Likewise.
8490         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8491         (struct tdesc_type_vector): Likewise.
8492         (struct tdesc_type_field): Likewise.
8493         (struct tdesc_type_with_fields): Likewise.
8494         (tdesc_create_enum): Add declaration.
8495         (tdesc_add_typed_bitfield): Likewise.
8496         (tdesc_add_enum_value): Likewise.
8497         * target-descriptions.c (tdesc_type_field): Move from here.
8498         (tdesc_type_builtin): Likewise.
8499         (tdesc_type_vector): Likewise.
8500         (tdesc_type_with_fields): Likewise.
8501         (tdesc_predefined_types): Likewise.
8502         (tdesc_named_type): Likewise.
8503         (tdesc_create_vector): Likewise.
8504         (tdesc_create_struct): Likewise.
8505         (tdesc_set_struct_size): Likewise.
8506         (tdesc_create_union): Likewise.
8507         (tdesc_create_flags): Likewise.
8508         (tdesc_create_enum): Likewise.
8509         (tdesc_add_field): Likewise.
8510         (tdesc_add_typed_bitfield): Likewise.
8511         (tdesc_add_bitfield): Likewise.
8512         (tdesc_add_flag): Likewise.
8513         (tdesc_add_enum_value): Likewise.
8514         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8515         (tdesc_add_typed_bitfield): Likewise.
8516         (tdesc_add_enum_value): Likewise.
8517
8518 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8519
8520         * common/tdesc.c (tdesc_feature::accept): Move to here.
8521         (tdesc_feature::operator==): Likewise.
8522         (tdesc_create_reg): Likewise.
8523         * common/tdesc.h (tdesc_type_kind): Likewise.
8524         (struct tdesc_type): Likewise.
8525         (struct tdesc_feature): Likewise.
8526         * regformats/regdat.sh: Create a feature.
8527         * target-descriptions.c (tdesc_type_kind): Move from here.
8528         (tdesc_type): Likewise.
8529         (tdesc_type_up): Likewise.
8530         (tdesc_feature): Likewise.
8531         (tdesc_create_reg): Likewise.
8532
8533 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8534
8535         * Makefile.in: Add arch/tdesc.c
8536         * common/tdesc.c: New file.
8537         * common/tdesc.h (tdesc_element_visitor): Move to here.
8538         (tdesc_element): Likewise.
8539         (tdesc_reg): Likewise.
8540         (tdesc_reg_up): Likewise.
8541         * regformats/regdef.h (reg): Add offset to constructors.
8542         * target-descriptions.c (tdesc_element_visitor): Move from here.
8543         (tdesc_element): Likewise.
8544         (tdesc_reg): Likewise.
8545         (tdesc_reg_up): Likewise.
8546
8547 2018-04-17  Tom Tromey  <tom@tromey.com>
8548
8549         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8550         discriminant field.
8551
8552 2018-04-17  Tom Tromey  <tom@tromey.com>
8553
8554         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8555
8556 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8557
8558         * symtab.c (print_symbol_info): Skip printing filename and line
8559         number when `last' is NULL.
8560         (symtab_symbol_info): Use empty string instead of NULL for first
8561         invocation of print_symbol_info.
8562         (rbreak_command): Pass NULL to `last' parameter of
8563         print_symbol_info.
8564
8565 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8566
8567         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8568         instead of nullptr.
8569
8570 2018-04-16  Pedro Alves  <palves@redhat.com>
8571
8572         * MAINTAINERS (sh): Remove.
8573         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8574         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8575         (ALLDEPFILES): Remove sh64-tdep.c.
8576         * NEWS: Mentions that support for SH-5/SH64 is removed.
8577         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8578         (sh*-*-openbsd*): Ditto.
8579         (sh64-*-elf*): Remove.
8580         (sh*): Remove.
8581         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8582         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8583         * sh-tdep.c: No longer include "sh64-tdep.h".
8584         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8585         * sh64-tdep.c, sh64-tdep.h: Remove files.
8586
8587 2018-04-16  Pedro Alves  <palves@redhat.com>
8588
8589         * MAINTAINERS: Remove m88k.
8590         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8591         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8592         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8593         * NEWS: Mention that support for m88k was removed.
8594         * configure.host (m88*-*-*): Remove support.
8595         * configure.nat (m88k-*-*): Remove support.
8596         * configure.tgt (m88*-*-openbsd*): Remove.
8597         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8598
8599 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8600
8601         * configure.tgt (x86_tobjs): New variable.
8602         (amd64_tobjs, i386_tobjs): Use it.
8603
8604 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8605
8606         * symtab.c (print_symbol_info): Precede the symbol definition by
8607         the line number when available.
8608         * NEWS: Advertise this enhancement.
8609
8610 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8611
8612         * NEWS (New options): announce set/show record btrace cpu.
8613         * btrace.c: Include record-btrace.h.
8614         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8615         the vendor is unknown.
8616         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8617         Maybe overwrite the btrace configuration's cpu.
8618         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8619         (btrace_fetch): Add cpu parameter.  Update callers.
8620         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8621         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8622         errata workarounds if the vendor is unknown.
8623         * python/py-record-btrace.c: Include record-btrace.h.
8624         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8625         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8626         * record-btrace.c (record_btrace_cpu_state_kind): New.
8627         (record_btrace_cpu): New.
8628         (set_record_btrace_cpu_cmdlist): New.
8629         (record_btrace_get_cpu): New.
8630         (require_btrace_thread, record_btrace_info)
8631         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8632         (cmd_set_record_btrace_cpu_none): New.
8633         (cmd_set_record_btrace_cpu_auto): New.
8634         (cmd_set_record_btrace_cpu): New.
8635         (cmd_show_record_btrace_cpu): New.
8636         (_initialize_record_btrace): Initialize set/show record btrace cpu
8637         commands.
8638         * record-btrace.h (record_btrace_get_cpu): New.
8639
8640 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8641
8642         * record.c (set_record_command): Fix typo in message.
8643
8644 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8645
8646         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8647
8648 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8649
8650         * infrun.c (process_event_stop_test): Call
8651         gdbarch_in_indirect_branch_thunk.
8652         * gdbarch.sh (in_indirect_branch_thunk): New.
8653         * gdbarch.c: Regenerated.
8654         * gdbarch.h: Regenerated.
8655         * x86-tdep.h: New.
8656         * x86-tdep.c: New.
8657         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8658         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8659         (ALLDEPFILES): Add x86-tdep.c.
8660         * arch-utils.h (default_in_indirect_branch_thunk): New.
8661         * arch-utils.c (default_in_indirect_branch_thunk): New.
8662         * i386-tdep: Include x86-tdep.h.
8663         (i386_in_indirect_branch_thunk): New.
8664         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8665         function.
8666         * amd64-tdep: Include x86-tdep.h.
8667         (amd64_in_indirect_branch_thunk): New.
8668         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8669
8670 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8671
8672         PR gdb/23053
8673         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8674         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8675         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8676         regression.
8677
8678 2018-04-12  Tom Tromey  <tom@tromey.com>
8679
8680         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8681         (rust_evaluate_subexp): Likewise.
8682
8683 2018-04-12  Pedro Alves  <palves@redhat.com>
8684
8685         * procfs.c (procfs_detach): Make forward declaration's prototype
8686         match definition's protototype.
8687         (proc_get_LDT_entry): Remove stale do_cleanups call.
8688
8689 2018-04-12  Pedro Alves  <palves@redhat.com>
8690
8691         * target.h (target_ops::to_has_exited): Delete.
8692         (target_has_exited): Delete.
8693         * target-delegates.c: Regenerate.
8694
8695 2018-04-11  Pedro Alves  <palves@redhat.com>
8696
8697         * target.c (fileio_fh_t::t): Add comment.
8698         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8699         (target_fileio_close): Handle a NULL target.
8700         (invalidate_fileio_fh): New.
8701         (target_close): Call it.
8702         * remote.c (remote_hostio_send_command): No longer check whether
8703         remote_desc is open.
8704
8705 2018-04-11  Pedro Alves  <palves@redhat.com>
8706
8707         * target.c (fileio_fh_t): Make it a named struct instead of a
8708         typedef.
8709         (fileio_fh_t::is_closed): New method.
8710         (DEF_VEC_O (fileio_fh_t)): Remove.
8711         (fileio_fhandles): Now a std::vector.
8712         (is_closed_fileio_fh): Delete.
8713         (acquire_fileio_fd): Adjust.  Rename parameters.
8714         (release_fileio_fd): Adjust.
8715         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8716         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8717         (target_fileio_close): Adjust.
8718
8719 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8720
8721         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8722         index.
8723
8724 2018-04-10  Pedro Alves  <palves@redhat.com>
8725
8726         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8727         (scoped_finish_thread_state): New class.
8728         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8729         cleanup.
8730         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8731         (fetch_inferior_event, normal_stop): Likewise.
8732         * thread.c (finish_thread_state_cleanup): Delete.
8733
8734 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8735             Pedro Alves  <palves@redhat.com>
8736
8737         * value.c: Include "selftest.h" and "common/array-view.h".
8738         (struct range) <operator ==>: New.
8739         (test_ranges_contain): New.
8740         (check_ranges_vector): New.
8741         (test_insert_into_bit_range_vector): New.
8742         (_initialize_values): Register selftests.
8743         * common/array-view.h (operator==, operator!=): New.
8744
8745 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8746
8747         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8748         an iterator.
8749         * inline-frame.c: Include <algorithm>.
8750         (struct inline_state): Add constructor.
8751         (inline_state_s): Remove.
8752         (DEF_VEC_O(inline_state_s)): Remove.
8753         (inline_states): Change type to std::vector.
8754         (find_inline_frame_state): Adjust to std::vector.
8755         (allocate_inline_frame_state): Remove.
8756         (clear_inline_frame_state): Adjust to std::vector.
8757         (skip_inline_frames): Adjust to std::vector.
8758
8759 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8760
8761         * tracepoint.h (struct trace_state_variable): Add constructor.
8762         <name>: Change type to std::string.
8763         * tracepoint.c (tsv_s): Remove.
8764         (DEF_VEC_O(tsv_s)): Remove.
8765         (tvariables): Change to std::vector.
8766         (create_trace_state_variable): Adjust to std::vector.
8767         (find_trace_state_variable): Likewise.
8768         (find_trace_state_variable_by_number): Likewise.
8769         (delete_trace_state_variable): Likewise.
8770         (trace_variable_command): Adjust to std::string.
8771         (delete_trace_variable_command): Likewise.
8772         (tvariables_info_1): Adjust to std::vector.
8773         (save_trace_state_variables): Likewise.
8774         (start_tracing): Likewise.
8775         (merge_uploaded_trace_state_variables): Adjust to std::vector
8776         and std::string.
8777         * target.h (struct target_ops)
8778         <to_download_trace_state_variable>: Pass reference to
8779         trace_state_variable.
8780         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8781         * target-delegates.c: Re-generate.
8782         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8783         (mi_tsv_deleted): Likewise.
8784         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8785         * remote.c (remote_download_trace_state_variable): Change
8786         pointer to reference and adjust.
8787         * make-target-delegates (parse_argtypes): Handle references.
8788         (write_function_header): Likewise.
8789         (munge_type): Likewise.
8790
8791 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8792
8793         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8794         string_view-selftests.c.
8795         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8796         testsuite.
8797         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8798         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8799         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8800         * unittests/basic_string_view/element_access/char/1.cc:
8801         Likewise.
8802         * unittests/basic_string_view/element_access/char/empty.cc:
8803         Likewise.
8804         * unittests/basic_string_view/element_access/char/front_back.cc:
8805         Likewise.
8806         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8807         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8808         Likewise.
8809         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8810         Likewise.
8811         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8812         Likewise.
8813         * unittests/basic_string_view/operations/compare/char/1.cc:
8814         Likewise.
8815         * unittests/basic_string_view/operations/compare/char/13650.cc:
8816         Likewise.
8817         * unittests/basic_string_view/operations/copy/char/1.cc:
8818         Likewise.
8819         * unittests/basic_string_view/operations/data/char/1.cc:
8820         Likewise.
8821         * unittests/basic_string_view/operations/find/char/1.cc:
8822         Likewise.
8823         * unittests/basic_string_view/operations/find/char/2.cc:
8824         Likewise.
8825         * unittests/basic_string_view/operations/find/char/3.cc:
8826         Likewise.
8827         * unittests/basic_string_view/operations/find/char/4.cc:
8828         Likewise.
8829         * unittests/basic_string_view/operations/rfind/char/1.cc:
8830         Likewise.
8831         * unittests/basic_string_view/operations/rfind/char/2.cc:
8832         Likewise.
8833         * unittests/basic_string_view/operations/rfind/char/3.cc:
8834         Likewise.
8835         * unittests/basic_string_view/operations/substr/char/1.cc:
8836         Likewise.
8837         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8838         * unittests/string_view-selftests.c: New file.
8839
8840 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8841
8842         * unittests/basic_string_view/capacity/1.cc: New file.
8843         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8844         * unittests/basic_string_view/cons/char/1.cc: New file.
8845         * unittests/basic_string_view/cons/char/2.cc: New file.
8846         * unittests/basic_string_view/cons/char/3.cc: New file.
8847         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8848         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8849         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8850         * unittests/basic_string_view/element_access/char/1.cc: New file.
8851         * unittests/basic_string_view/element_access/char/2.cc: New file.
8852         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8853         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8854         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8855         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8856         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8857         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8858         * unittests/basic_string_view/include.cc: New file.
8859         * unittests/basic_string_view/inserters/char/1.cc: New file.
8860         * unittests/basic_string_view/inserters/char/2.cc: New file.
8861         * unittests/basic_string_view/inserters/char/3.cc: New file.
8862         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8863         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8864         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8865         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8866         * unittests/basic_string_view/literals/types.cc: New file.
8867         * unittests/basic_string_view/literals/values.cc: New file.
8868         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8869         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8870         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8871         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8872         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8873         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8874         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8875         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8876         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8877         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8878         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8879         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8880         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8881         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8882         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8883         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8884         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8885         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8886         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8887         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8888         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8889         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8890         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8891         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8892         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8893         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8894         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8895         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8896         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8897         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8898         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8899         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8900         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8901         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8902         * unittests/basic_string_view/operators/char/2.cc: New file.
8903         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8904         * unittests/basic_string_view/range_access/char/1.cc: New file.
8905         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8906         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8907         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8908         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8909         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8910         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8911         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8912         * unittests/basic_string_view/typedefs.cc: New file.
8913         * unittests/basic_string_view/types/1.cc: New file.
8914
8915 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8916
8917         * common/gdb_string_view.h: Remove libstdc++ implementation
8918         details, adjust to gdb reality.
8919         * common/gdb_string_view.tcc: Likewise.
8920         * cli/cli-script.c (struct string_view): Remove.
8921         (user_args) <m_args>: Change element type to gdb::string_view.
8922         (user_args::insert_args): Adjust.
8923
8924 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8925
8926         * common/gdb_string_view.h: New file.
8927         * common/gdb_string_view.tcc: New file.
8928
8929 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8930
8931         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8932         * configure: Re-generate.
8933
8934 2018-04-09  Pedro Alves  <palves@redhat.com>
8935
8936         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8937         (set_target_gdbarch): Call
8938         gdb::observers::architecture_changed.notify instead of
8939         observer_notify_architecture_changed.
8940
8941 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8942
8943         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8944         (do_restore_current_traceframe_cleanup): Remove.
8945         (restore_current_traceframe_cleanup_dtor): Remove.
8946         (make_cleanup_restore_current_traceframe): Remove.
8947         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8948         New.
8949         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8950         * infrun.c (fetch_inferior_event): Use
8951         scoped_restore_current_traceframe.
8952
8953 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8954
8955         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8956         Remove.
8957         <n_allocated_type_units>: Remove.
8958         <all_type_units>: Change to std::vector.
8959         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8960         to std::vector change.
8961         (dwarf2_per_objfile::get_cutu): Likewise.
8962         (dwarf2_per_objfile::get_tu): Likewise.
8963         (create_signatured_type_table_from_index): Likewise.
8964         (create_signatured_type_table_from_debug_names): Likewise.
8965         (dw2_symtab_iter_next): Likewise.
8966         (dw2_print_stats): Likewise.
8967         (dw2_expand_all_symtabs): Likewise.
8968         (dw2_expand_marked_cus): Likewise.
8969         (dw2_debug_names_iterator::next): Likewise.
8970         (dwarf2_initialize_objfile): Likewise.
8971         (add_signatured_type_cu_to_table): Likewise.
8972         (create_all_type_units): Likewise.
8973         (add_type_unit): Likewise.
8974         (struct tu_abbrev_offset): Add constructor.
8975         (build_type_psymtabs_1): Adjust to std::vector change.
8976         (print_tu_stats): Likewise.
8977         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8978         (write_debug_names): Likewise.
8979
8980 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8981
8982         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8983         Make an std::vector.
8984         <n_comp_units>: Remove.
8985         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8986         to std::vector change.
8987         (dwarf2_per_objfile::get_cutu): Likewise.
8988         (dwarf2_per_objfile::get_cu): Likewise.
8989         (create_cus_from_index): Likewise.
8990         (create_addrmap_from_index): Likewise.
8991         (create_addrmap_from_aranges): Likewise.
8992         (dwarf2_read_index): Likewise.
8993         (dw2_find_last_source_symtab): Likewise.
8994         (dw2_map_symtabs_matching_filename): Likewise.
8995         (dw2_symtab_iter_next): Likewise.
8996         (dw2_print_stats): Likewise.
8997         (dw2_expand_all_symtabs): Likewise.
8998         (dw2_expand_symtabs_with_fullname): Likewise.
8999         (dw2_expand_marked_cus): Likewise.
9000         (dw2_map_symbol_filenames): Likewise.
9001         (create_cus_from_debug_names): Likewise.
9002         (dwarf2_read_debug_names): Likewise.
9003         (dw2_debug_names_iterator::next): Likewise.
9004         (dwarf2_initialize_objfile): Likewise.
9005         (set_partial_user): Likewise.
9006         (dwarf2_build_psymtabs_hard): Likewise.
9007         (read_comp_units_from_section): Remove arguments, adjust to
9008         std::vector change.
9009         (create_all_comp_units): Adjust to std::vector and
9010         read_comp_units_from_section changes.
9011         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9012         change.
9013         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9014         (psyms_seen_size): Likewise.
9015         (write_gdbindex): Likewise.
9016         (write_debug_names): Likewise.
9017
9018 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9019
9020         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9021         with dwarf2_per_objfile.
9022         (create_cus_from_index): Likewise.
9023         (create_signatured_type_table_from_index): Likewise.
9024         (dwarf2_read_index): Likewise.
9025         (dwarf2_initialize_objfile): Likewise.
9026         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9027         per_cu rather than get_dwarf2_per_objfile.
9028
9029 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9030
9031         * dwarf2read.h (struct signatured_type): Forward declare.
9032         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9033         New methods.
9034         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9035         (dw2_get_cutu): ...this.
9036         (dwarf2_per_objfile::get_cu): Rename from...
9037         (dw2_get_cu): ...this.
9038         (dwarf2_per_objfile::get_tu): New.
9039         (create_addrmap_from_index): Adjust.
9040         (create_addrmap_from_aranges): Adjust.
9041         (dw2_find_last_source_symtab): Adjust.
9042         (dw2_map_symtabs_matching_filename): Adjust.
9043         (dw2_symtab_iter_next): Adjust.
9044         (dw2_print_stats): Adjust.
9045         (dw2_expand_all_symtabs): Adjust.
9046         (dw2_expand_symtabs_with_fullname): Adjust.
9047         (dw2_expand_marked_cus): Adjust.
9048         (dw_expand_symtabs_matching_file_matcher): Adjust.
9049         (dw2_map_symbol_filenames): Adjust.
9050         (dw2_debug_names_iterator::next): Adjust.
9051         (dwarf2_initialize_objfile): Adjust.
9052         (set_partial_user): Adjust.
9053         (dwarf2_build_psymtabs_hard): Adjust.
9054
9055 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9056
9057         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9058         Remove unused variables.
9059         (dw2_map_symtabs_matching_filename): Likewise.
9060         (dwarf2_record_block_ranges): Likewise.
9061         (dwarf2_read_addr_index): Likewise.
9062         (follow_die_offset): Likewise.
9063
9064 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9065
9066         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9067         to symbol_file_add_main.
9068
9069 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9070
9071         PR mi/22299
9072         * mi/mi-console.c (do_fputc_async_safe): New.
9073         (mi_console_file::write_async_safe): New.
9074         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9075         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9076         New.
9077         * ui-file.c (ui_file::putstrn): Adjust call to
9078         fputstrn_unfiltered.
9079         * utils.c (printchar): Replace do_fputs and do_fprintf
9080         parameters by do_fputc.
9081         (fputstr_filtered): Adjust call to printchar.
9082         (fputstr_unfiltered): Likewise.
9083         (fputstrn_filtered): Likewise.
9084         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9085         printchar.
9086         * utils.h (do_fputc_ftype): New typedef.
9087         (fputstrn_unfiltered): Add do_fputc parameter.
9088
9089 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9090
9091         * regformats/i386/i386-avx.dat: Remove.
9092
9093 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9094
9095         PR gdb/22979
9096         * amd64-tdep.c (amd64_none_init_abi): New function.
9097         (amd64_x32_none_init_abi): New function.
9098         (_initialize_amd64_tdep): Register handlers for x86-64 and
9099         x64_32 with GDB_OSABI_NONE.
9100         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9101         GDB_OSABI_NONE osabi.
9102
9103 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9104
9105         PR gdb/22980
9106         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9107         GDB_OSABI_NONE.
9108         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9109         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9110
9111 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9112
9113         * common/byte-vector.h (char_vector): New type.
9114         * target.h (target_read_alloc): Return
9115         gdb::optional<byte_vector>.
9116         (target_read_stralloc): Return gdb::optional<char_vector>.
9117         (target_get_osdata): Return gdb::optional<char_vector>.
9118         * target.c (target_read_alloc_1): Templatize.  Replacement
9119         manual memory management with vector.
9120         (target_read_alloc): Change return type, adjust.
9121         (target_read_stralloc): Change return type, adjust.
9122         (target_get_osdata): Change return type, adjust.
9123         * auxv.c (struct auxv_info) <length>: Remove.
9124         <data>: Change type to gdb::optional<byte_vector>.
9125         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9126         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9127         (target_auxv_search): Adjust.
9128         (fprint_target_auxv): Adjust.
9129         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9130         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9131         (linux_make_corefile_notes): Adjust.
9132         * osdata.c (get_osdata): Adjust.
9133         * remote.c (remote_get_threads_with_qxfer): Adjust.
9134         (remote_memory_map): Adjust.
9135         (remote_traceframe_info): Adjust.
9136         (btrace_read_config): Adjust.
9137         (remote_read_btrace): Adjust.
9138         (remote_pid_to_exec_file): Adjust.
9139         * solib-aix.c (solib_aix_get_library_list): Adjust.
9140         * solib-dsbt.c (decode_loadmap): Don't free buf.
9141         (dsbt_get_initial_loadmaps): Adjust.
9142         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9143         * solib-target.c (solib_target_current_sos): Adjust.
9144         * tracepoint.c (sdata_make_value): Adjust.
9145         * xml-support.c (xinclude_start_include): Adjust.
9146         (xml_fetch_content_from_file): Adjust.
9147         * xml-support.h (xml_fetch_another): Change return type.
9148         (xml_fetch_content_from_file): Change return type.
9149         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9150         * xml-tdesc.c (file_read_description_xml): Adjust.
9151         (fetch_available_features_from_target): Change return type.
9152         (target_fetch_description_xml): Adjust.
9153         (target_read_description_xml): Adjust.
9154
9155 2018-04-06  Tom Tromey  <tom@tromey.com>
9156
9157         * value.c (~value): Update.
9158         (struct value) <contents>: Now unique_xmalloc_ptr.
9159         (value_contents_bits_eq, allocate_value_contents)
9160         (value_contents_raw, value_contents_all_raw)
9161         (value_contents_for_printing, value_contents_for_printing_const)
9162         (set_value_enclosing_type): Update.
9163
9164 2018-04-06  Tom Tromey  <tom@tromey.com>
9165
9166         * value.c (range_s): Remove typedef, VEC.
9167         (struct range): Add operator<.
9168         (range_lessthan): Remove.
9169         (ranges_contain): Change type.
9170         (~value): Update.
9171         (struct value) <unavailable, optimized_out>: Now std::vector.
9172         (value_entirely_available)
9173         (value_entirely_covered_by_range_vector)
9174         (value_entirely_unavailable, value_entirely_optimized_out):
9175         Update.
9176         (insert_into_bit_range_vector): Change argument type.
9177         (find_first_range_overlap): Likewise.
9178         (struct ranges_and_idx, value_contents_bits_eq)
9179         (require_not_optimized_out, require_available): Update.
9180         (ranges_copy_adjusted): Change argument types.
9181         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9182
9183 2018-04-06  Tom Tromey  <tom@tromey.com>
9184
9185         * value.c (~value): Update.
9186         (struct value) <parent>: Now a value_ref_ptr.
9187         (value_parent, set_value_parent, value_address, value_copy):
9188         Update.
9189
9190 2018-04-06  Tom Tromey  <tom@tromey.com>
9191
9192         * value.c (struct value): Add constructor, destructor, and member
9193         initializers.
9194         (allocate_value_lazy, value_decref): Update.
9195
9196 2018-04-06  Tom Tromey  <tom@tromey.com>
9197
9198         * value.c (struct value) <released, next>: Remove.
9199         (all_values): Now a std::vector.
9200         (allocate_value_lazy): Update.
9201         (value_next): Remove.
9202         (value_mark, value_free_to_mark, release_value)
9203         (value_release_to_mark): Update.
9204
9205 2018-04-06  Tom Tromey  <tom@tromey.com>
9206
9207         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9208         (free_value_chain): Remove.
9209         * value.c (free_value_chain): Remove.
9210         (value_release_to_mark): Return a std::vector.
9211         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9212         std::vector.
9213         (check_condition): Update.
9214         * eval.c (fetch_subexp_value): Change "val_chain" to a
9215         std::vector.
9216         * breakpoint.c (update_watchpoint): Update.
9217         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9218
9219 2018-04-06  Tom Tromey  <tom@tromey.com>
9220
9221         * value.h (free_all_values): Remove.
9222         * value.c (free_all_values): Remove.
9223
9224 2018-04-06  Tom Tromey  <tom@tromey.com>
9225
9226         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9227         (value_history_chain, value_history_count): Remove.
9228         (value_history): New global.
9229         (record_latest_value, access_value_history, show_values)
9230         (preserve_values): Update.
9231
9232 2018-04-06  Tom Tromey  <tom@tromey.com>
9233
9234         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9235         * varobj.c (varobj_set_display_format, varobj_set_value)
9236         (install_default_visualizer, construct_visualizer)
9237         (install_new_value, ~varobj, varobj_get_value_type)
9238         (my_value_of_variable, varobj_editable_p): Update.
9239         * c-varobj.c (c_describe_child, c_value_of_variable)
9240         (cplus_number_of_children, cplus_describe_child): Update.
9241         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9242         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9243         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9244
9245 2018-04-06  Tom Tromey  <tom@tromey.com>
9246
9247         * printcmd.c (last_examine_address): Change type to
9248         value_ref_ptr.
9249         (do_examine, x_command): Update.
9250
9251 2018-04-06  Tom Tromey  <tom@tromey.com>
9252
9253         * value.c (release_value): Update.
9254         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9255         (struct bpstats) <val>: Now a value_ref_ptr.
9256         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9257         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9258         (~watchpoint, print_it_watchpoint, watch_command_1)
9259         (invalidate_bp_value_on_memory_change): Update.
9260
9261 2018-04-06  Tom Tromey  <tom@tromey.com>
9262
9263         * varobj.c (varobj_clear_saved_item)
9264         (update_dynamic_varobj_children, install_new_value, ~varobj):
9265         Update.
9266         * value.h (value_incref): Move declaration earlier.
9267         (value_decref): Rename from value_free.
9268         (struct value_ref_policy): New.
9269         (value_ref_ptr): New typedef.
9270         (struct value_deleter): Remove.
9271         (gdb_value_up): Remove typedef.
9272         (release_value): Change return type.
9273         (release_value_or_incref): Remove.
9274         * value.c (set_value_parent): Update.
9275         (value_incref): Change return type.
9276         (value_decref): Rename from value_free.
9277         (value_free_to_mark, free_all_values, free_value_chain): Update.
9278         (release_value): Return value_ref_ptr.
9279         (release_value_or_incref): Remove.
9280         (record_latest_value, set_internalvar, clear_internalvar):
9281         Update.
9282         * stack.c (info_frame_command): Don't call value_free.
9283         * python/py-value.c (valpy_dealloc, valpy_new)
9284         (value_to_value_object): Update.
9285         * printcmd.c (do_examine): Update.
9286         * opencl-lang.c (lval_func_free_closure): Update.
9287         * mi/mi-main.c (register_changed_p): Don't call value_free.
9288         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9289         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9290         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9291         value_free.
9292         * guile/scm-value.c (vlscm_free_value_smob)
9293         (vlscm_scm_from_value): Update.
9294         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9295         (frame_unwind_register_unsigned, get_frame_register_bytes)
9296         (put_frame_register_bytes): Don't call value_free.
9297         * findvar.c (address_from_register): Don't call value_free.
9298         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9299         * dwarf2loc.c (entry_data_value_free_closure)
9300         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9301         (dwarf2_evaluate_loc_desc_full): Update.
9302         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9303         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9304         (~watchpoint, watch_command_1)
9305         (invalidate_bp_value_on_memory_change): Update.
9306         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9307
9308 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9309
9310         PR gdb/23022
9311         * warning.m4: Add -Wno-error=deprecated-register.
9312         * configure: Re-generate.
9313
9314 2018-04-05  Tom Tromey  <tom@tromey.com>
9315
9316         * linespec.h: Remove include of "vec.h".
9317
9318 2018-04-05  Tom Tromey  <tom@tromey.com>
9319
9320         * linespec.c (typep): Remove typedef.
9321         (find_methods, find_superclass_methods): Take a std::vector.
9322         (find_method): Use std::vector.
9323
9324 2018-04-05  Tom Tromey  <tom@tromey.com>
9325
9326         * utils.c (compare_strings): Remove.
9327         * utils.h (compare_strings): Remove.
9328         * objc-lang.h (find_imps): Update.
9329         * objc-lang.c (find_methods): Take a std::vector.
9330         (uniquify_strings, find_imps): Likewise.
9331         * linespec.c (find_methods): Take a std::vector.
9332         (decode_objc): Use std::vector.
9333         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9334         a std::vector.
9335         (find_method, find_function_symbols): Use std::vector.
9336
9337 2018-04-05  Tom Tromey  <tom@tromey.com>
9338
9339         * completer.c (completion_tracker::completion_tracker): Remove
9340         cast.
9341         (completion_tracker::discard_completions): Likewise.
9342         * breakpoint.c (ambiguous_names_p): Remove cast.
9343         * ada-lang.c (_initialize_ada_language): Remove cast.
9344         * utils.h (streq): Update.
9345         (streq_hash): Add new declaration.
9346         * utils.c (streq): Return bool.
9347         (streq_hash): New function.
9348
9349 2018-04-05  Tom Tromey  <tom@tromey.com>
9350
9351         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9352         Remove a string copy.
9353
9354 2018-04-05  Tom Tromey  <tom@tromey.com>
9355
9356         * linespec.c (filter_results): Use std::vector.
9357         (decode_line_2, decode_line_full): Update.
9358
9359 2018-04-05  Tom Tromey  <tom@tromey.com>
9360
9361         * linespec.c (canonical_to_fullform): Return std::string.
9362         (filter_results): Update.
9363         (struct decode_line_2_item): Add constructor.
9364         <fullform, displayform>: Now std::string.
9365         (decode_line_2_compare_items): Now a std::sort comparator.
9366         (decode_line_2): Update.
9367
9368 2018-04-05  Tom Tromey  <tom@tromey.com>
9369
9370         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9371         (unexpected_linespec_error): Update.
9372         (linespec_parse_basic, parse_linespec): Update.
9373
9374 2018-04-05  Tom Tromey  <tom@tromey.com>
9375
9376         * linespec.c (linespec_parse_basic): Reindent.
9377
9378 2018-04-05  Tom Tromey  <tom@tromey.com>
9379
9380         * minsyms.h (iterate_over_minimal_symbols): Update.
9381         * minsyms.c (iterate_over_minimal_symbols): Take a
9382         gdb::function_view.
9383         * linespec.c (struct collect_minsyms): Remove.
9384         (compare_msyms): Now a std::sort comparator.
9385         (add_minsym): Add parameters.
9386         (search_minsyms_for_name): Update.  Use std::vector.
9387
9388 2018-04-03  Tom Tromey  <tom@tromey.com>
9389
9390         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9391         gdb::byte_vector.
9392
9393 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9394
9395         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9396
9397 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9398
9399         PR gdb/16959
9400         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9401         printing static type.
9402
9403 2018-04-01  Tom Tromey  <tom@tromey.com>
9404
9405         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9406         (rs6000_xfer_shared_libraries): Update.
9407
9408 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9409
9410         * common/gdb_vecs.h (char_ptr): Remove.
9411         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9412
9413 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9414
9415         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9416         with std::vector.
9417         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9418
9419 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9420
9421         * tracepoint.h (struct uploaded_tp): Initialize fields.
9422         <actions, step_actions, cmd_strings>: Change type to
9423         std::vector<char *>.
9424         * tracepoint.c (get_uploaded_tp): Allocate with new.
9425         (free_uploaded_tps): Free with delete.
9426         (parse_tracepoint_definition): Adjust to std::vector change.
9427         * breakpoint.c (read_uploaded_action): Likewise.
9428         (create_tracepoint_from_upload): Likewise.
9429         * ctf.c (ctf_write_uploaded_tp): Likewise.
9430         (SET_ARRAY_FIELD): Likewise.
9431         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9432
9433 2018-03-30  Tom Tromey  <tom@tromey.com>
9434
9435         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9436         std::unique_ptr.
9437         (svr4_keep_data_in_core): Update.
9438         (svr4_read_so_list): Update.
9439
9440 2018-03-30  Tom Tromey  <tom@tromey.com>
9441
9442         * windows-nat.c (handle_output_debug_string, handle_exception):
9443         Update.
9444         * target.h (target_read_string): Update.
9445         * target.c (target_read_string): Change "string" to
9446         unique_xmalloc_ptr.
9447         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9448         Update.
9449         * solib-frv.c (frv_current_sos): Update.
9450         * solib-dsbt.c (dsbt_current_sos): Update.
9451         * solib-darwin.c (darwin_current_sos): Update.
9452         * linux-thread-db.c (inferior_has_bug): Update.
9453         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9454         Update.  Remove alloca.
9455         * ada-lang.c (ada_main_name): Update.
9456
9457 2018-03-30  Tom Tromey  <tom@tromey.com>
9458
9459         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9460         (struct dwo_file_deleter): New.
9461         (dwo_file_up): New typedef.
9462         (open_and_init_dwo_file): Use dwo_file_up.
9463         (free_dwo_file_cleanup): Remove.
9464
9465 2018-03-30  Tom Tromey  <tom@tromey.com>
9466
9467         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9468         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9469
9470 2018-03-30  Tom Tromey  <tom@tromey.com>
9471
9472         * dwarf2read.c (class free_cached_comp_units): New class.
9473         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9474         (free_cached_comp_units): Remove function.
9475
9476 2018-03-30  Tom Tromey  <tom@tromey.com>
9477
9478         * utils.h (make_cleanup_unpush_target): Remove.
9479         * inf-ptrace.c (struct target_unpusher): New.
9480         (target_unpush_up) New typedef.
9481         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9482         target_unpush_up.
9483         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9484
9485 2018-03-27  Tom Tromey  <tom@tromey.com>
9486
9487         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9488
9489 2018-03-27  Pedro Alves  <palves@redhat.com>
9490             Tom Tromey  <tom@tromey.com>
9491
9492         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9493         destructor.  Now a class.
9494         (gdb_readline_wrapper_cleanup): Remove function.
9495         (gdb_readline_wrapper): Remove cleanups.
9496
9497 2018-03-27  Tom Tromey  <tom@tromey.com>
9498
9499         * typeprint.h (struct type_print_options) <local_typedefs,
9500         global_typedefs>: Remove "struct" keyword.
9501         (class typedef_hash_table): New class.
9502         (recursively_update_typedef_hash, add_template_parameters)
9503         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9504         (find_typedef_in_hash): Don't declare.
9505         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9506         (typedef_hash_table::recursively_update): Rename from
9507         recursively_update_typedef_hash.  Now a member.
9508         (typedef_hash_table::add_template_parameters): Rename from
9509         add_template_parameters.  Now a member.
9510         (typedef_hash_table::typedef_hash_table): Now a constructor;
9511         rename from create_typedef_hash.
9512         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9513         rename from free_typedef_hash.
9514         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9515         (do_free_global_table): Remove.
9516         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9517         from copy_type_recursive.
9518         (create_global_typedef_table): Remove.
9519         (typedef_hash_table::find_global_typedef): Now a member of
9520         typedef_hash_table.
9521         (typedef_hash_table::find_typedef): Rename from
9522         find_typedef_in_hash; now a member.
9523         (whatis_exp): Update.
9524         * extension.h (struct ext_lang_type_printers): Add constructor and
9525         destructor.
9526         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9527         declare.
9528         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9529         Now a constructor; rename from start_ext_lang_type_printers.
9530         (ext_lang_type_printers): Now a destructor; rename from
9531         free_ext_lang_type_printers.
9532         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9533         Update.
9534         (c_type_print_base_struct_union): Update.  Remove cleanups.
9535
9536 2018-03-27  Tom Tromey  <tom@tromey.com>
9537
9538         * dwarf-index-write.c: Include <cmath>.
9539
9540 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9541
9542         * NEWS: Add entry describing new "set|show varsize-limit" command.
9543         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9544         command.
9545         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9546         "set variable".
9547
9548 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9549
9550         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9551         dwarf-index-write.c
9552         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9553         * dwarf-index-common.c: New file.
9554         * dwarf-index-common.h: New file.
9555         * dwarf-index-write.c: New file.
9556         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9557         (struct dwarf2_section_info): Move from here.
9558         (dwarf2_section_info_def): Likewise.
9559         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9560         (offset_type): Likewise.
9561         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9562         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9563         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9564         (byte_swap): Likewise.
9565         (MAYBE_SWAP): Likewise.
9566         (dwarf2_per_cu_ptr): Likewise.
9567         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9568         (struct tu_stats): Likewise.
9569         (struct dwarf2_per_objfile): Likewise.
9570         (struct dwarf2_per_cu_data): Likewise.
9571         (struct signatured_type): Likewise.
9572         (sig_type_ptr): Likewise.
9573         (DEF_VEC_P (sig_type_ptr)): Likewise.
9574         (INDEX4_SUFFIX): Likewise.
9575         (INDEX5_SUFFIX): Likewise.
9576         (DEBUG_STR_SUFFIX): Likewise.
9577         (dwarf2_read_section): Make non-static.
9578         (mapped_index_string_hash): Move from here.
9579         (dwarf5_djb_hash): Likewise.
9580         (file_write): Likewise.
9581         (class data_buf): Likewise.
9582         (struct symtab_index_entry): Likewise.
9583         (struct mapped_symtab): Likewise.
9584         (find_slot): Likewise.
9585         (hash_expand): Likewise.
9586         (add_index_entry): Likewise.
9587         (uniquify_cu_indices): Likewise.
9588         (class c_str_view): Likewise.
9589         (class c_str_view_hasher): Likewise.
9590         (class vector_hasher): Likewise.
9591         (write_hash_table): Likewise.
9592         (psym_index_map): Likewise.
9593         (struct addrmap_index_data): Likewise.
9594         (add_address_entry): Likewise.
9595         (add_address_entry_worker): Likewise.
9596         (write_address_map): Likewise.
9597         (symbol_kind): Likewise.
9598         (write_psymbols): Likewise.
9599         (struct signatured_type_index_data): Likewise.
9600         (write_one_signatured_type): Likewise.
9601         (recursively_count_psymbols): Likewise.
9602         (recursively_write_psymbols): Likewise.
9603         (class debug_names): Likewise.
9604         (check_dwarf64_offsets): Likewise.
9605         (psyms_seen_size): Likewise.
9606         (write_gdbindex): Likewise.
9607         (write_debug_names): Likewise.
9608         (assert_file_size): Likewise.
9609         (write_psymtabs_to_index): Likewise.
9610         (save_gdb_index_command): Likewise.
9611         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9612         command.
9613         * dwarf2read.h: New file.
9614
9615 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9616
9617         PR gdb/22670
9618         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9619         symbol name if the CU's language stores symbol names in linkage
9620         format.
9621         * language.h (struct language_defn)
9622         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9623         all instances of this struct.
9624
9625 2018-03-26  Tom Tromey  <tom@tromey.com>
9626
9627         * stack.c (backtrace_command_1): Remove verbose code.
9628
9629 2018-03-26  Tom Tromey  <tom@tromey.com>
9630
9631         * python/py-framefilter.c (py_print_type): Don't catch
9632         exceptions.  Return void.
9633         (py_print_value): Likewise.
9634         (py_print_single_arg): Likewise.
9635         (enumerate_args): Don't catch exceptions.
9636         (py_print_args): Likewise.
9637         (py_print_frame): Likewise.
9638         (gdbpy_apply_frame_filter): Catch exceptions here.
9639
9640 2018-03-26  Tom Tromey  <tom@tromey.com>
9641
9642         * stack.c (_initialize_stack): Remove trailing newlines from help
9643         text.  Add "Usage" line to "backtrace" help.
9644
9645 2018-03-26  Tom Tromey  <tom@tromey.com>
9646
9647         PR python/16486:
9648         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9649
9650 2018-03-26  Tom Tromey  <tom@tromey.com>
9651
9652         * python/py-framefilter.c (py_print_single_arg): Return
9653         EXT_LANG_BT_ERROR from catch.
9654
9655 2018-03-26  Tom Tromey  <tom@tromey.com>
9656
9657         PR backtrace/15584:
9658         * stack.c (backtrace_command_1): Move some code into no-filters
9659         "if".
9660
9661 2018-03-26  Tom Tromey  <tom@tromey.com>
9662
9663         * python/py-framefilter.c (throw_quit_or_print_exception): New
9664         function.
9665         (gdbpy_apply_frame_filter): Use it.
9666
9667 2018-03-26  Tom Tromey  <tom@tromey.com>
9668
9669         PR cli/17716:
9670         * python/py-framefilter.c (py_print_type, py_print_value)
9671         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9672         RETURN_MASK_ERROR.
9673
9674 2018-03-26  Tom Tromey  <tom@tromey.com>
9675
9676         * python/py-framefilter.c (enumerate_args): Use
9677         gdb::unique_xmalloc_ptr.
9678
9679 2018-03-26  Tom Tromey  <tom@tromey.com>
9680
9681         * python/py-framefilter.c (py_print_frame): Return
9682         EXT_LANG_BT_OK.
9683         (gdbpy_apply_frame_filter): Update comment.
9684         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9685         Remove.
9686         <EXT_LANG_BT_NO_FILTERS>: Change value.
9687
9688 2018-03-26  Tom Tromey  <tom@tromey.com>
9689
9690         PR backtrace/15582:
9691         * stack.c (backtrace_command): Parse "hide" argument.
9692         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9693         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9694         constant.
9695
9696 2018-03-26  Tom Tromey  <tom@tromey.com>
9697
9698         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9699         add "flags".
9700         (backtrace_command): Remove "fulltrace", add "flags".
9701
9702 2018-03-26  Tom Tromey  <tom@tromey.com>
9703
9704         * stack.c (backtrace_command): Rewrite command line parsing.
9705
9706 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9707
9708         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9709
9710 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9711
9712         * filename-seen-cache.h: Add include guard.
9713
9714 2018-03-26  Keith Seitz  <keiths@redhat.com>
9715
9716         * symfile.c (place_section): Remove "struct" from section_addr_info
9717         in comment.
9718         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9719         "struct" keyword from section_addr_info.
9720
9721 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9722
9723         * regformats/regdef.h (reg): Add constructors.
9724
9725 2018-03-25  Pedro Alves  <palves@redhat.com>
9726
9727         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9728         if then/else bodies in var_func_name extraction.
9729
9730 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9731
9732         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9733         lookup_minimal_symbol() to find symbol entry.
9734         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9735
9736 2018-03-23  Keith Seitz  <keiths@redhat.com>
9737
9738         PR c++/22968
9739         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9740         nested type definitions for C++, too.
9741
9742 2018-03-23  Tom Tromey  <tom@tromey.com>
9743
9744         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9745         a typedef.
9746         (macho_register_oso): Remove.
9747         (macho_symtab_read): Take a std::vector.
9748         (oso_el_compare_name): Now a std::sort comparator.
9749         (macho_symfile_read_all_oso): Take a std::vector.
9750         (macho_symfile_read): Use std::vector.  Remove cleanups.
9751
9752 2018-03-22  Tom Tromey  <tom@tromey.com>
9753
9754         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9755         (record_full_goto_bookmark): Use std::string.
9756
9757 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9758
9759         PR tdep/18295
9760         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9761         a single mask.
9762
9763 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9764
9765         * rs6000-tdep.c (store_insn_p): New function.
9766         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9767         and cr_reg to their unshifted values. Use store_insn_p to
9768         match LR saves using either R1 or fdata->alloca_reg. Use
9769         store_insn_p to match CR saves. Set alloca_reg_offset
9770         when alloca_reg and framep are set. Remove lr_reg shift
9771         when assigning to fdata->lr_register.
9772
9773 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9774
9775         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9776         command line args instead of emitting a warning.
9777
9778 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9779
9780         * tracepoint.h (struct static_tracepoint_marker): Initialize
9781         fields, define default constructor, move constructor and move
9782         assignment, disable the rest.
9783         <str_id, extra>: Make std::string.
9784         (release_static_tracepoint_marker): Remove.
9785         (free_current_marker): Remove.
9786         * tracepoint.c (free_current_marker): Remove.
9787         (parse_static_tracepoint_marker_definition): Adjust to
9788         std::string, use new hex2str overload.
9789         (release_static_tracepoint_marker): Remove.
9790         (print_one_static_tracepoint_marker): Get marker by reference
9791         and adjust to std::string.
9792         (info_static_tracepoint_markers_command): Adjust to std::vector
9793         changes
9794         * target.h (static_tracepoint_marker_p): Remove typedef.
9795         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9796         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9797         bool.
9798         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9799         * target-debug.h
9800         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9801         (target_debug_print_std_vector_static_tracepoint_marker): New.
9802         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9803         to...
9804         (target_debug_print_static_tracepoint_marker_p): ... this.
9805         * target-delegates.c: Re-generate.
9806         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9807         Make std::string.
9808         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9809         (decode_static_tracepoint_spec): Adjust to std::vector.
9810         (tracepoint_print_one_detail): Adjust to std::string.
9811         (strace_marker_decode_location): Adjust to std::string.
9812         (update_static_tracepoint): Adjust to std::string, remove call
9813         to release_static_tracepoint_marker.
9814         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9815         Adjust to std::vector.
9816         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9817         (remote_static_tracepoint_markers_by_strid): Adjust to
9818         std::vector.
9819         * common/rsp-low.h (hex2str): New overload with explicit count
9820         of bytes.
9821         * common/rsp-low.c (hex2str): New overload with explicit count
9822         of bytes.
9823         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9824         (_initialize_rsp_low_selftests): Add test_hex2str test.
9825         * unittests/tracepoint-selftests.c
9826         (test_parse_static_tracepoint_marker_definition): Adjust to
9827         std::string.
9828
9829 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9830
9831         * tracepoint.c (parse_static_tracepoint_marker_definition):
9832         Consider case where the definition is followed by more
9833         definitions.
9834         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9835         tracepoint-selftests.c.
9836         * unittests/tracepoint-selftests.c: New.
9837
9838 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9839
9840         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9841         Carvalho.
9842
9843 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9844
9845         * symtab.c (find_pc_sect_line): fixed indentation.
9846
9847 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9848
9849         * symtab.c (find_pc_sect_line): now uses binary search.
9850
9851 2018-03-19  Tom Tromey  <tom@tromey.com>
9852
9853         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9854         "IDENT" production.
9855
9856 2018-03-19  Pedro Alves  <palves@redhat.com>
9857             Tom Tromey  <tom@tromey.com>
9858
9859         * unittests/observable-selftests.c: New file.
9860         * common/observable.h: New file.
9861         * observable.h: New file.
9862         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9863         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9864         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9865         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9866         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9867         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9868         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9869         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9870         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9871         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9872         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9873         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9874         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9875         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9876         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9877         tui/tui-interp.c, valops.c: Update all users.
9878         * tui/tui-hooks.c (tui_bp_created_observer)
9879         (tui_bp_deleted_observer, tui_bp_modified_observer)
9880         (tui_inferior_exit_observer, tui_before_prompt_observer)
9881         (tui_normal_stop_observer, tui_register_changed_observer):
9882         Remove.
9883         (tui_observers_token): New global.
9884         (attach_or_detach, tui_attach_detach_observers): New functions.
9885         (tui_install_hooks, tui_remove_hooks): Use
9886         tui_attach_detach_observers.
9887         * record-btrace.c (record_btrace_thread_observer): Remove.
9888         (record_btrace_thread_observer_token): New global.
9889         * observer.sh: Remove.
9890         * observer.c: Rename to observable.c.
9891         * observable.c (namespace gdb_observers): Define new objects.
9892         (observer_debug): Move into gdb_observers namespace.
9893         (struct observer, struct observer_list, xalloc_observer_list_node)
9894         (xfree_observer_list_node, generic_observer_attach)
9895         (generic_observer_detach, generic_observer_notify): Remove.
9896         (_initialize_observer): Update.
9897         Don't include observer.inc.
9898         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9899         (clean mostlyclean): Likewise.
9900         (observer.h, observer.inc): Remove targets.
9901         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9902         (COMMON_SFILES): Use observable.c, not observer.c.
9903         * .gitignore: Remove observer.h.
9904
9905 2018-03-18  Tom Tromey  <tom@tromey.com>
9906
9907         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9908         gdb::def_vector.
9909         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9910
9911 2018-03-17  Tom Tromey  <tom@tromey.com>
9912
9913         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9914
9915 2018-03-17  Tom Tromey  <tom@tromey.com>
9916
9917         * target.c (class scoped_target_fd): New.
9918         (target_fileio_close_cleanup): Remove.
9919         (target_fileio_read_alloc_1): Use scoped_target_fd.
9920
9921 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9922
9923         * silent-rules.mk: New.
9924         * Makefile.in: Include silent-rules.mk
9925         (srcdir, VPATH, top_srcdir): Move up.
9926         (COMPILE): Add ECHO_CXX.
9927         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9928         (init.c): Add ECHO_INIT_C.
9929         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9930         (version.c): Add ECHO_GEN.
9931         (printcmd.o): Add ECHO_CXX.
9932         (target-float.o): Add ECHO_CXX.
9933         (ada-exp.o): Add ECHO_CXX.
9934         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9935         (insight$(EXEEXT)): Add ECHO_CXXLD.
9936         * gnulib/configure.ac: Add AM_SILENT_RULES.
9937         * gnulib/aclocal.m4: Re-generate.
9938         * gnulib/configure: Re-generate.
9939         * gnulib/import/Makefile.in: Re-generate.
9940
9941 2018-03-16  Tom Tromey  <tom@tromey.com>
9942
9943         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9944         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9945         * utils.c (do_free_section_addr_info)
9946         (make_cleanup_free_section_addr_info): Remove.
9947         * symfile.h (struct other_sections): Add constructor.
9948         (struct section_addr_info): Remove.
9949         (section_addr_info): New typedef.
9950         (struct sym_fns) <sym_offsets>: Change type of parameter.
9951         (build_section_addr_info_from_objfile)
9952         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9953         (default_symfile_offsets, symbol_file_add)
9954         (symbol_file_add_from_bfd)
9955         (build_section_addr_info_from_section_table): Update.
9956         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9957         * symfile.c (alloc_section_addr_info): Remove.
9958         (build_section_addr_info_from_section_table): Change return type.
9959         Update.
9960         (build_section_addr_info_from_bfd)
9961         (build_section_addr_info_from_objfile): Likewise.
9962         (free_section_addr_info): Remove.
9963         (relative_addr_info_to_section_offsets): Change type of "addrs".
9964         (addrs_section_compar): Now a std::sort comparator.
9965         (addrs_section_sort): Change return type.
9966         (addr_info_make_relative): Change type of "addrs".  Update.
9967         (default_symfile_offsets, syms_from_objfile_1)
9968         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9969         (symbol_file_add_separate): Update.
9970         (symbol_file_add): Change type of "addrs".  Update.
9971         (add_symbol_file_command): Update.  Remove cleanups.
9972         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
9973         cleanups.
9974         * symfile-debug.c (debug_sym_offsets): Change type of "info".
9975         * solib.c (solib_read_symbols): Update.
9976         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
9977         * machoread.c (macho_symfile_offsets): Update.
9978         * jit.c (jit_bfd_try_read_symtab): Update.
9979
9980 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
9981
9982         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9983         unittests/utils-selftests.c.
9984         * unittests/utils-selftests.c: New file.
9985
9986 2018-03-14  Tom Tromey  <tom@tromey.com>
9987
9988         PR cli/14977:
9989         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9990         for NULL.
9991
9992 2018-03-14  Tom Tromey  <tom@tromey.com>
9993
9994         PR cli/19918:
9995         * printcmd.c (printf_pointer): Allow "-" in format.
9996
9997 2018-03-14  Tom Tromey  <tom@tromey.com>
9998
9999         * printcmd.c (_initialize_printcmd): Add usage to printf.
10000
10001 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10002
10003         * MAINTAINERS: Update my email address.
10004
10005 2018-03-13  Tom Tromey  <tom@tromey.com>
10006
10007         * machoread.c (macho_check_dsym): Change filenamep to a
10008         std::string*.
10009         (macho_symfile_read): Update.
10010         * symfile.c (load_command): Use std::string.
10011
10012 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10013
10014         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10015         to error message string.
10016         (riscv_register_name): Use xsnprintf instead of sprintf.
10017         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10018         internal_error.
10019         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10020         error.
10021         (riscv_push_dummy_call): Likewise.
10022
10023 2018-03-12  Tom Tromey  <tom@tromey.com>
10024
10025         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10026         Use gdb::byte_vector.
10027         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10028
10029 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10030
10031         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10032         parameter type to readable_regcache.
10033         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10034         the declaration.
10035
10036 2018-03-11  Tom Tromey  <tom@tromey.com>
10037
10038         * dwarf2read.c (struct nextfield): Add initializers.
10039         (struct nextfnfield): Remove.
10040         (struct fnfieldlist): Add initializers.  Remove "length" and
10041         "head", use std::vector.
10042         (struct decl_field_list): Remove.
10043         (struct field_info): Add initializers.
10044         <fields, baseclasses>: Now std::vector.
10045         <nbaseclasses, nfnfields, typedef_field_list_count,
10046         nested_types_list_count>: Remove.
10047         (dwarf2_add_field, dwarf2_add_type_defn)
10048         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10049         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10050         (process_structure_scope): Update.
10051
10052 2018-03-11  Tom Tromey  <tom@tromey.com>
10053
10054         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10055         for use by std::sort.
10056         (build_type_psymtabs_1): Use std::vector.
10057
10058 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10059
10060         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10061         and LIBMPFR in the printed configuration.
10062
10063 2018-03-08  Tom Tromey  <tom@tromey.com>
10064
10065         * source.c (get_filename_and_charpos): Use scoped_fd.
10066         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10067         (procfs_pidlist): Likewise.
10068         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10069         (iterate_over_mappings): Likewise.
10070
10071 2018-03-08  Tom Tromey  <tom@tromey.com>
10072
10073         * infcall.c (struct call_return_meta_info)
10074         <stack_temporaries_enabled>: Remove.
10075         (get_call_return_value, call_function_by_hand_dummy): Update.
10076         * thread.c (disable_thread_stack_temporaries): Remove.
10077         (enable_thread_stack_temporaries): Remove.
10078         (thread_stack_temporaries_enabled_p): Return bool.
10079         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10080         (get_last_thread_stack_temporary): Update.
10081         * eval.c (evaluate_subexp): Update.
10082         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10083         class, not a function.
10084         (value_ptr, value_vec): Remove typedefs.
10085         (class thread_info) <stack_temporaries_enabled>: Now bool.
10086         <stack_temporaries>: Now a std::vector.
10087         (thread_stack_temporaries_enabled_p)
10088         (value_in_thread_stack_temporaries): Return bool.
10089
10090 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10091
10092         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10093         (getpkt_or_notif_sane_1): Likewise.
10094
10095 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10096
10097         * build-id.c (build_id_to_debug_bfd): Use std::string.
10098
10099 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10100
10101         * build-id.c (find_separate_debug_file_by_buildid): Return
10102         std::string.
10103         * build-id.h (find_separate_debug_file_by_buildid): Return
10104         std::string.
10105         * coffread.c (coff_symfile_read): Adjust to std::string.
10106         * elfread.c (elf_symfile_read): Adjust to std::string.
10107         * symfile.c (separate_debug_file_exists): Change parameter to
10108         std::string.
10109         (find_separate_debug_file): Return std::string.
10110         (find_separate_debug_file_by_debuglink): Return std::string.
10111         * symfile.h (find_separate_debug_file_by_debuglink): Return
10112         std::string.
10113
10114 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10115
10116         * common/xml-utils.c (xml_escape_text): Move code to...
10117         (xml_escape_text_append): ... this new function.
10118         * common/xml-utils.h (xml_escape_text_append): New declaration.
10119         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10120         New function.
10121         (_initialize_xml_utils): register test_xml_escape_text_append as
10122         a selftest.
10123
10124 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10125
10126         * defs.h: Remove MAX_REGISTER_SIZE.
10127         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10128         asserts.
10129         * python/py-unwind.c (pyuw_sniffer): Likewise.
10130
10131 2018-03-07  Tom Tromey  <tom@tromey.com>
10132
10133         * linux-tdep.c (linux_info_proc): Update.
10134         * target.h (struct target_ops) <to_fileio_readlink>: Return
10135         optional<string>.
10136         (target_fileio_readlink): Return optional<string>.
10137         * remote.c (remote_hostio_readlink): Return optional<string>.
10138         * inf-child.c (inf_child_fileio_readlink): Return
10139         optional<string>.
10140         * target.c (target_fileio_readlink): Return optional<string>.
10141
10142 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10143
10144         * regcache.c (cooked_read_test): Add riscv to the list of
10145         architectures that have a save_reggroup.
10146
10147 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10148
10149         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10150         value is not a dynamic class object.
10151
10152 2018-03-06  Tom Tromey  <tom@tromey.com>
10153
10154         * rust-exp.y: Formatting fixes.
10155
10156 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10157
10158         * riscv-tdep.c (riscv_register_name): Remove target description
10159         support.
10160         (riscv_gdbarch_init): Remove target description check.
10161
10162 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10163
10164         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10165         comment.
10166         * riscv-tdep.h: Likewise.
10167
10168 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10169
10170         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10171         (riscv_pseudo_register_write): Delete.
10172         (riscv_gdbarch_init): Remove all use of pseudo registers.
10173
10174 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10175
10176         * record-btrace.c (btrace_print_lines): Replace cleanup
10177         parameter with RAII equivalents.
10178         (btrace_insn_history): Replace cleanup with RAII equivalents.
10179         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10180         make_cleanup_ui_out_tuple_begin_end): Remove.
10181         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10182         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10183         make_cleanup_ui_out_list_begin_end): Remove.
10184
10185 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10186
10187         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10188         parameter types to std::vector.  Use bool.
10189         (record_btrace_wait): Replace VEC(tp_t) with
10190         std::vector<thread_info *>.
10191         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10192
10193 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10194
10195         * record-btrace.c (record_btrace_disable_callback): Remove.
10196         (struct scoped_btrace_disable): New.
10197         (record_btrace_open): Use scoped_btrace_disable.
10198
10199 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10200
10201         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10202         reading values from registers.
10203
10204 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10205
10206         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10207         where appropriate.
10208
10209 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10210
10211         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10212         change parameter type.  Use GDB's print functions, and use
10213         core_addr_to_string where appropriate.
10214         (riscv_push_dummy_call): Use core_addr_to_string where
10215         appropriate, update call to riscv_print_arg_location, and reindent
10216         a few lines.
10217         (riscv_return_value): Update call to riscv_print_arg_location.
10218
10219 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10220             Tim Newsome <tim@sifive.com>
10221             Albert Ou <a0u@eecs.berkeley.edu>
10222             Darius Rad <darius@bluespec.com>
10223
10224         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10225         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10226         (ALLDEPFILES): Add riscv-tdep.c
10227         * configure.tgt: Add riscv support.
10228         * riscv-tdep.c: New file.
10229         * riscv-tdep.h: New file.
10230         * NEWS: Mention new target.
10231         * MAINTAINERS: Add entry for riscv.
10232
10233 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10234
10235         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10236         fields within aggregates.
10237
10238 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10239
10240         * record-btrace.c (btrace_print_lines): Change type of flags to
10241         gdb_disassembly_flags.
10242
10243 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10244
10245         * fbsd-nat.c: Include "inf-ptrace.h".
10246         (USE_SIGTRAP_SIGINFO): Conditionally define.
10247         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10248         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10249         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10250         function.
10251         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10252         Likewise.
10253         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10254         Likewise.
10255         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10256         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10257         "supports_stopped_by_hw_breakpoint" target methods.
10258
10259 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10260
10261         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10262         * fbsd-nat.c (debug_fbsd_nat): New variable.
10263         (show_fbsd_nat_debug): New function.
10264         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10265         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10266
10267 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10268
10269         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10270         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10271         prototype.
10272         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10273         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10274         method.
10275
10276 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10277
10278         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10279         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10280
10281 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10282
10283         * charset.c (struct charset_vector): New.
10284         (charsets): Change type to charset_vector.
10285         (find_charset_names): Adjust.
10286         (add_one): Adjust.
10287         (_initialize_charset): Adjust.
10288
10289 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10290
10291         * progspace.h (struct program_space) <deleted_solibs>: Change
10292         type to std::vector<std::string>.
10293         * progspace.c (clear_program_space_solib_cache): Adjust.
10294         * breakpoint.c (print_solib_event): Adjust.
10295         (check_status_catch_solib): Adjust.
10296         * solib.c (update_solib_list): Adjust.
10297         * ui-out.h (class ui_out) <field_string>: New overload.
10298         * ui-out.c (ui_out::field_string): New overload.
10299
10300 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10301
10302         * progspace.h (struct program_space): Add constructor and
10303         destructor, initialize fields.
10304         (add_program_space): Remove.
10305         * progspace.c (add_program_space): Rename to...
10306         (program_space::program_space): ... this.
10307         (release_program_space): Rename to...
10308         (program_space::~program_space): ... this.
10309         (delete_program_space): Use delete to delete program_space.
10310         (initialize_progspace): Use new to allocate program_space.
10311         * inferior.c (add_inferior_with_spaces): Likewise.
10312         (clone_inferior_command): Likewise.
10313         * infrun.c (follow_fork_inferior): Likewise.
10314         (handle_vfork_child_exec_or_exit): Likewise.
10315
10316 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10317
10318         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10319         (delim_string_to_char_ptr_vec): Return std::vector of
10320         gdb::unique_xmalloc_ptr.
10321         (dirnames_to_char_ptr_vec_append): Take std::vector of
10322         gdb::unique_xmalloc_ptr.
10323         (dirnames_to_char_ptr_vec): Return std::vector of
10324         gdb::unique_xmalloc_ptr.
10325         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10326         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10327         (delim_string_to_char_ptr_vec): Return an std::vector of
10328         gdb::unique_xmalloc_ptr, adjust the code.
10329         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10330         gdb::unique_xmalloc_ptr, adjust the code.
10331         (dirnames_to_char_ptr_vec): Return an std::vector of
10332         gdb::unique_xmalloc_ptr, adjust the code.
10333         * auto-load.c (auto_load_safe_path_vec): Change type to
10334         std::vector of gdb::unique_xmalloc_ptr.
10335         (auto_load_expand_dir_vars): Return an std::vector of
10336         gdb::unique_xmalloc_ptr, adjust the code.
10337         (auto_load_safe_path_vec_update): Adjust.
10338         (filename_is_in_auto_load_safe_path_vec): Adjust.
10339         (auto_load_objfile_script_1): Adjust.
10340         * build-id.c (build_id_to_debug_bfd): Adjust.
10341         * linux-thread-db.c (thread_db_load_search): Adjust.
10342         * source.c (add_path): Adjust.
10343         (openp): Adjust.
10344         * symfile.c (find_separate_debug_file): Adjust.
10345         * utils.c (do_free_char_ptr_vec): Remove.
10346         (make_cleanup_free_char_ptr_vec): Remove.
10347
10348 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10349
10350         PR gdb/22907
10351         * common/pathstuff.c: Conditionally include "<windows.h>".
10352
10353 2018-03-01  Georg Sauthoff  <mail@georg.so>
10354
10355         PR gdb/22888
10356         * gcore.in: Quote variables and switch interpreter to bash.
10357
10358 2018-03-01  Tom Tromey  <tom@tromey.com>
10359
10360         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10361         assertion.  Add assertion for discriminant_index.
10362         (quirk_rust_enum): Use correct base type name in univariant case.
10363
10364 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10365
10366         * record.c (get_call_history_modifiers): Return a
10367         record_print_flags.
10368         (cmd_record_call_history): Adjust.
10369         * record-btrace.c (record_btrace_call_history): Adjust.
10370         (record_btrace_call_history_range): Adjust.
10371         (record_btrace_call_history_from): Adjust.
10372         * target-debug.h (target_debug_print_record_print_flags): New.
10373         * target-delegates.c: Re-generate.
10374         * target.c (target_call_history): Change flags type.
10375         (target_call_history_from): Likewise.
10376         (target_call_history_range): Likewise.
10377         * target.h (struct target_ops) <target_call_history>: Likewise.
10378         (target_call_history_from): Likewise.
10379         (target_call_history_range): Likewise.
10380
10381 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10382             Simon Marchi  <simon.marchi@polymtl.ca>
10383
10384         * common/common-utils.c: Include "sys/stat.h".
10385         (is_regular_file): Move here from "source.c"; change return
10386         type to "bool".
10387         * common/common-utils.h (is_regular_file): New prototype.
10388         * common/pathstuff.c (contains_dir_separator): New function.
10389         * common/pathstuff.h (contains_dir_separator): New prototype.
10390         * source.c: Don't include "sys/stat.h".
10391         (is_regular_file): Move to "common/common-utils.c".
10392
10393 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10394
10395         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10396         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10397         * auto-load.c: Include "common/pathstuff.h".
10398         * common/common-def.h (current_directory): Move here.
10399         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10400         function.
10401         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10402         prototype.
10403         * common/pathstuff.c: New file.
10404         * common/pathstuff.h: New file.
10405         * compile/compile.c: Include "common/pathstuff.h".
10406         * defs.h (current_directory): Move to "common/common-defs.h".
10407         * dwarf2read.c: Include "common/pathstuff.h".
10408         * exec.c: Likewise.
10409         * guile/scm-safe-call.c: Likewise.
10410         * linux-thread-db.c: Likewise.
10411         * main.c: Likewise.
10412         * nto-tdep.c: Likewise.
10413         * objfiles.c: Likewise.
10414         * source.c: Likewise.
10415         * symtab.c: Likewise.
10416         * utils.c: Include "common/pathstuff.h".
10417         (gdb_realpath): Move to "common/pathstuff.c".
10418         (gdb_realpath_keepfile): Likewise.
10419         (gdb_abspath): Likewise.
10420         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10421         (gdb_realpath_keepfile): Likewise.
10422         (gdb_abspath): Likewise.
10423
10424 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10425
10426         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10427         wildcard process pid for super_resume for kernels with a
10428         specific bug.
10429
10430 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10431
10432         * compile/compile.c (get_args): Add additional comments
10433         explaining function.
10434
10435 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10436             Tom Tromey  <tom@tromey.com>
10437
10438         * target.h (memory_write_request_s): Remove typedef.  Don't define
10439         VEC.
10440         (target_write_memory_blocks): Change argument to std::vector.
10441         (struct memory_write_request): Add constructor.
10442         * target-memory.c (compare_block_starting_address): Return bool.
10443         Change argument types.
10444         (claim_memory): Change arguments to use std::vector.
10445         (split_regular_and_flash_blocks, blocks_to_erase)
10446         (compute_garbled_blocks): Likewise.
10447         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10448         (target_write_memory_blocks): Change argument to std::vector.
10449         * symfile.c (struct load_section_data): Add constructor and
10450         destructor.  Use std::vector for "requests".
10451         (struct load_progress_data): Add initializers.
10452         (load_section_callback): Update.  Use "new".
10453         (clear_memory_write_data): Remove.
10454         (generic_load): Update.
10455
10456 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10457
10458         * arch/aarch64.h: Use common/tdesc.h.
10459
10460 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10461
10462         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10463         architecture with a 64-bit ABI.
10464
10465 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10466
10467         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10468         ahead of target description loading.
10469
10470 2018-02-26  Tom Tromey  <tom@tromey.com>
10471
10472         * stack.c (backtrace_command_1): Update.
10473         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10474         of "flags".
10475         * python/py-framefilter.c (py_print_frame)
10476         (gdbpy_apply_frame_filter): Change type of "flags".
10477         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10478         of "flags".
10479         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10480         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10481         * extension.h (enum frame_filter_flag): Rename from
10482         frame_filter_flags.
10483         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10484         (apply_ext_lang_frame_filter): Change type of "flags".
10485         * extension.c (apply_ext_lang_frame_filter): Change type of
10486         "flags".
10487         * extension-priv.h (struct extension_language_ops)
10488         <apply_frame_filter>: Change type of "flags".
10489
10490 2018-02-26  Tom Tromey  <tom@tromey.com>
10491
10492         PR python/16497:
10493         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10494         off-by-one in py_end computation.
10495         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10496         PRINT_MORE_FRAMES.
10497         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10498         constant.
10499
10500 2018-02-26  Tom Tromey  <tom@tromey.com>
10501
10502         * dwarf2read.c (struct variant_field): New.
10503         (struct nextfield) <variant>: New field.
10504         (dwarf2_add_field): Handle DW_TAG_variant_part.
10505         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10506         discriminated union.
10507         (read_structure_type): Handle DW_TAG_variant_part.
10508         (handle_struct_member_die): New function, extracted from
10509         process_structure_scope.  Handle DW_TAG_variant.
10510         (process_structure_scope): Handle discriminated unions.  Call
10511         handle_struct_member_die.
10512
10513 2018-02-26  Tom Tromey  <tom@tromey.com>
10514
10515         * rust-lang.h (rust_last_path_segment): Declare.
10516         * rust-lang.c (rust_last_path_segment): Now public.  Change
10517         contract.
10518         (struct disr_info): Remove.
10519         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10520         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10521         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10522         (rust_enum_p, rust_enum_variant): New function.
10523         (rust_underscore_fields): Remove "offset" parameter.
10524         (rust_print_enum): New function.
10525         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10526         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10527         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10528         enums.
10529         (rust_internal_print_type): New function, from rust_print_type.
10530         Remove enum code.
10531         (rust_print_type): Call rust_internal_print_type.
10532         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10533         Update enum handling.
10534         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10535         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10536         (rust_union_quirks): New functions.
10537         (process_full_comp_unit, process_full_type_unit): Call
10538         rust_union_quirks.
10539         (process_structure_scope): Update rust_unions if necessary.
10540
10541 2018-02-26  Tom Tromey  <tom@tromey.com>
10542
10543         * value.h (value_union_variant): Declare.
10544         * valops.c (value_union_variant): New function.
10545         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10546         (struct discriminant_info): New.
10547         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10548         enumerator.
10549         (struct main_type) <flag_discriminated_union>: New field.
10550
10551 2018-02-26  Tom Tromey  <tom@tromey.com>
10552
10553         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10554         unittests/unpack-selftests.c.
10555         * unittests/unpack-selftests.c: New file.
10556         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10557
10558 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10559
10560         * dwarf2read.c (struct partial_die_info) <read>: New method.
10561         (read_partial_die): Remove the declaration.
10562         (load_partial_dies): Update.
10563         (partial_die_info::partial_die_info):
10564         (read_partial_die): Change it to partial_die_info::read.
10565
10566 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10567
10568         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10569         (fixup_partial_die): Remove declaration.
10570         (scan_partial_symbols): Update.
10571         (partial_die_parent_scope): Likewise.
10572         (partial_die_full_name): Likewise.
10573         (fixup_partial_die): Change it to partial_die_info::fixup.
10574
10575 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10576
10577         * dwarf2read.c (read_partial_die): Update the declaration.
10578         (load_partial_dies): Caller update.
10579         (read_partial_die): Remove one argument abbrev_len.
10580
10581 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10582
10583         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10584         assignment operator.
10585         (load_partial_dies): Use ctor and copy ctor.
10586         (read_partial_die): Update.
10587         (dwarf2_cu::find_partial_die): Use ctor.
10588
10589 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10590
10591         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10592         (find_partial_die_in_comp_unit): Change it to
10593         dwarf2_cu::find_partial_die.
10594         (find_partial_die): Update.
10595
10596 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10597
10598         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10599         is NULL.
10600
10601 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10602
10603         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10604
10605 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10606
10607         * arch/amd64.h: Use common/tdesc.h.
10608         * arch/i386.c: Likewise.
10609         * arch/i386.h: Likewise.
10610         * arch/tic6x.c: Likewise.
10611         * arch/tdesc.h: Move file from here...
10612         * common/tdesc.h: ...to here.
10613         * features/aarch64-core.c: Regenerate.
10614         * features/aarch64-fpu.c: Regenerate.
10615         * features/i386/32bit-avx.c: Regenerate.
10616         * features/i386/32bit-avx512.c: Regenerate.
10617         * features/i386/32bit-core.c: Regenerate.
10618         * features/i386/32bit-linux.c: Regenerate.
10619         * features/i386/32bit-mpx.c: Regenerate.
10620         * features/i386/32bit-pkeys.c: Regenerate.
10621         * features/i386/32bit-sse.c: Regenerate.
10622         * features/i386/64bit-avx.c: Regenerate.
10623         * features/i386/64bit-avx512.c: Regenerate.
10624         * features/i386/64bit-core.c: Regenerate.
10625         * features/i386/64bit-linux.c: Regenerate.
10626         * features/i386/64bit-mpx.c: Regenerate.
10627         * features/i386/64bit-pkeys.c: Regenerate.
10628         * features/i386/64bit-segments.c: Regenerate.
10629         * features/i386/64bit-sse.c: Regenerate.
10630         * features/i386/x32-core.c: Regenerate.
10631         * features/tic6x-c6xp.c: Regenerate.
10632         * features/tic6x-core.c: Regenerate.
10633         * features/tic6x-gp.c: Regenerate.
10634         * target-descriptions.c: Use common/tdesc.h.
10635         * target-descriptions.h: Likewise.
10636
10637 2018-02-24  Tom Tromey  <tom@tromey.com>
10638
10639         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10640         (try_thread_db_load_from_dir, thread_db_load_search): Use
10641         std::string.
10642         (info_auto_load_libthread_db_compare): Return bool.  Change
10643         argument types.
10644         (info_auto_load_libthread_db): Use std::vector, std::string.
10645         Remove cleanups.
10646
10647 2018-02-24  Tom Tromey  <tom@tromey.com>
10648
10649         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10650         std::string.
10651         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10652         std::string*.
10653         * gdbarch.c: Rebuild.
10654         * gdbarch.h: Rebuild.
10655         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10656         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10657         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10658         std::string*.
10659
10660 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10661
10662         * gdbtypes.h (sect_offset): Change type to uint64_t.
10663         (sect_offset_str): New function.
10664         * dwarf2read.c (create_addrmap_from_aranges): Use
10665         sect_offset_str.
10666         (error_check_comp_unit_head): Likewise.
10667         (create_debug_type_hash_table): Likewise.
10668         (read_cutu_die_from_dwo): Likewise.
10669         (init_cutu_and_read_dies): Likewise.
10670         (init_cutu_and_read_dies_no_follow): Likewise.
10671         (process_psymtab_comp_unit_reader): Likewise.
10672         (partial_die_parent_scope): Likewise.
10673         (peek_die_abbrev): Likewise.
10674         (process_queue): Likewise.
10675         (dwarf2_physname): Likewise.
10676         (read_namespace_alias): Likewise.
10677         (read_import_statement): Likewise.
10678         (create_dwo_cu_reader): Likewise.
10679         (create_cus_hash_table): Likewise.
10680         (lookup_dwo_cutu): Likewise.
10681         (inherit_abstract_dies): Likewise.
10682         (read_func_scope): Likewise.
10683         (read_call_site_scope): Likewise.
10684         (dwarf2_add_member_fn): Likewise.
10685         (read_common_block): Likewise.
10686         (read_module_type): Likewise.
10687         (read_typedef): Likewise.
10688         (read_subrange_type): Likewise.
10689         (load_partial_dies): Likewise.
10690         (read_partial_die): Likewise.
10691         (find_partial_die): Likewise.
10692         (read_str_index): Likewise.
10693         (dwarf2_string_attr): Likewise.
10694         (build_error_marker_type): Likewise.
10695         (lookup_die_type): Likewise.
10696         (dump_die_shallow): Likewise.
10697         (follow_die_ref): Likewise.
10698         (dwarf2_fetch_die_loc_sect_off): Likewise.
10699         (dwarf2_fetch_constant_bytes): Likewise.
10700         (follow_die_sig): Likewise.
10701         (get_signatured_type): Likewise.
10702         (get_DW_AT_signature_type): Likewise.
10703         (dwarf2_find_containing_comp_unit): Likewise.
10704         (set_die_type): Likewise.
10705
10706 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10707
10708         * arch/aarch64.c: Include "common-defs.h".
10709         * arch/amd64.c: Likewise.
10710         * arch/i386.c: Likewise.
10711
10712 2018-02-21  Tom Tromey  <tom@tromey.com>
10713
10714         * value.h: (extract_field_op): Update.
10715         * eval.c (extract_field_op): Return a const char *.
10716         * expression.h (parse_expression_for_completion): Update.
10717         * completer.c (complete_expression): Update.
10718         (add_struct_fields): Make fieldname const.
10719         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10720         (mark_completion_tag, parse_exp_in_context_1): Update.
10721         (parse_expression_for_completion): Change "name" to
10722         unique_xmalloc_ptr*.
10723
10724 2018-02-21  Tom Tromey  <tom@tromey.com>
10725
10726         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10727
10728 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10729
10730         * avr-tdep.c (avr_read_pc): Change parameter type to
10731         readable_regcache.
10732         * gdbarch.sh (read_pc): Likewise.
10733         * gdbarch.c: Re-generated.
10734         * gdbarch.h: Re-generated.
10735         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10736         readable_regcache.
10737         * ia64-tdep.c (ia64_read_pc): Likewise.
10738         * mips-tdep.c (mips_read_pc): Likewise.
10739         * spu-tdep.c (spu_read_pc): Likewise.
10740
10741 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10742
10743         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10744         * regcache-dump.c: New file.
10745         * regcache.c: Move register_dump to regcache-dump.c.
10746         (maintenance_print_registers): Likewise.
10747         (maintenance_print_raw_registers): Likewise.
10748         (maintenance_print_cooked_registers): Likewise.
10749         (maintenance_print_register_groups): Likewise.
10750         (maintenance_print_remote_registers): Likewise.
10751         (_initialize_regcache): Likewise.
10752         * regcache.h (register_dump): Moved from regcache.c.
10753
10754 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10755
10756         * regcache.c (regcache::regcache): Update.
10757         (regcache::invalidate): Move it to detached_regcache::invalidate.
10758         (get_thread_arch_aspace_regcache): Update.
10759         (regcache::raw_update): Update.
10760         (regcache::cooked_read): Remove some code.
10761         (regcache::cooked_read_value): Likewise.
10762         (regcache::raw_write): Remove assert on m_readonly_p.
10763         (regcache::raw_supply_integer): Move it to
10764         detached_regcache::raw_supply_integer.
10765         (regcache::raw_supply_zeroed): Likewise.
10766         * regcache.h (detached_regcache) <raw_supply_integer>: New
10767         declaration.
10768         <raw_supply_zeroed, invalidate>: Likewise.
10769         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10770         <invalidate>: Likewise.
10771         <m_readonly_p>: Removed.
10772
10773 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10774
10775         * infcmd.c (get_return_value): Let stop_regs point to
10776         get_current_regcache.
10777         * regcache.c (regcache::regcache): Remove.
10778         (register_dump_reg_buffer): New class.
10779         (regcache_print): Adjust.
10780         * regcache.h (regcache): Remove constructors.
10781
10782 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10783
10784         * regcache.c (class register_dump): New class.
10785         (register_dump_regcache, register_dump_none): New class.
10786         (register_dump_remote, register_dump_groups): New class.
10787         (regcache_print): Update.
10788         * regcache.h (regcache_dump_what): Move it to regcache.c.
10789         (regcache) <dump>: Remove.
10790
10791 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10792
10793         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10794          reg_buffer_rw *.
10795         (jit_unwind_reg_set_impl): Call raw_supply.
10796         (jit_frame_sniffer): Use reg_buffer_rw.
10797         * record-full.c (record_full_core_regbuf): Change its type.
10798         (record_full_core_open_1): Use reg_buffer_rw.
10799         (record_full_close): Likewise.
10800         (record_full_core_fetch_registers): Use regcache->raw_supply.
10801         (record_full_core_store_registers): Likewise.
10802         * regcache.c (regcache::get_register_status): Move it to
10803         reg_buffer.
10804         (regcache_raw_set_cached_value): Remove.
10805         (regcache::raw_set_cached_value): Remove.
10806         (regcache::raw_write): Call raw_supply.
10807         (regcache::raw_supply): Move it to reg_buffer_rw.
10808         * regcache.h (regcache_raw_set_cached_value): Remove.
10809         (reg_buffer_rw): New class.
10810
10811 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10812
10813         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10814         readonly_detached_regcache.
10815         (dummy_frame_prev_register): Use regcache->cooked_read.
10816         * frame.c (frame_save_as_regcache): Change return type.
10817         (frame_pop): Update.
10818         * frame.h (frame_save_as_regcache): Update declaration.
10819         * inferior.h (get_infcall_suspend_state_regcache): Update
10820         declaration.
10821         * infrun.c (infcall_suspend_state) <registers>: use
10822         readonly_detached_regcache.
10823         (save_infcall_suspend_state): Don't use regcache_dup.
10824         (get_infcall_suspend_state_regcache): Change return type.
10825         * linux-fork.c (struct fork_info) <savedregs>: Change to
10826         readonly_detached_regcache.
10827         <pc>: New field.
10828         (fork_save_infrun_state): Don't use regcache_dup.
10829         (info_checkpoints_command): Adjust.
10830         * mi/mi-main.c (register_changed_p): Update declaration.
10831         (mi_cmd_data_list_changed_registers): Use
10832         readonly_detached_regcache.
10833         (register_changed_p): Change parameter type to
10834         readonly_detached_regcache.
10835         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10836         readonly_detached_regcache.
10837         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10838         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10839         New.
10840         (regcache::save): Move it to reg_buffer.
10841         (regcache::restore): Change parameter type.
10842         (regcache_dup): Remove.
10843         * regcache.h (reg_buffer) <save>: New method.
10844         (readonly_detached_regcache): New class.
10845         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10846         readonly_detached_regcache.
10847         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10848
10849 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10850
10851         * frame.c (frame_save_as_regcache): Use regcache method save.
10852         (frame_pop): Use regcache method restore.
10853         * infrun.c (restore_infcall_suspend_state): Likewise.
10854         * linux-fork.c (fork_load_infrun_state): Likewise.
10855         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10856         save.
10857         * regcache.c (regcache_save): Remove.
10858         (regcache::restore): More asserts.
10859         (regcache_cpy): Remove.
10860         * regcache.h (regcache_save): Remove the declaration.
10861         (regcache::restore): Move from private to public.
10862         Remove the friend declaration of regcache_cpy.
10863         (regcache_cpy): Remove declaration.
10864
10865 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10866
10867         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10868         parameter type to 'readable_regcache *'.
10869         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10870         * arm-tdep.c (arm_neon_quad_read): Likewise.
10871         (arm_pseudo_read): Likewise.
10872         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10873         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10874         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10875         * gdbarch.c: Re-generated.
10876         * gdbarch.h: Re-generated.
10877         * gdbarch.sh (pseudo_register_read): Change parameter type to
10878         'readable_regcache *'.
10879         (pseudo_register_read_value): Likewise.
10880         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10881         (h8300_pseudo_register_read): Likewise.
10882         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10883         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10884         (i386_pseudo_register_read_into_value): Likewise.
10885         (i386_pseudo_register_read_value): Likewise.
10886         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10887         declaration.
10888         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10889         * m32c-tdep.c (m32c_raw_read): Likewise.
10890         (m32c_read_flg): Likewise.
10891         (m32c_banked_register): Likewise.
10892         (m32c_banked_read): Likewise.
10893         (m32c_sb_read): Likewise.
10894         (m32c_part_read): Likewise.
10895         (m32c_cat_read): Likewise.
10896         (m32c_r3r2r1r0_read): Likewise.
10897         (m32c_pseudo_register_read): Likewise.
10898         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10899         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10900         (mep_pseudo_cr64_read): Likewise.
10901         (mep_pseudo_register_read): Likewise.
10902         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10903         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10904         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10905         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10906         (regcache::cooked_read): Likewise.
10907         (regcache::cooked_read_value): Likewise.
10908         (regcache_cooked_read_signed):
10909         (regcache::cooked_read): Likewise.
10910         * regcache.h (readable_regcache): New class.
10911         (regcache): Inherit readable_regcache.  Move some methods to
10912         readable_regcache.
10913         * rl78-tdep.c (rl78_pseudo_register_read): Change
10914         parameter type to 'readable_regcache *'.
10915         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10916         (e500_pseudo_register_read): Change parameter type to
10917         'readable_regcache *'.
10918         (dfp_pseudo_register_read): Likewise.
10919         (vsx_pseudo_register_read): Likewise.
10920         (efpr_pseudo_register_read): Likewise.
10921         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10922         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10923         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10924         (sh64_pseudo_register_read): Likewise.
10925         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10926         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10927         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10928         (spu_pseudo_register_read): Likewise.
10929         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10930         (xtensa_pseudo_register_read): Likewise.
10931
10932 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10933
10934         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10935         (regcache::arch): Move it to reg_buffer::arch.
10936         (regcache::register_buffer): Likewise.
10937         (regcache::assert_regnum): Likewise.
10938         (regcache::num_raw_registers): Likewise.
10939         * regcache.h (reg_buffer): New class.
10940         (regcache): Inherit reg_buffer.
10941
10942 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10943
10944         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10945         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10946
10947 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
10948
10949         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10950
10951 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
10952
10953         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10954         (SFILES): Remove common/*.c files.
10955         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10956         * common/common.host: Add common reference.
10957         * configure.ac: Likewise.
10958         * configure: Regenerate.
10959
10960 2018-02-16  Yao Qi  <yao.qi@linaro.org>
10961
10962         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10963         (block_initialize_namespace): Use new.
10964         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10965         (dwarf2_free_objfile): Use delete.
10966         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10967         (copy_type_recursive): Use new.
10968         * gdb_obstack.h (allocate_on_obstack): New.
10969
10970 2018-02-15  Yao Qi  <yao.qi@linaro.org>
10971
10972         PR gdb/22849
10973         * inferior.c (exit_inferior_1): Reset inf->control.
10974
10975 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
10976
10977         * ada-lang.c (ada_to_fixed_value_create): Delete advance
10978         declaration.
10979
10980 2018-02-14  Pedro Alves  <palves@redhat.com>
10981
10982         * frame-unwind.c (frame_unwind_try_unwinder): Always call
10983         frame_cleanup_after_sniffer on exception.
10984
10985 2018-02-14  Tom Tromey  <tom@tromey.com>
10986
10987         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10988         const.
10989         (solib_bfd_open): Make pathname const.
10990         * solib.c (solib_bfd_open): Make pathname const.
10991         * solib-spu.c (spu_bfd_fopen): Make name const.
10992         (spu_bfd_open): Make pathname const.
10993         * solib-darwin.c (darwin_bfd_open): Make pathname const.
10994         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10995
10996 2018-02-14  Tom Tromey  <tom@tromey.com>
10997
10998         * symfile.c (symfile_bfd_open): Update.
10999         * source.h (openp, source_full_path_of, find_and_open_source):
11000         Change argument type to unique_xmalloc_ptr.
11001         * source.c (openp): Take a unique_xmalloc_ptr.
11002         (source_full_path_of, find_and_open_source): Likewise.
11003         (open_source_file, symtab_to_fullname): Update.
11004         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11005         unique_xmalloc_ptr.
11006         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11007         (exec_file_find): Update.
11008         * psymtab.c (psymtab_to_fullname): Update.
11009         * nto-tdep.h (nto_find_and_open_solib): Update.
11010         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11011         unique_xmalloc_ptr.
11012         * exec.c (exec_file_attach): Update.
11013         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11014         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11015
11016 2018-02-14  Tom Tromey  <tom@tromey.com>
11017
11018         * solib.c: Include source.h.
11019         * nto-tdep.c: Include source.h.
11020         * mi/mi-cmd-env.c: Include source.h.
11021         * infcmd.c: Include source.h.
11022         * exec.c: Include source.h.
11023         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11024         (add_path, directory_switch, source_path, init_source_path): Move
11025         declarations...
11026         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11027         (add_path, directory_switch, source_path, init_source_path):
11028         ...here.
11029
11030 2018-02-14  Tom Tromey  <tom@tromey.com>
11031
11032         * solist.h (exec_file_find, solib_find): Return
11033         unique_xmalloc_ptr.
11034         (solib_bfd_fopen): Take a const char *.
11035         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11036         (exec_file_find, solib_find): Likewise.
11037         (solib_bfd_fopen): Do not take ownership of "pathname".
11038         (solib_bfd_open): Use unique_xmalloc_ptr.
11039         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11040         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11041         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11042         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11043
11044 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11045
11046         * ada-lang.c (name_match_type_from_name): Remove reference to
11047         ada_name_for_lookup in function's documentation.
11048         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11049
11050 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11051
11052         * defs.h (enum openp_flags): New enum.
11053         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11054         Move to enum openp_flags.
11055         (openp_flags): New enum flags.
11056         (openp): Change parameter type to openp_flags.
11057         * source.c (openp): Change parameter type to openp_flags.
11058         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11059         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11060
11061 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11062
11063         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11064         per-command.
11065
11066 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11067
11068         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11069         into...
11070         (class dwarf2_queue_guard): ...the destructor of this new class.
11071         (dw2_do_instantiate_symtab): Create instance of the new class
11072         dwarf2_queue_guard, remove cleanup.
11073
11074 2018-02-09  Tom Tromey  <tom@tromey.com>
11075
11076         * source.c (find_source_lines): Don't reference past the end of
11077         the vector.
11078
11079 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11080
11081         * remote.c (remote_btrace_maybe_reopen): Change error message.
11082         * btrace.c (btrace_enable): Likewise.
11083         (parse_xml_btrace): Likewise.
11084         (parse_xml_btrace_conf): Likewise.
11085
11086 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11087
11088         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11089         (linux_enable_pt, linux_enable_bts): Call
11090         diagnose_perf_event_open_fail.
11091
11092 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11093
11094         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11095         Remove parameter and change return type.  Update callers.  Move it.
11096         (linux_enable_bts, linux_enable_pt): Improve error message.
11097         (linux_enable_pt): Remove zero buffer size check.
11098         (linux_enable_btrace): Improve error messages.  Remove NULL return
11099         check.
11100
11101 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11102
11103         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11104         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11105         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11106         (linux_supports_pt, linux_supports_btrace): Remove.
11107         (linux_enable_bts): Call cpu_supports_bts.
11108         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11109         * remote.c (remote_supports_btrace): Remove.
11110         (init_remote_ops): Remove remote_supports_btrace.
11111         * target-delegates.c: Regenerated.
11112         * target.c (target_supports_btrace): Remove.
11113         * target.h (target_ops) <to_supports_btrace>: Remove
11114         (target_supports_btrace): Remove.
11115         * x86-linux-nat.c (x86_linux_create_target): Remove
11116         linux_supports_btrace.
11117
11118 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11119
11120         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11121         btrace failed.
11122         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11123         exception and use message in own exception.
11124
11125 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11126
11127         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11128         (perf_event_pt_event_type): Use gdb_file_up.
11129         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11130         scoped_fd, and scoped_mmap.
11131
11132 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11133
11134         * common/scoped_mmap.h: New.
11135         * unittests/scoped_mmap-selftest.c: New.
11136         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11137         unittests/scoped_mmap-selftest.c.
11138
11139 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11140
11141         * common/scoped_fd.h: New.
11142         * unittests/scoped_fd-selftest.c: New.
11143         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11144         unittests/scoped_fd-selftest.c.
11145
11146 2018-02-09  Tom Tromey  <tom@tromey.com>
11147
11148         * auto-load.c (auto_load_section_scripts): Use
11149         gdb::unique_xmalloc_ptr.
11150
11151 2018-02-09  Tom Tromey  <tom@tromey.com>
11152
11153         * auto-load.c (execute_script_contents): Use std::string.
11154
11155 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11156
11157         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11158         Python function, rather than a new command.
11159
11160 2018-02-08  Tom Tromey  <tom@tromey.com>
11161
11162         * solib.c (solib_find_1): Use std::string.
11163         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11164
11165 2018-02-08  Tom Tromey  <tom@tromey.com>
11166
11167         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11168
11169 2018-02-08  Tom Tromey  <tom@tromey.com>
11170
11171         * source.c (find_source_lines): Use gdb::def_vector.
11172
11173 2018-02-08  Tom Tromey  <tom@tromey.com>
11174
11175         * macrocmd.c (struct temporary_macro_definition): New.
11176         (macro_define_command): Use temporary_macro_definition.  Remove
11177         cleanups.
11178         (free_macro_definition_ptr): Remove.
11179
11180 2018-02-08  Tom Tromey  <tom@tromey.com>
11181
11182         * macroexp.c (maybe_expand): Use std::string.
11183
11184 2018-02-08  Tom Tromey  <tom@tromey.com>
11185
11186         * macroexp.c (struct macro_buffer): Add initializers for some
11187         members.
11188         (init_buffer, init_shared_buffer, free_buffer)
11189         (free_buffer_return_text): Remove.
11190         (macro_buffer): New constructors.
11191         (~macro_buffer): New destructor.
11192         (macro_buffer::set_shared): New method.
11193         (macro_buffer::resize_buffer, macro_buffer::appendc)
11194         (macro_buffer::appendmem): Now methods, not free functions.
11195         (set_token, append_tokens_without_splicing, stringify)
11196         (macro_stringify): Update.
11197         (gather_arguments): Change return type.  Remove argc_p argument,
11198         add args_ptr argument.  Use std::vector.
11199         (substitute_args): Remove argc argument.  Accept std::vector.
11200         (expand): Update.  Use std::vector.
11201         (scan, macro_expand, macro_expand_next): Update.
11202
11203 2018-02-08  Tom Tromey  <tom@tromey.com>
11204
11205         * symtab.c (default_collect_symbol_completion_matches_break_on):
11206         Use unique_xmalloc_ptr.
11207         * macroscope.h: (sal_macro_scope, user_macro_scope)
11208         (default_macro_scope): Return unique_xmalloc_ptr.
11209         * macroscope.c (sal_macro_scope, user_macro_scope)
11210         (default_macro_scope): Return unique_xmalloc_ptr.
11211         * macroexp.h (macro_expand, macro_expand_once): Return
11212         unique_xmalloc_ptr.
11213         * macroexp.c (macro_expand, macro_expand_once): Return
11214         unique_xmalloc_ptr.
11215         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11216         (info_macro_command, info_macros_command): Use
11217         unique_xmalloc_ptr.
11218         * compile/compile-c-support.c (write_macro_definitions): Use
11219         unique_xmalloc_ptr.
11220         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11221
11222 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11223
11224         * value.c (value_static_field): Assign field type instead of
11225         containing type when returning an optimized out value.
11226
11227 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11228
11229         * ft32-tdep.c (ft32_read_pc): Remove.
11230         (ft32_write_pc): Remove.
11231         (ft32_gdbarch_init): Update.
11232         * m32r-tdep.c (m32r_read_pc): Remove.
11233         (m32r_gdbarch_init): Update.
11234         * mep-tdep.c (mep_read_pc): Remove.
11235         (mep_gdbarch_init): Update.
11236         * microblaze-tdep.c (microblaze_write_pc): Remove.
11237         (microblaze_gdbarch_init): Update.
11238         * mn10300-tdep.c (mn10300_read_pc): Remove.
11239         (mn10300_write_pc): Remove.
11240         (mn10300_gdbarch_init): Update.
11241         * moxie-tdep.c (moxie_read_pc): Remove.
11242         (moxie_write_pc): Remove.
11243         (moxie_gdbarch_init): Update.
11244
11245 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11246
11247         * expprint.c (print_subexp_standard): Handle
11248         OP_F77_UNDETERMINED_ARGLIST.
11249         (dump_subexp_body_standard): Likewise.
11250
11251 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11252
11253         * target-descriptions.c (tdesc_element_visitor) Add empty
11254         implementations.
11255         (tdesc_type): Move make_gdb_type from here.
11256         (tdesc_type_builtin): Likewise.
11257         (tdesc_type_vector): Likewise.
11258         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11259         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11260         (make_gdb_type_union): Likewise.
11261         (make_gdb_type_flags): Likewise.
11262         (make_gdb_type_enum): Likewise.
11263         (make_gdb_type): New function.
11264         (tdesc_register_type): Use static make_gdb_type.
11265
11266 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11267
11268         * infcmd.c (default_print_one_register_info): Align natural-format
11269         column values consistently one under another.
11270         (pad_to_column): New function.
11271
11272 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11273
11274         * dwarf2read.c (dwarf2_physname): Move commment.
11275
11276 2018-02-01  Leszek Swirski  <leszeks@google.com>
11277
11278         * varobj.c (varobj_formatted_print_options): Allow recursive
11279         pretty printing if pretty printing is enabled.
11280
11281 2018-02-01  Leszek Swirski  <leszeks@google.com>
11282
11283         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11284         names after a structop as a filename.
11285
11286 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11287
11288         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11289         (arm_record_coproc_data_proc): Likewise.
11290
11291 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11292
11293         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11294
11295 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11296
11297         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11298         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11299
11300 2018-01-31  Pedro Alves  <palves@redhat.com>
11301
11302         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11303         * inflow.c (child_terminal_save_inferior): Wrap reference to
11304         tcgetpgrp in HAVE_TERMIOS_H.
11305         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11306         _WIN32.
11307         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11308         always iterate over all inferiors.
11309         (gdbsim_cntrl_c): Adjust.
11310         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11311
11312 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11313
11314         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11315         index type is objfile-owned if the element type is as well.
11316
11317 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11318
11319         GDB 8.1 released.
11320
11321 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11322
11323         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11324         "features/s390x-linux64.c".
11325         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11326         s390_linux32 and s390x_linux64.
11327         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11328         default tdesc.
11329         * s390-tdep.c: Include "features/s390-linux32.c" and
11330         "features/s390x-linux64.c".
11331         (s390_tdesc_valid): Add check for tdesc_has_registers.
11332         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11333         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11334         tdesc_s390x_linux64.
11335         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11336         tdesc_s390x_linux64 to...
11337         * s390-tdep.h: ...here.
11338
11339 2018-01-30  Pedro Alves  <palves@redhat.com>
11340
11341         PR gdb/13211
11342         * config.in, configure: Regenerate.
11343         * configure.ac: Check for getpgid.
11344         * go32-nat.c (go32_pass_ctrlc): New.
11345         (go32_target): Install it.
11346         * inf-child.c (inf_child_target): Install
11347         child_terminal_save_inferior, child_pass_ctrlc and
11348         child_interrupt.
11349         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11350         (inf_ptrace_target): No longer install it.
11351         * infcmd.c (interrupt_target_1): Adjust.
11352         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11353         (child_interrupt): Declare.
11354         (inferior::terminal_state): New.
11355         * inflow.c (struct terminal_info): Update comments.
11356         (inferior_process_group): Delete.
11357         (terminal_is_ours): Delete.
11358         (gdb_tty_state): New.
11359         (child_terminal_init): Adjust.
11360         (is_gdb_terminal, sharing_input_terminal_1)
11361         (sharing_input_terminal): New functions.
11362         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11363         Set the process's actual process group in the foreground if
11364         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11365         mark terminal as the inferior's if not sharing GDB's terminal.
11366         Don't check attach_flag.
11367         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11368         pass down a target_terminal_state.
11369         (child_terminal_save_inferior): New, factored out from ...
11370         (child_terminal_ours_1): ... this.  Handle
11371         target_terminal_state::is_ours_for_output.
11372         (child_interrupt, child_pass_ctrlc): New.
11373         (inflow_inferior_exit): Clear the inferior's terminal_state.
11374         (copy_terminal_info): Copy the inferior's terminal state.
11375         (_initialize_inflow): Remove reference to terminal_is_ours.
11376         * inflow.h (inferior_process_group): Delete.
11377         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11378         * procfs.c (procfs_target): Don't install procfs_interrupt.
11379         (procfs_interrupt): Delete.
11380         * remote.c (remote_serial_quit_handler): Adjust.
11381         (remote_interrupt): Remove ptid parameter.  Adjust.
11382         * target-delegates.c: Regenerate.
11383         * target.c: Include "terminal.h".
11384         (target_terminal::terminal_state): Rename to ...
11385         (target_terminal::m_terminal_state): ... this.
11386         (target_terminal::init): Adjust.
11387         (target_terminal::inferior): Adjust to per-inferior
11388         terminal_state.
11389         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11390         (target_terminal::ours, target_terminal::ours_for_output): Use
11391         target_terminal_is_ours_kind.
11392         (target_interrupt): Remove ptid parameter.  Adjust.
11393         (default_target_pass_ctrlc): Adjust.
11394         * target.h (target_ops::to_terminal_save_inferior): New field.
11395         (target_ops::to_interrupt): Remove ptid_t parameter.
11396         (target_interrupt): Remove ptid_t parameter.  Update comment.
11397         (target_pass_ctrlc): Update comment.
11398         * target/target.h (target_terminal_state): New scoped enum,
11399         factored out of ...
11400         (target_terminal::terminal_state): ... here.
11401         (target_terminal::inferior): Update comments.
11402         (target_terminal::restore_inferior): New.
11403         (target_terminal::is_inferior, target_terminal::is_ours)
11404         (target_terminal::is_ours_for_output): Adjust.
11405         (target_terminal::scoped_restore_terminal_state): Adjust to
11406         rename, and call restore_inferior() instead of inferior().
11407         (target_terminal::scoped_restore_terminal_state::m_state): Change
11408         type.
11409         (target_terminal::terminal_state): Rename to ...
11410         (target_terminal::m_terminal_state): ... this and change type.
11411
11412 2018-01-30  Pedro Alves  <palves@redhat.com>
11413
11414         * linux-nat.c (wait_for_signal): New function.
11415         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11416         directly.
11417         (async_terminal_is_ours)
11418         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11419         (linux_nat_add_target): Don't override
11420         to_terminal_inferior/to_terminal_ours.
11421
11422 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11423
11424         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11425
11426 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11427
11428         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11429         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11430         dwarf2_per_objfile_free here.
11431         (dwarf2_per_objfile_free): Remove.
11432         (_initialize_dwarf2_read): Don't register
11433         dwarf2_per_objfile_free as a registry cleanup.
11434
11435 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11436
11437         Avoid compilation errors in MinGW native builds
11438
11439         The error is triggered by including python-internal.h, and the
11440         error message is:
11441
11442              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11443                       from build-gnulib/import/math.h:27,
11444                       from d:/usr/Python26/include/pyport.h:235,
11445                       from d:/usr/Python26/include/Python.h:58,
11446                       from python/python-internal.h:94,
11447                       from python/py-arch.c:24:
11448              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11449         using ::hypot;
11450                 ^~~~~
11451
11452         This happens because Python headers define 'hypot' to expand t
11453         '_hypot' in the Windows builds.
11454         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11455         'hypoth'.  This avoids a compilation error.
11456
11457 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11458
11459         * MAINTAINERS (Write After Approval): Fix ordering.
11460
11461 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11462
11463         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11464
11465 2018-01-26  Alan Modra  <amodra@gmail.com>
11466
11467         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11468         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11469         Remove nop.  Make const.  Comment.
11470         (powerpc32_plt_stub_so_2): New.
11471         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11472         Correct count.  Update uses.
11473         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11474         Move common code reading PLT entry word.  Correct
11475         powerpc32_plt_stub PLT address calculation.
11476         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11477         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11478         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11479         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11480         (ppc64_standard_linkage8): Likewise.
11481         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11482         Correct insns description.
11483         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11484
11485 2018-01-24  Pedro Alves  <palves@redhat.com>
11486
11487         GCC PR libstdc++/83906
11488         * gdbtypes.c (operator==(const dynamic_prop &,
11489         const dynamic_prop &)): New.
11490         (operator==(const range_bounds &, const range_bounds &)): New.
11491         (check_types_equal): Use them instead of memcmp.
11492         * gdbtypes.h (operator==(const dynamic_prop &,
11493         const dynamic_prop &)): Declare.
11494         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11495         (operator==(const range_bounds &, const range_bounds &)): Declare.
11496         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11497
11498 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11499
11500         * s390-linux-tdep.c (s390_record_address_mask)
11501         (s390_record_calc_disp_common, s390_record_calc_disp)
11502         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11503         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11504         (s390_process_record): Move to s390-tdep.c.
11505         (s390_linux_init_abi_any): Adjust.
11506         * s390-tdep.c (s390_record_address_mask)
11507         (s390_record_calc_disp_common, s390_record_calc_disp)
11508         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11509         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11510         (s390_process_record): Moved from s390-linux-tdep.c
11511         (s390_gdbarch_init): Adjust.
11512
11513 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11514
11515         * s390-linux-nat.c (s390-tdep.h): New include.
11516         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11517         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11518         (ALLDEPFILES): Add s390-tdep.c.
11519         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11520         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11521         * s390-tdep.h: ...this.  New file.
11522         * s390-linux-tdep.c (s390-tdep.h): New include.
11523         (_initialize_s390_tdep): Rename to...
11524         (_initialize_s390_linux_tdep): ...this and adjust.
11525         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11526         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11527         s390-tdep.h.
11528         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11529         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11530         (s390_is_partial_instruction, s390_software_single_step)
11531         (is_non_branch_ril, s390_displaced_step_copy_insn)
11532         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11533         (s390_prologue_data, s390_addr, s390_store, s390_load)
11534         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11535         (s390_register_call_saved, s390_guess_tracepoint_registers)
11536         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11537         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11538         (s390_pseudo_register_name, s390_pseudo_register_type)
11539         (s390_pseudo_register_read, s390_pseudo_register_write)
11540         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11541         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11542         (s390_addr_bits_remove, s390_address_class_type_flags)
11543         (s390_address_class_type_flags_to_name)
11544         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11545         (s390_function_arg_float, s390_function_arg_vector)
11546         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11547         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11548         (s390_frame_align, s390_register_return_value, s390_return_value)
11549         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11550         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11551         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11552         (s390_trad_frame_prev_register, s390_unwind_cache)
11553         (s390_prologue_frame_unwind_cache)
11554         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11555         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11556         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11557         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11558         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11559         (s390_frame_base_address, s390_local_base_address)
11560         (s390_frame_base, s390_gcc_target_options)
11561         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11562         (s390_validate_reg_range, s390_tdesc_valid)
11563         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11564         * s390-tdep.c: ...this.  New file.
11565
11566 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11567
11568         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11569         (s390_process_record, s390_gdbarch_tdep_alloc)
11570         (s390_linux_init_abi_any): Use/set new hook.
11571
11572 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11573
11574         * s390-linux-tdep.c (osabi.h): New include.
11575         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11576         (s390_linux_init_abi_any): New functions.
11577         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11578
11579 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11580
11581         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11582         tdesc_has_registers check
11583
11584 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11585
11586         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11587         (s390_validate_reg_range): New macro.
11588         (s390_gdbarch_init): Adjust.
11589
11590 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11591
11592         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11593         (s390_gdbarch_tdep_alloc): Adjust.
11594         (s390_gdbarch_init): Adjust.
11595
11596 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11597
11598         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11599         <have_tdb>: Change type to bool.
11600         (s390_gdbarch_tdep_alloc): Adjust.
11601         (s390_gdbarch_init): Adjust.
11602
11603 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11604
11605         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11606         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11607         (s390_gdbarch_tdep_alloc): New function.
11608         (s390_gdbarch_init): Allocate tdep at start and use its fields
11609         instead of separate variables.
11610
11611 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11612
11613         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11614         when looking for cached gdbarch and add comment for remaining.
11615
11616 2018-01-22  Pedro Alves  <palves@redhat.com>
11617             Sergio Durigan Junior  <sergiodj@redhat.com>
11618
11619         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11620         case.
11621
11622 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11623
11624         * MAINTAINERS: Update my company e-mail address.
11625
11626 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11627
11628         * regcache.c (cooked_write_test): New function.
11629         (_initialize_regcache): Register the test.
11630
11631 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11632
11633         * ia64-tdep.c (ia64_pseudo_register_read): Call
11634         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11635         * m32c-tdep.c (m32c_cat_read): Likewise.
11636         (m32c_r3r2r1r0_read): Likewise.
11637         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11638         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11639
11640 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11641
11642         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11643         method raw_read instead of regcache_raw_read.
11644         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11645         * arm-tdep.c (arm_neon_quad_read): Likewise.
11646         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11647         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11648         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11649         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11650         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11651         (i386_pseudo_register_read_into_value): Likewise.
11652         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11653         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11654         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11655         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11656         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11657         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11658         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11659         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11660         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11661
11662 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11663
11664         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11665         * configure.tgt: Remove target mt.
11666         * mt-tdep.c: Remove.
11667         * regcache.c (cooked_read_test): Remove the check for mt.
11668
11669 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11670
11671         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11672         instead of gdbarch_pseudo_register_read_value.
11673
11674 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11675
11676         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11677         language is Ada.
11678
11679 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11680
11681         * linespec.c (create_sals_line_offset): Remove code that preserved
11682         the symtab_and_line's line number.
11683
11684 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11685
11686         * varobj.c (varobj_create): Don't set valid_block when creating a
11687         floating varobj.
11688
11689 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11690
11691         * varobj.c (varobj_create): Remove out of date comment.
11692
11693 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11694
11695         PR mi/20395
11696         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11697         updating innermost block.
11698         * parse.c (innermost_block_tracker::update): Take extra type
11699         parameter, and check types match before updating innermost block.
11700         (write_dollar_variable): Update innermost block for registers.
11701         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11702         (innermost_block_tracker::innermost_block_tracker): Initialise
11703         m_types member.
11704         (innermost_block_tracker::reset): Take type parameter.
11705         (innermost_block_tracker::update): Take type parameter, and pass
11706         type through as needed.
11707         (innermost_block_tracker::m_types): New member.
11708         * varobj.c (varobj_create): Pass type when reseting innermost
11709         block.
11710
11711 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11712
11713         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11714         * ada-lang.c (resolve_subexp): Likewise.
11715         * breakpoint.c (set_breakpoint_condition) Likewise.
11716         (watch_command_1) Likewise.
11717         * c-exp.y (variable): Likewise.
11718         * d-exp.y (PrimaryExpression): Likewise.
11719         * f-exp.y (variable): Likewise.
11720         * go-exp.y (variable): Likewise.
11721         * m2-exp.y (variable): Likewise.
11722         * objfiles.c (objfile::~objfile): Likewise.
11723         * p-exp.y (variable): Likewise.
11724         * parse.c (innermost_block): Change type.
11725         * parser-defs.h (class innermost_block_tracker): New.
11726         (innermost_block): Change to innermost_block_tracker.
11727         * printcmd.c (display_command): Switch to innermost_block API.
11728         (do_one_display): Likewise.
11729         * rust-exp.y (do_one_display): Likewise.
11730         * symfile.c (clear_symtab_users): Likewise.
11731         * varobj.c (varobj_create): Switch to innermost_block API, replace
11732         use of innermost_block with block stored on varobj object.
11733
11734 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11735
11736         * expression.h (innermost_block): Remove declaration.
11737         * varobj.c: Add 'parser-defs.h' include.
11738
11739 2018-01-19  Tom Tromey  <tom@tromey.com>
11740
11741         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11742         symbols in the static and global blocks.
11743
11744 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11745
11746         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11747         gdb_ptrace.h, and move including gdb_wait.h ...
11748         * nat/linux-ptrace.h: ... to here.
11749
11750 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11751
11752         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11753         inf_ptrace_detach_success.
11754         (inf_ptrace_detach_success): Add inferior parameter, use it
11755         instead of inferior_ptid, pass it to detach_inferior.
11756         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11757         parameter.
11758         * inferior.c (detach_inferior): Add overload that takes an
11759         inferior object.
11760         * inferior.h (detach_inferior): Likewise.
11761         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11762         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11763         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11764
11765 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11766
11767         * target.h (struct target_ops) <to_detach>: Add inferior
11768         parameter.
11769         (target_detach): Likewise.
11770         * target.c (dispose_inferior): Pass inferior down.
11771         (target_detach): Pass inferior down.  Assert that it is equal to
11772         the current inferior.
11773         * aix-thread.c (aix_thread_detach): Pass inferior down.
11774         * corefile.c (core_file_command): Pass current_inferior() down.
11775         * corelow.c (core_detach): Add inferior parameter.
11776         * darwin-nat.c (darwin_detach): Likewise.
11777         * gnu-nat.c (gnu_detach): Likewise.
11778         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11779         * infcmd.c (detach_command): Pass current_inferior() down to
11780         target_detach.
11781         * infrun.c (follow_fork_inferior): Pass parent_inf to
11782         target_detach.
11783         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11784         target_detach.
11785         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11786         * linux-thread-db.c (thread_db_detach): Likewise.
11787         * nto-procfs.c (procfs_detach): Likewise.
11788         * procfs.c (procfs_detach): Likewise.
11789         * record.c (record_detach): Likewise.
11790         * record.h (struct inferior): Forward-declare.
11791         (record_detach): Add inferior parameter.
11792         * remote-sim.c (gdbsim_detach): Likewise.
11793         * remote.c (remote_detach_1): Likewise.
11794         (remote_detach): Likewise.
11795         (extended_remote_detach): Likewise.
11796         * sol-thread.c (sol_thread_detach): Likewise.
11797         * target-debug.h (target_debug_print_inferior_p): New macro.
11798         * target-delegates.c: Re-generate.
11799         * top.c (kill_or_detach): Pass inferior down to target_detach.
11800         * windows-nat.c (windows_detach): Add inferior parameter.
11801
11802 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11803
11804         * target.h (struct target_ops) <to_detach>: Remove args
11805         parameter.
11806         (target_detach): Likewise.
11807         * target.c (dispose_inferior): Adjust.
11808         (target_detach): Remove args parameter, adjust.
11809         * aix-thread.c (aix_thread_detach): Adjust.
11810         * corefile.c (core_file_command): Adjust.
11811         * corelow.c (core_detach): Adjust.
11812         * darwin-nat.c (darwin_detach): Adjust.
11813         * gnu-nat.c (gnu_detach): Adjust.
11814         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11815         * infcmd.c (detach_command): Adjust
11816         * infrun.c (follow_fork_inferior): Adjust.
11817         (handle_vfork_child_exec_or_exit): Adjust.
11818         * linux-fork.c (linux_fork_detach): Remove args parameter.
11819         * linux-fork.h (linux_fork_detach): Likewise.
11820         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11821         * linux-thread-db.c (thread_db_detach): Likewise.
11822         * nto-procfs.c (procfs_detach): Likewise.
11823         * procfs.c (procfs_detach): Likewise.
11824         (do_detach): Remove signo parameter.
11825         * record.c (record_detach): Remove args parameter.
11826         * record.h (record_detach): Likewise.
11827         * remote-sim.c (gdbsim_detach): Likewise.
11828         * remote.c (remote_detach_1): Likewise.
11829         (remote_detach): Likewise.
11830         (extended_remote_detach): Likewise.
11831         * sol-thread.c (sol_thread_detach): Likewise.
11832         * target-delegates.c: Re-generate.
11833         * top.c (struct qt_args) <args>: Remove field.
11834         (kill_or_detach): Don't pass args.
11835         (quit_force): Don't set args.
11836         * windows-nat.c (windows_detach): Remove args parameter.
11837
11838 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11839
11840         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11841         (arm_linux_init_abi): Install it.
11842
11843 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11844
11845         * osabi.c (gdb_osabi_names): Extend the regexp for
11846         arm-linux-gnueabihf.
11847
11848 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11849
11850         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11851         m_abbrevs.
11852         (abbrev_table::add_abbrev): Update.
11853         (abbrev_table::lookup_abbrev): Update.
11854
11855 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11856
11857         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11858
11859 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11860
11861         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11862         to "std::string".
11863
11864 2018-01-17  Tom Tromey  <tom@tromey.com>
11865
11866         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11867
11868 2018-01-17  Tom Tromey  <tom@tromey.com>
11869
11870         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11871         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11872         (create_array_type_with_stride): Update.
11873         * dwarf2read.c (set_die_type): Update.
11874
11875 2018-01-17  Tom Tromey  <tom@tromey.com>
11876
11877         * dwarf2read.c (delayed_method_info): Remove typedef.
11878         (dwarf2_cu::method_info): Now a std::vector.
11879         (add_to_method_list): Update.
11880         (free_delayed_list): Remove.
11881         (compute_delayed_physnames): Update.
11882         (process_full_comp_unit, process_full_type_unit): Clear the method
11883         list.  Remove cleanups.
11884         (psymtab_include_file_name): Add name_holder parameter.  Use
11885         unique_xmalloc_ptr.
11886         (dwarf_decode_lines): Update.
11887
11888 2018-01-17  Tom Tromey  <tom@tromey.com>
11889             Simon Marchi  <simon.marchi@ericsson.com>
11890
11891         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11892         (dwarf2_per_objfile::free_cached_comp_units)
11893         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11894         (init_cutu_and_read_dies_no_follow): Update.
11895         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11896         (dwarf2_cu::~dwarf2_cu): New.
11897         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11898         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11899
11900 2018-01-17  Tom Tromey  <tom@tromey.com>
11901             Simon Marchi  <simon.marchi@ericsson.com>
11902
11903         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11904         (struct die_reader_specs) <abbrev_table>: New member.
11905         (struct abbrev_table): Add constructor.
11906         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11907         <abbrev_obstack>: Now an auto_obstack.
11908         (abbrev_table_up): New typedef.
11909         (init_cu_die_reader): Add abbrev_table parameter.
11910         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11911         Add result_dwo_abbrev_table.
11912         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11913         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11914         Update.
11915         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11916         parameter.
11917         (skip_children): Update.
11918         (abbrev_table::alloc_abbrev): Rename from
11919         abbrev_table_alloc_abbrev.
11920         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11921         (abbrev_table::lookup_abbrev): Rename from
11922         abbrev_table_lookup_abbrev.
11923         (abbrev_table_read_table): Return abbrev_table_up.
11924         (abbrev_table_free, abbrev_table_free_cleanup)
11925         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11926         (load_partial_dies): Update.
11927
11928 2018-01-17  Tom Tromey  <tom@tromey.com>
11929
11930         * dwarf2read.c (dwarf2_compute_name): Update comment.
11931         (read_func_scope, read_variable): Update.
11932         (new_symbol): Remove.
11933         (new_symbol_full): Rename to new_symbol.
11934
11935 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11936
11937         PR gdb/16577
11938         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11939         a warning instead of throwing an error, set section size to 0 and return
11940         NULL.
11941         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11942
11943 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11944
11945         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11946         std::string.
11947         (linux_ptrace_attach_fail_reason_string): Likewise.
11948         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11949         Likewise.
11950         (linux_ptrace_attach_fail_reason_string): Likewise.
11951         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11952
11953 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11954
11955         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11956
11957 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
11958
11959         PR gdb/21559
11960         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11961         checking for fs_base/gs_base fields in struct user_regs_struct.
11962         * configure: Regenerate.
11963
11964 2018-01-17  Yao Qi  <yao.qi@linaro.org>
11965
11966         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11967         function.
11968         (aarch64_linux_init_abi): Install it to gdbarch hook
11969         gcc_target_options.
11970
11971 2018-01-15  Pedro Alves  <palves@redhat.com>
11972
11973         * common/signals-state-save-restore.c
11974         (save_original_signals_state): Fix typos.
11975
11976 2017-01-12  Tom Tromey  <tom@tromey.com>
11977             Sergio Durigan Junior  <sergiodj@redhat.com>
11978
11979         * Makefile.in (install-only): Install gdb-add-index.
11980
11981 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
11982
11983         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11984
11985 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11986
11987         * infrun.c (keep_going_pass_signal): Clear step-over info when
11988         insert_breakpoints fails.
11989
11990 2018-01-11  Pedro Alves  <palves@redhat.com>
11991
11992         PR gdb/22583
11993         * infrun.c (resume): Rename to ...
11994         (resume_1): ... this.
11995         (resume): Reimplement as wrapper around resume_1.
11996
11997 2018-01-11  Pedro Alves  <palves@redhat.com>
11998
11999         PR remote/22597
12000         * remote.c (remote_parse_stop_reply): Default to the last-set
12001         general thread instead of to 'magic_null_ptid'.
12002
12003 2018-01-10  Pedro Alves  <palves@redhat.com>
12004
12005         * language.h (language_get_symbol_name_matcher): Rename ...
12006         (get_symbol_name_matcher): ... this.
12007         * language.c (language_get_symbol_name_matcher): Ditto.
12008         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12009         callers adjusted.
12010
12011 2018-01-10  Pedro Alves  <palves@redhat.com>
12012
12013         PR gdb/22670
12014         * dwarf2read.c
12015         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12016         Adjust to use language_get_symbol_name_matcher instead of
12017         language_defn::la_get_symbol_name_matcher.
12018         * language.c (language_get_symbol_name_matcher): If in Ada mode
12019         and the lookup name is a verbatim match, return Ada's matcher.
12020         * language.h (language_get_symbol_name_matcher): Adjust comment.
12021         (ada_lookup_name_info::verbatim_p):: New method.
12022
12023 2018-01-10  Pedro Alves  <palves@redhat.com>
12024
12025         PR gdb/22670
12026         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12027         minsym's language is language_auto or language_cplus, pass down
12028         language_ada instead.
12029         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12030
12031 2018-01-10  Pedro Alves  <palves@redhat.com>
12032
12033         PR gdb/22670
12034         * minsyms.c (linkage_name_str): New function.
12035         (iterate_over_minimal_symbols): Use it.
12036
12037 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12038
12039         * NEWS: Document that 'info proc' now works on FreeBSD.
12040
12041 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12042
12043         * configure.ac: Check for kinfo_getfile in libutil.
12044         * configure: Regenerate.
12045         * config.in: Regenerate.
12046         * fbsd-nat.c: Include "fbsd-tdep.h".
12047         (fbsd_fetch_cmdline): New.
12048         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12049         rather than calling error.
12050         (fbsd_info_proc): New.
12051         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12052         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12053         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12054
12055 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12056
12057         * fbsd-nat.c (struct free_deleter): Remove.
12058         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12059
12060 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12061
12062         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12063         NULL for an empty pathname.
12064
12065 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12066
12067         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12068         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12069         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12070         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12071         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12072         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12073         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12074         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12075         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12076         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12077         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12078         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12079         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12080         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12081         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12082
12083 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12084
12085         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12086         (gnu_xfer_auxv): New function.
12087         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12088         TARGET_OBJECT_AUXV.
12089
12090 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12091             Simon Marchi  <simon.marchi@ericsson.com>
12092
12093         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12094         common/selftest.c.
12095         (COMMON_OBS): Remove selftest.o.
12096         * configure.ac: Append selftest-arch.c and common/selftest.c to
12097         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12098         * configure: Re-generated.
12099         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12100         GDB_SELF_TEST.
12101         (maintenance_info_selftests): Likewise.
12102
12103 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12104
12105         * ada-valprint.c (val_print_packed_array_elements): Use
12106         proper number of elements when printing an array indexed
12107         by an enumeration type.
12108
12109 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12110
12111         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12112         (dw2_get_file_names_reader): Adjust.
12113         (lookup_dwo_signatured_type): Adjust.
12114         (lookup_dwp_signatured_type): Adjust.
12115         (lookup_signatured_type): Adjust.
12116         (create_type_unit_group): Adjust.
12117         (get_type_unit_group): Adjust.
12118         (process_psymtab_comp_unit_reader): Adjust.
12119         (build_type_psymtabs_reader): Adjust.
12120         (scan_partial_symbols): Adjust.
12121         (add_partial_symbol): Adjust.
12122         (add_partial_subprogram): Adjust.
12123         (peek_die_abbrev): Adjust.
12124         (fixup_go_packaging): Adjust.
12125         (process_imported_unit_die): Adjust.
12126         (dwarf2_compute_name): Adjust.
12127         (dwarf2_physname): Adjust.
12128         (read_import_statement): Adjust.
12129         (handle_DW_AT_stmt_list): Adjust.
12130         (read_file_scope): Adjust.
12131         (read_func_scope): Adjust.
12132         (read_lexical_block_scope): Adjust.
12133         (read_call_site_scope): Adjust.
12134         (read_variable): Adjust.
12135         (dwarf2_rnglists_process): Adjust.
12136         (dwarf2_ranges_process): Adjust.
12137         (dwarf2_ranges_read): Adjust.
12138         (dwarf2_get_pc_bounds): Adjust.
12139         (dwarf2_record_block_ranges): Adjust.
12140         (dwarf2_add_field): Adjust.
12141         (dwarf2_add_member_fn): Adjust.
12142         (read_structure_type): Adjust.
12143         (process_structure_scope): Adjust.
12144         (read_enumeration_type): Adjust.
12145         (read_array_type): Adjust.
12146         (mark_common_block_symbol_computed): Adjust.
12147         (read_common_block): Adjust.
12148         (read_namespace_type): Adjust.
12149         (read_namespace): Adjust.
12150         (read_module_type): Adjust.
12151         (read_tag_pointer_type): Adjust.
12152         (read_tag_ptr_to_member_type): Adjust.
12153         (read_tag_string_type): Adjust.
12154         (read_subroutine_type): Adjust.
12155         (read_typedef): Adjust.
12156         (read_base_type): Adjust.
12157         (attr_to_dynamic_prop): Adjust.
12158         (read_subrange_type): Adjust.
12159         (read_unspecified_type): Adjust.
12160         (dwarf2_read_abbrevs): Adjust.
12161         (load_partial_dies): Adjust.
12162         (read_partial_die): Adjust.
12163         (find_partial_die): Adjust.
12164         (guess_partial_die_structure_name): Adjust.
12165         (fixup_partial_die): Adjust.
12166         (read_attribute_value): Adjust.
12167         (read_addr_index): Adjust.
12168         (read_addr_index_from_leb128): Adjust.
12169         (read_str_index): Adjust.
12170         (dwarf2_string_attr): Adjust.
12171         (get_debug_line_section): Adjust.
12172         (dwarf_decode_line_header): Adjust.
12173         (lnp_state_machine::check_line_address): Adjust.
12174         (dwarf_decode_lines_1): Adjust.
12175         (dwarf_decode_lines): Adjust.
12176         (dwarf2_start_symtab): Adjust.
12177         (var_decode_location): Adjust.
12178         (new_symbol_full): Adjust.
12179         (dwarf2_const_value_data): Adjust.
12180         (dwarf2_const_value_attr): Adjust.
12181         (dwarf2_const_value): Adjust.
12182         (die_type): Adjust.
12183         (die_containing_type): Adjust.
12184         (build_error_marker_type): Adjust.
12185         (lookup_die_type): Adjust.
12186         (guess_full_die_structure_name): Adjust.
12187         (anonymous_struct_prefix): Adjust.
12188         (determine_prefix): Adjust.
12189         (dwarf2_name): Adjust.
12190         (follow_die_ref_or_sig): Adjust.
12191         (follow_die_offset): Adjust.
12192         (follow_die_ref): Adjust.
12193         (follow_die_sig_1): Adjust.
12194         (follow_die_sig): Adjust.
12195         (get_signatured_type): Adjust.
12196         (get_DW_AT_signature_type): Adjust.
12197         (decode_locdesc): Adjust.
12198         (dwarf_decode_macros): Adjust.
12199         (cu_debug_loc_section): Adjust.
12200         (fill_in_loclist_baton): Adjust.
12201         (dwarf2_symbol_mark_computed): Adjust.
12202         (init_one_comp_unit): Don't assign
12203         dwarf2_cu::dwarf2_per_objfile.
12204         (set_die_type): Adjust.
12205
12206 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12207
12208         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12209         <dwarf2_per_objfile>: New field.
12210         (dwarf2_per_objfile): Remove global.
12211         (get_dwarf2_per_objfile): New function.
12212         (set_dwarf2_per_objfile): New function.
12213         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12214         dwarf2_per_objfile.
12215         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12216         (read_abbrev_offset): Likewise.
12217         (read_indirect_string): Likewise.
12218         (read_indirect_line_string): Likewise.
12219         (read_indirect_string_at_offset): Likewise.
12220         (read_indirect_string_from_dwz): Likewise.
12221         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12222         dwarf2_per_objfile.
12223         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12224         (create_all_comp_units): Change objfile parameter to
12225         dwarf2_per_objfile.
12226         (create_all_type_units): Likewise.
12227         (process_queue): Add dwarf2_per_objfile parameter.
12228         (read_and_check_comp_unit_head): Likewise.
12229         (lookup_dwo_unit_in_dwp): Likewise.
12230         (get_dwp_file): Likewise.
12231         (process_cu_includes): Likewise.
12232         (struct free_dwo_file_cleanup_data): New struct.
12233         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12234         set_dwarf2_per_objfile.
12235         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12236         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12237         context, adjust calls.
12238         (dw2_instantiate_symtab): Likewise.
12239         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12240         (dw2_get_cu): Likewise.
12241         (create_cu_from_index_list): Change objfile parameter to
12242         dwarf2_per_objfile.
12243         (create_cus_from_index_list): Get dwarf2_per_objfile from
12244         context, adjust calls.
12245         (create_cus_from_index): Likewise.
12246         (create_signatured_type_table_from_index): Change objfile
12247         parameter to dwarf2_per_objfile.
12248         (create_signatured_type_table_from_debug_names): Change objfile
12249         parameter to dwarf2_per_objfile.
12250         (create_addrmap_from_index): Likewise.
12251         (create_addrmap_from_aranges): Likewise.
12252         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12253         (dw2_setup): Remove.
12254         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12255         context.
12256         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12257         get_dwarf2_per_objfile.
12258         (dw2_forget_cached_source_info): Likewise.
12259         (dw2_map_symtabs_matching_filename): Likewise.
12260         (struct dw2_symtab_iterator) <index>: Remove.
12261         <dwarf2_per_objfile>: New field.
12262         (dw2_symtab_iter_init): Replace index parameter with
12263         dwarf2_per_objfile.
12264         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12265         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12266         (dw2_print_stats): Likewise.
12267         (dw2_dump): Likewise.
12268         (dw2_expand_symtabs_for_function): Likewise.
12269         (dw2_expand_all_symtabs): Likewise.
12270         (dw2_expand_symtabs_with_fullname): Likewise.
12271         (dw2_expand_marked_cus): Replace index and objfile parameters
12272         with dwarf2_per_objfile.
12273         (dw_expand_symtabs_matching_file_matcher): Add
12274         dwarf2_per_objfile parameter and adjust calls.
12275         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12276         adjust calls.
12277         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12278         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12279         adjust calls.
12280         (create_cus_from_debug_names_list): Replace objfile parameter
12281         with dwarf2_per_objfile and adjust calls.
12282         (create_cus_from_debug_names): Likewise.
12283         (dwarf2_read_debug_names): Likewise.
12284         (mapped_debug_names::namei_to_name): Adjust call.
12285         (dw2_debug_names_iterator::next): Likewise.
12286         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12287         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12288         (dw2_debug_names_dump): Likewise.
12289         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12290         (dw2_debug_names_expand_symtabs_matching): Likewise.
12291         (dwarf2_initialize_objfile): Likewise.
12292         (dwarf2_build_psymtabs): Likewise.
12293         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12294         this_cu.
12295         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12296         (read_and_check_comp_unit_head): Likewise.
12297         (read_abbrev_offset): Likewise.
12298         (create_debug_type_hash_table): Likewise.
12299         (create_debug_types_hash_table): Likewise.
12300         (create_all_type_units): Replace objfile parameter with
12301         dwarf2_per_objfile.
12302         (add_type_unit): Add dwarf2_per_objfile parameter.
12303         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12304         with dwarf2_per_objfile.
12305         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12306         (lookup_dwp_signatured_type): Likewise.
12307         (lookup_signatured_type): Likewise.
12308         (read_cutu_die_from_dwo): Likewise.
12309         (init_tu_and_read_dwo_dies): Likewise.
12310         (init_cutu_and_read_dies): Likewise.
12311         (init_cutu_and_read_dies_no_follow): Likewise.
12312         (allocate_type_unit_groups_table): Add objfile parameter.
12313         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12314         (get_type_unit_group): Likewise.
12315         (process_psymtab_comp_unit): Update call.
12316         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12317         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12318         (print_tu_stats): Likewise.
12319         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12320         in void* parameter.
12321         (build_type_psymtabs): Change objfile parameter to
12322         dwarf2_per_objfile.
12323         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12324         passed in void* parameter.
12325         (process_skeletonless_type_units): Change objfile parameter to
12326         dwarf2_per_objfile.
12327         (set_partial_user): Likewise.
12328         (dwarf2_build_psymtabs_hard): Likewise.
12329         (read_comp_units_from_section): Likewise.
12330         (create_all_comp_units): Likewise.
12331         (scan_partial_symbols): Update calls.
12332         (add_partial_symbol): Likewise.
12333         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12334         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12335         (process_queue): Add dwarf2_per_objfile parameter.
12336         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12337         (compute_compunit_symtab_includes): Likewise.
12338         (process_cu_includes): Add dwarf2_per_objfile parameter.
12339         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12340         (process_full_type_unit): Likewise.
12341         (process_imported_unit_die): Update call.
12342         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12343         (read_file_scope): Likewise.
12344         (allocate_dwo_file_hash_table): Add objfile parameter.
12345         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12346         (create_cus_hash_table): Likewise.
12347         (create_dwp_hash_table): Likewise.
12348         (create_dwo_unit_in_dwp_v1): Likewise.
12349         (create_dwp_v2_section): Likewise.
12350         (create_dwo_unit_in_dwp_v2): Likewise.
12351         (lookup_dwo_unit_in_dwp): Likewise.
12352         (try_open_dwop_file): Likewise.
12353         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12354         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12355         cleanup to include a reference to dwarf2_per_objfile.
12356         (open_dwp_file): Add dwarf2_per_objfile parameter.
12357         (open_and_init_dwp_file): Likewise.
12358         (get_dwp_file): Likewise.
12359         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12360         (queue_and_load_all_dwo_tus): Update call.
12361         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12362         data.
12363         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12364         (dwarf2_ranges_process): Likewise.
12365         (dwarf2_get_pc_bounds): Likewise.
12366         (mark_common_block_symbol_computed): Likewise.
12367         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12368         (dwarf2_read_abbrevs): Update call.
12369         (read_partial_die): Use dwarf2_per_objfile from cu.
12370         (find_partial_die): Likewise.
12371         (fixup_partial_die): Likewise.
12372         (read_attribute_value): Likewise.
12373         (read_indirect_string_at_offset_from): Add objfile parameter.
12374         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12375         parameter.
12376         (read_indirect_string_from_dwz): Add objfile parameter.
12377         (read_indirect_string): Add objfile parameter.
12378         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12379         (read_addr_index): Use dwarf2_per_objfile from cu.
12380         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12381         call dw2_setup.
12382         (read_str_index): Use dwarf2_per_objfile from cu.
12383         (get_debug_line_section): Likewise.
12384         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12385         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12386         (new_symbol_full): Use dwarf2_per_objfile from cu.
12387         (build_error_marker_type): Likewise.
12388         (lookup_die_type): Likewise.
12389         (determine_prefix): Likewise.
12390         (follow_die_offset): Likewise.
12391         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12392         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12393         (dwarf2_fetch_die_type_sect_off): Likewise.
12394         (dwarf2_get_die_type): Likewise.
12395         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12396         (get_signatured_type): Likewise.
12397         (get_DW_AT_signature_type): Likewise.
12398         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12399         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12400         (cu_debug_loc_section): Likewise.
12401         (fill_in_loclist_baton): Likewise.
12402         (dwarf2_symbol_mark_computed): Likewise.
12403         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12404         dwarf2_per_objfile.
12405         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12406         parameter.
12407         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12408         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12409         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12410         (set_die_type): Use dwarf2_free_objfile from cu.
12411         (get_die_type_at_offset): Likewise.
12412         (dwarf2_per_objfile_free): Don't assign global variable.
12413         (debug_names) <constructor>: Add dwarf2_per_objfile
12414         parameter, update m_debugstrlookup construction.
12415         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12416         parameter.
12417         <m_dwarf2_per_objfile>: New field.
12418         <lookup>: Use m_dwarf2_per_objfile.
12419         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12420         (psyms_seen_size): Likewise.
12421         (write_gdbindex): Replace objfile parameter with
12422         dwarf2_per_objfile.
12423         (write_debug_names): Likewise.
12424         (write_psymtabs_to_index): Likewise.
12425         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12426         calls.
12427
12428 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12429
12430         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12431         <dwarf2_per_objfile>: New field.
12432         (struct dwarf2_per_cu_data) <objfile>: Remove.
12433         <dwarf2_per_objfile>: New field.
12434         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12435         of objfile.
12436         (create_signatured_type_table_from_index): Likewise.
12437         (create_debug_type_hash_table): Likewise.
12438         (fill_in_sig_entry_from_dwo_entry): Likewise.
12439         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12440         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12441         objfile.
12442         (create_partial_symtab): Access objfile through
12443         dwarf2_per_objfile.
12444         (process_psymtab_comp_unit_reader): Likewise.
12445         (read_comp_units_from_section): Likewise.
12446         (scan_partial_symbols): Likewise.
12447         (add_partial_symbol): Likewise.
12448         (add_partial_subprogram): Likewise.
12449         (peek_die_abbrev): Likewise.
12450         (fixup_go_packaging): Likewise.
12451         (process_full_comp_unit): Likewise.
12452         (process_full_type_unit): Likewise.
12453         (process_imported_unit_die): Likewise.
12454         (dwarf2_compute_name): Likewise.
12455         (dwarf2_physname): Likewise.
12456         (read_import_statement): Likewise.
12457         (create_cus_hash_table): Assign dwarf2_physname instead of
12458         objfile.
12459         (read_func_scope): Access objfile through dwarf2_per_objfile.
12460         (read_lexical_block_scope): Likewise.
12461         (read_call_site_scope): Likewise.
12462         (read_variable): Likewise.
12463         (dwarf2_rnglists_process): Likewise.
12464         (dwarf2_ranges_process): Likewise.
12465         (dwarf2_ranges_read): Likewise.
12466         (dwarf2_record_block_ranges): Likewise.
12467         (dwarf2_add_field): Likewise.
12468         (dwarf2_add_member_fn): Likewise.
12469         (read_structure_type): Likewise.
12470         (process_structure_scope): Likewise.
12471         (read_enumeration_type): Likewise.
12472         (read_array_type): Likewise.
12473         (read_common_block): Likewise.
12474         (read_namespace_type): Likewise.
12475         (read_namespace): Likewise.
12476         (read_module_type): Likewise.
12477         (read_tag_pointer_type): Likewise.
12478         (read_tag_ptr_to_member_type): Likewise.
12479         (read_tag_string_type): Likewise.
12480         (read_subroutine_type): Likewise.
12481         (read_typedef): Likewise.
12482         (read_base_type): Likewise.
12483         (attr_to_dynamic_prop): Likewise.
12484         (read_subrange_type): Likewise.
12485         (read_unspecified_type): Likewise.
12486         (load_partial_dies): Likewise.
12487         (read_partial_die): Likewise.
12488         (find_partial_die): Likewise.
12489         (guess_partial_die_structure_name): Likewise.
12490         (fixup_partial_die): Likewise.
12491         (read_attribute_value): Likewise.
12492         (read_addr_index_from_leb128): Likewise.
12493         (dwarf2_read_addr_index): Likewise.
12494         (dwarf2_string_attr): Likewise.
12495         (lnp_state_machine::check_line_address): Likewise.
12496         (dwarf_decode_lines_1): Likewise.
12497         (dwarf_decode_lines): Likewise.
12498         (dwarf2_start_symtab): Likewise.
12499         (var_decode_location): Likewise.
12500         (new_symbol_full): Likewise.
12501         (dwarf2_const_value_data): Likewise.
12502         (dwarf2_const_value_attr): Likewise.
12503         (dwarf2_const_value): Likewise.
12504         (die_type): Likewise.
12505         (die_containing_type): Likewise.
12506         (lookup_die_type): Likewise.
12507         (guess_full_die_structure_name): Likewise.
12508         (anonymous_struct_prefix): Likewise.
12509         (dwarf2_name): Likewise.
12510         (follow_die_ref_or_sig): Likewise.
12511         (follow_die_offset): Likewise.
12512         (follow_die_ref): Likewise.
12513         (dwarf2_fetch_die_loc_sect_off): Likewise.
12514         (dwarf2_fetch_constant_bytes): Likewise.
12515         (dwarf2_fetch_die_type_sect_off): Likewise.
12516         (dwarf2_get_die_type): Likewise.
12517         (follow_die_sig): Likewise.
12518         (decode_locdesc): Likewise.
12519         (dwarf2_per_cu_objfile): Likewise.
12520         (dwarf2_per_cu_text_offset): Likewise.
12521         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12522         objfile.
12523         (set_die_type): Access objfile through
12524         dwarf2_per_objfile.
12525
12526 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12527
12528         * valprint.c (converted_character_d): Remove typedef.
12529         (DEF_VEC_O (converted_character_d)): Remove.
12530         (count_next_character): Use std::vector.
12531         (print_converted_chars_to_obstack): Likewise.
12532         (generic_printstr): Likewise.
12533
12534 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12535
12536         * xml-support.h (struct gdb_xml_value): Add constructor.
12537         <value>: Change type to unique_xmalloc_ptr.
12538         (gdb_xml_value_s): Remove typedef.
12539         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12540         (gdb_xml_element_start_handler): Change parameter type to
12541         std::vector.
12542         (xml_find_attribute): Likewise.
12543         * xml-support.c (xml_find_attribute): Change parameter type to
12544         std::vector and adjust.
12545         (gdb_xml_values_cleanup): Remove.
12546         (gdb_xml_parser::start_element): Adjust to std::vector.
12547         (xinclude_start_include): Change paraeter type to std::vector
12548         and adjust.
12549         * btrace.c (check_xml_btrace_version): Likewise.
12550         (parse_xml_btrace_block): Likewise.
12551         (parse_xml_btrace_pt_config_cpu): Likewise.
12552         (parse_xml_btrace_pt): Likewise.
12553         (parse_xml_btrace_conf_bts): Likewise.
12554         (parse_xml_btrace_conf_pt): Likewise.
12555         * memory-map.c (memory_map_start_memory): Likewise.
12556         (memory_map_start_property): Likewise.
12557         * osdata.c (osdata_start_osdata): Likewise.
12558         (osdata_start_item): Likewise.
12559         (osdata_start_column): Likewise.
12560         * remote.c (start_thread): Likewise.
12561         * solib-aix.c (library_list_start_library): Likewise.
12562         (library_list_start_list): Likewise.
12563         * solib-svr4.c (library_list_start_library): Likewise.
12564         (svr4_library_list_start_list): Likewise.
12565         * solib-target.c (library_list_start_segment): Likewise.
12566         (library_list_start_section): Likewise.
12567         (library_list_start_library): Likewise.
12568         (library_list_start_list): Likewise.
12569         * tracepoint.c (traceframe_info_start_memory): Likewise.
12570         (traceframe_info_start_tvar): Likewise.
12571         * xml-syscall.c (syscall_start_syscall): Likewise.
12572         * xml-tdesc.c (tdesc_start_target): Likewise.
12573         (tdesc_start_feature): Likewise.
12574         (tdesc_start_reg): Likewise.
12575         (tdesc_start_union): Likewise.
12576         (tdesc_start_struct): Likewise.
12577         (tdesc_start_flags): Likewise.
12578         (tdesc_start_enum): Likewise.
12579         (tdesc_start_field): Likewise.
12580         (tdesc_start_enum_value): Likewise.
12581         (tdesc_start_vector): Likewise.
12582
12583 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12584
12585         * extension.h (struct xmethod_worker) <clone>: Remove.
12586         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12587         Remove.
12588         (python_xmethod_worker::clone): Remove.
12589         * valops.c (find_overload_match): Use std::move instead of
12590         clone.
12591
12592 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12593
12594         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12595         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12596         <free_xmethod_worker_data>: Remove.
12597         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12598         <get_xmethod_arg_types>: Remove.
12599         <get_xmethod_result_type>: Remove.
12600         <invoke_xmethod>: Remove.
12601         * extension.c (new_xmethod_worker): Remove.
12602         (clone_xmethod_worker): Remove.
12603         (get_matching_xmethod_workers): Return void, pass std::vector by
12604         pointer.
12605         (get_xmethod_arg_types): Rename to...
12606         (xmethod_worker::get_arg_types): ... this, and adjust.
12607         (get_xmethod_result_type): Rename to...
12608         (xmethod_worker::get_result_type): ... this, and adjust.
12609         (invoke_xmethod): Remove.
12610         (free_xmethod_worker): Remove.
12611         (free_xmethod_worker_vec): Remove.
12612         * extension.h (enum ext_lang_rc): Move here from
12613         extension-priv.h.
12614         (struct xmethod_worker): Add constructor and destructor.
12615         <data>: Remove.
12616         <value>: Remove.
12617         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12618         virtual pure methods.
12619         <get_arg_types, get_result_type>: New methods.
12620         (xmethod_worker_ptr): Remove typedef.
12621         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12622         (xmethod_worker_vec): Remove typedef.
12623         (xmethod_worker_up): New typedef.
12624         (invoke_xmethod): Remove.
12625         (clone_xmethod_worker): Remove.
12626         (free_xmethod_worker): Remove.
12627         (free_xmethod_worker_vec): Remove.
12628         (get_xmethod_arg_types): Remove.
12629         (get_xmethod_result_type): Remove.
12630         * valops.c (find_method_list): Use std::vector, don't use
12631         intermediate vector.
12632         (value_find_oload_method_list): Use std::vector.
12633         (find_overload_match): Use std::vector.
12634         (find_oload_champ): Use std::vector.
12635         * value.c (value_free): Use operator delete.
12636         (value_of_xmethod): Rename to...
12637         (value_from_xmethod): ... this.  Don't assign
12638         xmethod_worker::value, take rvalue-reference.
12639         (result_type_of_xmethod): Adjust.
12640         (call_xmethod): Adjust.
12641         * value.h: Include extension.h.
12642         (struct xmethod_worker): Don't forward-declare.
12643         (value_of_xmethod): Rename to...
12644         (value_from_xmethod): ... this, take rvalue-reference.
12645         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12646         (struct python_xmethod_worker): ... this, add constructor and
12647         destructor.
12648         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12649         (gdbpy_free_xmethod_worker_data): Rename to...
12650         (python_xmethod_worker::~python_xmethod_worker): ... this and
12651         adjust.
12652         (gdbpy_clone_xmethod_worker_data): Rename to...
12653         (python_xmethod_worker::clone): ... this and adjust.
12654         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12655         temporary vector.
12656         (gdbpy_get_xmethod_arg_types): Rename to...
12657         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12658         (gdbpy_get_xmethod_result_type): Rename to...
12659         (python_xmethod_worker::do_get_result_type): ... this and
12660         adjust.
12661         (gdbpy_invoke_xmethod): Rename to...
12662         (python_xmethod_worker::invoke): ... this and adjust.
12663         (new_python_xmethod_worker): Rename to...
12664         (python_xmethod_worker::python_xmethod_worker): ... this and
12665         adjust.
12666         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12667         Remove.
12668         (gdbpy_free_xmethod_worker_data): Remove.
12669         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12670         (gdbpy_get_xmethod_arg_types): Remove.
12671         (gdbpy_get_xmethod_result_type): Remove.
12672         (gdbpy_invoke_xmethod): Remove.
12673         * python/python.c (python_extension_ops): Remove obsolete
12674         callbacks.
12675
12676 2018-01-05  Pedro Alves  <palves@redhat.com>
12677
12678         PR gdb/18653
12679         * common/signals-state-save-restore.c
12680         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12681         find a custom handler preinstalled, instead of internal erroring.
12682         But only warn if !quiet.
12683         * common/signals-state-save-restore.h
12684         (save_original_signals_state): New parameter 'quiet'.
12685         * main.c (captured_main_1): Move save_original_signals_state call
12686         after option handling, and pass QUIET.
12687
12688 2018-01-05  Pedro Alves  <palves@redhat.com>
12689
12690         * spu-tdep.c (spu_catch_start): Pass
12691         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12692
12693 2018-01-05  Pedro Alves  <palves@redhat.com>
12694
12695         PR gdb/22670
12696         * ada-lang.c (literal_symbol_name_matcher): New function.
12697         (ada_get_symbol_name_matcher): Use it for
12698         symbol_name_match_type::SEARCH_NAME.
12699         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12700         it down instead of assuming symbol_name_match_type::FULL.
12701         * block.h (block_lookup_symbol): New parameter 'match_type'.
12702         * c-valprint.c (print_unpacked_pointer): Use
12703         lookup_symbol_search_name instead of lookup_symbol.
12704         * compile/compile-object-load.c (get_out_value_type): Pass down
12705         symbol_name_match_type::SEARCH_NAME.
12706         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12707         symbol_name_match_type::FULL.
12708         * cp-support.c (cp_get_symbol_name_matcher): Handle
12709         symbol_name_match_type::SEARCH_NAME.
12710         * infrun.c (insert_exception_resume_breakpoint): Use
12711         lookup_symbol_search_name.
12712         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12713         * psymtab.c (maintenance_check_psymtabs): Use
12714         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12715         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12716         SYMBOL_SEARCH_NAME.
12717         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12718         if symbol_name_match_type::SEARCH_NAME.
12719         (lookup_symbol_in_language): Pass down
12720         symbol_name_match_type::FULL.
12721         (lookup_symbol_search_name): New.
12722         (lookup_language_this): Pass down
12723         symbol_name_match_type::SEARCH_NAME.
12724         (lookup_symbol_aux, lookup_local_symbol): New parameter
12725         'match_type'.  Pass it down.
12726         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12727         (lookup_symbol_search_name): New declaration.
12728         (lookup_symbol_in_block): New 'match_type' parameter.
12729
12730 2018-01-05  Pedro Alves  <palves@redhat.com>
12731
12732         PR gdb/22670
12733         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12734         ada_lookup_symbol.
12735         (ada_lookup_symbol): Reimplement in terms of
12736         ada_lookup_symbol_list, bits factored out from
12737         ada_lookup_encoded_symbol.
12738
12739 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12740
12741         * ada-exp.y (write_object_renaming): When subscripting an array
12742         using a symbol as the index, pass the block in call to
12743         ada_lookup_encoded_symbol when looking that symbol up.
12744
12745 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12746
12747         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12748         TYPE_INDEX_TYPE.
12749
12750 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12751
12752         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12753         the case where VALUE_LVAL (val0) is not lval_memory.
12754
12755 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12756
12757         * ada-valprint.c (print_optional_low_bound): Handle
12758         character-indexed array printing like boolean-indexed array
12759         printing.
12760
12761 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12762
12763         * NEWS: Create a new section for the next release branch.
12764         Rename the section of the current branch, now that it has
12765         been cut.
12766
12767 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12768
12769         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12770         * version.in: Bump version to 8.1.50.DATE-git.
12771
12772 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12773
12774         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12775         Add field.
12776         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12777         Add field.
12778         (default_exception_support_info) <catch_handlers_sym>: Add field.
12779         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12780         (ada_exception_name_addr_1): Add "catch handlers" handling.
12781         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12782         Update all callers.
12783         (create_excep_cond_exprs) <ex>: Add parameter.
12784         (re_set_exception): Update create_excep_cond_exprs call.
12785         (print_it_exception, print_one_exception, print_mention_exception)
12786         (print_recreate_exception): Add "catch handler" handling.
12787         (allocate_location_catch_handlers, re_set_catch_handlers)
12788         (check_status_catch_handlers, print_it_catch_handlers)
12789         (print_one_catch_handlers, print_mention_catch_handlers)
12790         (print_recreate_catch_handlers): New function.
12791         (catch_handlers_breakpoint_ops): New variable.
12792         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12793         Add parameter.  Add "catch handler" handling.
12794         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12795         Add "catch handler" handling.
12796         (ada_exception_catchpoint_cond_string): Add "catch handler"
12797         handling.
12798         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12799         call.
12800         (catch_ada_handlers_command): New function.
12801         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12802         operations structure.
12803         (_initialize_ada_language): Add "catch handlers" command entry.
12804         * NEWS: Document "catch handlers" feature.
12805
12806 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12807
12808         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12809         account when creating the array type of the slice.
12810         (ada_value_slice): Likewise.
12811
12812 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12813
12814         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12815         New enum value.
12816         (create_array_type_with_stride): Add byte_stride_prop parameter.
12817         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12818         New parameter.  Update all callers in this file.
12819         (array_type_has_dynamic_stride): New function.
12820         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12821         of arrays with dynamic byte strides.
12822         * dwarf2read.c (read_array_type): Add support for dynamic
12823         DW_AT_byte_stride attributes.
12824
12825 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12826
12827         * dwarf2read.c (read_unspecified_type): Treat
12828         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12829
12830 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12831
12832         Update copyright year range in all GDB files.
12833
12834 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12835
12836         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12837         and gdb/testsuite/gdb.base/step-line.c.
12838
12839 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12840
12841         * copyright.py (main): Dump the contents of
12842         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12843         even if BY_HAND is empty.
12844
12845 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12846
12847         * top.c (print_gdb_version): Update Copyright year in version
12848         message.
12849
12850 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12851
12852         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12853
12854 For older changes see ChangeLog-2017.
12855 \f
12856 Local Variables:
12857 mode: change-log
12858 left-margin: 8
12859 fill-column: 74
12860 version-control: never
12861 coding: utf-8
12862 End: