compile: Remove non-const reference parameters
[external/binutils.git] / gdb / ChangeLog
1 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * compile/compile-c.h (generate_c_for_variable_locations):
4         Change reference to pointer.
5         * compile/compile-c-support.c (compile_program) <compute>:
6         Likewise.
7         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
8         (generate_c_for_for_one_variable): Likewise
9         (generate_c_for_variable_locations): Likewise
10         * compile/compile-c-types.c (compile_c_instance::convert_type):
11         Likewise
12         * compile/compile-cplus-symbols.c (convert_one_symbol):
13         std::move the scope passed to enter_scope.
14         * compile/compile-cplus-types.c
15         (compile_cplus_instance::enter_scope): Make parameter
16         rvalue-reference.
17         (compile_cplus_instance::new_scope): Change reference to
18         pointer.
19         (compile_cplus_instance::convert_type): Likewise
20         (compile_cplus_convert_typedef): std::move the scope passed to
21         enter_scope.
22         (compile_cplus_convert_struct_or_union): Likewise.
23         (compile_cplus_convert_enum): Likewise.
24         (compile_cplus_convert_namespace): Likewise.
25         * compile/compile-cplus.h (compile_cplus_instance)
26         <enter_scope>: Make parameter rvalue-reference.
27         * compile/compile-internal.h (compile_instance)
28         <get_cached_type>: Likewise
29         * compile/compile-loc2c.c (push): Likewise
30         (pushf): Likewise
31         (unary): Likewise
32         (binary): Likewise
33         (print_label): Likewise
34         (pushf_register_address): Likewise
35         (pushf_register): Likewise
36         (do_compile_dwarf_expr_to_c): Likewise
37         (compile_dwarf_expr_to_c): Likewise
38         (compile_dwarf_bounds_to_c): Likewise
39         * compile/compile.c (compile_instance::get_cached_type):
40         Likewise
41         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
42         (compile_dwarf_bounds_to_c): Likewise
43         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
44         (dwarf2_compile_property_to_c): Likewise
45         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
46         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
47         Likewise
48
49 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
50
51         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
52         * tui/tui-data.c (init_content_element): Don't initialize it.
53
54 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
55
56         * tui/tui-data.h (struct tui_win_info)
57         <detail::opaque>: Remove.
58         * tui/tui-data.c (init_win_info): Remove assignment.
59
60 2018-09-05  Tom Tromey  <tom@tromey.com>
61
62         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
63         -Wformat-nonliteral.
64         * target-float.c (host_float_ops<T>::to_string)
65         (host_float_ops<T>::from_string): Use
66         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
67         * configure: Rebuild.
68
69 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
70
71         * printcmd.c (printf_c_string): Use
72         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
73         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
74
75 2018-09-05  Tom Tromey  <tom@tromey.com>
76
77         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
78
79 2018-09-05  Tom de Vries  <tdevries@suse.de>
80
81         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
82         with resolve_abstract_p == true.
83         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
84         defaulting to false. Propagate resolve_abstract_p to
85         dwarf2_fetch_die_loc_sect_off.
86         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
87         parameter, defaulting to false.
88         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
89         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
90         parameter.
91         * dwarf2read.h (struct die_info): Forward-declare.
92         (die_info_ptr): New typedef.
93         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
94
95 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
96
97         GDB 8.2 released.
98
99 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
100             Pedro Alves  <palves@redhat.com>
101
102         * gnulib/Makefile.in (aclocal_m4_deps): Move to
103         "aclocal-m4-deps.mk".  Include file here.
104         $(srcdir)/aclocal.m4: Add "configure.ac".
105         * gnulib/aclocal-m4-deps.mk: New file.
106         * gnulib/update-gnulib.sh: Automatically update
107         "aclocal-m4-deps.mk".
108
109 2018-09-04  Tom Tromey  <tom@tromey.com>
110
111         * configure: Rebuild.
112         * configure.ac: Remove multi-ice code.
113
114 2018-09-04  Tom Tromey  <tom@tromey.com>
115
116         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
117         (ada-exp.o): Update.
118
119 2018-09-04  Tom Tromey  <tom@tromey.com>
120
121         * Makefile.in (printcmd.o, target-float.o): Remove.
122         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
123
124 2018-09-04  Tom Tromey  <tom@tromey.com>
125
126         * gnulib/Makefile.in: Remove obsolete comment.
127         * Makefile.in: Remove obsolete comment.
128
129 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
130
131         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
132         line with '+'.
133
134 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
135
136         * riscv-tdep.c: Add 'prologue-value.h' include.
137         (struct riscv_unwind_cache): New struct.
138         (riscv_debug_unwinder): New global.
139         (riscv_scan_prologue): Update arguments, capture register details
140         from prologue scan.
141         (riscv_skip_prologue): Reformat arguments line, move end of
142         prologue calculation into riscv_scan_prologue.
143         (riscv_frame_cache): Update return type, create
144         riscv_unwind_cache, scan the prologue, and fill in remaining cache
145         details.
146         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
147         (riscv_frame_prev_register): Use the trad_frame within the
148         riscv_unwind_cache.
149         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
150         flag.
151
152 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
153
154         * trad-frame.h (trad_frame_set_realreg): Declare.
155         (trad_frame_set_addr): Declare.
156         * trad-frame.c (trad_frame_set_realreg): Define new function.
157         (trad_frame_set_addr): Define new function.
158         (trad_frame_set_reg_realreg): Use new function.
159         (trad_frame_set_reg_addr): Use new function.
160
161 2018-09-01  Keith Seitz  <keiths@redhat.com>
162
163         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
164         pulongest instead of "%lld".
165         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
166         ATTRIBUTE_UNUSED.
167
168 2018-08-31  Tom Tromey  <tom@tromey.com>
169
170         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
171         variant part type.
172
173 2018-08-31  Pedro Alves  <palves@redhat.com>
174
175         * gdbarch.h: Regenerate.
176
177 2018-08-31  Pedro Alves  <palves@redhat.com>
178
179         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
180         * target.h (Hardware watchpoint interfaces): Describe
181         continuable/steppable/non-steppable watchpoints.
182         * gdbarch.h, gdbarch.c: Regenerate.
183
184 2018-08-31  Pedro Alves  <palves@redhat.com>
185
186         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
187         Delete.
188         * s390-linux-nat.c
189         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
190         * target.h (target_ops::have_continuable_watchpoint): Delete.
191         (target_have_continuable_watchpoint): Delete.
192         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
193         * target-delegates.c: Regenerate.
194
195 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
196
197         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
198         the files present in "gnulib/import/m4/".
199
200 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
201
202         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
203         c.sw, c.swsp, and c.sdsp.
204
205 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
206
207         * riscv-tdep.c (struct riscv_inferior_data): Delete.
208         (riscv_read_misa_reg): Don't cache value read into inferior data.
209         (riscv_new_inferior_data): Delete.
210         (riscv_inferior_data_cleanup): Delete.
211         (riscv_inferior_data): Delete.
212         (riscv_invalidate_inferior_data): Delete.
213         (_initialize_riscv_tdep): Remove initialisation of inferior data.
214
215 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
216
217         * compile/compile-cplus-types.c
218         (compile_cplus_instance::leave_scope): Take the address of scope
219         object.
220         (compile_cplus_instance::convert_qualified_base): Compare quals
221         to 0.
222
223 2018-08-30  Keith Seitz  <keiths@redhat.com>
224
225         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
226         Use "%s" and host_address_to_string instead of "%p" in printf.
227
228 2018-08-29  Keith Seitz  <keiths@redhat.com>
229
230         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
231         and compile-cplus-types.c.
232         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
233         * c-lang.c (cplus_language_defn): Set C++ compile functions.
234         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
235         Declare.
236         * compile/compile-c-support.c: Include compile-cplus.h.
237         (load_libcompile): Templatize.
238         (get_compile_context): "New" function.
239         (c_get_compile_context): Use get_compile_context.
240         (cplus_get_compile_context): New function.
241         (cplus_push_user_expression, cplus_pop_user_expression)
242         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
243         (cplus_compute_program): Define new structs/functions.
244         * compile/compile-cplus-symmbols.c: New file.
245         * compile/compile-cplus-types.c: New file.
246         * compile/compile-cplus.h: New file.
247         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
248         Declare.
249         * compile/compile-object-load.c (get_out_value_type): Use
250         strncmp_iw when comparing symbol names.
251         (compile_object_load): Add mst_bss and mst_data.
252         * compile/compile.c (_initialize_compile): Remove
253         -Wno-implicit-function-declaration from `compile_args'.
254         * compile/gcc-cp-plugin.h: New file.
255         * NEWS: Mention C++ compile support and new debug options.
256
257 2018-08-29  Keith Seitz  <keiths@redhat.com>
258
259         * linespec.c (collect_info::add_symbol): Make virtual.
260         (struct symbol_searcher_collect_info): New struct.
261         (symbol_searcher::find_all_symbols): New method.
262         * symtab.h (class symbol_searcher): New class.
263
264 2018-08-29  Keith Seitz  <keiths@redhat.com>
265
266         * linespec.c (struct linespec) <function_symbols, label_symbols>:
267         Change to vector of block_symbol.  Update all users.
268         (struct collect_info) <symbols>: Likewise.
269         (collect_info::add_symbol): Take block_symbol as argument.
270         Update all callers.
271         (decode_compound_collector) <m_symbols>: Change type to vector
272         of block_symbol.  Update all users.
273         (decode_compound_collector::operator ()): Change parameter type
274         to block_symbol.
275         (find_method, find_function_symbols, find_linespec_symbols)
276         (find_label_symbols_in_block, find_label_symbols): Change symbol
277         vectors to block_symbol vectors.
278         * symtab.h (symbol_found_callback_ftype): Change parameter type to
279         block_symbol.
280
281 2018-08-29  Keith Seitz  <keiths@redhat.com>
282
283         * linespec.c (symbolp): Remove typedef and VEC definitions.
284         (bound_minimal_symbol_d): Likewise.
285
286 2018-08-29  Keith Seitz  <keiths@redhat.com>
287
288         * linespec.c (decode_compound_collector::decode_compound_collector):
289         Remove initialization for `m_symtabs'.
290         (decode_compound_collector::release_symbols): Change return type
291         to std::vector.  Update all callers.
292         (class decode_compound_collector) <m_symbols>: Change type to
293         std::vector.
294         (lookup_prefix_sym): Change return type to std::vector.  Update all
295         callers.
296         (compare_symbols): Remove.
297         (std_compare_symbols): Rename to `compare_symbols'.
298         (find_method): Change `sym_classes' parameter to std::vector.
299         Update all callers.  Use std::sort to sort sym_classes.
300         (find_linespec_symbols): Remove cleanup.
301
302 2018-08-29  Keith Seitz  <keiths@redhat.com>
303
304         * linespec.c (struct linespec) <minimal_symbols>: Change type to
305         std::vector.  Update all users.
306         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
307         (struct collect_info) <minimal_symbols>: Likewise.
308         (compare_msymbols): Return bool.  Change parameters to const
309         bound_minimal_symbol references.
310         (find_method, find_function_symbols, find_linespec_symbols): Change
311         `minsyms' parameter to std::vector.  Update all callers.
312
313 2018-08-29  Keith Seitz  <keiths@redhat.com>
314
315         * linespec.c (struct linespec) <label_symbols>: Change type to
316         std::vector.  Update all users.
317         (find_label_symbols_in_block): Change `result' parameter to
318         std::vector.  Update all callers.
319         (find_label_symbols): Return std::vector.  Update all callers.
320
321 2018-08-29  Keith Seitz  <keiths@redhat.com>
322
323         * linespec.c (struct linespec) <function_symbols>: Change type to
324         std::vector.  Update all users.
325         (struct collect_info) <function_symbols>: Likewise.
326         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
327         (std_compare_symbols): New function.
328         (find_method, find_function_symbols, find_linespec_symbols)
329         (find_label_symbols_in_block): Change `symbols' parameter to
330         std::vector.  Update all callers.
331         (find_label_symbols): Likewise for `function_symbols' and
332         `label_funcs_ret'.
333
334 2018-08-29  Keith Seitz  <keiths@redhat.com>
335
336         * linespec.c (symtab_vector_up): Define.
337         (struct linespec) <file_symtabs>: Change type to std::vector *.
338         Update all uses.
339         (struct collect_info) <file_symtabs>: Likewise.
340         (collect_symtabs_from_filename): Return symtab_vector_up.
341         Update all callers.
342         (decode_objc): Remove cleanup.
343         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
344         (symtab_collector::release_symtabs): Return symtab_vector_up.
345         Update all callers.
346         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
347         Update all users.
348         (collect_symtabs_from_filename, symtabs_from_filename): Return
349         symtab_vector_up.  Update all callers.
350
351 2018-08-29  Tom Tromey  <tom@tromey.com>
352
353         * csky-tdep.c (csky_analyze_prologue): Use
354         core_addr_to_string_nz.
355
356 2018-08-29  Tom Tromey  <tom@tromey.com>
357
358         * windows-nat.c (struct xlate_exception) <them>: Change type to
359         DWORD.
360         (xlate): Fix formatting.  Remove last entry.
361         (struct xlate_exception, xlate): Comment out.
362         (windows_nat_target::resume): Use ranged for.
363
364 2018-08-29  Jim Wilson  <jimw@sifive.com>
365
366         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
367         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
368         of NT_PRFPREG.
369         (riscv_linux_nat_target::store_registers): Likewise.
370
371 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
372
373         PR gdb/23555
374         PR gdb/23558
375         * gnulib/aclocal.m4: Regenerate.
376         * gnulib/config.in: Regenerate.
377         * gnulib/configure: Regenerate.
378         * gnulib/import/Makefile.am: Update.
379         * gnulib/import/Makefile.in: Update.
380         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
381         * gnulib/import/_Noreturn.h: ... this.
382         * gnulib/import/alloca.in.h: Update.
383         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
384         * gnulib/import/arg-nonnull.h: ... this.
385         * gnulib/import/assure.h: Update.
386         * gnulib/import/at-func.c: Update.
387         * gnulib/import/basename-lgpl.c: Update.
388         * gnulib/import/extra/snippet/c++defs.h: Rename to...
389         * gnulib/import/c++defs.h: ... this.
390         * gnulib/import/canonicalize-lgpl.c: Update.
391         * gnulib/import/cdefs.h: Update.
392         * gnulib/import/chdir-long.c: Update.
393         * gnulib/import/chdir-long.h: Update.
394         * gnulib/import/cloexec.c: Update.
395         * gnulib/import/cloexec.h: Update.
396         * gnulib/import/close.c: Update.
397         * gnulib/import/closedir.c: Update.
398         * gnulib/import/config.charset: Update.
399         * gnulib/import/dirent-private.h: Update.
400         * gnulib/import/dirent.in.h: Update.
401         * gnulib/import/dirfd.c: Update.
402         * gnulib/import/dirname-lgpl.c: Update.
403         * gnulib/import/dirname.h: Update.
404         * gnulib/import/dosname.h: Update.
405         * gnulib/import/dup-safer-flag.c: Update.
406         * gnulib/import/dup-safer.c: Update.
407         * gnulib/import/dup.c: Update.
408         * gnulib/import/dup2.c: Update.
409         * gnulib/import/errno.in.h: Update.
410         * gnulib/import/error.c: Update.
411         * gnulib/import/error.h: Update.
412         * gnulib/import/exitfail.c: Update.
413         * gnulib/import/exitfail.h: Update.
414         * gnulib/import/extra/update-copyright: Update.
415         * gnulib/import/fchdir.c: Update.
416         * gnulib/import/fcntl.c: Update.
417         * gnulib/import/fcntl.in.h: Update.
418         * gnulib/import/fd-hook.c: Update.
419         * gnulib/import/fd-hook.h: Update.
420         * gnulib/import/fd-safer-flag.c: Update.
421         * gnulib/import/fd-safer.c: Update.
422         * gnulib/import/fdopendir.c: Update.
423         * gnulib/import/filename.h: Update.
424         * gnulib/import/filenamecat-lgpl.c: Update.
425         * gnulib/import/filenamecat.h: Update.
426         * gnulib/import/flexmember.h: Update.
427         * gnulib/import/float+.h: Update.
428         * gnulib/import/float.c: Update.
429         * gnulib/import/float.in.h: Update.
430         * gnulib/import/fnmatch.c: Update.
431         * gnulib/import/fnmatch.in.h: Update.
432         * gnulib/import/fnmatch_loop.c: Update.
433         * gnulib/import/fpucw.h: Update.
434         * gnulib/import/frexp.c: Update.
435         * gnulib/import/frexpl.c: Update.
436         * gnulib/import/fstat.c: Update.
437         * gnulib/import/fstatat.c: Update.
438         * gnulib/import/getcwd-lgpl.c: Update.
439         * gnulib/import/getcwd.c: Update.
440         * gnulib/import/getdtablesize.c: Update.
441         * gnulib/import/getlogin_r.c: Update.
442         * gnulib/import/getprogname.c: Update.
443         * gnulib/import/getprogname.h: Update.
444         * gnulib/import/gettext.h: Update.
445         * gnulib/import/gettimeofday.c: Update.
446         * gnulib/import/glob-libc.h: Update.
447         * gnulib/import/glob.c: Update.
448         * gnulib/import/glob.in.h: Update.
449         * gnulib/import/glob_internal.h: Update.
450         * gnulib/import/glob_pattern_p.c: Update.
451         * gnulib/import/globfree.c: Update.
452         * gnulib/import/hard-locale.c: Update.
453         * gnulib/import/hard-locale.h: Update.
454         * gnulib/import/intprops.h: Update.
455         * gnulib/import/inttypes.in.h: Update.
456         * gnulib/import/isnan.c: Update.
457         * gnulib/import/isnand-nolibm.h: Update.
458         * gnulib/import/isnand.c: Update.
459         * gnulib/import/isnanl-nolibm.h: Update.
460         * gnulib/import/isnanl.c: Update.
461         * gnulib/import/itold.c: Update.
462         * gnulib/import/libc-config.h: Update.
463         * gnulib/import/limits.in.h: Update.
464         * gnulib/import/localcharset.c: Update.
465         * gnulib/import/localcharset.h: Update.
466         * gnulib/import/localtime-buffer.c: Update.
467         * gnulib/import/localtime-buffer.h: Update.
468         * gnulib/import/lstat.c: Update.
469         * gnulib/import/m4/00gnulib.m4: Update.
470         * gnulib/import/m4/__inline.m4: Update.
471         * gnulib/import/m4/absolute-header.m4: Update.
472         * gnulib/import/m4/alloca.m4: Update.
473         * gnulib/import/m4/builtin-expect.m4: Update.
474         * gnulib/import/m4/canonicalize.m4: Update.
475         * gnulib/import/m4/chdir-long.m4: Update.
476         * gnulib/import/m4/close.m4: Update.
477         * gnulib/import/m4/closedir.m4: Update.
478         * gnulib/import/m4/configmake.m4: Update.
479         * gnulib/import/m4/d-ino.m4: Update.
480         * gnulib/import/m4/d-type.m4: Update.
481         * gnulib/import/m4/dirent_h.m4: Update.
482         * gnulib/import/m4/dirfd.m4: Update.
483         * gnulib/import/m4/dirname.m4: Update.
484         * gnulib/import/m4/double-slash-root.m4: Update.
485         * gnulib/import/m4/dup.m4: Update.
486         * gnulib/import/m4/dup2.m4: Update.
487         * gnulib/import/m4/eealloc.m4: Update.
488         * gnulib/import/m4/environ.m4: Update.
489         * gnulib/import/m4/errno_h.m4: Update.
490         * gnulib/import/m4/error.m4: Update.
491         * gnulib/import/m4/exponentd.m4: Update.
492         * gnulib/import/m4/exponentl.m4: Update.
493         * gnulib/import/m4/extensions.m4: Update.
494         * gnulib/import/m4/extern-inline.m4: Update.
495         * gnulib/import/m4/fchdir.m4: Update.
496         * gnulib/import/m4/fcntl-o.m4: Update.
497         * gnulib/import/m4/fcntl.m4: Update.
498         * gnulib/import/m4/fcntl_h.m4: Update.
499         * gnulib/import/m4/fdopendir.m4: Update.
500         * gnulib/import/m4/filenamecat.m4: Update.
501         * gnulib/import/m4/flexmember.m4: Update.
502         * gnulib/import/m4/float_h.m4: Update.
503         * gnulib/import/m4/fnmatch.m4: Update.
504         * gnulib/import/m4/fnmatch_h.m4: Update.
505         * gnulib/import/m4/fpieee.m4: Update.
506         * gnulib/import/m4/frexp.m4: Update.
507         * gnulib/import/m4/frexpl.m4: Update.
508         * gnulib/import/m4/fstat.m4: Update.
509         * gnulib/import/m4/fstatat.m4: Update.
510         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
511         * gnulib/import/m4/getcwd-path-max.m4: Update.
512         * gnulib/import/m4/getcwd.m4: Update.
513         * gnulib/import/m4/getdtablesize.m4: Update.
514         * gnulib/import/m4/getlogin.m4: Update.
515         * gnulib/import/m4/getlogin_r.m4: Update.
516         * gnulib/import/m4/getpagesize.m4: Update.
517         * gnulib/import/m4/getprogname.m4: Update.
518         * gnulib/import/m4/gettimeofday.m4: Update.
519         * gnulib/import/m4/glibc21.m4: Update.
520         * gnulib/import/m4/glob.m4: Update.
521         * gnulib/import/m4/glob_h.m4: Update.
522         * gnulib/import/m4/gnulib-cache.m4: Update.
523         * gnulib/import/m4/gnulib-common.m4: Update.
524         * gnulib/import/m4/gnulib-comp.m4: Update.
525         * gnulib/import/m4/gnulib-tool.m4: Update.
526         * gnulib/import/m4/hard-locale.m4: Update.
527         * gnulib/import/m4/include_next.m4: Update.
528         * gnulib/import/m4/inttypes-pri.m4: Update.
529         * gnulib/import/m4/inttypes.m4: Update.
530         * gnulib/import/m4/isnand.m4: Update.
531         * gnulib/import/m4/isnanl.m4: Update.
532         * gnulib/import/m4/largefile.m4: Update.
533         * gnulib/import/m4/limits-h.m4: Update.
534         * gnulib/import/m4/localcharset.m4: Update.
535         * gnulib/import/m4/locale-fr.m4: Update.
536         * gnulib/import/m4/locale-ja.m4: Update.
537         * gnulib/import/m4/locale-zh.m4: Update.
538         * gnulib/import/m4/localtime-buffer.m4: Update.
539         * gnulib/import/m4/longlong.m4: Update.
540         * gnulib/import/m4/lstat.m4: Update.
541         * gnulib/import/m4/malloc.m4: Update.
542         * gnulib/import/m4/malloca.m4: Update.
543         * gnulib/import/m4/math_h.m4: Update.
544         * gnulib/import/m4/mbrtowc.m4: Update.
545         * gnulib/import/m4/mbsinit.m4: Update.
546         * gnulib/import/m4/mbsrtowcs.m4: Update.
547         * gnulib/import/m4/mbstate_t.m4: Update.
548         * gnulib/import/m4/memchr.m4: Update.
549         * gnulib/import/m4/memmem.m4: Update.
550         * gnulib/import/m4/mempcpy.m4: Update.
551         * gnulib/import/m4/memrchr.m4: Update.
552         * gnulib/import/m4/mkdir.m4: Update.
553         * gnulib/import/m4/mkstemp.m4: Update.
554         * gnulib/import/m4/mmap-anon.m4: Update.
555         * gnulib/import/m4/mode_t.m4: Update.
556         * gnulib/import/m4/msvc-inval.m4: Update.
557         * gnulib/import/m4/msvc-nothrow.m4: Update.
558         * gnulib/import/m4/multiarch.m4: Update.
559         * gnulib/import/m4/nocrash.m4: Update.
560         * gnulib/import/m4/off_t.m4: Update.
561         * gnulib/import/m4/onceonly.m4: Update.
562         * gnulib/import/m4/open-cloexec.m4: Update.
563         * gnulib/import/m4/open.m4: Update.
564         * gnulib/import/m4/openat.m4: Update.
565         * gnulib/import/m4/opendir.m4: Update.
566         * gnulib/import/m4/pathmax.m4: Update.
567         * gnulib/import/m4/rawmemchr.m4: Update.
568         * gnulib/import/m4/readdir.m4: Update.
569         * gnulib/import/m4/readlink.m4: Update.
570         * gnulib/import/m4/realloc.m4: Update.
571         * gnulib/import/m4/rename.m4: Update.
572         * gnulib/import/m4/rewinddir.m4: Update.
573         * gnulib/import/m4/rmdir.m4: Update.
574         * gnulib/import/m4/save-cwd.m4: Update.
575         * gnulib/import/m4/secure_getenv.m4: Update.
576         * gnulib/import/m4/setenv.m4: Update.
577         * gnulib/import/m4/signal_h.m4: Update.
578         * gnulib/import/m4/ssize_t.m4: Update.
579         * gnulib/import/m4/stat-time.m4: Update.
580         * gnulib/import/m4/stat.m4: Update.
581         * gnulib/import/m4/std-gnu11.m4: Update.
582         * gnulib/import/m4/stdbool.m4: Update.
583         * gnulib/import/m4/stddef_h.m4: Update.
584         * gnulib/import/m4/stdint.m4: Update.
585         * gnulib/import/m4/stdio_h.m4: Update.
586         * gnulib/import/m4/stdlib_h.m4: Update.
587         * gnulib/import/m4/strchrnul.m4: Update.
588         * gnulib/import/m4/strdup.m4: Update.
589         * gnulib/import/m4/strerror.m4: Update.
590         * gnulib/import/m4/string_h.m4: Update.
591         * gnulib/import/m4/strstr.m4: Update.
592         * gnulib/import/m4/strtok_r.m4: Update.
593         * gnulib/import/m4/sys_socket_h.m4: Update.
594         * gnulib/import/m4/sys_stat_h.m4: Update.
595         * gnulib/import/m4/sys_time_h.m4: Update.
596         * gnulib/import/m4/sys_types_h.m4: Update.
597         * gnulib/import/m4/tempname.m4: Update.
598         * gnulib/import/m4/time_h.m4: Update.
599         * gnulib/import/m4/unistd-safer.m4: Update.
600         * gnulib/import/m4/unistd_h.m4: Update.
601         * gnulib/import/m4/warn-on-use.m4: Update.
602         * gnulib/import/m4/wchar_h.m4: Update.
603         * gnulib/import/m4/wchar_t.m4: Update.
604         * gnulib/import/m4/wctype_h.m4: Update.
605         * gnulib/import/m4/wint_t.m4: Update.
606         * gnulib/import/malloc.c: Update.
607         * gnulib/import/malloc/scratch_buffer.h: Update.
608         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
609         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
610         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
611         * gnulib/import/malloca.c: Update.
612         * gnulib/import/malloca.h: Update.
613         * gnulib/import/malloca.valgrind: Update.
614         * gnulib/import/math.in.h: Update.
615         * gnulib/import/mbrtowc.c: Update.
616         * gnulib/import/mbsinit.c: Update.
617         * gnulib/import/mbsrtowcs-impl.h: Update.
618         * gnulib/import/mbsrtowcs-state.c: Update.
619         * gnulib/import/mbsrtowcs.c: Update.
620         * gnulib/import/memchr.c: Update.
621         * gnulib/import/memmem.c: Update.
622         * gnulib/import/mempcpy.c: Update.
623         * gnulib/import/memrchr.c: Update.
624         * gnulib/import/mkdir.c: Update.
625         * gnulib/import/mkstemp.c: Update.
626         * gnulib/import/msvc-inval.c: Update.
627         * gnulib/import/msvc-inval.h: Update.
628         * gnulib/import/msvc-nothrow.c: Update.
629         * gnulib/import/msvc-nothrow.h: Update.
630         * gnulib/import/open.c: Update.
631         * gnulib/import/openat-die.c: Update.
632         * gnulib/import/openat-priv.h: Update.
633         * gnulib/import/openat-proc.c: Update.
634         * gnulib/import/openat.c: Update.
635         * gnulib/import/openat.h: Update.
636         * gnulib/import/opendir.c: Update.
637         * gnulib/import/pathmax.h: Update.
638         * gnulib/import/pipe-safer.c: Update.
639         * gnulib/import/rawmemchr.c: Update.
640         * gnulib/import/readdir.c: Update.
641         * gnulib/import/readlink.c: Update.
642         * gnulib/import/realloc.c: Update.
643         * gnulib/import/ref-add.sin: Update.
644         * gnulib/import/ref-del.sin: Update.
645         * gnulib/import/rename.c: Update.
646         * gnulib/import/rewinddir.c: Update.
647         * gnulib/import/rmdir.c: Update.
648         * gnulib/import/same-inode.h: Update.
649         * gnulib/import/save-cwd.c: Update.
650         * gnulib/import/save-cwd.h: Update.
651         * gnulib/import/scratch_buffer.h: Update.
652         * gnulib/import/secure_getenv.c: Update.
653         * gnulib/import/setenv.c: Update.
654         * gnulib/import/signal.in.h: Update.
655         * gnulib/import/stat-time.c: Update.
656         * gnulib/import/stat-time.h: Update.
657         * gnulib/import/stat-w32.c: Update.
658         * gnulib/import/stat-w32.h: Update.
659         * gnulib/import/stat.c: Update.
660         * gnulib/import/stdbool.in.h: Update.
661         * gnulib/import/stddef.in.h: Update.
662         * gnulib/import/stdint.in.h: Update.
663         * gnulib/import/stdio.in.h: Update.
664         * gnulib/import/stdlib.in.h: Update.
665         * gnulib/import/str-two-way.h: Update.
666         * gnulib/import/strchrnul.c: Update.
667         * gnulib/import/strdup.c: Update.
668         * gnulib/import/streq.h: Update.
669         * gnulib/import/strerror-override.c: Update.
670         * gnulib/import/strerror-override.h: Update.
671         * gnulib/import/strerror.c: Update.
672         * gnulib/import/string.in.h: Update.
673         * gnulib/import/stripslash.c: Update.
674         * gnulib/import/strnlen1.c: Update.
675         * gnulib/import/strnlen1.h: Update.
676         * gnulib/import/strstr.c: Update.
677         * gnulib/import/strtok_r.c: Update.
678         * gnulib/import/sys_stat.in.h: Update.
679         * gnulib/import/sys_time.in.h: Update.
680         * gnulib/import/sys_types.in.h: Update.
681         * gnulib/import/tempname.c: Update.
682         * gnulib/import/tempname.h: Update.
683         * gnulib/import/time.in.h: Update.
684         * gnulib/import/unistd--.h: Update.
685         * gnulib/import/unistd-safer.h: Update.
686         * gnulib/import/unistd.in.h: Update.
687         * gnulib/import/unsetenv.c: Update.
688         * gnulib/import/verify.h: Update.
689         * gnulib/import/extra/snippet/warn-on-use.h: Update.
690         * gnulib/import/wchar.in.h: Update.
691         * gnulib/import/wctype.in.h: Update.
692         * gnulib/import/xalloc-oversized.h: Update.
693         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
694         "53e2c179f26a890fa6685af4b6c1397ee370433b".
695
696 2018-08-16  Gary Benson <gbenson@redhat.com>
697
698         PR gdb/13000:
699         * gdb/main.c (captured_main_1): Exit with nonzero status
700         in batch mode if the last command to be executed failed.
701         * NEWS: Mention the above.
702
703 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
704
705         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
706         end of warning message.
707
708 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
709
710         PR gdb/22943:
711         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
712         (aarch64_extract_return_value): Use
713         aapcs_is_vfp_call_or_return_candidate.
714         (aarch64_return_in_memory): Likewise.
715         (aarch64_store_return_value): Likewise.
716
717 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
718
719         * aarch64-tdep.c
720         (aapcs_is_vfp_call_or_return_candidate): Make static
721         (pass_in_v_or_stack): Remove function.
722         (pass_in_v_vfp_candidate): New function.
723         (aarch64_push_dummy_call): Check for float register candidates.
724
725 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
726
727         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
728         (aapcs_is_vfp_call_or_return_candidate_1): New function.
729         (aapcs_is_vfp_call_or_return_candidate): Likewise.
730
731 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
732
733         PR build/23399
734         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
735         (struct ipa_sym_addresses): Rename to...
736         (struct ipa_sym_addresses_common): ... this.
737         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
738
739 2018-08-28  Tom Tromey  <tom@tromey.com>
740
741         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
742         (token_fifo): Now a std::vector.
743         (yylex, c_parse): Update.
744         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
745         (token_fifo): Now a std::vector.
746         (yylex, d_parse): Update.
747         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
748         (token_fifo): Now a std::vector.
749         (yylex, go_parse): Update.
750
751 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
752
753         * parser-defs.h (struct type_stack) <elements>: Change type to
754         std::vector<union type_stack_elt>.
755         <depth, size>: Remove.
756         * parse.c (parse_exp_in_context_1): Adjust.
757         (type_stack_reserve): Remove.
758         (check_type_stack_depth): Remove.
759         (insert_into_type_stack): Adjust to std::vector.
760         (insert_type): Likewise.
761         (push_type): Likewise.
762         (push_type_int): Likewise.
763         (insert_type_address_space): Likewise.
764         (pop_type): Likewise.
765         (pop_type_int): Likewise.
766         (pop_typelist): Likewise.
767         (pop_type_stack): Likewise.
768         (append_type_stack): Likewise.
769         (push_type_stack): Likewise.
770         (get_type_stack): Likewise.
771         (type_stack_cleanup): Likewise.
772         (push_typelist): Likewise.
773         (follow_types): Likewise.
774         (_initialize_parse): Likewise.
775
776 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
777
778         * NEWS: Mention csky target.
779
780 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
781             Hafiz Abid Qadeer  <abidh@codesourcery.com>
782             Don Breazeal  <donb@codesourcery.com>
783
784         * csky-linux-tdep.c: New file.
785         * csky-tdep.c: Likewise.
786         * csky-tdep.h: Likewise.
787         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
788         csky-tdep.o.
789         (HFILES_NO_SRCDIR): Add csky-tdep.h.
790         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
791         * configure.tgt: Add csky support.
792
793 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
794
795         * python/py-framefilter.c (py_print_frame): Print frame architecture
796         when printing on an MI output.
797
798 2018-08-27  Tom Tromey  <tom@tromey.com>
799
800         PR build/23087:
801         * configure: Rebuild.
802         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
803
804 2018-08-27  Tom Tromey  <tom@tromey.com>
805
806         * aarch64-linux-tdep.c
807         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
808         casts to int.
809
810 2018-08-27  Tom Tromey  <tom@tromey.com>
811
812         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
813         unsigned.
814         (ppc64_standard_linkage1, ppc64_standard_linkage2)
815         (ppc64_standard_linkage3, ppc64_standard_linkage4)
816         (ppc64_standard_linkage5, ppc64_standard_linkage6)
817         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
818         unsigned.
819
820 2018-08-27  Tom Tromey  <tom@tromey.com>
821
822         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
823         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
824
825 2018-08-27  Tom Tromey  <tom@tromey.com>
826
827         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
828         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
829         ULONGEST_MAX.
830         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
831         ULONGEST_MAX.
832         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
833         ULONGEST_MAX.
834         * sparc-linux-tdep.c (sparc32_linux_sigframe)
835         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
836         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
837         ULONGEST_MAX.
838         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
839         (ppc64_linux_sigaction_tramp_frame)
840         (ppc32_linux_sighandler_tramp_frame)
841         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
842         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
843         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
844         * mn10300-linux-tdep.c (am33_linux_sigframe)
845         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
846         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
847         * mips-linux-tdep.c (mips_linux_o32_sigframe)
848         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
849         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
850         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
851         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
852         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
853         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
854         * microblaze-linux-tdep.c
855         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
856         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
857         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
858         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
859         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
860         * common/common-types.h (ULONGEST_MAX): New define.
861         (CORE_ADDR_MAX): Fix formatting.
862         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
863         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
864         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
865         (arm_linux_rt_sigreturn_tramp_frame)
866         (arm_eabi_linux_sigreturn_tramp_frame)
867         (arm_eabi_linux_rt_sigreturn_tramp_frame)
868         (thumb2_eabi_linux_sigreturn_tramp_frame)
869         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
870         (arm_linux_restart_syscall_tramp_frame)
871         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
872         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
873         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
874         ULONGEST_MAX.
875         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
876
877 2018-08-27  Tom Tromey  <tom@tromey.com>
878
879         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
880         CORE_ADDR_MAX.
881         * mips-tdep.c (mips_deal_with_atomic_sequence)
882         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
883         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
884         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
885         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
886         CORE_ADDR_MAX.
887         * aarch64-tdep.c (aarch64_software_single_step): Use
888         CORE_ADDR_MAX.
889
890 2018-08-27  Tom Tromey  <tom@tromey.com>
891
892         * linespec.c (complete_linespec_component): Add cast to "char".
893         * completer.c (completion_tracker::build_completion_result): Add
894         cast to "char".
895
896 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
897
898         * solist.h (struct solist, struct target_so_ops): Fix
899         indentation.
900
901 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
902
903         * ada-tasks.c (ada_task_info_s): Remove typedef.
904         (DEF_VEC_O(ada_task_info_s)): Remove.
905         (struct ada_tasks_inferior_data): Initialize fields.
906         <task_list>: Make an std::vector.
907         (get_ada_tasks_inferior_data): Allocate with new.
908         (ada_get_task_number): Adjust.
909         (get_task_number_from_id): Likewise.
910         (valid_task_id): Likewise.
911         (ada_get_task_info_from_ptid): Likewise.
912         (iterate_over_live_ada_tasks): Likewise.
913         (add_ada_task): Likewise.
914         (read_known_tasks): Likewise.
915         (ada_build_task_list): Likewise.
916         (print_ada_task_info): Likewise.
917         (info_task): Likewise.
918         (task_command_1): Likewise.
919
920 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
921
922         * ada-lang.c (add_angle_brackets): Return std::string.
923
924 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
925
926         * python/py-threadevent.c (py_get_event_thread): Initialize
927         pythread.
928
929 2018-08-24  Pedro Alves  <palves@redhat.com>
930
931         * python/py-bpevent.c (create_breakpoint_event_object): Use
932         copy-initialization.
933         * python/py-continueevent.c (emit_continue_event): Use
934         copy-initialization.
935         * python/py-exitedevent.c (create_exited_event_object): Return a
936         gdbpy_ref<>.
937         (emit_exited_event): Use copy-initialization.
938         * python/py-inferior.c (python_new_inferior)
939         (python_inferior_deleted, add_thread_object): Use
940         copy-initialization.
941         * python/py-infevents.c (create_inferior_call_event_object)
942         (create_register_changed_event_object)
943         (create_memory_changed_event_object): Return a gdbpy_ref<>.
944         (emit_inferior_call_event, emit_memory_changed_event)
945         (emit_register_changed_event): Use copy-initialization.
946         * python/py-newobjfileevent.c (create_new_objfile_event_object):
947         Return a gdbpy_ref<>.
948         (emit_new_objfile_event): Use copy-initialization.
949         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
950         (emit_clear_objfiles_event): Use copy-initialization.
951         * python/py-signalevent.c (create_signal_event_object): Use
952         copy-initialization.
953         * python/py-threadevent.c (create_thread_event_object): Use
954         copy-initialization.
955
956 2018-08-24  Pedro Alves  <palves@redhat.com>
957             Simon Marchi  <simon.marchi@ericsson.com>
958
959         PR gdb/23379
960         * python/py-continueevent.c: Include "gdbthread.h".
961         (create_continue_event_object): Add intro comment.  Add 'ptid'
962         parameter.  Use it to find thread to pass to
963         create_thread_event_object.
964         (emit_continue_event): Pass PTID down to
965         create_continue_event_object.
966         * python/py-event.h (py_get_event_thread): Declare.
967         (create_thread_event_object): Remove default from 'thread'
968         parameter.
969         * python/py-stopevent.c (create_stop_event_object): Use
970         py_get_event_thread.
971         * python/py-threadevent.c (get_event_thread): Rename to ...
972         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
973         and use it to find the thread.
974         (create_thread_event_object): Assert that THREAD isn't null.
975         Don't find the event thread here.
976
977 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
978
979         * block.h (blockrange, blockranges): New struct declarations.
980         (struct block): Add new field named `ranges'.
981         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
982         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
983         macros for accessing ranges in struct block.
984         (make_blockranges): New declaration.
985         block.c (make_blockranges): New function.
986         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
987         for block.
988         * symtab.h (find_pc_partial_function): Add new parameter `block'.
989         * blockframe.c (cache_pc_function_block): New static global.
990         (clear_pc_function_cache): Clear cache_pc_function_block.
991         (find_pc_partial_function): Move comment to symtab.h.  Add
992         support for non-contiguous blocks.
993         * cli/cli-cmds.c (block.h): Include.
994         (print_disassembly): Handle printing of non-contiguous blocks.
995         (disassemble_current_function): Likewise.
996         (disassemble_command): Likewise.
997
998         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
999         BLOCK_START.
1000         * blockframe.c (get_pc_function_start): Likewise.
1001         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1002         (gcc_symbol_address): Likewise.
1003         * compile/compile-object-run.c (compile_object_run): Likewise.
1004         * compile/compile.c (get_expr_block_and_pc): Likewise.
1005         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1006         (func_addr_to_tail_call_list): Likewise.
1007         * findvar.c (default_read_var_value): Likewise.
1008         * inline-frame.c (inline_frame_this_id): Likewise.
1009         (skip-inline_frames): Likewise.
1010         * infcmd.c (until_next_command): Likewise.
1011         * linespec.c (convert_linespec_to_sals): Likewise.
1012         * parse.c (parse_exp_in_context_1): Likewise.
1013         * printcmd.c (build_address_symbolic): likewise.
1014         (info_address_command): Likewise.
1015         symtab.c (find_function_start_sal): Likewise.
1016         (skip_prologue_sal): Likewise.
1017         (find_function_alias_target): Likewise.
1018         (find_gnu_ifunc): Likewise.
1019         * stack.c (find_frame_funname): Likewise.
1020         * symtab.c (fixup_symbol_section): Likewise.
1021         (find_function_start_sal): Likewise.
1022         (skip_prologue_sal): Likewsie.
1023         (find_function_alias_target): Likewise.
1024         (find_gnu_ifunc): Likewise.
1025         * tracepoint.c (info_scope_command): Likewise.
1026         * value.c (value_fn_field): Likewise.
1027
1028         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1029         in place of find_pc_partial_function.
1030         * blockframe.c (find_function_entry_range_from_pc): New function.
1031         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1032         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1033         for each range in a block.
1034
1035
1036 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1037
1038         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1039         incrementation.
1040
1041 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1042
1043         * solib-svr4.c (read_program_headers_from_bfd): Return
1044         gdb::optional<gdb::byte_vector>.
1045         (svr4_exec_displacement): Adjust.
1046
1047 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1048
1049         * solib-svr4.c (read_program_header): Return
1050         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1051         (find_program_interpreter): Return
1052         gdb::optional<gdb::byte_vector>.
1053         (scan_dyntag_auxv): Adjust.
1054         (enable_break): Adjust.
1055         (svr4_exec_displacement): Adjust.
1056
1057 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1058
1059         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1060         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1061
1062 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1063
1064         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1065         string_vprintf.
1066         * guile/scm-utils.c (gdbscm_printf): Likewise.
1067         * serial.c (serial_printf): Likewise.
1068         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1069
1070 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1071
1072         * stack.c (print_frame): Print frame architecture when printing on
1073         an MI output.
1074         * NEWS: Mention new "arch" attribute in frame output.
1075
1076 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1077
1078         * arch/aarch64.h (aarch64_regnum): Update comment.
1079
1080 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1081
1082         * NEWS: Add SVE to 8.2 section.
1083
1084 2018-08-21  Pedro Alves  <palves@redhat.com>
1085
1086         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1087         out from gdbscm_parse_function_args.
1088         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1089         gdbscm_parse_function_args_1.
1090
1091 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1092
1093         PR gdb/17816
1094         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1095         operator.
1096
1097 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1098
1099         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1100
1101 2018-08-19  Michael Spang  <spang@google.com>
1102
1103         PR gdb/11786
1104         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1105         for PT_TLS segments.
1106
1107 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1108
1109         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1110         dwarf_variable_value.
1111         * dwarf2-frame.c (class dwarf_expr_executor):
1112         Add override for dwarf_variable_value.
1113         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1114         (class symbol_needs_eval_context): Likewise.
1115         (indirect_synthetic_pointer): Add forward declaration.
1116         (sect_variable_value): New function.
1117         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1118         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1119         for DW_OP_GNU_variable_value.
1120
1121 2018-08-16  Tom Tromey  <tom@tromey.com>
1122
1123         * top.c (read_command_file): Update.
1124         (command_line_input): Remove "repeat" argument.
1125         * ada-lang.c (get_selections): Update.
1126         * linespec.c (decode_line_2): Update.
1127         * defs.h (command_line_input): Remove argument.
1128         * cli/cli-script.c (read_next_line): Update.
1129         * python/py-gdb-readline.c: Update.
1130
1131 2018-08-17  Tom Tromey  <tom@tromey.com>
1132
1133         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1134         command_line_input.
1135
1136 2018-08-15  Tom Tromey  <tom@tromey.com>
1137
1138         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1139
1140 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1141
1142         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1143         If used, use find_pc_partial_function to find address range
1144         to disassemble.
1145         * mi/mi-main.c (mi_cmd_list_features): Report
1146         "data-disassemble-a-option" feature.
1147         * NEWS: Mention new -data-disassemble option -a.
1148
1149 2018-08-13  Tom Tromey  <tom@tromey.com>
1150
1151         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1152
1153 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1154
1155         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1156         (aarch64_linux_collect_sve_regset): Likewise.
1157         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1158         * regcache.h (regcache_map_entry_size): New function.
1159
1160 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1161
1162         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1163         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1164         (SVE_HEADER_VL_LENGTH): Likewise.
1165         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1166         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1167         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1168         (SVE_HEADER_SIZE_OFFSET): Likewise.
1169         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1170         (SVE_HEADER_VL_OFFSET): Likewise.
1171         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1172         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1173         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1174         (SVE_HEADER_SIZE): Likewise.
1175         (aarch64_linux_core_read_vq): Add function.
1176         (aarch64_linux_core_read_description): Check for SVE section.
1177
1178 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1179
1180         * aarch64-fbsd-tdep.c
1181         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1182         collect_size.
1183         * aarch64-linux-tdep.c
1184         (aarch64_linux_iterate_over_regset_sections): Likewise.
1185         * alpha-linux-tdep.c
1186         (alpha_linux_iterate_over_regset_sections):
1187         * alpha-nbsd-tdep.c
1188         (alphanbsd_iterate_over_regset_sections): Likewise.
1189         * amd64-fbsd-tdep.c
1190         (amd64fbsd_iterate_over_regset_sections): Likewise.
1191         * amd64-linux-tdep.c
1192         (amd64_linux_iterate_over_regset_sections): Likewise.
1193         * arm-bsd-tdep.c
1194         (armbsd_iterate_over_regset_sections): Likewise.
1195         * arm-fbsd-tdep.c
1196         (arm_fbsd_iterate_over_regset_sections): Likewise.
1197         * arm-linux-tdep.c
1198         (arm_linux_iterate_over_regset_sections): Likewise.
1199         * corelow.c (get_core_registers_cb): Likewise.
1200         (core_target::fetch_registers): Likewise.
1201         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1202         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1203         * gdbarch.h (void): Regenerate.
1204         * gdbarch.sh: Add supply_size and collect_size.
1205         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1206         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1207         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1208         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1209         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1210         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1211         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1212         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1213         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1214         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1215         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1216         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1217         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1218         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1219         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1220         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1221         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1222         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1223         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1224         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1225         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1226         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1227         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1228         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1229         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1230         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1231         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1232         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1233         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1234         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1235
1236 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1237
1238         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1239         with string_printf.
1240
1241 2018-08-10  Keith Seitz  <keiths@redhat.com>
1242
1243         * compile/compile-c-support.c (add_code_header, add_code_footer):
1244         Move into policy class.
1245         (c_push_user_expression, pop_user_expression_nop)
1246         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1247         (compile_program): New host class.
1248         (c_compile_program): New typedef.
1249         (c_compute_porgram): Use c_compile_program.
1250
1251 2018-08-10  Keith Seitz  <keiths@redhat.com>
1252
1253         * compile/compile-internal.h (compile_instance::~compile_instance):
1254         Remove calls to htab_delete.
1255         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1256         * compile.c (compile_instance::compile_instance): Initialize
1257         htab unique pointers.
1258         (compile_instance::get_cached_type, compile_instance::insert_type)
1259         (compile_instance::error_symbol_once): Update for unique_ptr.
1260
1261 2018-08-10  Keith Seitz  <keiths@redhat.com>
1262
1263         * compile/compile-c-symbols.c (struct symbol_error)
1264         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1265         (compile_instance::insert_symbol_error)
1266         (compile_instance::error_symbol_once): Move to ...
1267         * compile/compile.c: ... here.
1268
1269 2018-08-10  Keith Seitz  <keiths@redhat.com>
1270
1271         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1272         instead of `new_compile_instance'.
1273         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1274         Update description.
1275         If the symbol error map is not initialized, create it.
1276         (generate_c_for_for_one_symbol): Do not check/initialize
1277         the symbol error map.
1278         * compile/compile-c-types.c (compile_c_instance): Make a class.
1279         Update all callers.
1280         (compile_instance::compile_instance): Initialize the type cache.
1281         (get_cached_type): New function.
1282         (insert_type): Update description.
1283         (compile_c_instance::m_default_cflags): Define.
1284         (convert_type): Update description.  Use get_cached_type.
1285         (delete_instance): Moved to destructor.
1286         (new_compile_instance): Moved to constructor.
1287         * compile/compile-c.h (compile_c_instance): Make class inheriting
1288         from compile_instance.
1289         <base>: Remove field.
1290         <type_map, symbol_err_map>: Move to base class.
1291         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1292         * compile/compile-internal.h (compile_instance): Make class.
1293         <type_map_t, symbol_err_map_t>: Define.
1294         <fe>: Rename to `m_gcc_fe'.
1295         <scope, block, gcc_target_options>: Add `m_' prefix.
1296         <m_type_map, m_symbol_err_map>: New fields, moved from
1297         compile_c_instance.
1298         <destroy>: Remove.
1299         (convert_type, new_compile_instance): Remove.
1300         * compile/compile.c (cleanup_compile_instance): Remove.
1301         (compile_to_object): Use unique_ptr to eliminate cleanups.
1302         (compile_instance::set_print_callback, compile_instance::version)
1303         (compile_instance::set_verbose)
1304         (compile_instance::set_driver_filename)
1305         (compile_instance::set_triplet_regexp)
1306         (compile_instance::set_arguments)
1307         (compile_instance::set_source_file)
1308         (compile_instance::compile): Define.
1309
1310 2018-08-10  Keith Seitz  <keiths@redhat.com>
1311
1312         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1313         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1314         gcc-c-fe.def to define C plugin.
1315         (delete_instance): Delete `c_plugin'.
1316         (new_compile_instance): Initialize `c_plugin'.
1317         * compile/compile-c.h: Include gcc_c_plugin.h.
1318         (struct compile_c_instance) <c_plugin>: New member.
1319         * gcc-c-plugin.h: New file.
1320         Update all callers with API change.
1321
1322 2018-08-10  Keith Seitz  <keiths@redhat.com>
1323
1324         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1325         (HFILES_NO_SRCDIR): ... to here.
1326         Add compile-internal.h and compile-c.h.
1327         * compile/compile-c-support.c: Include compile-c.h.
1328         * compile/compile-c-symbols.c: Include compile-c.h.
1329         (generate_c_for_variable_locations): Update comment.
1330         * compile/compile-c-types.c: Include compile-c.h.
1331         * compile/compile-c.h: New file -- moved C language declarations
1332         from other files here.
1333         * compile/compile-internal.h: Do not include hashtab.h or
1334         common/enum-flags.h.
1335         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1336         (gcc_convert_symbol, gcc_symbol_address)
1337         (generate_c_for_variable_locations, c_get_mode_for_size)
1338         (c_get_range_decl_name): Definitions moved to compile-c.h.
1339         * compile/compile-loc2c.c: Include compile-c.h.
1340
1341 2018-08-10  Keith Seitz  <keiths@redhat.com>
1342
1343         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1344         (c_symbol_substitution_name): ... this.
1345         Update all callers.
1346
1347 2018-08-10  Keith Seitz  <keiths@redhat.com>
1348
1349         * compile/compile-c-support.c (c_compute_program): Use
1350         unique_xmalloc_ptr to eliminate cleanup.
1351         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1352         Return a unique_xmalloc_ptr and eliminate cleanup.
1353         * compile/compile-internal.h (generate_c_for_variable_locations):
1354         Return unique_xmalloc_ptr and update description.
1355
1356 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1357
1358         * corelow.c (core_target::get_core_register_section): Rename
1359         min_size to section_min_size.
1360
1361 2018-08-09  Jim Wilson  <jimw@sifive.com>
1362
1363         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1364         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1365         * NEWS: Mention new GNU/Linux RISC-V target.
1366         * configure.host: Add riscv*-*-linux*.
1367         * configure.nat: Add riscv*.
1368         * configure.tgt: Add riscv*-*-linux*.
1369         * riscv-linux-nat.c: New file.
1370         * riscv-linux-tdep.c: New file.
1371
1372 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1373
1374         * infrun.c (resume): Make static, add forward declaration.
1375         (proceed): Update header comment.
1376         * infrun.h (resume): Delete declaration.
1377
1378 2018-08-09  Tom Tromey  <tom@tromey.com>
1379
1380         * riscv-tdep.h: Minor formatting fixes.
1381
1382 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1383
1384         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1385         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1386         (test_mkdir_recursive): Likewise.
1387         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1388
1389 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1390
1391         * valarith.c (value_subscripted_rvalue): If an array is not in
1392         memory, and we don't know the upper bound, then we can't know that
1393         the requested element exists or not.
1394
1395 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1396
1397         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1398         (target_options_to_string): Add comment.
1399
1400 2018-08-08  Tom Tromey  <tom@tromey.com>
1401
1402         * unittests/scoped_mmap-selftests.c: Check result of "write".
1403
1404 2018-08-08  Jim Wilson  <jimw@sifive.com>
1405
1406         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1407         (decode_register_index_short): New.
1408         (decode_j_type_insn, decode_cj_type_insn): New.
1409         (decode_b_type_insn, decode_cb_type_insn): New.
1410         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1411         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1412         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1413         is_c_sw_insn instead of is_sw_insn.
1414         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1415         (riscv_software_single_step): New.
1416         * riscv-tdep.h (riscv_software_single_step): Declare.
1417
1418         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1419         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1420
1421 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1422
1423         PR gdb/18050:
1424         * target.c (dispose_inferior): Don't dispose of inferiors that are
1425         already killed.
1426
1427 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1428
1429         * remote.c (remote_target::download_tracepoint): Change char* to
1430         const char*.
1431
1432 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1433
1434         * target.h (target_options_to_string): Return an std::string.
1435         * target.c (str_comma_list_concat_elem): Return void, use
1436         std::string.
1437         (do_option): Likewise.
1438         (target_options_to_string): Return an std::string.
1439         * linux-nat.c (linux_nat_target::wait): Adjust.
1440         * target-debug.h (target_debug_print_options): Adjust.
1441
1442 2018-08-07  Tom Tromey  <tom@tromey.com>
1443
1444         * Makefile.in (CPPFLAGS): New variable.
1445         (INTERNAL_CPPFLAGS): Use it.
1446
1447 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1448
1449         * NEWS: Mention the index cache.
1450
1451 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1452
1453         * common/pathstuff.h (get_standard_cache_dir): New.
1454         * common/pathstuff.c (get_standard_cache_dir): New.
1455         * build-id.h (build_id_to_string): New.
1456         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1457         DEBUG_STR_SUFFIX): Move to here.
1458         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1459         DEBUG_STR_SUFFIX): Move from there.
1460         (write_psymtabs_to_index): Make non-static, add basename
1461         parameter.  Write to temporary files, rename when done.
1462         (save_gdb_index_command): Adjust call to
1463         write_psymtabs_to_index.
1464         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1465         field.
1466         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1467         (get_gdb_index_contents_from_cache): New.
1468         (get_gdb_index_contents_from_cache_dwz): New.
1469         (dwarf2_initialize_objfile): Read index from cache.
1470         (dwarf2_build_psymtabs): Save to index.
1471         * dwarf-index-cache.h: New file.
1472         * dwarf-index-cache.c: New file.
1473         * dwarf-index-write.h: New file.
1474
1475 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1476
1477         * gnulib/aclocal.m4: Re-generate.
1478         * gnulib/config.in: Re-generate.
1479         * gnulib/configure: Re-generate.
1480         * gnulib/import/Makefile.am: Re-generate.
1481         * gnulib/import/Makefile.in: Re-generate.
1482         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1483         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1484         * gnulib/import/m4/mkdir.m4: New file.
1485         * gnulib/import/mkdir.c: New file.
1486         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1487         module.
1488
1489 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1490
1491         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1492         * common/scoped_mmap.c: New file.
1493         * common/scoped_mmap.h (destroy): New method.
1494         (~scoped_mmap, reset): Use destroy.
1495         (scoped_mmap): New move constructor.
1496         (mmap_file): New declaration.
1497         * unittests/scoped_mmap-selftests.c (test_normal,
1498         test_invalid_filename, run_tests): New functions.
1499         (_initialize_scoped_mmap_selftests): Register selftest.
1500
1501 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1502
1503         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1504         (read_gdb_index_from_buffer): ... this.  Remove section
1505         parameter, add buffer parameter.
1506         (get_gdb_index_contents_ftype,
1507         get_gdb_index_contents_dwz_ftype): New typedefs.
1508         (dwarf2_read_gdb_index): Add callback parameters to get the
1509         index contents.
1510         (get_gdb_index_contents_from_section): New.
1511         (dwarf2_initialize_objfile): Update call to
1512         dwarf2_read_gdb_index.
1513
1514 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1515
1516         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1517         (gdb_open_cloexec): Likewise.
1518         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1519         (commandline_from_pid): Likewise.
1520         (linux_xfer_osdata_threads): Likewise.
1521         (linux_xfer_osdata_fds): Likewise.
1522         * ada-lang.c (is_package_name): Likewise.
1523         * auxv.c (procfs_xfer_auxv): Likewise.
1524         * breakpoint.c (print_one_breakpoint_location): Use
1525         uiout::field_fmt.
1526         (print_one_catch_solib): Use string_printf.
1527         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1528         (add_pe_forwarded_sym): Likewise.
1529         * dwarf2read.c (create_type_unit_group): Likewise.
1530         (build_error_marker_type): Likewise.
1531         * infcall.c (get_function_name): Likewise.
1532         * valprint.c (print_converted_chars_to_obstack): Likewise.
1533         * xtensa-tdep.c (xtensa_register_type): Likewise.
1534
1535 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1536
1537         * remote.c (remote_target::download_tracepoint): Fix format
1538         string errors.
1539
1540 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1541
1542         * tracefile.c: Include common/byte-vector.h.
1543         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1544         with trace_regblock_size if needed.  Update uses of buf.
1545
1546 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1547
1548         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1549         std::vector<unsigned char>.
1550         * tracepoint.c (collection_list::collection_list): Remove
1551         m_regs_mask initializer from initializer list.  Resize
1552         m_regs_mask using the largest remote register number.
1553         (collection_list::add_remote_register): Remove size check on
1554         m_regs_mask.  Use at to access element.
1555         (collection_list::stringify): Change type of temp_buf to
1556         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1557         stringify the register mask.  Use pack_hex_byte for the register
1558         mask.
1559
1560 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1561
1562         * tracepoint.h (class collection_list) <add_register>: Remove.
1563         <add_remote_register, add_ax_registers, add_local_register>:
1564         Declare.
1565         <add_memrange>: Add scope parameter.
1566         * tracepoint.c (encode_actions_1): Likewise.
1567         (collection_list::add_register): Rename to ...
1568         (collection_list::add_remote_register): ... this.  Update
1569         comment.
1570         (collection_list::add_ax_registers, add_local_register): New
1571         methods.
1572         (collection_list::add_memrange): Add scope parameter.  Call
1573         add_local_register instead of add_register.
1574         (finalize_tracepoint_aexpr): New function.
1575         (collection_list::collect_symbol): Update calls to add_memrange.
1576         Call add_local_register instead of add_register.  Call
1577         add_ax_registers.  Call finalize_tracepoint_aexpr.
1578         (encode_actions_1): Get remote regnos for $reg action.  Call
1579         add_remote_register, add_ax_registers, and add_local_register.
1580         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1581         (validate_actionline): Call finalize_tracepoint_aexpr.
1582
1583 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1584
1585         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1586         Replace array buf with gdb::char_vector buf, of size
1587         get_remote_packet_size ().  Replace references to buf and
1588         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1589         and xsnprintf with snprintf.  Raise errors if the buffer is too
1590         small.
1591
1592 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1593
1594         * remote.c (remote_target::download_tracepoint): Fix the has_more
1595         predicate in the QTDP action list iteration.
1596
1597 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1598
1599         * remote.c (remote_target::download_tracepoint): Fix indentation
1600         in for block.
1601
1602 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1603
1604         * proc-api.c (_initialize_proc_api): Remove c, unused.
1605         * procfs.c (procfs_init_inferior): Remove signals, unused.
1606         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1607         unused.
1608
1609 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1610             Andrew Burgess  <andrew.burgess@embecosm.com>
1611
1612         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1613         'W_STOPCODE (0)' as this could be ambiguous.
1614
1615 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1616
1617         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1618         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1619         "ai_socktype").
1620
1621 2018-08-02  Tom Tromey  <tom@tromey.com>
1622
1623         PR symtab/16842.
1624         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1625         symbols.
1626         (process_structure_scope): Likewise.
1627
1628 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1629
1630         PR gdb/22629:
1631         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1632         kill inferior.
1633
1634 2018-08-02  Tom Tromey  <tom@tromey.com>
1635
1636         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1637         (darwin_suspend_inferior, darwin_resume_inferior)
1638         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1639         (darwin_check_new_threads): Check result of get_darwin_inferior.
1640
1641 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1642
1643         GDB 8.1.1 released.
1644
1645 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1646
1647         * varobj.c (varobj_get_path_expr_parent): Report an error if
1648         parent is a dynamic varobj.
1649
1650 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1651
1652         * gnulib/aclocal.m4: Re-generate.
1653         * gnulib/config.in: Re-generate.
1654         * gnulib/configure: Re-generate.
1655         * gnulib/import/Makefile.in: Re-generate.
1656         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1657         * gnulib/import/m4/onceonly.m4: Re-generate.
1658
1659 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1660
1661         * target-descriptions.c (struct xml_test_tdesc): New.
1662         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1663         (record_xml_tdesc): Update.
1664         (maintenance_check_xml_descriptions): Update.
1665         * target-descriptions.h (record_xml_tdesc): Update comment.
1666
1667 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1668
1669         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1670         checking array bounds are defined.
1671
1672 2018-07-30  Tom Tromey  <tom@tromey.com>
1673
1674         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1675         irreflexivity violation.
1676
1677 2018-07-30  Tom Tromey  <tom@tromey.com>
1678
1679         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1680         * value.c (unpack_long): Remove lint code.
1681         * valops.c (value_ind): Remove lint code.
1682         * valarith.c (value_x_binop, value_x_unop, value_equal)
1683         (value_pos): Remove lint code.
1684
1685 2018-07-28  Tom de Vries  <tdevries@suse.de>
1686
1687         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1688         with undefined upper bound as <optimized out>.
1689
1690 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1691
1692         * gcore.in: Rename variable "name" to "prefix".  Expand
1693         "usage" text.
1694
1695 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1696
1697         * windows-nat.c (windows_nat_target::create_inferior): Update to
1698         call close() in global namespace.
1699
1700 2018-07-26  Tom Tromey  <tom@tromey.com>
1701
1702         * dwarf-index-write.c (add_address_entry): Don't add objfile
1703         offsets.
1704         * dbxread.c (find_stab_function): Rename from
1705         find_stab_function_addr.  Return a bound_minimal_symbol.
1706         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1707         Don't add objfile offsets.
1708         (end_psymtab): Use raw_text_low, raw_text_high,
1709         MSYMBOL_VALUE_RAW_ADDRESS.
1710         (read_ofile_symtab): Update.
1711         (process_one_symbol): Update.
1712         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1713         offsets.
1714         (dw2_relocate): Remove.
1715         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1716         searching addrmap.
1717         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1718         Update.
1719         (process_psymtab_comp_unit_reader, add_partial_symbol)
1720         (add_partial_subprogram, dwarf2_ranges_read): Update.
1721         (load_partial_dies): Update.
1722         (add_address_entry): Don't add objfile offsets.
1723         (dwarf2_build_include_psymtabs): Update.
1724         (create_addrmap_from_aranges): Don't add objfile offsets.
1725         (dw2_find_pc_sect_compunit_symtab): Update.
1726         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1727         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1728         Update.
1729         (parse_partial_symbols): Don't add objfile offsets.  Use
1730         raw_text_low, raw_text_high.  Update.
1731         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1732         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1733         or call 'relocate' quick function.  Clear psymbol_map.
1734         * psympriv.h (struct partial_symbol) <address>: Add section
1735         offset.
1736         <set_unrelocated_address>: Rename from set_address.
1737         <raw_text_low, raw_text_high>: New methods.
1738         <text_low, text_high>: Add objfile parameter.
1739         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1740         set_unrelocated_address.
1741         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1742         (find_pc_psymbol): Update.
1743         (fixup_psymbol_section, relocate_psymtabs): Remove.
1744         (dump_psymtab, psym_functions): Update.
1745         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1746         parameter.
1747         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1748         (start_psymtab_common): Update.
1749         * symfile-debug.c (debug_qf_relocate): Remove.
1750         (debug_sym_quick_functions): Update.
1751         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1752         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1753         Update.
1754
1755 2018-07-26  Tom Tromey  <tromey@redhat.com>
1756
1757         * dbxread.c (end_psymtab): Use text_high_valid and
1758         text_low_valid.
1759         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1760         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1761         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1762         Update comment.
1763         <text_low_valid, text_high_valid>: New fields.
1764         <set_text_low, set_text_high>: Update.
1765         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1766
1767 2018-07-26  Tom Tromey  <tom@tromey.com>
1768
1769         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1770         Update.
1771         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1772         textlow and texthigh fields.
1773         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1774         Update.
1775         * mdebugread.c (parse_lines, parse_partial_symbols)
1776         (psymtab_to_symtab_1): Update.
1777         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1778         Rename fields.  Update comment.  Now private.
1779         <text_low, text_high, set_text_low, set_text_high>: New methods.
1780         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1781         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1782         (start_psymtab_common, maintenance_info_psymtabs)
1783         (maintenance_check_psymtabs): Update.
1784         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1785         texthigh fields.
1786         (scan_xcoff_symtab): Update.
1787
1788 2018-07-26  Tom Tromey  <tromey@redhat.com>
1789
1790         * psympriv.h (struct partial_symbol) <unrelocated_address,
1791         address, set_address>: New methods.
1792         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1793         (fixup_psymbol_section, relocate_psymtabs): Update.
1794         (print_partial_symbols): Add 'objfile' parameter.  Update.
1795         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1796         Update.
1797
1798 2018-07-26  Tom Tromey  <tom@tromey.com>
1799
1800         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1801         (debug_names::write_psymbols): Update.
1802         * psympriv.h (struct partial_symbol): Derive from
1803         general_symbol_info.
1804         <obj_section>: New method.
1805         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1806         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1807         (find_pc_sect_psymbol, fixup_psymbol_section)
1808         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1809         (print_partial_symbols, recursively_search_psymtabs)
1810         (compare_psymbols, psymbol_hash, psymbol_compare)
1811         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1812         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1813
1814 2018-07-26  Tom Tromey  <tromey@redhat.com>
1815
1816         * dbxread.c (end_psymtab): Remove dead code.
1817
1818 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1819
1820         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1821         DWARF unwinders are disabled.
1822         * dwarf2-frame.c: Add dwarf2read.h include.
1823         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1824         disabled.
1825         (dwarf2_frame_unwinders_enabled_p): Define.
1826         (show_dwarf_unwinders_enabled_p): New function.
1827         (_initialize_dwarf2_frame): Register switch to control DWARF
1828         unwinder use.
1829         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1830         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1831         (show_dwarf_cmdlist): Remove static keyword.
1832         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1833         (show_dwarf_cmdlist): Declare.
1834         * NEWS: Document new feature.
1835
1836 2018-07-26  Tom de Vries  <tdevries@suse.de>
1837
1838         PR breakpoints/23366
1839         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1840
1841 2018-07-26  Tom de Vries  <tdevries@suse.de>
1842
1843         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1844         DW_AT_count can't be translated to a dynamic prop.
1845
1846 2018-07-25  Tom de Vries  <tdevries@suse.de>
1847
1848         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1849         try/catch.
1850
1851 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1852
1853         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1854
1855 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1856
1857         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1858
1859 2018-07-24  Keith Seitz  <keiths@redhat.comt
1860
1861         PR symtab/23010
1862         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1863         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1864         instead of add_symbol_to_list.
1865         (read_file_scope): Call prepare_one_comp_unit before reading
1866         any other DIEs.
1867
1868 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1869
1870         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1871
1872 2018-07-24  Tom Tromey  <tom@tromey.com>
1873
1874         * utils.c (malloc, realloc, free): Don't declare.
1875         * configure, config.in: Rebuild.
1876         * configure.ac: Don't check for declarations of free, malloc, or
1877         realloc.
1878
1879 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1880
1881         * aarch64-linux-nat.c
1882         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1883         variable.
1884         * arm-linux-nat.c (fetch_regs): Likewise.
1885         (store_regs): Likewise.
1886         (fetch_vfp_regs): Likewise.
1887         (store_vfp_regs): Likewise.
1888         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1889         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1890         (arm_linux_nat_target::insert_watchpoint): Likewise.
1891         (arm_linux_nat_target::remove_watchpoint): Likewise.
1892         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1893         Likewise.
1894         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1895         Likewise.
1896         * ppc-linux-nat.c (fetch_register): Likewise.
1897         (fetch_all_gp_regs): Likewise.
1898         (fetch_ppc_registers): Likewise.
1899         (store_all_gp_regs): Likewise.
1900         (store_ppc_registers): Likewise.
1901         (hwdebug_insert_point): Likewise.
1902         (can_use_watchpoint_cond_accel): Likewise.
1903         * remote-sim.c (gdb_os_write_stdout): Likewise.
1904
1905 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1906             Tom Tromey  <tom@tromey.com>
1907
1908         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1909         test for it.
1910         * configure: Rebuild.
1911
1912 2018-07-22  Tom Tromey  <tom@tromey.com>
1913
1914         * regformats/regdat.sh: Define xmltarget_${name} inside
1915         #ifndef IN_PROCESS_AGENT.
1916
1917 2018-07-22  Tom Tromey  <tom@tromey.com>
1918
1919         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1920
1921 2018-07-22  Tom Tromey  <tom@tromey.com>
1922
1923         * symfile.c (reread_symbols): Notify iter, not objfile.
1924
1925 2018-07-22  Tom Tromey  <tom@tromey.com>
1926
1927         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1928         Use arch_ops.
1929         (ravenscar_thread_target::prepare_to_store): Likewise.
1930
1931 2018-07-22  Tom Tromey  <tom@tromey.com>
1932
1933         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1934         unused variable.  Call value_fetch_lazy when needed.
1935         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1936         Remove unused variable.  Call value_fetch_lazy when needed.
1937
1938 2018-07-22  Tom Tromey  <tom@tromey.com>
1939
1940         * m32c-tdep.c (mark_dma): Return void.
1941         (make_regs): Remove unused declarations.
1942
1943 2018-07-22  Tom Tromey  <tom@tromey.com>
1944
1945         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1946         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1947         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1948         bkscm_get_valid_block_smob_arg_unsafe for effect.
1949
1950 2018-07-22  Tom Tromey  <tom@tromey.com>
1951
1952         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1953         value_type.
1954
1955 2018-07-22  Tom Tromey  <tom@tromey.com>
1956
1957         * windows-nat.c (saved_context): Conditionally define.
1958         * remote.c (remote_target::remote_btrace_maybe_reopen):
1959         Conditionally declare "warned".
1960         * inflow.c (sigquit_ours): Conditionally define.
1961         (new_tty): Move "tty" declaration inside #if.
1962         * guile/guile.c (guile_datadir): Conditionally define.
1963         * charset.c (set_be_le_names): Move some declarations inside #if.
1964         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1965         #if.
1966         (parse_xml_btrace_conf): Likewise.
1967
1968 2018-07-22  Tom Tromey  <tom@tromey.com>
1969
1970         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1971
1972 2018-07-22  Tom Tromey  <tom@tromey.com>
1973
1974         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1975         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1976         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1977         * buildsym-legacy.c (get_macro_table): Remove unused variable.
1978         * stack.c (frame_apply_level_command): Remove unused variable.
1979         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1980         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1981         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1982         unused variable.
1983         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1984         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1985         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1986         variable.
1987         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1988         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1989         variable.
1990         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1991         Remove unused variable.
1992         * cli/cli-script.c (recurse_read_control_structure): Remove unused
1993         variable.
1994         * common/tdesc.c (print_xml_feature::visit): Remove unused
1995         variable.
1996         * compile/compile-object-load.c (store_regs): Remove unused
1997         variables.
1998         * complaints.c (clear_complaints): Remove unused variable.
1999         * corelow.c (core_target_open): Remove unused variable.
2000         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2001         variable.
2002         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2003         variable.
2004         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2005         variable.
2006         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2007         variable.
2008         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2009         variable.
2010         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2011         variable.
2012         * ia64-tdep.c (examine_prologue): Remove unused variable.
2013         * infcall.c (run_inferior_call): Remove unused variable.
2014         * inferior.c (exit_inferior): Remove unused variable.
2015         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2016         * linespec.c (decode_line_2): Remove unused variable.
2017         * linux-nat.c (super_close): Remove.
2018         * linux-tdep.c (linux_info_proc): Remove unused variable.
2019         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2020         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2021         Remove unused variable.
2022         * parse.c (find_minsym_type_and_address): Remove unused variable.
2023         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2024         variable.
2025         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2026         variable.
2027         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2028         variables.
2029         * record-btrace.c (record_btrace_target::store_registers): Remove
2030         unused variable.
2031         (cmd_show_record_btrace_cpu): Remove unused variable.
2032         * riscv-tdep.c (riscv_register_reggroup_p)
2033         (riscv_push_dummy_call, riscv_return_value): Remove unused
2034         variable.
2035         * rust-exp.y (literal): Remove unused variable.
2036         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2037         unused variable.
2038         <STRUCTOP_ANONYMOUS>: Likewise.
2039         * s390-linux-tdep.c (s390_linux_init_abi_31)
2040         (s390_linux_init_abi_64): Remove unused variable.
2041         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2042         (file_select_thread, net_windows_open, _initialize_ser_windows):
2043         Remove unused variables.
2044         * symtab.c (find_pc_sect_line): Remove unused variable.
2045         * target-memory.c (compute_garbled_blocks): Remove unused
2046         variable.
2047         (target_write_memory_blocks): Remove unused variable.
2048         * target.c (target_stack::unpush): Remove unused variables.
2049         * tracepoint.c (start_tracing, all_tracepoint_actions)
2050         (merge_uploaded_trace_state_variables)
2051         (print_one_static_tracepoint_marker): Remove unused variable.
2052         * unittests/basic_string_view/element_access/char/1.cc (test01):
2053         Remove unused variable.
2054         * windows-nat.c (windows_continue, windows_add_all_dlls)
2055         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2056         Remove unused variables.
2057
2058 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2059
2060         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2061         attr_profile in HAVE_ELF.
2062         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2063         HAVE_ELF.
2064
2065 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2066
2067         * frame.c (frame_register_unwind): Change parameter name.
2068         (frame_unwind_register): Likewise.
2069         (frame_unwind_register_value): Likewise.
2070         (frame_unwind_register_signed): Likewise.
2071         (frame_unwind_register_unsigned): Likewise.
2072         * frame.h (frame_register_unwind): Likewise.
2073         (frame_unwind_register): Likewise.
2074         (frame_unwind_register_value): Likewise.
2075         (frame_unwind_register_signed): Likewise.
2076         (frame_unwind_register_unsigned): Likewise.
2077         (frame_unwind_arch): Likewise.
2078
2079 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2080
2081         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2082         ISA maintenance.
2083
2084 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2085
2086         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2087         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2088         hand.
2089
2090 2018-07-20  Keith Seitz  <keiths@redhat.com>
2091
2092         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2093         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2094         m_compunit_symtab, m_language>: Add "m_" prefix.
2095         Update all uses.
2096         * buildsym.c: Update all uses.
2097
2098 2018-07-20  Tom Tromey  <tom@tromey.com>
2099
2100         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2101         * buildsym.h (record_line_ftype): Remove typedef.
2102
2103 2018-07-20  Tom Tromey  <tom@tromey.com>
2104
2105         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2106         (end_expandable_symtab): Likewise.
2107         (end_symtab_get_static_block): Likewise.
2108         (end_symtab_from_static_block): Likewise.
2109         * buildsym-legacy.c (augment_type_symtab): Remove.
2110         (end_expandable_symtab): Remove.
2111         (end_symtab_get_static_block): Remove.
2112         (end_symtab_from_static_block): Remove.
2113
2114 2018-07-20  Tom Tromey  <tom@tromey.com>
2115
2116         * dwarf2read.c: Include buildsym.h.
2117         (struct dwarf2_cu) <builder>: New method.
2118         (fixup_go_packaging): Update.
2119         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2120         use scoped_free_pendings.
2121         (using_directives): Add "cu" parameter, remove "language".
2122         (read_import_statement, setup_type_unit_groups, )
2123         (read_func_scope, read_lexical_block_scope)
2124         (dwarf2_record_block_ranges, read_namespace): Update.
2125         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2126         (lnp_state_machine::handle_end_sequence): Update.
2127         (class lnp_state_machine) <m_cu>: New member.
2128         <m_record_line_callback>: Remove.
2129         <m_currently_recording_lines>: New member.
2130         (lnp_state_machine::handle_set_file): Update.
2131         (noop_record_line): Remove.
2132         (dwarf_record_line_p): Add cu parameter.
2133         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2134         (lnp_state_machine::record_line)
2135         (lnp_state_machine::lnp_state_machine)
2136         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2137         (dwarf_decode_lines): Update.
2138         (dwarf2_start_subfile): Add cu parameter.
2139         (dwarf2_start_symtab, new_symbol): Update.
2140         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2141         Remove dwarf2_per_objfile parameter.
2142         (dwarf_decode_macros): Update.
2143
2144 2018-07-20  Tom Tromey  <tom@tromey.com>
2145
2146         * stabsread.c (define_symbol): Update.
2147         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2148         * dwarf2read.c (new_symbol): Update.
2149         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2150         * cp-namespace.c: Include buildsym.h.
2151         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2152         * buildsym-legacy.c (get_buildsym_compunit): New function.
2153
2154 2018-07-20  Tom Tromey  <tom@tromey.com>
2155
2156         * xcoffread.c: Include buildsym-legacy.h.
2157         * windows-nat.c: Include buildsym-legacy.h.
2158         * stabsread.c: Include buildsym-legacy.h.
2159         * mdebugread.c: Include buildsym-legacy.h.
2160         * buildsym-legacy.h: New file.
2161         * buildsym-legacy.c: New file, from buildsym.c.
2162         * go32-nat.c: Include buildsym-legacy.h.
2163         * dwarf2read.c: Include buildsym-legacy.h.
2164         * dbxread.c: Include buildsym-legacy.h.
2165         * cp-namespace.c: Include buildsym-legacy.h.
2166         * coffread.c: Include buildsym-legacy.h.
2167         * buildsym.h: Move some contents to buildsym-legacy.h.
2168         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2169         buildsym-legacy.c.
2170         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2171
2172 2018-07-20  Tom Tromey  <tom@tromey.com>
2173
2174         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2175         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2176         (buildsym_compunit::buildsym_compunit)
2177         (buildsym_compunit::~buildsym_compunit)
2178         (buildsym_compunit::get_macro_table): Define.
2179
2180 2018-07-20  Tom Tromey  <tom@tromey.com>
2181
2182         * buildsym.c (reset_symtab_globals): Remove.
2183         (buildsym_compunit::end_symtab_from_static_block): Update.
2184         (buildsym_compunit::augment_type_symtab): Update.
2185         (end_symtab_from_static_block): Call free_buildsym_compunit.
2186         (augment_type_symtab, end_symtab, end_expandable_symtab):
2187         Likewise.
2188
2189 2018-07-20  Tom Tromey  <tom@tromey.com>
2190
2191         * arch-utils.c: Do not include buildsym.h.
2192         * mipsread.c: Do not include buildsym.h.
2193         * machoread.c: Do not include buildsym.h.
2194         * elfread.c: Do not include buildsym.h.
2195
2196 2018-07-20  Tom Tromey  <tom@tromey.com>
2197
2198         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2199         initialization.
2200         (buildsym_compunit): Add new constructor.
2201         (struct buildsym_compunit) <get_last_source_file, finish_block,
2202         record_block_range, start_subfile, patch_subfile_names,
2203         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2204         set_last_source_start_addr, get_last_source_start_addr,
2205         get_local_using_directives, set_local_using_directives,
2206         get_global_using_directives, outermost_context_p,
2207         get_current_context_stack, get_context_stack_depth,
2208         get_current_subfile, get_local_symbols, get_file_symbols,
2209         get_global_symbols, record_debugformat, record_producer,
2210         push_context, pop_context, end_symtab_get_static_block,
2211         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2212         New public methods.
2213         <record_pending_block, finish_block_internal, make_blockvector,
2214         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2215         private methods.
2216         Update all users.
2217
2218 2018-05-22  Tom Tromey  <tom@tromey.com>
2219
2220         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2221         parameter.
2222         (finish_block_internal): Update.
2223
2224 2018-07-20  Tom Tromey  <tom@tromey.com>
2225
2226         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2227         parameter.
2228         (finish_block_internal): Update.
2229
2230 2018-07-20  Tom Tromey  <tom@tromey.com>
2231
2232         * buildsym.h (EXTERN): Don't define or undef.
2233         * buildsym.c (EXTERN): Don't define.
2234
2235 2018-07-20  Tom Tromey  <tom@tromey.com>
2236
2237         * buildsym.c: Remove TODO comment.
2238
2239 2018-07-20  Tom Tromey  <tom@tromey.com>
2240
2241         * coffread.c (coff_symtab_read): Update.
2242         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2243         (xcoff_new_init): Update.
2244         * mipsread.c (mipscoff_new_init): Update.
2245         * mdebugread.c (mdebug_build_psymtabs): Update.
2246         * elfread.c (elf_new_init): Update.
2247         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2248         Update.
2249         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2250         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2251         (stabsect_build_psymtabs): Update.
2252         * buildsym.h (buildsym_init): Don't declare.
2253         * buildsym.c: Update comment.
2254         (prepare_for_building): Remove.
2255         (start_symtab, restart_symtab): Update.
2256         (reset_symtab_globals): Update comment.
2257         (buildsym_init): Remove.
2258
2259 2018-07-20  Tom Tromey  <tom@tromey.com>
2260
2261         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2262         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2263         (read_enum_type, common_block_start, common_block_end)
2264         (cleanup_undefined_types_1, finish_global_stabs): Update.
2265         * mdebugread.c (psymtab_to_symtab_1): Update.
2266         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2267         (read_lexical_block_scope, new_symbol): Update.
2268         * dbxread.c (process_one_symbol): Update.
2269         * coffread.c (coff_symtab_read, process_coff_symbol)
2270         (coff_read_enum_type): Update.
2271         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2272         declare.
2273         (get_local_symbols, get_file_symbols, get_global_symbols): New
2274         functions.
2275         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2276         m_global_symbols.
2277         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2278         (~scoped_free_pendings): Update.
2279         (finish_block, prepare_for_building, reset_symtab_globals)
2280         (end_symtab_get_static_block, end_symtab_with_blockvector)
2281         (augment_type_symtab, push_context): Update.
2282         (get_local_symbols, get_file_symbols, get_global_symbols): New
2283         functions.
2284         (buildsym_init): Update.
2285
2286 2018-07-20  Tom Tromey  <tom@tromey.com>
2287
2288         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2289         (process_full_type_unit): Likewise.
2290         (dwarf2_start_symtab): Set list_in_scope.
2291
2292 2018-07-20  Tom Tromey  <tom@tromey.com>
2293
2294         * dwarf2read.c (process_psymtab_comp_unit_reader)
2295         (build_type_psymtabs_reader): Do not set list_in_scope.
2296
2297 2018-07-20  Tom Tromey  <tom@tromey.com>
2298
2299         * buildsym.c (free_pendings): Remove.
2300         (add_symbol_to_list, scoped_free_pendings)
2301         (finish_block_internal, buildsym_init): Update.
2302
2303 2018-07-20  Tom Tromey  <tom@tromey.com>
2304
2305         * xcoffread.c (read_xcoff_symtab): Update.
2306         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2307         Update.
2308         * dbxread.c (process_one_symbol): Update.
2309         * coffread.c (coff_symtab_read): Update.
2310         * buildsym.h (finish_block): Update.
2311         * buildsym.c (finish_block): Remove "listhead" argument.
2312         (end_symtab_get_static_block): Update.
2313
2314 2018-07-20  Tom Tromey  <tom@tromey.com>
2315
2316         * buildsym.h (class scoped_free_pendings): Remove constructor.
2317         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2318         method.
2319         <m_pending_block_obstack, m_pending_blocks>: New members.
2320         (pending_block_obstack, pending_blocks): Remove.
2321         (scoped_free_pendings::scoped_free_pendings): Default.
2322         (~scoped_free_pendings): Update.
2323         (free_pending_blocks): Remove.
2324         (finish_block_internal, record_pending_block, make_blockvector)
2325         (end_symtab_get_static_block, augment_type_symtab, push_context)
2326         (buildsym_init): Update.
2327
2328 2018-07-20  Tom Tromey  <tom@tromey.com>
2329
2330         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2331         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2332         members.
2333         (pending_addrmap, pending_addrmap_obstack)
2334         (pending_addrmap_interesting): Remove.
2335         (scoped_free_pendings, record_block_range, make_blockvector)
2336         (prepare_for_building, reset_symtab_globals, buildsym_init):
2337         Update.
2338
2339 2018-07-20  Tom Tromey  <tom@tromey.com>
2340
2341         * xcoffread.c (process_linenos): Update.
2342         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2343         * mdebugread.c (psymtab_to_symtab_1): Update.
2344         * dwarf2read.c (setup_type_unit_groups)
2345         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2346         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2347         * dbxread.c (process_one_symbol): Update.
2348         * coffread.c (coff_symtab_read, enter_linenos)
2349         (process_coff_symbol): Update.
2350         * buildsym.h (current_subfile): Don't declare.
2351         (get_current_subfile): Declare.
2352         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2353         member.
2354         (start_subfile, free_buildsym_compunit, push_subfile)
2355         (prepare_for_building, start_symtab): Update.
2356         (get_current_subfile): New function.
2357
2358 2018-07-20  Tom Tromey  <tom@tromey.com>
2359
2360         * coffread.c (coff_symtab_read): Update.
2361         * xcoffread.c (read_xcoff_symtab): Update.
2362         * dwarf2read.c (new_symbol): Update.
2363         (read_func_scope, read_lexical_block_scope): Update.
2364         * dbxread.c (process_one_symbol): Update.
2365         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2366         (outermost_context_p): Remove macro.
2367         (outermost_context_p, get_current_context_stack)
2368         (get_context_stack_depth): Declare.
2369         (pop_context): Return struct context_stack.
2370         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2371         member.
2372         (context_stack_size): Remove.
2373         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2374         (prepare_for_building, end_symtab_get_static_block)
2375         (augment_type_symtab, push_context): Update.
2376         (pop_context): Return struct context_stack.
2377         (outermost_context_p, get_current_context_stack)
2378         (get_context_stack_depth): New functions.
2379         (buildsym_init): Update.
2380
2381 2018-07-20  Tom Tromey  <tom@tromey.com>
2382
2383         * rust-exp.y: Now a pure parser.  Update all rules.
2384         (%union): Move earlier.
2385         (current_parser, work_obstack): Remove globals.
2386         (rust_parser, ~rust_parser): Update.
2387         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2388         lex_character, lex_number, lex_string, lex_identifier,
2389         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2390         convert_name, convert_params_to_expression,
2391         convert_ast_to_expression, ast_basic_type, ast_operation,
2392         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2393         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2394         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2395         ast_array_type, ast_slice_type, ast_reference_type,
2396         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2397         (rust_parse): Update.
2398         (rustyyerror, rustyylex): Add parser parameter.
2399         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2400         (rust_lex_stringish_test, rust_lex_test_sequence)
2401         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2402         (rust_lex_test_push_back, rust_lex_tests): Update.
2403
2404 2018-07-19  Pedro Alves  <palves@redhat.com>
2405
2406         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2407         gdb::unique_xmalloc_ptr.
2408         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2409         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2410         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2411         copy-initialization.
2412         * guile/scm-pretty-print.c (ppscm_print_children): Use
2413         gdb::unique_xmalloc_ptr instead of cleanups.
2414         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2415         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2416         gdb::unique_xmalloc_ptr.
2417         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2418         Adjust to use gdb::unique_xmalloc_ptr.
2419         * guile/scm-utils.c (extract_arg): Adjust.
2420         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2421         gdb::unique_xmalloc_ptr instead of a cleanup.
2422
2423 2018-07-19  Tom Tromey  <tom@tromey.com>
2424
2425         * utils.c (do_value_free_to_mark)
2426         (make_cleanup_value_free_to_mark): Remove.
2427         * utils.h (make_cleanup_value_free_to_mark): Remove.
2428
2429 2018-07-19  Pedro Alves  <palves@redhat.com>
2430
2431         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2432         forwarding reference.
2433
2434 2018-07-18  Pedro Alves  <palves@redhat.com>
2435
2436         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2437         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2438         cleanup.
2439
2440 2018-07-18  Pedro Alves  <palves@redhat.com>
2441
2442         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2443         exceptions.
2444         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2445         (gdbscm_wrap): New.
2446         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2447         directly instead of a cleanup.
2448         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2449         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2450         (vlscm_binop_gdbthrow): New, factored out from ...
2451         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2452         (vlscm_rich_compare): Use gdbscm_wrap.
2453         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2454         instead of a cleanup.
2455         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2456         cleanup.
2457         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2458         Use xfree directly instead of a cleanup.
2459         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2460         Adjust to use gdbscm_wrap and scoped_value_mark.
2461         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2462         (gdbscm_value_address, gdbscm_value_dereference)
2463         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2464         scoped_value_mark.
2465         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2466         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2467         scoped_value_mark.
2468         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2469         gdbscm_wrap and scoped_value_mark.
2470         (gdbscm_value_to_string): Use xfree directly instead of a
2471         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2472         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2473         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2474         scoped_value_mark.
2475         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2476         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2477         scoped_value_mark.
2478         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2479         gdbscm_wrap.
2480
2481 2018-07-18  Tom de Vries  <tdevries@suse.de>
2482
2483         * findvar.c (default_read_var_value): Also resolve dynamic type for
2484         LOC_OPTIMIZED_OUT vars.
2485
2486 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2487
2488         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2489         decoding.
2490
2491 2018-07-17  Tom Tromey  <tom@tromey.com>
2492
2493         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2494         (compute_enum_list, pascm_set_param_value_x)
2495         (gdbscm_parameter_value): Update.
2496         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2497         (gdbscm_scm_to_host_string): Update.
2498         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2499         Update.
2500         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2501         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2502         * guile/scm-string.c (gdbscm_scm_to_string): Return
2503         unique_xmalloc_ptr.
2504         (gdbscm_scm_to_host_string): Likewise.
2505
2506 2018-07-17  Tom Tromey  <tom@tromey.com>
2507
2508         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2509         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2510         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2511         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2512         unique_xmalloc_ptr.
2513
2514 2018-07-17  Tom Tromey  <tom@tromey.com>
2515
2516         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2517         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2518         Update.
2519         * guile/scm-cmd.c (cmdscm_function): Update.
2520         * guile/scm-pretty-print.c
2521         (ppscm_print_exception_unless_memory_error): Update.
2522         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2523         Return unique_xmalloc_ptr.
2524
2525 2018-07-17  Tom Tromey  <tom@tromey.com>
2526
2527         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2528         Use string_printf.
2529
2530 2018-07-17  Jim Wilson  <jimw@sifive.com>
2531
2532         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2533         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2534         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2535         unecessary braces after EF_RISCV_RVC test.  Delete call to
2536         set_gdbarch_decr_pc_after_break.
2537
2538         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2539         RISCV_LAST_FP_REGNUM + 1.
2540         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2541
2542 2018-07-17  Tom Tromey  <tom@tromey.com>
2543
2544         * configure.ac: Remove --disable-gdbcli.
2545         * configure: Rebuild.
2546         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2547         (SUBDIR_CLI_CFLAGS): Remove.
2548         (SFILES): Use SUBDIR_CLI_SRCS.
2549         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2550
2551 2018-07-17  Tom Tromey  <tom@tromey.com>
2552
2553         PR gdb/18624:
2554         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2555
2556 2018-07-16  Jim Wilson  <jimw@sifive.com>
2557
2558         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2559
2560 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2561
2562         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2563         variable.
2564         (libunwind_frame_sniffer): Likewise.
2565         (libunwind_frame_prev_register): Likewise.
2566         (libunwind_sigtramp_frame_sniffer): Likewise.
2567         * ia64-tdep.c (ia64_access_reg): Likewise.
2568         (ia64_access_rse_reg): Likewise.
2569         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2570         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2571
2572 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2573
2574         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2575
2576 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2577
2578         * remote-sim.c (gdbsim_target::close,
2579         gdbsim_target::mourn_inferior): Remove unused variables.
2580
2581 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2582
2583         * ia64-tdep.c (ktab_buf): New global.
2584         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2585         (get_kernel_table): Adjust.
2586
2587 2018-07-16  Tom Tromey  <tom@tromey.com>
2588
2589         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2590         * dwarf2read.c (using_directives, new_symbol): Use
2591         outermost_context_p.
2592         * dbxread.c (process_one_symbol): Use outermost_context_p.
2593         * coffread.c (coff_symtab_read): Use outermost_context_p.
2594
2595 2018-07-16  Tom Tromey  <tom@tromey.com>
2596
2597         * dwarf2read.c (using_directives, read_func_scope)
2598         (read_lexical_block_scope): Update.
2599         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2600         * buildsym.h (local_using_directives, global_using_directives):
2601         Don't declare.
2602         (get_local_using_directives, set_local_using_directives)
2603         (get_global_using_directives): Declare.
2604         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2605         m_global_using_directives>: New members.
2606         (finish_block_internal, prepare_for_building)
2607         (reset_symtab_globals, end_symtab_get_static_block)
2608         (push_context): Update.
2609         (get_local_using_directives, set_local_using_directives)
2610         (get_global_using_directives): New functions.
2611         (buildsym_init): Update.
2612
2613 2018-07-16  Tom Tromey  <tom@tromey.com>
2614
2615         * xcoffread.c (xcoff_initial_scan): Don't call
2616         free_pending_blocks.
2617         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2618         * buildsym.h (class scoped_free_pendings): Add constructor.
2619         (free_pending_blocks): Don't declare.
2620         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2621         (free_pending_blocks): Now static.
2622
2623 2018-07-16  Tom Tromey  <tom@tromey.com>
2624
2625         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2626         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2627         member.
2628         (struct subfile_stack): Remove.
2629         (subfile_stack): Remove.
2630         (push_subfile, pop_subfile, buildsym_init): Update.
2631
2632 2018-07-16  Tom Tromey  <tom@tromey.com>
2633
2634         * buildsym.c (push_subfile): Use gdb_assert.
2635         (pop_subfile): Use gdb_assert.
2636
2637 2018-07-16  Tom Tromey  <tom@tromey.com>
2638
2639         * buildsym.h (merge_symbol_lists): Remove.
2640         * buildsym.c (merge_symbol_lists): Remove.
2641
2642 2018-07-16  Tom Tromey  <tom@tromey.com>
2643
2644         * stabsread.c (scan_file_globals): Update comment.
2645         * stabsread.h (scan_file_globals): Move from buildsym.h.
2646         * buildsym.h (scan_file_globals): Move to stabsread.h.
2647
2648 2018-07-16  Tom Tromey  <tom@tromey.com>
2649
2650         * xcoffread.c (xcoff_new_init): Update.
2651         * mipsread.c (mipscoff_new_init): Update.
2652         * mdebugread.c (mdebug_build_psymtabs): Update.
2653         * elfread.c (elf_new_init): Update.
2654         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2655         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2656         * buildsym.h (buildsym_new_init): Don't declare.
2657         * buildsym.c (buildsym_new_init): Remove.
2658
2659 2018-07-16  Tom Tromey  <tom@tromey.com>
2660
2661         * stabsread.h (within_function): Move from buildsym.h.
2662         * stabsread.c (start_stabs): Clear within_function.
2663         * coffread.c (coff_start_symtab): Clear within_function.
2664         * buildsym.h (within_function): Move to stabsread.h.
2665         * buildsym.c (prepare_for_building): Update.
2666
2667 2018-07-16  Tom Tromey  <tom@tromey.com>
2668
2669         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2670         * dwarf2read.c (dwarf2_start_symtab): Don't set
2671         processing_gcc_compilation.
2672         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2673
2674 2018-07-16  Tom Tromey  <tom@tromey.com>
2675
2676         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2677         (next_symbol_text_func): Move from buildsym.h.
2678         * stabsread.c (hashname): Move from buildsym.c.
2679         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2680         (next_symbol_text_func, hashname): Move to stabsread.h.
2681         * buildsym.c: Don't include bcache.h
2682         (hashname): Move to stasbread.c.
2683
2684 2018-07-16  Tom Tromey  <tom@tromey.com>
2685
2686         * buildsym.h (context_stack_size): Don't declare.
2687         * buildsym.c (context_stack_size): New global.
2688
2689 2018-07-16  Tom Tromey  <tom@tromey.com>
2690
2691         * dbxread.c (processing_acc_compilation): New global.
2692         * buildsym.h (processing_acc_compilation): Don't declare.
2693
2694 2018-07-16  Tom Tromey  <tom@tromey.com>
2695
2696         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2697         * dbxread.c (read_ofile_symtab): Update.
2698         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2699         * buildsym.h (last_source_start_addr): Remove.
2700         (set_last_source_start_addr, get_last_source_start_addr):
2701         Declare.
2702         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2703         parameter.
2704         (struct buildsym_compunit) <m_last_source_start_addr>: New
2705         member.
2706         (prepare_for_building): Remove start_addr parameter.
2707         (start_symtab, restart_symtab, end_symtab_get_static_block)
2708         (end_symtab_with_blockvector): Update.
2709         (set_last_source_start_addr, get_last_source_start_addr): New
2710         functions.
2711
2712 2018-07-16  Tom Tromey  <tom@tromey.com>
2713
2714         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2715         member.
2716         (have_line_numbers): Remove.
2717         (record_line, prepare_for_building, end_symtab_get_static_block)
2718         (augment_type_symtab): Update.
2719
2720 2018-07-16  Tom Tromey  <tom@tromey.com>
2721
2722         * buildsym.c (~buildsym_compunit): Free the macro table.
2723         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2724         methods.
2725         <m_pending_macros>: New member.
2726         (pending_macros): Remove.
2727         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2728         (reset_symtab_globals, end_symtab_get_static_block)
2729         (end_symtab_with_blockvector, augment_type_symtab)
2730         (buildsym_init): Update.
2731
2732 2018-07-16  Tom Tromey  <tom@tromey.com>
2733
2734         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2735         parameter.
2736         (buildsym_compunit::set_last_source_file): New method.
2737         <m_last_source_file>: New member.
2738         (prepare_for_building): Remove "name" parameter.
2739         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2740         (last_source_file): Remove.
2741         (set_last_source_file, get_last_source_file): Update.
2742
2743 2018-07-16  Tom Tromey  <tom@tromey.com>
2744
2745         * buildsym.c (prepare_for_building): Add assert.
2746
2747 2018-07-16  Tom Tromey  <tom@tromey.com>
2748
2749         * buildsym.c (~buildsym_compunit): Update.
2750         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2751         (start_subfile, patch_subfile_names)
2752         (end_symtab_with_blockvector): Update.
2753
2754 2018-07-16  Tom Tromey  <tom@tromey.com>
2755
2756         * buildsym.c (struct buildsym_compunit): Add constructor,
2757         destructor, initializers.
2758         (start_buildsym_compunit): Remove.
2759         (free_buildsym_compunit): Use "delete".
2760         (start_symtab, restart_symtab): Use "new".
2761
2762 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2763
2764         * symfile.c (set_objfile_default_section_offset): Remove struct
2765         keyword.
2766
2767 2018-07-14  Stafford Horne  <shorne@gmail.com>
2768
2769         * (Responsible Maintainers): Add myself as or1k maintainer.
2770
2771 2018-07-13  Tom Tromey  <tom@tromey.com>
2772
2773         * symfile.c (set_objfile_default_section_offset): Use extra braces
2774         around initializer.
2775
2776 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2777
2778         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2779         non-branching basr.
2780
2781 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2782
2783         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2784         unittests/cli-utils-selftests.c
2785         * unittests/cli-utils-selftests.c: New file.
2786
2787 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2788
2789         * NEWS: Mention new commands. Mention change to 'thread apply'.
2790
2791 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2792
2793         * thread.c (thr_try_catch_cmd): New function.
2794         (thread_apply_all_command): Handle qcs flags.
2795         (thread_apply_command): Handle qcs flags.
2796         (taas_command): New function.
2797         (tfaas_command): New function.
2798         (_initialize_thread): Update to setup the new commands 'taas
2799         and 'tfaas'. Change doc string for 'thread apply'.
2800
2801 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2802
2803         * stack.c: (trailing_outermost_frame): New function, mostly
2804         extracted from backtrace_command_1.
2805         (leading_innermost_frame): New function.
2806         (backtrace_command_1): Update to call trailing_outermost_frame.
2807         (frame_apply_command_count): New function.
2808         (frame_apply_level_command): New function.
2809         (frame_apply_all_command): New function.
2810         (frame_apply_command): New function.
2811         (faas_command): New function.
2812         (frame_cmd_list): New variable.
2813         (_initialize_stack): Update to setup the new commands 'frame apply'
2814         and 'faas'.
2815
2816 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2817
2818         * cli-utils.c (number_or_range_parser::get_number): Only handle
2819         numbers or convenience var as numbers.
2820         (parse_flags): New function.
2821         (parse_flags_qcs): New function.
2822         (number_or_range_parser::finished): Ensure parsing end is detected
2823         before end of string.
2824         * cli-utils.h (parse_flags): New function.
2825         (parse_flags_qcs): New function.
2826         (number_or_range_parser): Remove m_finished bool.
2827         (number_or_range_parser::skip_range): Set m_in_range to false.
2828
2829 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2830
2831         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2832         on Windows.
2833
2834 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2835             Jan Kratochvil  <jan.kratochvil@redhat.com>
2836             Paul Fertser  <fercerpav@gmail.com>
2837             Tsutomu Seki  <sekiriki@gmail.com>
2838             Pedro Alves  <palves@redhat.com>
2839
2840         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2841         'unittests/parse-connection-spec-selftests.c'.
2842         (COMMON_SFILES): Add 'common/netstuff.c'.
2843         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2844         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2845         * common/netstuff.c: New file.
2846         * common/netstuff.h: New file.
2847         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2848         (wait_for_connect): Update comment.  New parameter
2849         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2850         Use 'sock' directly instead of 'scb->fd'.
2851         (try_connect): New function, with code from 'net_open'.
2852         (net_open): Rewrite main loop to deal with multiple
2853         sockets/addresses.  Handle IPv6-style hostnames; implement
2854         support for IPv6 connections.
2855         * unittests/parse-connection-spec-selftests.c: New file.
2856
2857 2018-07-11  Pedro Alves  <palves@redhat.com>
2858
2859         PR gdb/23377
2860         * remote.c (remote_target::remote_detach_pid): Call
2861         set_current_process.
2862
2863 2018-07-11  Pedro Alves  <palves@redhat.com>
2864
2865         * h8300-tdep.c (h8300_gdbarch_init): Remove
2866         set_gdbarch_ecoff_reg_to_regnum calls.
2867
2868 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2869
2870         PR c++/23373
2871         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2872         offsets/sizes for static members of a class/struct.
2873
2874 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2875
2876         * target-descriptions.c (tdesc_register_bitsize): Rename.
2877         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2878         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2879         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2880
2881 2018-07-10  Tom Tromey  <tom@tromey.com>
2882
2883         * breakpoint.c (moribund_locations): Now static and a
2884         std::vector.
2885         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2886         (build_bpstat_chain, update_global_location_list)
2887         (breakpoint_retire_moribund): Update.
2888         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2889         VEC.
2890
2891 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2892
2893         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2894         (riscv_register_reggroup_p): Use new function, remove unneeded
2895         parenthesis.
2896         (riscv_push_dummy_call): Extend assert to compare against xlen or
2897         flen based on register type.
2898
2899 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2900
2901         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2902
2903 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2904
2905         * remote.c (show_hardware_watchpoint_limit): New function.
2906         (show_hardware_watchpoint_length_limit): New function.
2907         (show_hardware_breakpoint_limit): New function.
2908         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2909         where appropriate, update help text.
2910
2911 2018-07-09  Tom Tromey  <tom@tromey.com>
2912
2913         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2914         (CLIBS): Don't mention NAT_CLIBS.
2915
2916 2018-07-09  Tom Tromey  <tom@tromey.com>
2917
2918         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2919         (LIBGDB_OBS, clean mostlyclean): Update.
2920         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2921
2922 2018-07-09  Tom Tromey  <tom@tromey.com>
2923
2924         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2925         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2926         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2927
2928 2018-07-09  Tom Tromey  <tom@tromey.com>
2929
2930         * Makefile.in (ALLDEPFILES): Remove exec.c.
2931         (COMMON_OBS): Remove exec.o.
2932         (COMMON_SFILES): Add exec.c.
2933
2934 2018-07-09  Tom Tromey  <tom@tromey.com>
2935
2936         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2937
2938 2018-07-09  Tom Tromey  <tom@tromey.com>
2939
2940         * Makefile.in (clean mostlyclean): Remove stamp-version.
2941         (version.c): Depend on stamp-version.
2942         (stamp-version): New rule, from version.c rule.
2943
2944 2018-07-09  Tom Tromey  <tom@tromey.com>
2945
2946         * Makefile.in (init.c): Depend on stamp-init.
2947         (stamp-init): New rule, from init.c rule.
2948         (clean mostlyclean): Remove stamp-init.
2949
2950 2018-07-09  Tom Tromey  <tom@tromey.com>
2951
2952         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2953         SUBDIR_GCC_COMPILE_SRCS.
2954
2955 2018-07-09  Tom Tromey  <tom@tromey.com>
2956
2957         * Makefile.in (init.c): Remove some unused sed rules.
2958
2959 2018-07-09  Tom Tromey  <tom@tromey.com>
2960
2961         * Makefile.in (TSOBS): Remove.
2962         (INIT_FILES): Update.
2963         (LIBGDB_OBS): Update.
2964         (COMMON_SFILES): Add inflow.c.
2965         (SFILES): Remove inflow.c.
2966
2967 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2968
2969         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2970
2971 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
2972
2973         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2974         get_saveloc_name, is_signal_frame_name, step_name,
2975         init_remote_name, create_addr_space_name,
2976         destroy_addr_space_name, search_unwind_table_name,
2977         find_dyn_list_name): Constify.
2978
2979 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
2980
2981         * darwin-nat.c (darwin_pthread_kill): New function.
2982         (darwin_resume_thread): Use darwin_pthread_kill.
2983
2984 2018-07-05  Tom de Vries  <tdevries@suse.de>
2985
2986         * macroexp.c (macro_buffer) <operator=>: New member function.
2987
2988 2018-07-04  Tom Tromey  <tom@tromey.com>
2989
2990         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2991
2992 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
2993
2994         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2995         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2996         * maint.c: Likewise.
2997         * top.c: Likewise.
2998
2999 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3000
3001         * NEWS: Create a new section for the next release branch.
3002         Rename the section of the current branch, now that it has
3003         been cut.
3004
3005 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3006
3007         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3008         * version.in: Bump version to 8.2.50.DATE-git.
3009
3010 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3011             Pedro Alves  <palves@redhat.com>
3012
3013         * linux-nat.c (linux_init_ptrace): Rename to ...
3014         (linux_init_ptrace_procfs): ... this.  Call
3015         linux_proc_init_warnings.
3016         (linux_nat_target::post_attach)
3017         (linux_nat_target::post_startup_inferior): Adjust.
3018         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3019         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3020
3021 2018-07-04  Tom de Vries  <tdevries@suse.de>
3022
3023         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3024         check ...
3025         (read_comp_unit_head): ... here.
3026
3027 2018-07-03  Tom Tromey  <tom@tromey.com>
3028
3029         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3030         (stop_tracing, tstatus_command)
3031         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3032         (print_one_static_tracepoint_marker): Update.
3033         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3034         std::vector.
3035         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3036         VEC.
3037         (all_tracepoints, static_tracepoints_here): Return std::vector.
3038
3039 2018-07-03  Tom Tromey  <tom@tromey.com>
3040
3041         * common/ptid.c (ptid_equal): Remove.
3042         * common/ptid.h (ptid_equal): Don't declare.
3043         * ada-tasks.c: Update.
3044         * breakpoint.c: Update.
3045         * common/agent.c: Update.
3046         * corelow.c: Update.
3047         * darwin-nat-info.c: Update.
3048         * darwin-nat.c: Update.
3049         * dcache.c: Update.
3050         * dtrace-probe.c: Update.
3051         * dummy-frame.c: Update.
3052         * fbsd-nat.c: Update.
3053         * frame.c: Update.
3054         * gdbthread.h: Update.
3055         * gnu-nat.c: Update.
3056         * go32-nat.c: Update.
3057         * inf-loop.c: Update.
3058         * inf-ptrace.c: Update.
3059         * infcall.c: Update.
3060         * infcmd.c: Update.
3061         * inflow.c: Update.
3062         * infrun.c: Update.
3063         * linux-fork.c: Update.
3064         * linux-nat.c: Update.
3065         * linux-thread-db.c: Update.
3066         * mi/mi-cmd-var.c: Update.
3067         * mi/mi-interp.c: Update.
3068         * mi/mi-main.c: Update.
3069         * nto-procfs.c: Update.
3070         * ppc-linux-tdep.c: Update.
3071         * procfs.c: Update.
3072         * python/py-inferior.c: Update.
3073         * python/py-record-btrace.c: Update.
3074         * python/py-record.c: Update.
3075         * ravenscar-thread.c: Update.
3076         * regcache.c: Update.
3077         * remote-sim.c: Update.
3078         * remote.c: Update.
3079         * sol-thread.c: Update.
3080         * solib.c: Update.
3081         * target.c: Update.
3082         * tui/tui-stack.c: Update.
3083         * varobj.c: Update.
3084         * windows-nat.c: Update.
3085         * windows-tdep.c: Update.
3086
3087 2018-07-03  Tom Tromey  <tom@tromey.com>
3088
3089         * common/ptid.c (ptid_match): Remove.
3090         * common/ptid.h (ptid_match): Don't declare.
3091         * fbsd-nat.c: Update.
3092         * infcmd.c: Update.
3093         * infrun.c: Update.
3094         * linux-nat.c: Update.
3095         * record-btrace.c: Update.
3096         * regcache.c: Update.
3097         * remote.c: Update.
3098
3099 2018-07-03  Tom Tromey  <tom@tromey.com>
3100
3101         * common/ptid.c (ptid_tid_p): Remove.
3102         * common/ptid.h (ptid_tid_p): Don't declare.
3103         * sol-thread.c: Update.
3104
3105 2018-07-03  Tom Tromey  <tom@tromey.com>
3106
3107         * common/ptid.c (ptid_lwp_p): Remove.
3108         * common/ptid.h (ptid_lwp_p): Don't declare.
3109         * fbsd-nat.c: Update.
3110         * linux-nat.c: Update.
3111         * nat/linux-procfs.c: Update.
3112         * nat/x86-linux-dregs.c: Update.
3113         * sol-thread.c: Update.
3114
3115 2018-07-03  Tom Tromey  <tom@tromey.com>
3116
3117         * common/ptid.c (ptid_is_pid): Remove.
3118         * common/ptid.h (ptid_is_pid): Don't declare.
3119         * infrun.c: Update.
3120         * linux-nat.c: Update.
3121         * mi/mi-interp.c: Update.
3122         * remote.c: Update.
3123         * thread.c: Update.
3124
3125 2018-07-03  Tom Tromey  <tom@tromey.com>
3126
3127         * common/ptid.c (ptid_get_tid): Remove.
3128         * common/ptid.h (ptid_get_tid): Don't declare.
3129         * ada-tasks.c: Update.
3130         * aix-thread.c: Update.
3131         * bsd-uthread.c: Update.
3132         * darwin-nat.c: Update.
3133         * fbsd-nat.c: Update.
3134         * i386-darwin-nat.c: Update.
3135         * infrun.c: Update.
3136         * linux-tdep.c: Update.
3137         * nto-procfs.c: Update.
3138         * ppc-ravenscar-thread.c: Update.
3139         * python/py-infthread.c: Update.
3140         * ravenscar-thread.c: Update.
3141         * sol-thread.c: Update.
3142         * sparc-ravenscar-thread.c: Update.
3143         * windows-nat.c: Update.
3144
3145 2018-07-03  Tom Tromey  <tom@tromey.com>
3146
3147         * common/ptid.c (ptid_get_lwp): Remove.
3148         * common/ptid.h (ptid_get_lwp): Don't declare.
3149         * aarch64-linux-nat.c: Update.
3150         * ada-tasks.c: Update.
3151         * aix-thread.c: Update.
3152         * amd64-linux-nat.c: Update.
3153         * arm-linux-nat.c: Update.
3154         * corelow.c: Update.
3155         * fbsd-nat.c: Update.
3156         * fbsd-tdep.c: Update.
3157         * gnu-nat.c: Update.
3158         * i386-cygwin-tdep.c: Update.
3159         * i386-gnu-nat.c: Update.
3160         * i386-linux-nat.c: Update.
3161         * ia64-linux-nat.c: Update.
3162         * inf-ptrace.c: Update.
3163         * infrun.c: Update.
3164         * linux-fork.c: Update.
3165         * linux-nat.c: Update.
3166         * linux-tdep.c: Update.
3167         * linux-thread-db.c: Update.
3168         * mips-linux-nat.c: Update.
3169         * nat/aarch64-linux-hw-point.c: Update.
3170         * nat/aarch64-linux.c: Update.
3171         * nat/linux-btrace.c: Update.
3172         * nat/linux-osdata.c: Update.
3173         * nat/linux-procfs.c: Update.
3174         * nat/x86-linux-dregs.c: Update.
3175         * obsd-nat.c: Update.
3176         * ppc-fbsd-nat.c: Update.
3177         * ppc-linux-nat.c: Update.
3178         * procfs.c: Update.
3179         * python/py-infthread.c: Update.
3180         * ravenscar-thread.c: Update.
3181         * remote.c: Update.
3182         * s390-linux-nat.c: Update.
3183         * sol-thread.c: Update.
3184         * sol2-tdep.c: Update.
3185         * spu-linux-nat.c: Update.
3186         * x86-linux-nat.c: Update.
3187         * xtensa-linux-nat.c: Update.
3188
3189 2018-07-03  Tom Tromey  <tom@tromey.com>
3190
3191         * common/ptid.c (ptid_get_pid): Remove.
3192         * common/ptid.h (ptid_get_pid): Don't declare.
3193         * aarch64-linux-nat.c: Update.
3194         * ada-lang.c: Update.
3195         * aix-thread.c: Update.
3196         * alpha-bsd-nat.c: Update.
3197         * amd64-fbsd-nat.c: Update.
3198         * amd64-linux-nat.c: Update.
3199         * arm-linux-nat.c: Update.
3200         * arm-nbsd-nat.c: Update.
3201         * auxv.c: Update.
3202         * break-catch-syscall.c: Update.
3203         * breakpoint.c: Update.
3204         * bsd-uthread.c: Update.
3205         * corelow.c: Update.
3206         * ctf.c: Update.
3207         * darwin-nat.c: Update.
3208         * fbsd-nat.c: Update.
3209         * fbsd-tdep.c: Update.
3210         * gcore.c: Update.
3211         * gnu-nat.c: Update.
3212         * hppa-nbsd-nat.c: Update.
3213         * hppa-obsd-nat.c: Update.
3214         * i386-fbsd-nat.c: Update.
3215         * ia64-linux-nat.c: Update.
3216         * inf-ptrace.c: Update.
3217         * infcmd.c: Update.
3218         * inferior.c: Update.
3219         * inferior.h: Update.
3220         * inflow.c: Update.
3221         * infrun.c: Update.
3222         * linux-fork.c: Update.
3223         * linux-nat.c: Update.
3224         * linux-tdep.c: Update.
3225         * linux-thread-db.c: Update.
3226         * m68k-bsd-nat.c: Update.
3227         * mi/mi-interp.c: Update.
3228         * mi/mi-main.c: Update.
3229         * mips-linux-nat.c: Update.
3230         * mips-nbsd-nat.c: Update.
3231         * mips64-obsd-nat.c: Update.
3232         * nat/aarch64-linux-hw-point.c: Update.
3233         * nat/aarch64-linux.c: Update.
3234         * nat/linux-btrace.c: Update.
3235         * nat/linux-osdata.c: Update.
3236         * nat/linux-procfs.c: Update.
3237         * nat/x86-linux-dregs.c: Update.
3238         * nto-procfs.c: Update.
3239         * obsd-nat.c: Update.
3240         * ppc-linux-nat.c: Update.
3241         * ppc-nbsd-nat.c: Update.
3242         * ppc-obsd-nat.c: Update.
3243         * proc-service.c: Update.
3244         * procfs.c: Update.
3245         * python/py-inferior.c: Update.
3246         * python/py-infthread.c: Update.
3247         * ravenscar-thread.c: Update.
3248         * record.c: Update.
3249         * remote-sim.c: Update.
3250         * remote.c: Update.
3251         * rs6000-nat.c: Update.
3252         * s390-linux-nat.c: Update.
3253         * sh-nbsd-nat.c: Update.
3254         * sol-thread.c: Update.
3255         * sparc-nat.c: Update.
3256         * sparc64-tdep.c: Update.
3257         * spu-linux-nat.c: Update.
3258         * spu-tdep.c: Update.
3259         * target-debug.h: Update.
3260         * target.c: Update.
3261         * thread.c: Update.
3262         * tid-parse.c: Update.
3263         * tracefile-tfile.c: Update.
3264         * vax-bsd-nat.c: Update.
3265         * windows-nat.c: Update.
3266         * x86-linux-nat.c: Update.
3267         * x86-nat.c: Update.
3268
3269 2018-07-03  Tom Tromey  <tom@tromey.com>
3270
3271         * common/ptid.c (pid_to_ptid): Remove.
3272         * common/ptid.h (pid_to_ptid): Don't declare.
3273         * aix-thread.c: Update.
3274         * arm-linux-nat.c: Update.
3275         * common/ptid.c: Update.
3276         * common/ptid.h: Update.
3277         * corelow.c: Update.
3278         * ctf.c: Update.
3279         * darwin-nat.c: Update.
3280         * fbsd-nat.c: Update.
3281         * fork-child.c: Update.
3282         * gnu-nat.c: Update.
3283         * go32-nat.c: Update.
3284         * inf-ptrace.c: Update.
3285         * infcmd.c: Update.
3286         * inferior.c: Update.
3287         * infrun.c: Update.
3288         * linux-fork.c: Update.
3289         * linux-nat.c: Update.
3290         * nat/aarch64-linux-hw-point.c: Update.
3291         * nat/fork-inferior.c: Update.
3292         * nat/x86-linux-dregs.c: Update.
3293         * nto-procfs.c: Update.
3294         * obsd-nat.c: Update.
3295         * procfs.c: Update.
3296         * progspace.c: Update.
3297         * remote.c: Update.
3298         * rs6000-nat.c: Update.
3299         * s390-linux-nat.c: Update.
3300         * sol-thread.c: Update.
3301         * spu-linux-nat.c: Update.
3302         * target.c: Update.
3303         * top.c: Update.
3304         * tracefile-tfile.c: Update.
3305         * windows-nat.c: Update.
3306
3307 2018-07-03  Tom Tromey  <tom@tromey.com>
3308
3309         * common/ptid.h (ptid_build): Don't declare.
3310         * common/ptid.c (ptid_build): Remove.
3311         * aix-thread.c: Update.
3312         * bsd-kvm.c: Update.
3313         * bsd-uthread.c: Update.
3314         * common/agent.c: Update.
3315         * common/ptid.c: Update.
3316         * common/ptid.h: Update.
3317         * corelow.c: Update.
3318         * darwin-nat.c: Update.
3319         * fbsd-nat.c: Update.
3320         * gnu-nat.c: Update.
3321         * linux-fork.c: Update.
3322         * linux-nat.c: Update.
3323         * linux-thread-db.c: Update.
3324         * nat/linux-osdata.c: Update.
3325         * nat/linux-procfs.c: Update.
3326         * nto-procfs.c: Update.
3327         * obsd-nat.c: Update.
3328         * proc-service.c: Update.
3329         * procfs.c: Update.
3330         * ravenscar-thread.c: Update.
3331         * remote-sim.c: Update.
3332         * remote.c: Update.
3333         * sol-thread.c: Update.
3334         * target.c: Update.
3335         * windows-nat.c: Update.
3336
3337 2018-07-03  Tom Tromey  <tom@tromey.com>
3338
3339         * infrun.c (follow_exec): Use exit_inferior_silent.
3340         * inferior.c (exit_inferior_num_silent): Remove.
3341         * inferior.h (exit_inferior_num_silent): Don't declare.
3342
3343 2018-07-03  Tom Tromey  <tom@tromey.com>
3344
3345         PR cli/23340:
3346         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3347         inferior_ptid on error.
3348
3349 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3350             Simon Marchi  <simon.marchi@polymtl.ca>
3351
3352         PR tdep/8282
3353         * disasm.h (gdb_disassembler): Add
3354         `m_disassembler_options_holder'. member
3355         * disasm.c (get_all_disassembler_options): New function.
3356         (gdb_disassembler::gdb_disassembler): Use it.
3357         (gdb_buffered_insn_length_init_dis): Likewise.
3358         (gdb_buffered_insn_length): Adjust accordingly.
3359         (set_disassembler_options): Handle options with arguments.
3360         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3361         line if showing options with descriptions.
3362         (disassembler_options_completer): Adapt to using the
3363         `disasm_options_and_args_t' structure.
3364         * mips-tdep.c (mips_disassembler_options): New variable.
3365         (mips_disassembler_options_o32): Likewise.
3366         (mips_disassembler_options_n32): Likewise.
3367         (mips_disassembler_options_n64): Likewise.
3368         (gdb_print_insn_mips): Don't set `disassembler_options'.
3369         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3370         functions.
3371         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3372         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3373         `gdbarch_disassembler_options_implicit' and
3374         `gdbarch_valid_disassembler_options'.
3375         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3376         `disasm_options_and_args_t' structure.
3377         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3378         method.
3379         (valid_disassembler_options): Switch from `disasm_options_t' to
3380         the `disasm_options_and_args_t' structure.
3381         * NEWS: Document `set disassembler-options' support for the MIPS
3382         target.
3383         * gdbarch.h: Regenerate.
3384         * gdbarch.c: Regenerate.
3385
3386 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3387
3388         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3389
3390 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3391
3392         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3393         parameter in call to amd64_target_description.
3394         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3395         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3396         (amd64fbsd_init_abi): Likewise.
3397         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3398         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3399         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3400         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3401
3402 2018-06-29  Pedro Alves  <palves@redhat.com>
3403
3404         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3405         "segments" parameter.
3406         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3407         (_initialize_amd64_tdep): Update call to
3408         amd64_create_target_description.
3409         (amd64_target_description): Add "segments" parameter.  Adjust
3410         the implementation to use it.
3411         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3412         call to amd64_create_target_description.
3413         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3414         * gdb/arch/amd64.h (amd64_create_target_description): Add
3415         "segments" register.
3416         * gdb/arch/amd64.c (amd64_create_target_description): Add
3417         "segments" parameter.  Call create_feature_i386_64bit_segments
3418         only if SEGMENTS is true.
3419         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3420         call to amd64_create_target_description.
3421
3422 2018-06-29  Pedro Alves  <palves@redhat.com>
3423
3424         * thread.c (thread_target_id_str): New, factored out from ...
3425         (print_thread_info_1): ... here.  Use it to compute the max
3426         "Target Id" column width.
3427
3428 2018-06-29  Pedro Alves  <palves@redhat.com>
3429
3430         * remote.c (remote_target::extra_thread_info): Delete
3431         'display_buf' and 'n' locals.  from the cache, regardless of
3432         packet mechanims is in use.  Use cache for qThreadExtra and qP
3433         methods too.
3434
3435 2018-06-29  Pedro Alves  <palves@redhat.com>
3436
3437         * blockframe.c (find_pc_sect_containing_function): New function.
3438         * breakpoint.c (print_breakpoint_location): Don't call
3439         find_pc_sect_function.
3440         * linespec.c (create_sals_line_offset): Record the location's
3441         symbol in the sal.
3442         * linespec.c (convert_address_location_to_sals): Fill in sal's
3443         symbol with find_pc_sect_containing_function.
3444         * symtab.c (find_function_start_sal): Rename to ...
3445         (find_function_start_sal_1): ... this.
3446         (find_function_start_sal): Reimplement as wrapper around
3447         find_function_start_sal_1, and use
3448         find_pc_sect_containing_function to fill in the sal's symbol.
3449         (find_function_start_sal(symbol*, bool)): Adjust.
3450         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3451         comments.
3452         (find_pc_sect_containing_function): Declare.
3453
3454 2018-06-29  Pedro Alves  <palves@redhat.com>
3455
3456         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3457         true if the the location has no symbol.
3458
3459 2018-06-28  Tom Tromey  <tom@tromey.com>
3460
3461         * NEWS: Mention --enable-codesign.
3462         * silent-rules.mk (ECHO_SIGN): New variable.
3463         * configure.ac: Add --enable-codesign.
3464         * configure: Rebuild.
3465         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3466         (gdb$(EXEEXT)): Optionally invoke codesign.
3467
3468 2018-06-28  Pedro Alves  <palves@redhat.com>
3469
3470         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3471         comments.
3472         (switch_to_thread_no_regs): Adjust comment.
3473         * infcmd.c (stop_pc): Delete.
3474         (post_create_inferior, info_program_command): Replace references
3475         to stop_pc with references to thread_info->suspend.stop_pc.
3476         * inferior.h (stop_pc): Delete declaration.
3477         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3478         (handle_inferior_event_1, handle_signal_stop)
3479         (process_event_stop_test, keep_going_stepped_thread)
3480         (handle_step_into_function, handle_step_into_function_backward)
3481         (print_stop_location): Replace references to stop_pc with
3482         references to thread_info->suspend.stop_pc.
3483         (struct infcall_suspend_state) <stop_pc>: Delete field.
3484         (save_infcall_suspend_state, restore_infcall_suspend_state):
3485         Remove references to inf_stat->stop_pc.
3486         * linux-fork.c (fork_load_infrun_state): Likewise.
3487         * record-btrace.c (record_btrace_set_replay): Likewise.
3488         * record-full.c (record_full_goto_entry): Likewise.
3489         * remote.c (print_one_stopped_thread): Likewise.
3490         * target.c (target_resume): Extend comment.
3491         * thread.c (set_executing_thread): New.
3492         (set_executing): Use it.
3493         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3494         Remove references to stop_pc.
3495
3496 2018-06-28  Pedro Alves  <palves@redhat.com>
3497
3498         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3499         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3500
3501 2018-06-28  Tom Tromey  <tom@tromey.com>
3502
3503         * coffread.c (coff_symfile_finish): Update.
3504         * xcoffread.c (xcoff_symfile_finish): Update.
3505         * elfread.c (elf_symfile_finish): Update.
3506         * symfile.h (dwarf2_free_objfile): Don't declare.
3507         * dwarf2read.c (_initialize_dwarf2_read): Use
3508         register_objfile_data_with_cleanup.
3509         (dwarf2_free_objfile): Now static.  Change signature.
3510
3511 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3512
3513         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3514         option "-o" to add-symbol-file-load to add an offset to each
3515         section's load address.
3516         * symfile.c (set_objfile_default_section_offset): New function.
3517
3518 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3519
3520         * symfile.c (add_symbol_file_command): Make sure that sections
3521         with the same name are sorted in the same order.
3522
3523 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3524
3525         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3526         require the second argument.  If omitted, load sections at the
3527         addresses specified in the file.
3528
3529 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3530
3531         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3532         (_initialize_symfile): Add option "-o" to symbol-file to add an
3533         offset to each section of the symbol file.
3534
3535 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3536
3537         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3538
3539 2018-06-27  Tom Tromey  <tom@tromey.com>
3540
3541         * stack.c (_initialize_stack): Update "func" help text.
3542
3543 2018-06-27  Tom Tromey  <tom@tromey.com>
3544
3545         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3546         std::vector.
3547         (unwind_infopy_str, pyuw_create_unwind_info)
3548         (unwind_infopy_add_saved_register, pyuw_sniffer)
3549         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3550         Update.
3551         (struct saved_reg): Add constructor.
3552         <value>: Now a gdbpy_ref<>.
3553
3554 2018-06-27  Tom Tromey  <tom@tromey.com>
3555
3556         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3557
3558 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3559
3560         * gdb-gdb.py.in: Format using autopep8.
3561
3562 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3563
3564         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3565         (type_lookup_function): Recognize CORE_ADDR values.
3566
3567 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3568
3569         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3570         print tag_name.
3571
3572 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3573
3574         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3575         <__lt__>: Add.
3576
3577 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3578
3579         * gdb-gdb.py: Move to...
3580         * gdb-gdb.py.in: ... here.
3581         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3582         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3583         dependencies.
3584         (distclean): Remove gdb-gdb.py when cleaning.
3585         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3586         * configure: Re-generate.
3587
3588 2018-06-27  Pedro Alves  <palves@redhat.com>
3589
3590         * proc-service.c (get_ps_regcache): New.
3591         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3592         (ps_lsetfpregs): Use it.
3593
3594 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3595
3596         PR gdb/21695
3597         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3598         (dwarf_decode_lines_1): Adjust.
3599
3600 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3601
3602         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3603         override.
3604         <info_proc>: Likewise.
3605
3606 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3607
3608         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3609         to windows_fetch_one_register, and only handle the case of
3610         fetching one register.  Move the code that reloads the context
3611         and iterates over all registers if R is negative to...
3612         (windows_nat_target::fetch_registers): ... here.
3613         (do_windows_store_inferior_registers): Rename to
3614         windows_store_one_register, and only handle the case of storing
3615         one register.  Move the code that handles the case where r is
3616         negative to...
3617         (windows_nat_target::store_registers) ... here.
3618
3619 2018-06-26  Tom Tromey  <tom@tromey.com>
3620
3621         PR rust/22574:
3622         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3623         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3624         Update.
3625         (rust_internal_print_type): Add podata parameter.
3626         (rust_print_type): Update.
3627
3628 2018-06-26  Tom Tromey  <tom@tromey.com>
3629
3630         * typeprint.h (struct print_offset_data) <update, finish,
3631         maybe_print_hole>: New methods.
3632         <indentation>: New constant.
3633         * typeprint.c (print_offset_data::indentation): Define.
3634         (print_offset_data::maybe_print_hole, print_offset_data::update)
3635         (print_offset_data::finish): Move from c-typeprint.c and rename.
3636         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3637         (print_spaces_filtered_with_print_options): Update.
3638         (c_print_type_union_field_offset, maybe_print_hole)
3639         (c_print_type_struct_field_offset): Move to typeprint.c and
3640         rename.
3641         (c_type_print_base_struct_union): Update.
3642
3643 2018-06-25  Pedro Alves  <palves@redhat.com>
3644
3645         * gdbthread.h (thread_info_ref, delete_thread)
3646         (delete_thread_silent, first_thread_of_inferior)
3647         (any_thread_of_inferior, switch_to_thread)
3648         (enable_thread_stack_temporaries)
3649         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3650         (get_last_thread_stack_temporary)
3651         (value_in_thread_stack_temporaries, can_access_registers_thread):
3652         Spell out "struct thread_info" instead of just "thread_info".
3653         * inferior.h (notice_new_inferior): Likewise.
3654
3655 2018-06-25  Pedro Alves  <palves@redhat.com>
3656
3657         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3658         pass thread_info pointer to delete_thread.
3659         (windows_nat_target::detach): Pass inferior pointer to
3660         detach_inferior.
3661         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3662         delete_thread.
3663         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3664         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3665         and pass a thread_info pointer to delete_thread.
3666         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3667         pass thread_info pointer to delete_thread.
3668         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3669         delete_thread_silent call.
3670         * procfs.c (procfs_target::detach): Pass inferior pointer to
3671         detach_inferior.
3672         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3673         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3674         delete_thread_silent call.
3675         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3676         pass thread_info pointer to delete_thread.
3677         (windows_nat_target::detach): Pass inferior pointer to
3678         delete_inferior.
3679
3680 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3681
3682         * regcache.c (readable_regcache::read_part): Fix asserts.
3683         (reg_buffer::raw_collect_part): New function.
3684         (regcache::write_part): Fix asserts.
3685         (reg_buffer::raw_supply_part): New function.
3686         (regcache::transfer_regset_register): New helper function.
3687         (regcache::transfer_regset): Call new functions.
3688         (regcache_supply_regset): Use gdb_byte*.
3689         (regcache::supply_regset): Likewise.
3690         (regcache_collect_regset): Likewise.
3691         (regcache::collect_regset): Likewise.
3692         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3693         (reg_buffer::raw_supply_part): Likewise.
3694         (regcache::transfer_regset_register): Likewise.
3695         (regcache::transfer_regset): Use gdb_byte*.
3696
3697 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3698
3699         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3700
3701 2018-06-21  Pedro Alves  <palves@redhat.com>
3702
3703         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3704         instead of a ptid_t.  All callers adjusted.
3705         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3706         adjusted.
3707         (print_ada_task_info, display_current_task_id, task_command_1):
3708         Adjust.
3709         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3710         inferior_thread.
3711         (breakpoint_kind): Adjust.
3712         (remove_breakpoints_pid): Rename to ...
3713         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3714         pointer.  All callers adjusted.
3715         (bpstat_clear_actions): Use inferior_thread.
3716         (get_bpstat_thread): New.
3717         (bpstat_do_actions): Use it.
3718         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3719         to take a thread_info pointer.  All callers adjusted.
3720         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3721         (breakpoint_re_set_thread): Use inferior_thread.
3722         * breakpoint.h (struct inferior): Forward declare.
3723         (bpstat_stop_status): Update.
3724         (remove_breakpoints_pid): Delete.
3725         (remove_breakpoints_inf): New.
3726         * bsd-uthread.c (bsd_uthread_target::wait)
3727         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3728         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3729         (maint_btrace_packet_history_cmd)
3730         (maint_btrace_clear_packet_history_cmd): Adjust.
3731         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3732         inferior_thread.
3733         * cli/cli-interp.c: Include "inferior.h".
3734         * common/refcounted-object.h (struct
3735         refcounted_object_ref_policy): New.
3736         * compile/compile-object-load.c: Include gdbthread.h.
3737         (store_regs): Use inferior_thread.
3738         * corelow.c (core_target::close): Use current_inferior.
3739         (core_target_open): Adjust to use first_thread_of_inferior and use
3740         the current inferior.
3741         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3742         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3743         <thread>: ... this new field.  All references adjusted.
3744         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3745         Take a thread_info pointer instead of a ptid_t.
3746         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3747         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3748         thread_info pointer instead of a ptid_t.
3749         * elfread.c: Include "inferior.h".
3750         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3751         Use inferior_thread.
3752         * eval.c (evaluate_subexp): Likewise.
3753         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3754         inferior_thread.
3755         * gdb_proc_service.h (struct thread_info): Forward declare.
3756         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3757         <thread>: ... this new field.  All references adjusted.
3758         * gdbarch.h, gdbarch.c: Regenerate.
3759         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3760         'thread' parameter.  All implementations and callers adjusted.
3761         * gdbthread.h (thread_info) <set_running>: New method.
3762         (delete_thread, delete_thread_silent): Take a thread_info pointer
3763         instead of a ptid.
3764         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3765         (first_thread_of_process): Delete, replaced by ...
3766         (first_thread_of_inferior): ... this new function.  All callers
3767         adjusted.
3768         (any_live_thread_of_process): Delete, replaced by ...
3769         (any_live_thread_of_inferior): ... this new function.  All callers
3770         adjusted.
3771         (switch_to_thread, switch_to_no_thread): Declare.
3772         (is_executing): Delete.
3773         (enable_thread_stack_temporaries): Update comment.
3774         <enable_thread_stack_temporaries>: Take a thread_info pointer
3775         instead of a ptid_t.  Incref the thread.
3776         <~enable_thread_stack_temporaries>: Decref the thread.
3777         <m_ptid>: Delete
3778         <m_thr>: New.
3779         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3780         (get_last_thread_stack_temporary)
3781         (value_in_thread_stack_temporaries, can_access_registers_thread):
3782         Take a thread_info pointer instead of a ptid_t.  All callers
3783         adjusted.
3784         * infcall.c (get_call_return_value): Use inferior_thread.
3785         (run_inferior_call): Work with thread pointers instead of ptid_t.
3786         (call_function_by_hand_dummy): Work with thread pointers instead
3787         of ptid_t.  Use thread_info_ref.
3788         * infcmd.c (proceed_thread_callback): Access thread's state
3789         directly.
3790         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3791         access thread's state directly.
3792         (continue_command): Use inferior_thread.
3793         (info_program_command): Use find_thread_ptid and access thread
3794         state directly.
3795         (proceed_after_attach_callback): Use thread state directly.
3796         (notice_new_inferior): Take a thread_info pointer instead of a
3797         ptid_t.  All callers adjusted.
3798         (exit_inferior): Take an inferior pointer instead of a pid.  All
3799         callers adjusted.
3800         (exit_inferior_silent): New.
3801         (detach_inferior): Delete.
3802         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3803         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3804         (detach_inferior_command, kill_inferior_command): Use
3805         find_inferior_id instead of valid_gdb_inferior_id and
3806         gdb_inferior_id_to_pid.
3807         (inferior_command): Use inferior and thread pointers.
3808         * inferior.h (struct thread_info): Forward declare.
3809         (notice_new_inferior): Take a thread_info pointer instead of a
3810         ptid_t.  All callers adjusted.
3811         (detach_inferior): Delete declaration.
3812         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3813         instead of a pid.  All callers adjusted.
3814         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3815         (valid_gdb_inferior_id): Delete.
3816         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3817         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3818         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3819         ...
3820         <inf>: ... this new field.
3821         <step_ptid>: Delete, replaced by ...
3822         <step_thread>: ... this new field.
3823         (get_displaced_stepping_state): Take an inferior pointer instead
3824         of a pid.  All callers adjusted.
3825         (displaced_step_in_progress_any_inferior): Adjust.
3826         (displaced_step_in_progress_thread): Take a thread pointer instead
3827         of a ptid_t.  All callers adjusted.
3828         (displaced_step_in_progress, add_displaced_stepping_state): Take
3829         an inferior pointer instead of a pid.  All callers adjusted.
3830         (get_displaced_step_closure_by_addr): Adjust.
3831         (remove_displaced_stepping_state): Take an inferior pointer
3832         instead of a pid.  All callers adjusted.
3833         (displaced_step_prepare_throw, displaced_step_prepare)
3834         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3835         All callers adjusted.
3836         (start_step_over): Adjust.
3837         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3838         displaced step queue.
3839         (do_target_resume): Adjust.
3840         (fetch_inferior_event): Use inferior_thread.
3841         (context_switch, get_inferior_stop_soon): Take an
3842         execution_control_state pointer instead of a ptid_t.  All callers
3843         adjusted.
3844         (switch_to_thread_cleanup): Delete.
3845         (stop_all_threads): Use scoped_restore_current_thread.
3846         * inline-frame.c: Include "gdbthread.h".
3847         (inline_state) <inline_state>: Take a thread pointer instead of a
3848         ptid_t.  All callers adjusted.
3849         <ptid>: Delete, replaced by ...
3850         <thread>: ... this new field.
3851         (find_inline_frame_state): Take a thread pointer instead of a
3852         ptid_t.  All callers adjusted.
3853         (skip_inline_frames, step_into_inline_frame)
3854         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3855         pointer instead of a ptid_t.  All callers adjusted.
3856         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3857         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3858         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3859         pointers directly.
3860         * linux-nat.c (get_detach_signal): Likewise.
3861         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3862         (thread_db_notice_clone): Adjust.
3863         (thread_db_find_new_threads_silently)
3864         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3865         a thread pointer instead of a ptid_t.  All callers adjusted.
3866         * mi/mi-cmd-var.c: Include "inferior.h".
3867         (mi_cmd_var_update_iter): Update to use thread pointers.
3868         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3869         inferior directly.
3870         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3871         out to ...
3872         (mi_output_running): ... this new function.
3873         (mi_on_resume_1): Adjust to use it.
3874         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3875         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3876         directly.
3877         (interrupt_thread_callback): : Adjust to use thread and inferior
3878         pointers.
3879         * proc-service.c: Include "gdbthread.h".
3880         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3881         * progspace-and-thread.c: Include "inferior.h".
3882         * progspace.c: Include "inferior.h".
3883         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3884         hold a reference to an inferior_object.
3885         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3886         inferior_thread.
3887         * python/py-inferior.c (struct inferior_object): Give the type a
3888         tag name instead of a typedef.
3889         (python_on_normal_stop): No need to check if the current thread is
3890         listed.
3891         (inferior_to_inferior_object): Change return type to
3892         inferior_object.  All callers adjusted.
3893         (find_thread_object): Delete, bits factored out to ...
3894         (thread_to_thread_object): ... this new function.
3895         * python/py-infthread.c (create_thread_object): Use
3896         inferior_to_inferior_object.
3897         (thpy_is_stopped): Use thread pointer directly.
3898         (gdbpy_selected_thread): Use inferior_thread.
3899         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3900         field, replaced with ...
3901         <thread>: ... this new field.  All users adjusted.
3902         (btpy_insn_or_gap_new): Drop const.
3903         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3904         callers adjusted.
3905         * python/py-record.c: Include "gdbthread.h".
3906         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3907         a ptid_t.  All callers adjusted.
3908         (gdbpy_current_recording): Use inferior_thread.
3909         * python/py-record.h (recpy_record_object) <ptid>: Delete
3910         field, replaced with ...
3911         <thread>: ... this new field.  All users adjusted.
3912         (recpy_element_object) <ptid>: Delete
3913         field, replaced with ...
3914         <thread>: ... this new field.  All users adjusted.
3915         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3916         a ptid_t.  All callers adjusted.
3917         * python/py-threadevent.c: Include "gdbthread.h".
3918         (get_event_thread): Use thread_to_thread_object.
3919         * python/python-internal.h (struct inferior_object): Forward
3920         declare.
3921         (find_thread_object, find_inferior_object): Delete declarations.
3922         (thread_to_thread_object, inferior_to_inferior_object): New
3923         declarations.
3924         * record-btrace.c: Include "inferior.h".
3925         (require_btrace_thread): Use inferior_thread.
3926         (record_btrace_frame_sniffer)
3927         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3928         (get_thread_current_frame): Use scoped_restore_current_thread and
3929         switch_to_thread.
3930         (get_thread_current_frame): Use thread pointer directly.
3931         (record_btrace_replay_at_breakpoint): Use thread's inferior
3932         pointer directly.
3933         * record-full.c: Include "inferior.h".
3934         * regcache.c: Include "gdbthread.h".
3935         (get_thread_arch_regcache): Use the inferior's address space
3936         directly.
3937         (get_thread_regcache, registers_changed_thread): New.
3938         * regcache.h (get_thread_regcache(thread_info *thread)): New
3939         overload.
3940         (registers_changed_thread): New.
3941         (remote_target) <remote_detach_1>: Swap order of parameters.
3942         (remote_add_thread): <remote_add_thread>: Return the new thread.
3943         (get_remote_thread_info(ptid_t)): New overload.
3944         (remote_target::remote_notice_new_inferior): Use thread pointers
3945         directly.
3946         (remote_target::process_initial_stop_replies): Use
3947         thread_info::set_running.
3948         (remote_target::remote_detach_1, remote_target::detach)
3949         (extended_remote_target::detach): Adjust.
3950         * stack.c (frame_show_address): Use inferior_thread.
3951         * target-debug.h (target_debug_print_thread_info_pp): New.
3952         * target-delegates.c: Regenerate.
3953         * target.c (default_thread_address_space): Delete.
3954         (memory_xfer_partial_1): Use current_inferior.
3955         (target_detach): Use current_inferior.
3956         (target_thread_address_space): Delete.
3957         (generic_mourn_inferior): Use current_inferior.
3958         * target.h (struct target_ops) <thread_address_space>: Delete.
3959         (target_thread_address_space): Delete.
3960         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
3961         pointers directly.
3962         (delete_thread_1, delete_thread, delete_thread_silent): Take a
3963         thread pointer instead of a ptid_t.  Adjust all callers.
3964         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3965         (first_thread_of_process): Delete, replaced by ...
3966         (first_thread_of_inferior): ... this new function.  All callers
3967         adjusted.
3968         (any_thread_of_process): Rename to ...
3969         (any_thread_of_inferior): ... this, and take an inferior pointer.
3970         (any_live_thread_of_process): Rename to ...
3971         (any_live_thread_of_inferior): ... this, and take an inferior
3972         pointer.
3973         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3974         (value_in_thread_stack_temporaries)
3975         (get_last_thread_stack_temporary): Take a thread pointer instead
3976         of a ptid_t.  Adjust all callers.
3977         (thread_info::set_running): New.
3978         (validate_registers_access): Use inferior_thread.
3979         (can_access_registers_ptid): Rename to ...
3980         (can_access_registers_thread): ... this, and take a thread
3981         pointer.
3982         (print_thread_info_1): Adjust to compare thread pointers instead
3983         of ptids.
3984         (switch_to_no_thread, switch_to_thread): Make extern.
3985         (scoped_restore_current_thread::~scoped_restore_current_thread):
3986         Use m_thread pointer directly.
3987         (scoped_restore_current_thread::scoped_restore_current_thread):
3988         Use inferior_thread.
3989         (thread_command): Use thread pointer directly.
3990         (thread_num_make_value_helper): Use inferior_thread.
3991         * top.c (execute_command): Use inferior_thread.
3992         * tui/tui-interp.c: Include "inferior.h".
3993         * varobj.c (varobj_create): Use inferior_thread.
3994         (value_of_root_1): Use find_thread_global_id instead of
3995         global_thread_id_to_ptid.
3996
3997 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
3998
3999         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4000         possible.
4001         (regcache::write_part): Likewise.
4002         (readable_regcache::cooked_read_part): Update comment.
4003         (readable_regcache::cooked_write_part): Likewise.
4004         * regcache.h: (readable_regcache::read_part): Likewise.
4005         (regcache::write_part): Likewise.
4006
4007 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4008             Dirk Schubert  <dirk.schubert@arm.com>
4009
4010         * aarch64-linux-nat.c (post_attach): New.
4011         (aarch64_linux_nat_target::post_attach): Override post_attach to
4012         record the number of hardware debug registers.
4013
4014 2018-06-20  Tom Tromey  <tom@tromey.com>
4015
4016         * python/py-param.c (add_setshow_generic): Make parameters const.
4017         (parmpy_init): Update.
4018
4019 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4020
4021         * regcache.h (regcache_cooked_read_ftype): Rename to...
4022         (register_read_ftype): ...this, change type to function_view.
4023         (class reg_buffer) <save>: Remove src parameter.
4024         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4025         parameter non-const in first overload.  Remove src parameter in
4026         second overload.
4027         * regcache.c (do_cooked_read): Remove.
4028         (readonly_detached_regcache::readonly_detached_regcache): Make
4029         parameter non-const, adjust call to other constructor.
4030         (reg_buffer::save): Remove src parameter.
4031         * frame.c (do_frame_register_read): Remove.
4032         (frame_save_as_regcache): Use lambda function.
4033         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4034         parameter to ppu2spu_data *.
4035         (ppu2spu_sniffer): Use lambda function.
4036
4037 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4038
4039         * record-full.c (record_full_target::insert_breakpoint): Remove
4040         "struct" keyword, add const.
4041
4042 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4043
4044         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4045         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4046         * configure.ac: Remove AC_PREREQ, add missing quoting.
4047         * gnulib/configure.ac: Modernize usage of
4048         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4049         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4050         (AUTOMAKE_VERSION): Bump to 1.15.1.
4051         * configure: Re-generate.
4052         * config.in: Re-generate.
4053         * aclocal.m4: Re-generate.
4054         * gnulib/aclocal.m4: Re-generate.
4055         * gnulib/config.in: Re-generate.
4056         * gnulib/configure: Re-generate.
4057         * gnulib/import/Makefile.in: Re-generate.
4058
4059 2018-06-19  Pedro Alves  <palves@redhat.com>
4060
4061         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4062         (lookup_minimal_symbol_by_pc_section): ... here with
4063         gdb_assert_not_reached added.
4064
4065 2018-06-19  Pedro Alves  <palves@redhat.com>
4066
4067         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4068         parameter with a block parameter.  Compare location's block symbol
4069         with the frame's block instead of addresses.
4070         (skip_inline_frames): Pass the current block instead of the
4071         frame's address.  Break out as soon as we determine the frame
4072         should not be skipped.
4073
4074 2018-06-18  Tom Tromey  <tom@tromey.com>
4075
4076         * solib-aix.c (solib_aix_get_section_offsets): Return
4077         unique_xmalloc_ptr.
4078         (solib_aix_solib_create_inferior_hook): Update.
4079
4080 2018-06-18  Tom Tromey  <tom@tromey.com>
4081
4082         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4083
4084 2018-06-18  Tom Tromey  <tom@tromey.com>
4085
4086         * solib-frv.c (frv_relocate_main_executable): Use
4087         unique_xmalloc_ptr.
4088         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4089         unique_xmalloc_ptr.
4090
4091 2018-06-18  Tom Tromey  <tom@tromey.com>
4092
4093         * objfiles.h (inhibit_section_map_updates): Update.
4094         (resume_section_map_updates, resume_section_map_updates_cleanup):
4095         Remove.
4096         * solib-svr4.c (svr4_handle_solib_event): Update.
4097         * objfiles.c (inhibit_section_map_updates): Return
4098         scoped_restore_tmpl<int>.
4099         (resume_section_map_updates, resume_section_map_updates_cleanup):
4100         Remove.
4101
4102 2018-06-18  Tom Tromey  <tom@tromey.com>
4103
4104         * valprint.h (read_string): Update.
4105         * valprint.c (read_string): Change type of "buffer".
4106         (val_print_string): Update.
4107         * python/py-value.c (valpy_string): Update.
4108         * language.h (struct language_defn) <la_get_string>: Change
4109         type of "buffer".
4110         (default_get_string, c_get_string): Update.
4111         * language.c (default_get_string): Change type of "buffer".
4112         * guile/scm-value.c (gdbscm_value_to_string): Update.
4113         * c-lang.c (c_get_string): Change type of "buffer".
4114
4115 2018-06-18  Tom Tromey  <tom@tromey.com>
4116
4117         * ser-mingw.c (struct pipe_state_destroyer): New.
4118         (pipe_state_up): New typedef.
4119         (cleanup_pipe_state): Remove.
4120         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4121
4122 2018-06-18  Tom Tromey  <tom@tromey.com>
4123
4124         * rust-lang.h (rust_yyerror): Don't declare.
4125         * rust-lang.c (rust_language_defn): Update.
4126         * rust-exp.y (yyerror): Now static.
4127         * parse.c (parse_exp_in_context_1): Update.
4128         * p-lang.h (p_yyerror): Don't declare.
4129         * p-lang.c (p_language_defn): Update.
4130         * p-exp.y (yyerror): Now static.
4131         * opencl-lang.c (opencl_language_defn): Update.
4132         * objc-lang.c (objc_language_defn): Update.
4133         * m2-lang.h (m2_yyerror): Don't declare.
4134         * m2-lang.c (m2_language_defn): Update.
4135         * m2-exp.y (yyerror): Now static.
4136         * language.h (struct language_defn) <la_error>: Remove.
4137         * language.c (unk_lang_error): Remove.
4138         (unknown_language_defn, auto_language_defn): Remove.
4139         * go-lang.h (go_yyerror): Don't declare.
4140         * go-lang.c (go_language_defn): Update.
4141         * go-exp.y (yyerror): Now static.
4142         * f-lang.h (f_yyerror): Don't declare.
4143         * f-lang.c (f_language_defn): Update.
4144         * f-exp.y (yyerror): Now static.
4145         * d-lang.h (d_yyerror): Don't declare.
4146         * d-lang.c (d_language_defn): Update.
4147         * d-exp.y (yyerror): Now static.
4148         * c-lang.h (c_yyerror): Don't declare.
4149         * c-lang.c (c_language_defn, cplus_language_defn)
4150         (asm_language_defn, minimal_language_defn): Update.
4151         * c-exp.y (yyerror): Now static.
4152         * ada-lang.h (ada_yyerror): Don't declare.
4153         * ada-lang.c (ada_language_defn): Update.
4154         * ada-exp.y (yyerror): Now static.
4155
4156 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4157
4158         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4159         (store_sveregs_to_thread): Likewise.
4160         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4161         (aarch64_linux_store_inferior_registers): Likewise.
4162         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4163         function.
4164         (aarch64_sve_regs_copy_to_regcache): Likewise.
4165         (aarch64_sve_regs_copy_from_regcache): Likewise.
4166         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4167         declaration.
4168         (aarch64_sve_regs_copy_to_regcache): Likewise.
4169         (aarch64_sve_regs_copy_from_regcache): Likewise.
4170         (sve_context): Structure from Linux headers.
4171         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4172         (SVE_SIG_ZREG_SIZE): Likewise.
4173         (SVE_SIG_PREG_SIZE): Likewise.
4174         (SVE_SIG_FFR_SIZE): Likewise.
4175         (SVE_SIG_REGS_OFFSET): Likewise.
4176         (SVE_SIG_ZREGS_OFFSET): Likewise.
4177         (SVE_SIG_ZREG_OFFSET): Likewise.
4178         (SVE_SIG_ZREGS_SIZE): Likewise.
4179         (SVE_SIG_PREGS_OFFSET): Likewise.
4180         (SVE_SIG_PREG_OFFSET): Likewise.
4181         (SVE_SIG_PREGS_SIZE): Likewise.
4182         (SVE_SIG_FFR_OFFSET): Likewise.
4183         (SVE_SIG_REGS_SIZE): Likewise.
4184         (SVE_SIG_CONTEXT_SIZE): Likewise.
4185         (SVE_PT_REGS_MASK): Likewise.
4186         (SVE_PT_REGS_FPSIMD): Likewise.
4187         (SVE_PT_REGS_SVE): Likewise.
4188         (SVE_PT_VL_INHERIT): Likewise.
4189         (SVE_PT_VL_ONEXEC): Likewise.
4190         (SVE_PT_REGS_OFFSET): Likewise.
4191         (SVE_PT_FPSIMD_OFFSET): Likewise.
4192         (SVE_PT_FPSIMD_SIZE): Likewise.
4193         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4194         (SVE_PT_SVE_PREG_SIZE): Likewise.
4195         (SVE_PT_SVE_FFR_SIZE): Likewise.
4196         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4197         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4198         (__SVE_SIG_TO_PT): Likewise.
4199         (SVE_PT_SVE_OFFSET): Likewise.
4200         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4201         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4202         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4203         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4204         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4205         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4206         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4207         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4208         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4209         (SVE_PT_SVE_SIZE): Likewise.
4210         (SVE_PT_SIZE): Likewise.
4211         (HAS_SVE_STATE): New define.
4212
4213 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4214
4215         * nat/aarch64-sve-linux-sigcontext.h: New file.
4216         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4217         new files.
4218         (SVE_VQ_MIN): Likewise.
4219         (SVE_VQ_MAX): Likewise.
4220         (SVE_VL_MIN): Likewise.
4221         (SVE_VL_MAX): Likewise.
4222         (SVE_NUM_ZREGS): Likewise.
4223         (SVE_NUM_PREGS): Likewise.
4224         (sve_vl_valid): Likewise.
4225         (struct user_sve_header): Likewise.
4226
4227 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4228             Richard Bunt <Richard.Bunt@arm.com>
4229
4230         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4231         was requested by GDB.
4232
4233 2018-06-15  Tom de Vries  <tdevries@suse.de>
4234
4235         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4236
4237 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4238
4239         * gnulib/update-gnulib.sh: Print expected versions of
4240         autoconf/aclocal.
4241
4242 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4243
4244         * arch-utils.c (default_type_align): Use type_length_units.
4245         * gdbtypes.c (type_align): Use type_length_units.
4246
4247 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4248
4249         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4250         of 'define' command.
4251
4252 2018-06-14  Tom de Vries  <tdevries@suse.de>
4253
4254         PR cli/22573
4255         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4256         get_no_prettyformat_print_options.
4257
4258 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4259
4260         * sparc-nat.h: Include target.h.
4261         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4262         <fetch_registers>: Remove this argument in function call.
4263         <store_registers>: Remove this argument in function call, remove
4264         extra semicolon.
4265         <low_forget_process>: Call sparc64_forget_process instead of
4266         sparc_forget_process.
4267
4268 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4269
4270         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4271         (procfs_target::make_corefile_notes): Adjust to new
4272         target_read_alloc return type.
4273
4274 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4275             Stephen Roberts  <stephen.roberts@arm.com>
4276
4277         PR gdb/22882
4278         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4279         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4280         Move should_notify_stop local into more inner scope.
4281
4282 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4283             Stephen Roberts  <stephen.roberts@arm.com>
4284
4285         PR gdb/22882
4286         * infrun.c (resume_1): Add call to mark_async_event_handler.
4287
4288 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4289
4290         * infrun.c (do_target_wait): Change old version of $pc printed.
4291
4292 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4293
4294         * dwarf2read.c (read_index_from_section): Rename to...
4295         (read_gdb_index_from_section): ... this, update all callers.
4296         (dwarf2_read_index): Rename to...
4297         (dwarf2_read_gdb_index): ... this, update all callers.
4298
4299 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4300
4301         * gdb/hppa-linux-nat.c
4302         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4303         hppa_linux_nat_target::fetch_registers.
4304
4305 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4306
4307         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4308         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4309         (AARCH64_DWARF_SVE_FFR): Likewise.
4310         (AARCH64_DWARF_SVE_P0): Likewise.
4311         (AARCH64_DWARF_SVE_Z0): Likewise.
4312
4313 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4314
4315         * common/common-regcache.h (raw_compare): New function.
4316         * regcache.c (regcache::raw_compare): Likewise.
4317         * regcache.h (regcache::raw_compare): New declaration.
4318
4319 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4320
4321         * common/common-regcache.h (reg_buffer_common): New structure.
4322         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4323         (reg_buffer::raw_supply): Likewise.
4324         (reg_buffer::raw_supply_integer): Likewise.
4325         (reg_buffer::raw_supply_zeroed): Likewise.
4326         (reg_buffer::raw_collect): Likewise.
4327         (reg_buffer::raw_collect_integer): Likewise.
4328         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4329         (reg_buffer::raw_supply): Likewise.
4330         (reg_buffer::raw_supply_integer): Likewise.
4331         (reg_buffer::raw_supply_zeroed): Likewise.
4332         (reg_buffer::raw_collect): Likewise.
4333         (reg_buffer::raw_collect_integer): Likewise.
4334
4335 2018-06-10  Tom Tromey  <tom@tromey.com>
4336
4337         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4338         (class remote_state) <stop_reply_queue>: Now std::vector.
4339         (remote_state::~remote_state)
4340         (remote_target::stop_reply_queue_length): Update.
4341         (struct queue_iter_param, remove_child_of_pending_fork)
4342         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4343         (check_pending_event_prevents_wildcard_vcont_callback)
4344         (remove_stop_reply_for_inferior)
4345         (remove_stop_reply_of_remote_state)
4346         (remote_notif_remove_once_on_match)
4347         (stop_reply_match_ptid_and_ws)
4348         (remote_kill_child_of_pending_fork): Remove.
4349         (remote_target::remove_new_fork_children)
4350         (remote_target::check_pending_events_prevent_wildcard_vcont)
4351         (remote_target::discard_pending_stop_replies)
4352         (remote_target::discard_pending_stop_replies_in_queue)
4353         (remote_target::remote_notif_remove_queued_reply)
4354         (remote_target::queued_stop_reply)
4355         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4356         (remote_target::wait, remote_target::kill_new_fork_children)
4357         (remote_target::async): Update.
4358
4359 2018-06-10  Tom Tromey  <tom@tromey.com>
4360
4361         * record-full.c (record_full_arch_list_cleanups): Remove.
4362         (record_full_message): Use try/catch.
4363         (record_full_wait_cleanups): Remove.
4364         (record_full_wait_1): Use try/catch.
4365         (record_full_restore): Likewise.
4366
4367 2018-06-10  Tom Tromey  <tom@tromey.com>
4368
4369         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4370         declare VEC.  Add constructor.
4371         <in_target_beneath>: Now bool.
4372         (record_full_breakpoints): Now a std::vector, static.
4373         (record_full_sync_record_breakpoints)
4374         (record_full_init_record_breakpoints)
4375         (record_full_target::insert_breakpoint)
4376         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4377
4378 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4379
4380         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4381         * serial.c (serial_interface_lookup): Remove struct keyword.
4382
4383 2018-06-10  Tom Tromey  <tom@tromey.com>
4384
4385         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4386         method.
4387         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4388         a method.
4389         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4390         method.
4391         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4392         "beneath" as a method.
4393         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4394         Use "beneath" as a method.
4395
4396 2018-06-10  Tom Tromey  <tom@tromey.com>
4397
4398         * tracefile.c (struct trace_file_writer_deleter): New.
4399         <operator()>: Rename from trace_file_writer_xfree.
4400         (trace_file_writer_up): New typedef.
4401         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4402
4403 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4404
4405         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4406         <m_registers, m_register_status>: Change type to
4407         std::unique_ptr.
4408         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4409         XCNEWVEC.
4410
4411 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4412
4413         * common/common-regcache.h (enum register_status): Add
4414         underlying type "signed char".
4415         * regcache.h (reg_buffer) <m_register_status>: Change type to
4416         register_status *.
4417         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4418         register_status instead of signed char.
4419         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4420         (reg_buffer::get_register_status): Remove cast.
4421         (readable_regcache::raw_read): Remove cast.
4422         (readable_regcache::cooked_read): Remove cast.
4423
4424 2018-06-09  Tom Tromey  <tom@tromey.com>
4425
4426         * source.c (reverse_search_command, forward_search_command): Use
4427         scoped_fd.
4428
4429 2018-06-09  Tom Tromey  <tom@tromey.com>
4430
4431         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4432         (serial_ops_list): Now static, std::vector.
4433         (serial_interface_lookup, serial_add_interface): Update.
4434
4435 2018-06-09  Tom Tromey  <tom@tromey.com>
4436
4437         * dwarf2read.c (process_cu_includes): Update.
4438         (process_full_comp_unit): Update.
4439         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4440         std::vector.
4441
4442 2018-06-08  Paul Koning  <paul_koning@dell.com>
4443
4444         PR gdb/23252
4445
4446         * python/python.c (do_start_initialization):
4447         Avoid call to internal Python API.
4448         (init__gdb_module): New function.
4449
4450 2018-06-08  Gary Benson <gbenson@redhat.com>
4451
4452         * linux-thread-db.c (valprint.h): New include.
4453         (struct check_thread_db_info): New structure.
4454         (check_thread_db_on_load, tdb_testinfo): New static globals.
4455         (check_thread_db, check_thread_db_callback): New functions.
4456         (try_thread_db_load_1): Run integrity checks if requested.
4457         (maintenance_check_libthread_db): New function.
4458         (_initialize_thread_db): Register "maint check libthread-db"
4459         and "maint set/show check-libthread-db".
4460         * NEWS: Mention the above new commands.
4461
4462 2018-06-08  Tom Tromey  <tom@tromey.com>
4463
4464         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4465         now a method.
4466
4467 2018-06-08  Tom Tromey  <tom@tromey.com>
4468
4469         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4470
4471 2018-06-08  Tom Tromey  <tom@tromey.com>
4472
4473         * common/btrace-common.h (struct btrace_data): Add constructor,
4474         destructor, move assignment operator.
4475         <empty, clear, fini>: New methods.
4476         <format>: Initialize.
4477         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4478         (btrace_data_empty): Don't declare.
4479         * common/btrace-common.c (btrace_data_init): Remove.
4480         (btrace_data::fini): Rename from btrace_data_fini.
4481         (btrace_data::empty): Rename from btrace_data_empty.
4482         (btrace_data::clear): Rename from btrace_data_clear.  Return
4483         bool.
4484         * btrace.h (make_cleanup_btrace_data): Don't declare.
4485         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4486         (parse_xml_btrace): Update.
4487         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4488         (maint_btrace_clear_packet_history_cmd): Update.
4489
4490 2018-06-07  Pedro Alves  <palves@redhat.com>
4491
4492         * target.h (target_ops) <beneath>: Now a method.  All references
4493         updated.
4494         (class target_stack): New.
4495         * target.c (g_target_stack): New.
4496         (g_current_top_target): Delete.
4497         (current_top_target): Get the top target out of g_target_stack.
4498         (target_stack::push, target_stack::unpush): New.
4499         (push_target, unpush_target): Reimplement.
4500         (target_is_pushed): Reimplement in terms of g_target_stack.
4501         (target_ops::beneath, target_stack::find_beneath): New.
4502
4503 2018-06-07  Pedro Alves  <palves@redhat.com>
4504
4505         * target.h (find_target_beneath): Delete declaration.
4506         * target.c (find_target_beneath): Delete definition.
4507         * aix-thread.c: All callers of find_target_beneath adjusted to
4508         call target_ops::beneath instead.
4509         * bsd-uthread.c: Likewise.
4510         * linux-thread-db.c: Likewise.
4511         * ravenscar-thread.c: Likewise.
4512         * sol-thread.c: Likewise.
4513         * spu-multiarch.c: Likewise.
4514
4515 2018-06-07  Pedro Alves  <palves@redhat.com>
4516
4517         * target.h (target_ops) <beneath>: Now a method.  All references
4518         updated.
4519         (target_ops) <m_beneath>: New.
4520         * target.c (target_ops::beneath): New.
4521         * corelow.c: Adjust all references to target_ops::beneath.
4522         * linux-thread-db.c: Likewise.
4523         * make-target-delegates: Likewise.
4524         * record-btrace.c: Likewise.
4525         * record-full.c: Likewise.
4526         * remote.c: Likewise.
4527         * target.c: Likewise.
4528         * target-delegates.c: Regenerate.
4529
4530 2018-06-07  Pedro Alves  <palves@redhat.com>
4531
4532         * target.h (target_stack): Delete.
4533         (current_top_target): Declare function.
4534         * target.c (target_stack): Delete.
4535         (g_current_top_target): New.
4536         (current_top_target): New function.
4537         * auxv.c: Use current_top_target instead of target_stack
4538         throughout.
4539         * avr-tdep.c: Likewise.
4540         * breakpoint.c: Likewise.
4541         * corefile.c: Likewise.
4542         * elfread.c: Likewise.
4543         * eval.c: Likewise.
4544         * exceptions.c: Likewise.
4545         * frame.c: Likewise.
4546         * gdbarch-selftests.c: Likewise.
4547         * gnu-v3-abi.c: Likewise.
4548         * ia64-tdep.c: Likewise.
4549         * ia64-vms-tdep.c: Likewise.
4550         * infcall.c: Likewise.
4551         * infcmd.c: Likewise.
4552         * infrun.c: Likewise.
4553         * linespec.c: Likewise.
4554         * linux-tdep.c: Likewise.
4555         * minsyms.c: Likewise.
4556         * ppc-linux-nat.c: Likewise.
4557         * ppc-linux-tdep.c: Likewise.
4558         * procfs.c: Likewise.
4559         * regcache.c: Likewise.
4560         * remote.c: Likewise.
4561         * rs6000-tdep.c: Likewise.
4562         * s390-linux-nat.c: Likewise.
4563         * s390-tdep.c: Likewise.
4564         * solib-aix.c: Likewise.
4565         * solib-darwin.c: Likewise.
4566         * solib-dsbt.c: Likewise.
4567         * solib-spu.c: Likewise.
4568         * solib-svr4.c: Likewise.
4569         * solib-target.c: Likewise.
4570         * sparc-tdep.c: Likewise.
4571         * sparc64-tdep.c: Likewise.
4572         * spu-tdep.c: Likewise.
4573         * symfile.c: Likewise.
4574         * symtab.c: Likewise.
4575         * target-descriptions.c: Likewise.
4576         * target-memory.c: Likewise.
4577         * target.c: Likewise.
4578         * target.h: Likewise.
4579         * tracefile-tfile.c: Likewise.
4580         * tracepoint.c: Likewise.
4581         * valops.c: Likewise.
4582         * valprint.c: Likewise.
4583         * value.c: Likewise.
4584         * windows-tdep.c: Likewise.
4585         * mi/mi-main.c: Likewise.
4586
4587 2018-06-07  Tom Tromey  <tom@tromey.com>
4588
4589         * valprint.h (build_address_symbolic): Declare.
4590         * printcmd.c (print_address_symbolic): Update.
4591         (build_address_symbolic): Change "name" and "filename" to
4592         std::string.
4593         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4594         Update.
4595         * defs.h (build_address_symbolic): Remove declaration.
4596
4597 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4598
4599         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4600         (aarch64_vnv_type): Add function.
4601         (aarch64_pseudo_register_name): Add V regs for SVE.
4602         (aarch64_pseudo_register_type): Likewise.
4603         (aarch64_pseudo_register_reggroup_p): Likewise.
4604         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4605         (aarch64_pseudo_read_value): Add V regs for SVE.
4606         (aarch64_pseudo_write_2): Use V0 offset for SVE
4607         (aarch64_pseudo_write): Add V regs for SVE.
4608         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4609
4610 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4611
4612         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4613         (sve_vl_from_vq): Likewise.
4614
4615 2018-06-05  Tom Tromey  <tom@tromey.com>
4616
4617         * cli/cli-cmds.c (show_version): Update.
4618         * top.c (print_gdb_version): Add "interactive" parameter.
4619         Update.
4620         * main.c (captured_main_1): Update.
4621         * top.h (print_gdb_version): Add "interactive" parameter and a
4622         comment.
4623
4624 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4625
4626         * common/enum-flags.h: Add trailing semicolon to example in
4627         comment.
4628
4629 2018-06-05  Tom Tromey  <tom@tromey.com>
4630
4631         PR cli/12326:
4632         * NEWS: Add entry about pager.
4633         * utils.c (pagination_disabled_for_command): New global.
4634         (prompt_for_continue): Allow "c" response to prompt.
4635         (reinitialize_more_filter): Clear
4636         pagination_disabled_for_command.
4637         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4638
4639 2018-06-04  Tom Tromey  <tom@tromey.com>
4640
4641         * ada-lang.h (ada_lookup_symbol_list): Update.
4642         * ada-lang.c (resolve_subexp): Update.
4643         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4644         parameter.
4645         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4646         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4647         results parameter to std::vector.
4648         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4649         Update.
4650         * ada-exp.y (block_lookup): Update.
4651         (select_possible_type_sym): Change type of syms.  Remove nsyms
4652         parameter.
4653         (write_var_or_type, write_name_assoc): Update.
4654
4655 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4656
4657         * windows-nat.c (windows_nat_target::xfer_partial): Return
4658         TARGET_XFER_E_IO if we need to delegate to the target beneath
4659         but BENEATH is NULL.
4660
4661 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4662
4663         * Makefile.in (config.status): Add configure.nat as a
4664         dependency.
4665
4666 2018-06-04  Tom Tromey  <tom@tromey.com>
4667
4668         * cp-name-parser.y (cpname_state): Add method declarations.
4669         (HANDLE_QUAL): Update.
4670         (cpname_state::d_grab, cpname_state::fill_comp)
4671         (cpname_state::make_operator, cpname_state::make_dtor)
4672         (cpname_state::make_builtin_type, cpname_state::make_name)
4673         (cpname_state::d_qualify, cpname_state::d_int_type)
4674         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4675         (%union): Move earlier.
4676
4677 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4678
4679         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4680
4681 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4682
4683         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4684         (aarch64_pseudo_write_1): Likewise.
4685         (aarch64_pseudo_read_value): Use helper.
4686         (aarch64_pseudo_write): Likewise.
4687
4688 2018-06-04  Pedro Alves  <palves@redhat.com>
4689
4690         * darwin-nat.c (darwin_ops): Delete.
4691         (darwin_attach_pid): Use get_native_target.
4692
4693 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4694
4695         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4696         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4697
4698 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4699
4700         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4701         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4702         (aarch64_gdbarch_init): Check for SVE.
4703         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4704
4705 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4706
4707         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4708         * aarch64-tdep.h (aarch64_read_description): Likewise.
4709         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4710         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4711         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4712         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4713         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4714
4715 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4716
4717         * value.c (value_fetch_lazy_bitfield): New.
4718         (value_fetch_lazy_memory): New.
4719         (value_fetch_lazy_register): New.
4720         (value_fetch_lazy): Factor out to smaller functions.
4721
4722 2018-06-01  Tom Tromey  <tom@tromey.com>
4723
4724         * cp-name-parser.y (backslashable, represented): Now const.
4725
4726 2018-06-01  Tom Tromey  <tom@tromey.com>
4727
4728         * cp-name-parser.y: Include parser-defs.h.
4729         (parser_fprintf): Remove declaration.
4730
4731 2018-06-01  Tom Tromey  <tom@tromey.com>
4732
4733         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4734         %parse-param.
4735         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4736         (global_result): Remove globals.
4737         (struct cpname_state): New.
4738         (yyparse): Don't declare.
4739         (yylex, yyerror): Move declarations after %union.
4740         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4741         (make_name): Add state parameter.
4742         Update all callers.
4743         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4744         parameter.
4745         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4746         Update.
4747         (yylex): Add lvalp, state parameters.
4748         (yyerror): Add state parameter.
4749         (cp_demangled_name_to_comp): Update.
4750
4751 2018-06-01  Tom Tromey  <tom@tromey.com>
4752
4753         * cp-name-parser.y (parser_fprintf): Declare.
4754         (GDB_YY_REMAP_PREFIX): Define.
4755         Include yy-remap.h.  Don't redefine yy* identifiers.
4756
4757 2018-06-01  Tom Tromey  <tom@tromey.com>
4758
4759         * python/py-type.c (typy_legacy_template_argument): Update.
4760         * cp-support.h (cp_demangled_name_to_comp): Update.
4761         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4762         parameter to be a "std::string *".
4763         (main): Update.
4764
4765 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4766
4767         * ada-lex.l: Include "diagnostics.h" instead of
4768         "common/diagnostics.h".
4769         * unittests/environ-selftests.c: Likewise.
4770         * common/diagnostics.h: Moved to ../include.
4771
4772 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4773
4774         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4775         to language_mode_manual while calling breakpoint_re_set_one.
4776
4777 2018-06-01  Tom Tromey  <tom@tromey.com>
4778
4779         * valops.c (value_cast_structs, destructor_name_p): Update.
4780         * symtab.c (gdb_mangle_name): Update.
4781         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4782         Update.
4783         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4784         (pascal_object_print_value_fields, pascal_object_print_value):
4785         Update.
4786         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4787         * linespec.c (find_methods): Update.
4788         * gdbtypes.h (type_name_no_tag): Remove.
4789         (type_name_or_error): Rename from type_name_no_tag_or_error.
4790         * gdbtypes.c (type_name_no_tag): Remove.
4791         (type_name_or_error): Rename from type_name_no_tag_or_error.
4792         (lookup_struct_elt_type, check_typedef): Update.
4793         * expprint.c (print_subexp_standard): Update.
4794         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4795         * d-namespace.c (d_lookup_nested_symbol): Update.
4796         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4797         (cp_print_class_member): Update.
4798         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4799         * completer.c (add_struct_fields): Update.
4800         * c-typeprint.c (cp_type_print_derivation_info)
4801         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4802         Update.
4803         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4804         (ada_prefer_type, ada_is_exception_sym): Update.
4805
4806 2018-06-01  Tom Tromey  <tom@tromey.com>
4807
4808         * valops.c (enum_constant_from_type, value_namespace_elt)
4809         (value_maybe_namespace_elt): Update.
4810         * valarith.c (find_size_for_pointer_math): Update.
4811         * target-descriptions.c (make_gdb_type): Update.
4812         * symmisc.c (print_symbol): Update.
4813         * stabsread.c (define_symbol, read_type)
4814         (complain_about_struct_wipeout, add_undefined_type)
4815         (cleanup_undefined_types_1): Update.
4816         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4817         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4818         (rust_internal_print_type, rust_composite_type)
4819         (rust_evaluate_funcall, rust_evaluate_subexp)
4820         (rust_inclusive_range_type_p): Update.
4821         * python/py-type.c (typy_get_tag): Update.
4822         * p-typeprint.c (pascal_type_print_base): Update.
4823         * mdebugread.c (parse_symbol, parse_type): Update.
4824         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4825         Update.
4826         * guile/scm-type.c (gdbscm_type_tag): Update.
4827         * go-lang.c (sixg_string_p): Update.
4828         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4829         Update.
4830         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4831         (TYPE_TAG_NAME): Remove.
4832         * gdbtypes.c (type_name_no_tag): Simplify.
4833         (check_typedef, check_types_equal, recursive_dump_type)
4834         (copy_type_recursive, arch_composite_type): Update.
4835         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4836         in summary mode when needed.
4837         * eval.c (evaluate_funcall): Update.
4838         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4839         (process_structure_scope, read_enumeration_type)
4840         (read_namespace_type, read_module_type, determine_prefix): Update.
4841         * cp-support.c (inspect_type): Update.
4842         * coffread.c (process_coff_symbol, decode_base_type): Update.
4843         * c-varobj.c (c_is_path_expr_parent): Update.
4844         * c-typeprint.c (c_type_print_base_struct_union): Update.
4845         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4846         summary when using C language.
4847         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4848         (gen_maybe_namespace_elt): Update.
4849         * ada-lang.c (ada_type_name): Simplify.
4850         (empty_record, ada_template_to_fixed_record_type_1)
4851         (template_to_static_fixed_type)
4852         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4853
4854 2018-06-01  Tom Tromey  <tom@tromey.com>
4855
4856         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4857         c_print_type.
4858         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4859         (c_print_type): Update.
4860         (c_print_type): New overload.
4861         (c_type_print_varspec_prefix, c_type_print_args)
4862         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4863         (c_type_print_base_struct_union, c_type_print_base_1)
4864         (cp_type_print_method_args): Add "language" parameter.
4865         (c_type_print_base): Update.
4866         * c-lang.h (c_print_type): Add new overload.
4867
4868 2018-06-01  Tom Tromey  <tom@tromey.com>
4869
4870         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4871         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4872
4873 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4874
4875         * aarch64-tdep.c (aarch64_sve_register_names): New const
4876         var.
4877         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4878         (AARCH64_SVE_Z_REGS_NUM): New define.
4879         (AARCH64_SVE_P_REGS_NUM): Likewise.
4880         (AARCH64_SVE_NUM_REGS): Likewise.
4881
4882 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4883
4884         * nat/linux-ptrace.h [__alpha__]
4885         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4886         definitions.
4887
4888 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4889
4890         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4891         the endianness selected.
4892         * NEWS: Document `set endian auto' mode operation update.
4893
4894 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4895
4896         * Makefile.in: Add new header.
4897         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4898         (sve_vl_from_vg): Likewise.
4899         (sve_vq_from_vl): Likewise.
4900         (sve_vl_from_vq): Likewise.
4901         (sve_vq_from_vg): Likewise.
4902         (sve_vg_from_vq): Likewise.
4903         * configure.nat: Add new c file.
4904         * nat/aarch64-sve-linux-ptrace.c: New file.
4905         * nat/aarch64-sve-linux-ptrace.h: New file.
4906
4907 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4908
4909         * aarch64-linux-nat.c (aarch64_linux_read_description):
4910         Add parmeter zero.
4911         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4912         Likewise.
4913         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4914         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4915         (aarch64_gdbarch_init): Add parmeter zero.
4916         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4917         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4918         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4919         parmeter.
4920         * doc/gdb.texinfo: Describe SVE feature
4921         * features/aarch64-sve.c: New file.
4922
4923 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4924
4925         PR gdb/23210
4926         * gdbarch.sh (significant_addr_bit): Default to zero when
4927         not set by target architecture.
4928         * gdbarch.c: Re-generated.
4929         * utils.c (address_significant): Update.
4930
4931 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4932
4933         * stack.c (func_command): Remove trailing newline in call to error.
4934
4935 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4936
4937         * regcache.h (regcache_raw_collect): Remove, update callers to
4938         use regcache::raw_collect.
4939         * regcache.c (regcache_raw_collect): Remove.
4940
4941 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4942
4943         * regcache.h (regcache_raw_supply): Remove, update callers to
4944         use detached_regcache::raw_supply.
4945         * regcache.c (regcache_raw_supply): Remove.
4946
4947 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4948
4949         * regcache.h (regcache_cooked_write_part): Remove, update
4950         callers to use regcache::cooked_write_part.
4951         * regcache.c (regcache_cooked_write_part): Remove.
4952
4953 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4954
4955         * regcache.h (regcache_cooked_read_part): Remove, update callers
4956         to use readable_regcache::cooked_read_part.
4957         * regcache.c (regcache_cooked_read_part): Remove.
4958
4959 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4960
4961         * regcache.h (regcache_cooked_read_value): Remove, update
4962         callers to use readable_regcache::cooked_read_value.
4963         * regcache.c (regcache_cooked_read_value): Remove.
4964
4965 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4966
4967         * regcache.h (regcache_cooked_write): Remove, update callers to
4968         use regcache::cooked_write.
4969         * regcache.c (regcache_cooked_write): Remove.
4970
4971 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4972
4973         * regcache.h (regcache_invalidate): Remove, update callers to
4974         use detached_regcache::invalidate instead.
4975         * regcache.c (regcache_invalidate): Remove.
4976
4977 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4978
4979         * regcache.h (regcache_raw_write_part): Remove, update callers
4980         to use regcache::raw_write_part instead.
4981         * regcache.c (regcache_raw_write_part): Remove.
4982
4983 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4984
4985         * regcache.h (regcache_raw_read_part): Remove, update callers to
4986         use readable_regcache::raw_read_part instead.
4987         * regcache.c (regcache_raw_read_part): Remove.
4988
4989 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4990
4991         * regcache.h (regcache_cooked_read): Remove, update callers to
4992         use readable_regcache::cooked_read instead.
4993         * regcache.c (regcache_cooked_read): Remove.
4994
4995 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4996
4997         * regcache.h (regcache_raw_write): Remove, update callers to use
4998         regcache::raw_write instead.
4999         * regcache.c (regcache_raw_write): Remove.
5000
5001 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5002
5003         * regcache.h (regcache_raw_read): Remove, update callers to use
5004         readable_regcache::raw_read instead.
5005         * regcache.c (regcache_raw_read): Remove.
5006
5007 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5008
5009         * regcache.h (regcache_raw_update): Remove, update callers to
5010         use readable_regcache::raw_update instead.
5011         * regcache.c (regcache_raw_update): Remove.
5012
5013 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5014
5015         * regcache.h (regcache_register_status): Remove, update callers
5016         to use reg_buffer::get_register_status directly instead.
5017         * regcache.c (regcache_register_status): Remove.
5018
5019 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5020
5021         * regcache.h (regcache_get_ptid): Remove, update all callers to
5022         call regcache::ptid instead.
5023         * regcache.c (regcache_get_ptid): Remove.
5024
5025 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5026
5027         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5028
5029 2018-05-30  Pedro Alves  <palves@redhat.com>
5030
5031         * common/common-exceptions.h (exception_rethrow): Use
5032         ATTRIBUTE_NORETURN.
5033
5034 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5035
5036         * breakpoint.c (print_solib_event, check_status_catch_solib):
5037         Remove struct keyword in range-based for loops.
5038         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5039         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5040         Likewise.
5041         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5042         Likewise.
5043         * symfile.c (addr_info_make_relative): Likewise.
5044         * thread.c (value_in_thread_stack_temporaries): Likewise.
5045
5046 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5047
5048         PR gdb/16841
5049         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5050         aggregate type to get its real type before accessing it.
5051
5052 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5053
5054         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5055         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5056         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5057         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5058         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5059         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5060         * printcmd.c (info_address_command): Likewise.
5061
5062 2018-05-29  Tom Tromey  <tom@tromey.com>
5063
5064         * windows-nat.c (handle_exception): Update fall-through comment.
5065
5066 2018-05-29  Tom Tromey  <tom@tromey.com>
5067
5068         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5069         (struct program_space) <added_solibs>: Now a std::vector.
5070         * breakpoint.c (print_solib_event): Update.
5071         (check_status_catch_solib): Update.
5072         * progspace.c (clear_program_space_solib_cache): Update.
5073         * solib.c (update_solib_list): Update.
5074
5075 2018-05-29  Tom Tromey  <tom@tromey.com>
5076
5077         * python/py-type.c (typy_richcompare): Update.
5078         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5079         * gdbtypes.h (types_deeply_equal): Return bool.
5080         (types_equal): Likewise.
5081         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5082         declare VEC.
5083         (check_types_equal): Change worklist to std::vector.  Return
5084         bool.
5085         (struct type_equality_entry): Add constructor.
5086         (compare_maybe_null_strings): Return bool.
5087         (check_types_worklist): Return bool.  Change worklist to
5088         std::vector.
5089         (types_deeply_equal): Use std::vector.
5090         (types_equal): Return bool.
5091         (compare_maybe_null_strings): Simplify.
5092
5093 2018-05-29  Tom Tromey  <tom@tromey.com>
5094
5095         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5096
5097 2018-05-29  Tom Tromey  <tom@tromey.com>
5098
5099         * objc-lang.h: Don't include cp-support.h.
5100         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5101         declare VEC.
5102
5103 2018-05-27  Tom Tromey  <tom@tromey.com>
5104
5105         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5106
5107 2018-05-25  Tom Tromey  <tom@tromey.com>
5108
5109         * value.c (value::location): Initialize.
5110
5111 2018-05-25  Tom Tromey  <tom@tromey.com>
5112
5113         * dbxread.c (init_bincl_list): Remove.
5114         (bincl_list): Now a std::vector.
5115         (bincls_allocated, next_bincl): Remove.
5116         (free_bincl_list, do_free_bincl_list_cleanup)
5117         (make_cleanup_free_bincl_list): Remove.
5118         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5119         unique_xmalloc_ptr.
5120         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5121         (struct header_file_location): Add constructor.
5122         (add_bincl_to_list): Remove.
5123
5124 2018-05-25  Tom Tromey  <tom@tromey.com>
5125
5126         * tui/tui.c (tui_enable): Update.
5127         * mi/mi-interp.c (mi_interp::init): Update.
5128         * interps.h (class interp) <name>: New method.
5129         <m_name>: Rename from name.
5130         (~scoped_restore_interp): Update.
5131         * interps.c (interp::interp): Update.
5132         (interp_add, interp_set, interp_lookup_existing)
5133         (current_interp_named_p): Update.
5134
5135 2018-05-25  Tom Tromey  <tom@tromey.com>
5136
5137         * interps.c (interp_name): Remove.
5138         * mi/mi-interp.c (mi_interp::init): Update.
5139         * interps.h (interp_name): Remove.
5140         (~scoped_restore_interp): Update.
5141         * tui/tui.c (tui_enable): Update.
5142
5143 2018-05-25  Tom Tromey  <tom@tromey.com>
5144
5145         * utils.c (fputs_maybe_filtered): Update.
5146         * linespec.c (decode_line_full): Update.
5147         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5148         (mi_print_breakpoint_for_event, mi_solib_loaded)
5149         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5150         (mi_user_selected_context_changed): Update.
5151         * mi/mi-main.c (mi_execute_command): Update.
5152         * cli/cli-script.c (execute_control_command): Update.
5153         * python/python.c (execute_gdb_command): Update.
5154         * solib.c (info_sharedlibrary_command): Update.
5155         * interps.c (interp_ui_out): Remove.
5156         * interps.h (interp_ui_out): Remove.
5157
5158 2018-05-25  Tom Tromey  <tom@tromey.com>
5159
5160         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5161         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5162         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5163
5164 2018-05-25  Tom Tromey  <tom@tromey.com>
5165
5166         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5167         * interps.c (interp_exec): Use scoped_restore.
5168
5169 2018-05-25  Tom Tromey  <tom@tromey.com>
5170
5171         * remote.c (remote_target::remote_file_get): Use
5172         gdb::byte_vector.
5173         (remote_target::remote_file_put): Likewise.
5174
5175 2018-05-25  Tom Tromey  <tom@tromey.com>
5176
5177         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5178         a std::string.
5179         (get_pe_section_index, add_pe_exported_sym): Update.
5180         (read_pe_exported_syms): Use gdb::def_vector.
5181
5182 2018-05-25  Tom Tromey  <tom@tromey.com>
5183
5184         * frame.c (remove_prev_frame): Remove.
5185         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5186
5187 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5188
5189         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5190         Remove prototypes.
5191         * mips-linux-nat.c (supply_fpregset): Always call
5192         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5193         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5194         `mips_fill_fpregset'.
5195         * mips-linux-tdep.c (mips_supply_fpregset)
5196         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5197         (mips_fill_fpregset_wrapper): Remove functions.
5198         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5199         (mips_linux_fpregset): Remove variable.
5200         (mips_linux_iterate_over_regset_sections): Use
5201         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5202         (mips_linux_o32_sigframe_init): Remove comment.
5203
5204 2018-05-25  Pedro Alves  <palves@redhat.com>
5205
5206         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5207         (struct readahead_cache, struct packet_reg, struct
5208         remote_arch_state, class remote_state): Move higher up in the
5209         file.
5210         (remote_target::m_remote_state): Now an object instead of a pointer.
5211         (remote_target::get_remote_state): Adjust.
5212
5213 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5214
5215         * stack.c (select_and_print_frame): Delete.
5216         (struct function_bounds): Move struct within function.
5217         (func_command): Most content moved into new function
5218         find_frame_for_function, use new function, print result, add
5219         function comment.
5220         (find_frame_for_function): New function, now returns a result.
5221
5222 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5223
5224         * stack.c (iterate_over_block_arg_vars): Fix comment.
5225         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5226
5227 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5228
5229         PR gdb/23203
5230         * frame.c
5231         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5232         Define.
5233         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5234         Define.
5235         * frame.h (class scoped_restore_selected_frame): New class.
5236         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5237         of any exception, use scoped_restore_selected_frame to restore the
5238         frame instead.
5239
5240 2018-05-24  Pedro Alves  <palves@redhat.com>
5241
5242         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5243         override.
5244
5245 2018-05-23  Tom Tromey  <tom@tromey.com>
5246
5247         * complaints.c (struct complaints): Remove.
5248         (symfile_complaint_book): Remove.
5249         (series): New global.
5250         (complaint_internal): Update.
5251         (clear_complaints): Update.
5252
5253 2018-05-23  Tom Tromey  <tom@tromey.com>
5254
5255         * complaints.c (counters): New global.
5256         (struct complain): Remove.
5257         (struct complaints) <root>: Remove.
5258         (complaint_sentinel): Remove.
5259         (symfile_complaint_book): Update.
5260         (find_complaint) Remove.
5261         (complaint_internal, clear_complaints): Update.
5262
5263 2018-05-23  Tom Tromey  <tom@tromey.com>
5264
5265         * complaints.c (struct complain) <file, line>: Remove.
5266         (find_complaint): Remove file, line parameters.
5267         (complaint_internal): Update.
5268
5269 2018-05-23  Tom Tromey  <tom@tromey.com>
5270
5271         * complaints.c (vcomplaint): Remove.
5272         (complaint_internal) Merge in contents of vcomplaint.
5273
5274 2018-05-23  Tom Tromey  <tom@tromey.com>
5275
5276         * complaints.c (struct complaints) <explanation>: Remove.
5277         (symfile_explanations): Remove.
5278         (symfile_complaint_book): Update.
5279         (vcomplaint): Update.
5280         (struct explanation): Remove.
5281
5282 2018-05-23  Tom Tromey  <tom@tromey.com>
5283
5284         * complaints.c (symfile_complaints): Remove.
5285         (complaint_internal): Remove "complaints" parameter.
5286         (clear_complaints, vcomplaint): Remove "c" parameter.
5287         (get_complaints): Remove.
5288         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5289         (dwarf2_debug_line_missing_file_complaint)
5290         (dwarf2_debug_line_missing_end_sequence_complaint)
5291         (dwarf2_complex_location_expr_complaint)
5292         (dwarf2_const_value_length_mismatch_complaint)
5293         (dwarf2_section_buffer_overflow_complaint)
5294         (dwarf2_macro_malformed_definition_complaint)
5295         (dwarf2_invalid_attrib_class_complaint)
5296         (create_addrmap_from_index, dw2_symtab_iter_next)
5297         (dw2_expand_marked_cus)
5298         (dw2_debug_names_iterator::find_vec_in_debug_names)
5299         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5300         (create_debug_type_hash_table, init_cutu_and_read_dies)
5301         (partial_die_parent_scope, add_partial_enumeration)
5302         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5303         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5304         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5305         (create_cus_hash_table, create_dwp_hash_table)
5306         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5307         (dwarf2_rnglists_process, dwarf2_ranges_process)
5308         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5309         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5310         (handle_struct_member_die, process_structure_scope)
5311         (read_array_type, read_common_block, read_module_type)
5312         (read_tag_pointer_type, read_typedef, read_base_type)
5313         (read_subrange_type, load_partial_dies, partial_die_info::read)
5314         (partial_die_info::read, partial_die_info::read)
5315         (partial_die_info::read, read_checked_initial_length_and_offset)
5316         (dwarf2_string_attr, read_formatted_entries)
5317         (dwarf_decode_line_header)
5318         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5319         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5320         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5321         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5322         (get_signatured_type, get_DW_AT_signature_type)
5323         (decode_locdesc, file_file_name, consume_improper_spaces)
5324         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5325         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5326         (dwarf2_symbol_mark_computed, set_die_type)
5327         (read_attribute_value): Update.
5328         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5329         Update.
5330         * dbxread.c (unknown_symtype_complaint)
5331         (lbrac_mismatch_complaint, repeated_header_complaint)
5332         (set_namestring, function_outside_compilation_unit_complaint)
5333         (read_dbx_symtab, process_one_symbol): Update.
5334         * gdbtypes.c (stub_noname_complaint): Update.
5335         * windows-nat.c (handle_unload_dll): Update.
5336         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5337         (decode_base_type): Update.
5338         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5339         (eb_complaint, record_include_begin, record_include_end)
5340         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5341         (process_xcoff_symbol, read_symbol)
5342         (function_outside_compilation_unit_complaint)
5343         (scan_xcoff_symtab): Update.
5344         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5345         * buildsym.c (finish_block_internal, make_blockvector)
5346         (end_symtab_get_static_block, augment_type_symtab): Update.
5347         * dtrace-probe.c (dtrace_process_dof)
5348         (dtrace_static_probe_ops::get_probes): Update.
5349         * complaints.h (struct complaint): Don't declare.
5350         (symfile_complaints): Remove.
5351         (complaint_internal): Remove "complaints" parameter.
5352         (complaint): Likewise.
5353         (clear_complaints): Likewise.
5354         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5355         (reread_symbols): Update.
5356         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5357         (dwarf2_frame_cache, decode_frame_entry): Update.
5358         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5359         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5360         (info_selectors_command): Update.
5361         * macrotab.c (macro_include, check_for_redefinition)
5362         (macro_undef): Update.
5363         * objfiles.c (filter_overlapping_sections): Update.
5364         * stabsread.c (invalid_cpp_abbrev_complaint)
5365         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5366         (define_symbol, error_type, read_type, rs6000_builtin_type)
5367         (stabs_method_name_from_physname, read_member_functions)
5368         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5369         (attach_fields_to_type, complain_about_struct_wipeout)
5370         (read_range_type, read_args, common_block_start)
5371         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5372         Update.
5373         * mdebugread.c (index_complaint, unknown_ext_complaint)
5374         (basic_type_complaint, bad_tag_guess_complaint)
5375         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5376         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5377         (parse_procedure, parse_lines)
5378         (function_outside_compilation_unit_complaint)
5379         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5380         (bad_tag_guess_complaint, reg_value_complaint): Update.
5381         * cp-support.c (demangled_name_complaint): Update.
5382         * macroscope.c (sal_macro_scope): Update.
5383         * dwarf-index-write.c (class debug_names): Update.
5384
5385 2018-05-23  Tom Tromey  <tom@tromey.com>
5386
5387         * complaints.c (clear_complaints): Remove "noisy" parameter.
5388         * complaints.h (clear_complaints): Update.
5389         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5390         (reread_symbols): Update.
5391
5392 2018-05-23  Tom Tromey  <tom@tromey.com>
5393
5394         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5395         SUBSEQUENT_MESSAGE.
5396         (vcomplaint, clear_complaints): Update.
5397         (symfile_explanations): Remove some messages.
5398
5399 2018-05-23  Tom Tromey  <tom@tromey.com>
5400
5401         * complaints.c (internal_complaint): Remove.
5402         * complaints.h (internal_complaint): Remove.
5403
5404 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5405
5406         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5407
5408 2018-05-22  Pedro Alves  <palves@redhat.com>
5409
5410         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5411         (remote_fileio_badfd, remote_fileio_return_errno)
5412         (remote_fileio_return_success, remote_fileio_func_open)
5413         (remote_fileio_func_open, remote_fileio_func_close)
5414         (remote_fileio_func_read, remote_fileio_func_write)
5415         (remote_fileio_func_lseek, remote_fileio_func_rename)
5416         (remote_fileio_func_unlink, remote_fileio_func_stat)
5417         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5418         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5419         remote_target parameter.
5420         (remote_fio_func_map) <func>: Add remote_target parameter.
5421         (do_remote_fileio_request, remote_fileio_request):
5422         * remote-fileio.h (remote_fileio_request):
5423         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5424         remote_target parameter.
5425         (remote_notif_process, handle_notification): Adjust to pass down
5426         the remote.
5427         (remote_notif_state_allocate): Add remote_target parameter.  Save
5428         it.
5429         * remote-notif.h (struct remote_target): Forward declare.
5430         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5431         remote_target parameter.
5432         (struct remote_notif_state) <remote>: New field.
5433         (remote_notif_ack, remote_notif_parse): Add remote_target
5434         parameter.
5435         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5436         remote_target parameter.
5437         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5438         (threads_listing_context, rmt_thread_action, protocol_feature)
5439         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5440         (packet_result, struct threads_listing_context, remote_state):
5441         Move definitions and declarations higher up.
5442         (remote_target) <~remote_target>: Declare.
5443         (remote_download_command_source, remote_file_put, remote_file_get)
5444         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5445         (remote_hostio_pread_vFile, remote_hostio_send_command)
5446         (remote_hostio_set_filesystem, remote_hostio_open)
5447         (remote_hostio_close, remote_hostio_unlink, remote_state)
5448         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5449         (get_memory_write_packet_size, get_memory_read_packet_size)
5450         (append_pending_thread_resumptions, remote_detach_1)
5451         (append_resumption, remote_resume_with_vcont)
5452         (add_current_inferior_and_thread, wait_ns, wait_as)
5453         (process_stop_reply, remote_notice_new_inferior)
5454         (process_initial_stop_replies, remote_add_thread)
5455         (btrace_sync_conf, remote_btrace_maybe_reopen)
5456         (remove_new_fork_children, kill_new_fork_children)
5457         (discard_pending_stop_replies, stop_reply_queue_length)
5458         (check_pending_events_prevent_wildcard_vcont)
5459         (discard_pending_stop_replies_in_queue, stop_reply)
5460         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5461         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5462         (remote_interrupt_as, remote_interrupt_ns)
5463         (remote_get_noisy_reply, remote_query_attached)
5464         (remote_add_inferior, remote_current_thread, get_current_thread)
5465         (set_thread, set_general_thread, set_continue_thread)
5466         (set_general_process, write_ptid)
5467         (remote_unpack_thread_info_response, remote_get_threadinfo)
5468         (parse_threadlist_response, remote_get_threadlist)
5469         (remote_threadlist_iterator, remote_get_threads_with_ql)
5470         (remote_get_threads_with_qxfer)
5471         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5472         (get_offsets, remote_check_symbols, remote_supported_packet)
5473         (remote_query_supported, remote_packet_size)
5474         (remote_serial_quit_handler, remote_detach_pid)
5475         (remote_vcont_probe, remote_resume_with_hc)
5476         (send_interrupt_sequence, interrupt_query)
5477         (remote_notif_get_pending_events, fetch_register_using_p)
5478         (send_g_packet, process_g_packet, fetch_registers_using_g)
5479         (store_register_using_P, store_registers_using_G)
5480         (set_remote_traceframe, check_binary_download)
5481         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5482         (remote_xfer_live_readonly_partial, remote_read_bytes)
5483         (remote_send_printf, remote_flash_write, readchar)
5484         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5485         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5486         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5487         (extended_remote_disable_randomization, extended_remote_run)
5488         (send_environment_packet, extended_remote_environment_support)
5489         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5490         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5491         (packet_command): Now methods of ...
5492         (remote_target): ... this class.
5493         (m_remote_state) <remote_target>: New field.
5494         (struct remote_state) <stop_reply_queue,
5495         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5496         fields.
5497         (remote_state::remote_state): Allocate stop_reply_queue.
5498         (remote_state): Delete global.
5499         (get_remote_state_raw): Delete.
5500         (remote_target::get_remote_state): Allocate m_remote_state on
5501         demand.
5502         (get_current_remote_target): New.
5503         (remote_ops, extended_remote_ops): Delete.
5504         (wait_forever_enabled_p, remote_async_inferior_event_token):
5505         Delete, moved to struct remote_state.
5506         (remote_target::close): Delete self.  Destruction bits split to
5507         ...
5508         (remote_target::~remote_target): ... this.
5509         (show_memory_packet_size): Adjust to use
5510         get_current_remote_target.
5511         (struct protocol_feature) <func>: Add remote_target parameter.
5512         All callers adjusted.
5513         (curr_quit_handler_target): New.
5514         (remote_serial_quit_handler): Reimplement.
5515         (remote_target::open_1): Adjust to use get_current_remote_target.
5516         Heap-allocate remote_target/extended_remote_target instances.
5517         (vcont_builder::vcont_builder): Add remote_target parameter, and
5518         save it in m_remote.  All callers adjusted.
5519         (vcont_builder::m_remote): New field.
5520         (vcont_builder::restart, vcont_builder::flush)
5521         (vcont_builder::push_action): Use it.
5522         (remote_target::commit_resume): Use it.
5523         (struct queue_iter_param) <remote>: New field.
5524         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5525         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5526         (check_pending_event_prevents_wildcard_vcont_callback)
5527         (remote_target::check_pending_events_prevent_wildcard_vcont)
5528         (remote_target::discard_pending_stop_replies)
5529         (remote_target::discard_pending_stop_replies_in_queue)
5530         (remote_target::remote_notif_remove_queued_reply): Fill in
5531         'remote' field.
5532         (remote_notif_get_pending_events): New.
5533         (remote_target::readchar, remote_target::remote_serial_write):
5534         Save/restore curr_quit_handler_target.
5535         (putpkt): New.
5536         (kill_new_fork_children): Fill in 'remote' field.
5537         (packet_command): Use get_current_remote_target, defer to
5538         remote_target method of same name.
5539         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5540         parameter, and save it in m_remote.  All callers adjusted.
5541         (scoped_remote_fd::release): Use m_remote.
5542         (scoped_remote_fd::m_remote): New field.
5543         (remote_file_put, remote_file_get, remote_file_delete): Use
5544         get_current_remote_target, defer to remote_target method of same
5545         name.
5546         (remote_btrace_reset): Add remote_state paremeter.  Update all
5547         callers.
5548         (remote_async_inferior_event_handler). Pass down 'data'.
5549         (remote_new_objfile): Use get_current_remote_target.
5550         (remote_target::vcont_r_supported): New.
5551         (set_range_stepping): Use get_current_remote_target and
5552         remote_target::vcont_r_supported.
5553         (_initialize_remote): Don't allocate 'remote_state' and
5554         'stop_reply_queue' globals.
5555         * remote.h (struct remote_target): Forward declare.
5556         (getpkt, putpkt, remote_notif_get_pending_events): Add
5557         'remote_target' parameter.
5558
5559 2018-05-22  Pedro Alves  <palves@redhat.com>
5560
5561         * remote.c (vcont_builder): Now a class.  Make all data members
5562         private.
5563         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5564         Declare methods.
5565         (vcont_builder_restart): Rename to ...
5566         (vcont_builder::restart): ... this.
5567         (vcont_builder_flush): Rename to ...
5568         (vcont_builder::flush): ... this.
5569         (vcont_builder_push_action): Rename to ...
5570         (vcont_builder::push_action): ... this.
5571         (remote_target::commit_resume): Adjust.
5572
5573 2018-05-22  Pedro Alves  <palves@redhat.com>
5574
5575         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5576         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5577         (get_fixed_memory_packet_size): New.
5578         (get_memory_packet_size): Use it.
5579         (set_memory_packet_size): Don't override the config size with
5580         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5581         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5582         Don't refer to get_memory_packet_size if not connected to a remote
5583         target.  Show "(default)" if configured size is 0.
5584
5585 2018-05-22  Pedro Alves  <palves@redhat.com>
5586
5587         * remote.c (remote_target::mourn_inferior): Move
5588         discard_pending_stop_replies call here from ...
5589         (_initialize_remote): ... here.
5590
5591 2018-05-22  Pedro Alves  <palves@redhat.com>
5592
5593         * remote.c (compare_section_command): Remove set_general_process
5594         call.
5595
5596 2018-05-22  Pedro Alves  <palves@redhat.com>
5597
5598         * remote.c (struct packet_reg, struct remote_arch_state):
5599         Move higher up in the file.
5600         (remote_state) <m_arch_states>: Store remote_arch_state values
5601         instead of remote_arch_state pointers.
5602         (remote_state::get_remote_arch_state): Adjust.
5603
5604 2018-05-22  Pedro Alves  <palves@redhat.com>
5605
5606         * remote.c: Include <unordered_map>.
5607         (remote_state): Now a class.
5608         (remote_state) <get_remote_arch_state>: Declare method.
5609         <get_remote_arch_state>: New field.
5610         (remote_arch_state) <remote_arch_state>: Declare ctor.
5611         <regs>: Now a unique_ptr.
5612         (remote_gdbarch_data_handle): Delete.
5613         (get_remote_arch_state): Delete.
5614         (remote_state::get_remote_arch_state): New.
5615         (get_remote_state): Adjust to call remote_state's
5616         get_remote_arch_state method.
5617         (init_remote_state): Delete, bits factored out to ...
5618         (remote_arch_state::remote_arch_state): ... this new method.
5619         (get_remote_packet_size, get_memory_packet_size)
5620         (process_g_packet, remote_target::fetch_registers)
5621         (remote_target::prepare_to_store, store_registers_using_G)
5622         (remote_target::store_registers, remote_target::get_trace_status):
5623         Adjust to call remote_state's method.
5624         (_initialize_remote): Remove reference to
5625         remote_gdbarch_data_handle.
5626
5627 2018-05-22  Pedro Alves  <palves@redhat.com>
5628
5629         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5630         pread>: New method declarations.
5631         (remote_target::open_1): Adjust.
5632         (readahead_cache_invalidate): Rename to ...
5633         (readahead_cache::invalidate): ... this, and adjust to be a class
5634         method.
5635         (readahead_cache_invalidate_fd): Rename to ...
5636         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5637         class method.
5638         (remote_hostio_pwrite): Adjust.
5639         (remote_hostio_pread_from_cache): Rename to ...
5640         (readahead_cache::pread): ... this, and adjust to be a class
5641         method.
5642         (remote_hostio_close): Adjust.
5643
5644 2018-05-22  Pedro Alves  <palves@redhat.com>
5645
5646         * remote.c (remote_hostio_close_cleanup): Delete.
5647         (class scoped_remote_fd): New.
5648         (remote_file_put, remote_file_get): Use it.
5649
5650 2018-05-22  Pedro Alves  <palves@redhat.com>
5651
5652         (struct vCont_action_support): Use bool and initialize all fields.
5653         (struct readahead_cache): Initialize all fields.
5654         (remote_state): Use bool and initialize all fields.
5655         (remote_state::remote_state, remote_state::~remote_state): New.
5656         (new_remote_state): Delete.
5657         (_initialize_remote): Use new to allocate remote_state.
5658
5659 2018-05-22  Pedro Alves  <palves@redhat.com>
5660             張俊芝  <zjz@zjz.name>
5661
5662         PR gdb/22973
5663         * c-exp.y: Include "c-support.h".
5664         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5665         of tolower.  Use c_ident_is_alpha to scan names.
5666         * c-lang.c: Include "c-support.h".
5667         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5668         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5669         * c-support.h: New file, with bits factored out from ...
5670         * cp-name-parser.y: ... this file.
5671         Include "c-support.h".
5672         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5673         c-support.h and renamed.
5674         (symbol_end, yylex): Adjust.
5675
5676 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5677
5678         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5679         parameter type to CORE_ADDR.
5680         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5681         parameter type in declaration to CORE_ADDR.
5682         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5683         target_auxv_search to get AT_HWCAP and use the result to get the
5684         target description.
5685         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5686         to CORE_ADDR. Remove the cast of the return value to unsigned
5687         long. Fix error predicate of target_auxv_search.
5688         (ppc_linux_nat_target::read_description): Change the type of the
5689         hwcap variable to CORE_ADDR.
5690
5691 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5692
5693         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5694         if the size of fpscr is larger than 32 bits.
5695
5696 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5697
5698         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5699         (ppc32_linux_vsxregmap): New global.
5700         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5701         regcache_supply_regset, and regcache_collect_regset.
5702         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5703         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5704         (fetch_vsx_register, store_vsx_register): Remove.
5705         (fetch_vsx_registers): Add regno parameter. Get regset using
5706         ppc_linux_vsxregset. Use regset to supply registers.
5707         (store_vsx_registers): Add regno parameter. Get regset using
5708         ppc_linux_vsxregset. Use regset to collect registers.
5709         (fetch_register): Call fetch_vsx_registers instead of
5710         fetch_vsx_register.
5711         (store_register): Call store_vsx_registers instead of
5712         store_vsx_register.
5713         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5714         new regno parameter.
5715         (store_ppc_registers): Call store_vsx_registers with -1 for the
5716         new regno parameter.
5717         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5718         (ppc_collect_vsxregset): Remove.
5719
5720 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5721
5722         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5723         offset fields.
5724         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5725         for vector register offset fields.
5726         (ppc64_fbsd_reg_offsets): Likewise.
5727         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5728         to vector register offset fields.
5729         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5730         to vector register offset fields.
5731         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5732         vector register offset fields.
5733         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5734         initializers for vector register offset fields.
5735         (rs6000_aix64_reg_offsets): Likewise.
5736         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5737         (ppc_supply_vrregset): Remove.
5738         (ppc_collect_vrregset): Remove.
5739         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5740         (ppc_linux_vrregset) : New function.
5741         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5742         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5743         (ppc32_linux_vrregset): Remove.
5744         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5745         and use result instead of ppc32_linux_vrregset.
5746         (ppc32_linux_reg_offsets): Remove initializers for vector register
5747         offset fields.
5748         (ppc64_linux_reg_offsets): Likewise.
5749         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5750         * ppc-linux-nat.c: Include regset.h.
5751         (gdb_vrregset_t): Adjust comment to account for little-endian
5752         mode.
5753         (supply_vrregset, fill_vrregset): Remove.
5754         (fetch_altivec_register, store_altivec_register): Remove.
5755         (fetch_altivec_registers): Add regno parameter. Get regset using
5756         ppc_linux_vrregset. Use regset to supply registers.
5757         (store_altivec_registers): Add regno parameter. Get regset using
5758         ppc_linux_vrregset. Use regset to collect registers.
5759         (fetch_register): Call fetch_altivec_registers instead of
5760         fetch_altivec_register.
5761         (store_register): Call store_altivec_registers instead of
5762         store_altivec_register.
5763         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5764         the new regno parameter.
5765         (store_ppc_registers): Call store_altivec_registers with -1 for
5766         the new regno parameter.
5767
5768 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5769
5770         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5771         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5772         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5773         (gdb_vrregset_t): Change array type size to
5774         PPC_LINUX_SIZEOF_VRREGSET.
5775         (gdb_vsxregset_t): Change array type size to
5776         PPC_LINUX_SIZEOF_VSXREGSET.
5777         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5778         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5779         PPC_LINUX_SIZEOF_VSXREGSET.
5780
5781 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5782
5783         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5784         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5785         nat/ppc-linux.c.
5786         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5787         ppc_linux_target_wordsize with tid.
5788         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5789         wordsize with tid.
5790         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5791         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5792         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5793         tid parameter. Remove static specifier.
5794         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5795         (ppc_linux_target_wordsize): New declaration.
5796
5797 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5798
5799         * arch/ppc-linux-common.c: New file.
5800         * arch/ppc-linux-common.h: New file.
5801         * arch/ppc-linux-tdesc.h: New file.
5802         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5803         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5804         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5805         arch/ppc-linux-tdesc.h.
5806         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5807         arch/ppc-linux-tdesc.h.
5808         (ppc_linux_nat_target::read_description): Remove target
5809         description matching code. Fill a ppc_linux_features struct and
5810         call ppc_linux_match_description with it. Move comment about ISA
5811         2.05 to ppc-linux-common.c.
5812         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5813         arch/ppc-linux-tdesc.h.
5814         (ppc_linux_core_read_description): Remove target description
5815         matching code. Fill a ppc_linux_features struct and call
5816         ppc_linux_match_description with it.
5817         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5818         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5819         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5820         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5821         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5822         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5823         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5824         (tdesc_powerpc_e500l): Remove.
5825
5826 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5827
5828         * ada-lang.c (catch_assert_command): Pass empty string instead
5829         of NULL for excep_string argument.
5830
5831 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5832
5833         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5834         the width of the requested register exceeds the width of the
5835         `ptrace' data type.
5836
5837 2018-05-21  Tom Tromey  <tom@tromey.com>
5838
5839         * printcmd.c (output_command): Remove.
5840         (output_command_const): Rename to output_command.
5841         * valprint.h (output_command): Rename from output_command_const.
5842         * tracepoint.c (trace_dump_actions): Call output_command.
5843
5844 2018-05-21  Tom Tromey  <tom@tromey.com>
5845
5846         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5847         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5848         * ada-lang.h (create_ada_exception_catchpoint): Update.
5849         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5850         std::string.
5851         (create_excep_cond_exprs, ~ada_catchpoint)
5852         (should_stop_exception, print_one_exception)
5853         (print_mention_exception, print_recreate_exception): Update.
5854         (ada_get_next_arg): Remove.
5855         (catch_ada_exception_command_split): Use std::string.  Change type
5856         of "excep_string", "cond_string".
5857         (catch_ada_exception_command): Update.
5858         (create_ada_exception_catchpoint): Change type of excep_string.
5859         (ada_exception_sal): Remove excep_string parameter.
5860         (~ada_catchpoint): Remove.
5861
5862 2018-05-21  Tom Tromey  <tom@tromey.com>
5863
5864         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5865         cleanup.
5866
5867 2018-05-21  Tom Tromey  <tom@tromey.com>
5868
5869         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5870         Return unique_xmalloc_ptr.
5871         (print_it_exception): Update.
5872
5873 2018-05-21  Tom Tromey  <tom@tromey.com>
5874
5875         * tracepoint.c (trace_dump_actions): Use std::string.
5876
5877 2018-05-21  Tom Tromey  <tom@tromey.com>
5878
5879         * symfile.c (reread_symbols): Use std::string for original_name.
5880
5881 2018-05-21  Tom Tromey  <tom@tromey.com>
5882
5883         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5884         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5885         constructor.
5886
5887 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5888
5889         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5890         instance to...
5891         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5892         * objfiles.c (get_objfile_bfd_data): Allocate
5893         objfile_per_bfd_storage with obstack_new when allocating on
5894         obstack.
5895
5896 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5897
5898         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5899         OBSTACK_ZALLOC.
5900         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5901         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5902         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5903         (add_pending): Likewise.
5904         (parse_symbol): Likewise.
5905         (parse_partial_symbols): Likewise.
5906         (psymtab_to_symtab_1): Likewise.
5907         (new_psymtab): Likewise.
5908         (elfmdebug_build_psymtabs): Likewise.
5909         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5910         * objfiles.c (get_objfile_bfd_data): Likewise.
5911         (objfile_register_static_link): Likewise.
5912         * psymtab.c (allocate_psymtab): Likewise.
5913         * stabsread.c (read_member_functions): Likewise.
5914         * xcoffread.c (xcoff_end_psymtab): Likewise.
5915
5916 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5917
5918         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5919         compiler supports std::is_trivially_constructible.
5920         * common/poison.h: Include obstack.h.
5921         (IsMallocable): Define to is_trivially_constructible if the
5922         compiler supports it, define to true_type otherwise.
5923         (xobnew): New.
5924         (XOBNEW): Redefine.
5925         (xobnewvec): New.
5926         (XOBNEWVEC): Redefine.
5927         * gdb_obstack.h (obstack_zalloc): New.
5928         (OBSTACK_ZALLOC): Redefine.
5929         (obstack_calloc): New.
5930         (OBSTACK_CALLOC): Redefine.
5931         (obstack_new): New.
5932         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5933         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5934         gdbarch.c.
5935         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5936         obstack_calloc/obstack_zalloc.
5937         (gdbarch_obstack_zalloc): Remove.
5938         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5939
5940 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5941
5942         * stack.c (backtrace_command_1): Remove useless variable int i.
5943
5944 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5945
5946         * stack.c (print_frame_info): Fix comment.
5947
5948 2018-05-18  Tom Tromey  <tom@tromey.com>
5949
5950         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5951         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5952         (~dwarf2_per_objfile): Update
5953         (dwarf2_get_dwz_file): Use new.
5954         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5955         unique_ptr.
5956
5957 2018-05-18  Tom Tromey  <tom@tromey.com>
5958
5959         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5960         unique_ptr.
5961         * dwarf2read.c (struct dwp_file): Add constructor and
5962         initializers.
5963         (open_and_init_dwp_file): Return a unique_ptr.
5964         (dwarf2_per_objfile, create_dwp_hash_table)
5965         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5966         (lookup_dwo_unit_in_dwp): Update.
5967         (open_and_init_dwp_file, get_dwp_file): Update.
5968
5969 2018-05-18  Tom Tromey  <tom@tromey.com>
5970
5971         * dwarf2read.c (dwarf2_per_objfile): Update.
5972         (struct mapped_index): Add initializers.
5973         (dwarf2_read_index): Use new.
5974         (dw2_symtab_iter_init): Update.
5975         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5976         unique_ptr.
5977
5978 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5979
5980         * dwarf2read.c (mapped_index) <total_size>: Remove.
5981
5982 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5983
5984         * unittests/format_pieces-selftests.c (test_format_specifier):
5985         Add ARI comments.
5986
5987 2018-05-18  Tom Tromey  <tom@tromey.com>
5988
5989         * c-typeprint.c (maybe_print_hole): New function.
5990         (c_print_type_struct_field_offset): Update.
5991         (c_type_print_base_struct_union): Call maybe_print_hole.
5992
5993 2018-05-17  Keith Seitz  <keiths@redhat.com>
5994
5995         * breakpoint.c (build_bpstat_chain): New function, moved from
5996         bpstat_stop_status.
5997         (bpstat_stop_status): Add optional parameter, `stop_chain'.
5998         If no stop chain is passed, call build_bpstat_chain to build it.
5999         * breakpoint.h (build_bpstat_chain): Declare.
6000         (bpstat_stop_status): Move documentation here from breakpoint.c.
6001         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6002         build the stop chain and pass it to skip_inline_frames.
6003         Pass this stop chain to bpstat_stop_status.
6004         * inline-frame.c: Include breakpoint.h.
6005         (stopped_by_user_bp_inline_frame): New function.
6006         (skip_inline_frames): Add parameter `stop_chain'.
6007         Move documention to inline-frame.h.
6008         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6009         whether the frame should be elided.
6010         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6011         Add moved documentation and update for new parameter.
6012
6013 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6014
6015         PR cli/14975
6016         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6017         unittests/format_pieces-selftests.c.
6018         * common/format.h (format_piece) <operator==>: New.
6019         (format_pieces) <operator[]>: Remove.
6020         * common/format.c (format_pieces::format_pieces): Handle \e.
6021         * unittests/format_pieces-selftests.c: New.
6022
6023 2018-05-17  Tom Tromey  <tom@tromey.com>
6024
6025         PR symtab/23010:
6026         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6027         (dw2_instantiate_symtab): Add skip_partial parameter.
6028         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6029         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6030         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6031         (dw2_expand_symtabs_matching_one)
6032         (dw2_find_pc_sect_compunit_symtab)
6033         (dw2_debug_names_lookup_symbol)
6034         (dw2_debug_names_expand_symtabs_for_function): Update.
6035         (init_cutu_and_read_dies): Add skip_partial parameter.
6036         (process_psymtab_comp_unit, build_type_psymtabs_1)
6037         (process_skeletonless_type_unit, load_partial_comp_unit)
6038         (psymtab_to_symtab_1): Update.
6039         (load_full_comp_unit): Add skip_partial parameter.
6040         (process_imported_unit_die, dwarf2_read_addr_index)
6041         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6042         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6043         (read_signatured_type): Update.
6044
6045 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6046
6047         * value.c (release_value): Remove unused variable.
6048         (record_latest_value): Likewise.
6049         (access_value_history): Likewise.
6050         (preserve_values): Likewise.
6051
6052 2018-05-17  Tom Tromey  <tom@tromey.com>
6053
6054         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6055         Initialize.
6056
6057 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6058
6059         PR gdb/22286
6060         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6061         Also handle registers whose width is not a multiple of
6062         PTRACE_TYPE_RET.
6063         (linux_nat_trad_target::store_register): Likewise.
6064
6065 2018-05-16  Tom Tromey  <tom@tromey.com>
6066
6067         * gdbcore.h (core_bfd): Redefine.
6068         * corelow.c (core_target::close): Update.
6069         (core_target_open): Update.
6070         * progspace.h (struct program_space) <cbfd>: Now a
6071         gdb_bfd_ref_ptr.
6072
6073 2018-05-16  Tom Tromey  <tom@tromey.com>
6074
6075         PR cli/19551:
6076         * symfile-add-flags.h (enum symfile_add_flags)
6077         <SYMFILE_NOT_FILENAME>: New constant.
6078         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6079         objfile name from BFD.
6080         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6081         * minidebug.c (find_separate_debug_file_in_section): Put
6082         ".gnu_debugdata" into BFD's file name.
6083
6084 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6085
6086         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6087         Remove.
6088
6089 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6090
6091         PR binutils/21446
6092         * aarch64-tdep.c (aarch64_analyze_prologue,
6093         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6094         Indicate not interested in errors.
6095
6096 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6097
6098         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6099         Supply the MIPS_ZERO_REGNUM register.
6100
6101 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6102
6103         * mips-tdep.c (mask_address_var): Make variable static.
6104
6105 2018-05-14  Tom Tromey  <tom@tromey.com>
6106
6107         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6108
6109 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6110
6111         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6112         FXSAVE_ADDR for the mxcsr register.
6113
6114 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6115
6116         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6117
6118 2018-05-11  Pedro Alves  <palves@redhat.com>
6119
6120         * corelow.c (core_target) <core_target>: No longer inline.
6121         Initialize m_core_gdbarch, m_core_vec and build the section table
6122         here.
6123         <~core_target>: New.
6124         <core_gdbarch, get_core_register_section>: New methods.
6125         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6126         factored out from ...
6127         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6128         (core_ops): Delete.
6129         (sniff_core_bfd): Add gdbarch parameter.
6130         (core_close): Delete, merged into ...
6131         (core_target::close): ... here.  Delete self.
6132         (core_close_cleanup): Delete.
6133         (core_target_open): Allocate a core_target on the heap.  Use a
6134         unique_ptr instead of a cleanup.  Bits moved into the core_target
6135         ctor.  Adjust to use core_target methods instead of globals.
6136         (get_core_register_section): Rename to ...
6137         (core_target::get_core_register_section): ... this and adjust.
6138         (struct get_core_registers_cb_data): New.
6139         (get_core_registers_cb): Use it.  Use bool.
6140         (core_target::fetch_registers, core_target::files_info)
6141         (core_target::xfer_partial, core_target::read_description)
6142         (core_target::pid_to, core_target::thread_name): Adjust to
6143         reference class fields instead of globals.
6144         * target.h (struct target_ops_deleter, target_ops_up): New.
6145
6146 2018-05-11  Pedro Alves  <palves@redhat.com>
6147
6148         * corefile.c (core_file_command): Move to corelow.c.
6149         * corelow.c (the_core_target): Delete.
6150         (core_file_command): Moved from corefile.c.  Check exec_bfd
6151         instead of the_core_target.  Use target_detach instead of calling
6152         into the_core_target directly.
6153         (maybe_say_no_core_file_now): New.
6154         (core_target::detach): Use it.
6155         (_initialize_corelow): Remove references to the_core_target.
6156         * gdbcore.h (the_core_target): Delete.
6157
6158 2018-05-11  Tom Tromey  <tromey@redhat.com>
6159             Pedro Alves  <palves@redhat.com>
6160
6161         * corefile.c (core_bfd): Remove.
6162         * gdbcore.h (core_bfd): Now a macro.
6163         * progspace.h (struct program_space) <cbfd>: New field.
6164
6165 2018-05-11  Tom Tromey  <tom@tromey.com>
6166
6167         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6168         gdb::def_vector.
6169
6170 2018-05-10  Tom Tromey  <tom@tromey.com>
6171
6172         * configure: Rebuild.
6173         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6174
6175 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6176
6177         PR server/23158:
6178         * regformats/regdat.sh: Adjust script, following the addition
6179         of the new expedite_regs parameter to init_target_desc.
6180
6181 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6182     
6183         PR gdb/23127
6184         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6185         set_gdbarch_significant_addr_bit.
6186         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6187         set_gdbarch_significant_addr_bit.
6188         * utils.c (address_significant): Update to sign extend addr.
6189
6190 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6191
6192         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6193         (xtensa_linux_init_abi): Limit tdep->num_regs by
6194         tdep->num_nopriv_regs.
6195         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6196         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6197         not initialized.
6198
6199 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6200
6201         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6202
6203 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6204
6205         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6206         (I387_MXCSR_INIT_VAL): New constant.
6207         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6208         buffer if it was supplied by the inferior.
6209         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6210         (i387_xsave_get_clear_bv): New function.
6211         (i387_supply_xsave): Only read x87 control registers from the
6212         xsave buffer if the feature is enabled, and the state will have
6213         been written, otherwise, provide a suitable default.
6214         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6215         including x87 control registers.  Update control registers if they
6216         have changed from the default value, and mark features as enabled
6217         as required.
6218         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6219
6220 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6221
6222         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6223
6224 2018-05-07  Tom Tromey  <tom@tromey.com>
6225
6226         * configure: Rebuild.
6227         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6228
6229 2018-05-07  Tom Tromey  <tom@tromey.com>
6230
6231         PR tdep/20362:
6232         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6233         bit.  Use correct value for VDIV.
6234
6235 2018-05-04  Tom Tromey  <tom@tromey.com>
6236
6237         * configure: Rebuild.
6238         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6239
6240 2018-05-04  Tom Tromey  <tom@tromey.com>
6241
6242         * linux-record.c (record_linux_system_call) <case
6243         RECORD_SYS_RECVFROM>: Add "break".
6244
6245 2018-05-04  Tom Tromey  <tom@tromey.com>
6246
6247         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6248         Add missing "break".
6249         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6250         Add missing "break".
6251
6252 2018-05-04  Tom Tromey  <tom@tromey.com>
6253
6254         * rs6000-tdep.c (ppc_process_record_op4)
6255         (ppc_process_record_op63): Add fall-through comment.
6256
6257 2018-05-04  Tom Tromey  <tom@tromey.com>
6258
6259         * i386-tdep.c (i386_process_record): Add fall-through comment.
6260
6261 2018-05-04  Tom Tromey  <tom@tromey.com>
6262
6263         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6264         comment.
6265
6266 2018-05-04  Tom Tromey  <tom@tromey.com>
6267
6268         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6269         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6270         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6271         comment.
6272         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6273         comment.
6274         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6275         comment.
6276
6277 2018-05-04  Tom Tromey  <tom@tromey.com>
6278
6279         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6280
6281 2018-05-04  Tom Tromey  <tom@tromey.com>
6282
6283         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6284         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6285         * symfile.c (section_is_mapped): Fix fall-through comment.
6286         * stabsread.c (define_symbol, read_member_functions): Fix
6287         fall-through comment.
6288         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6289         comment.
6290         * remote.c (remote_wait_as): Fix fall-through comment.
6291         * p-exp.y (yylex): Fix fall-through comment.
6292         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6293         comment.
6294         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6295         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6296         * jv-exp.y (yylex): Fix fall-through comment.
6297         * go-exp.y (lex_one_token): Fix fall-through comment.
6298         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6299         fall-through comment.
6300         * f-exp.y (yylex): Fix fall-through comment.
6301         * dwarf2read.c (process_die): Fix fall-through comments.
6302         * dbxread.c (process_one_symbol): Fix fall-through comment.
6303         * d-exp.y (lex_one_token): Fix fall-through comment.
6304         * cp-name-parser.y (yylex): Fix fall-through comment.
6305         * coffread.c (coff_symtab_read): Fix fall-through comment.
6306         * c-exp.y (lex_one_token): Fix fall-through comment.
6307         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6308         comment.
6309         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6310         comment.
6311
6312 2018-05-04  Tom Tromey  <tom@tromey.com>
6313
6314         PR python/22730:
6315         * NEWS: Mention gdb.execute change.
6316         * gdbcmd.h (execute_control_command): Don't declare.
6317         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6318         execute_control_commands, execute_control_commands_to_string.
6319         * cli/cli-script.h (execute_control_commands)
6320         (execute_control_commands_to_string): Declare.
6321         (execute_control_command): Add from_tty parameter.
6322         * cli/cli-script.c (execute_control_commands)
6323         (execute_control_commands_to_string): New functions.
6324         (execute_user_command): Use execute_control_commands.
6325         (execute_control_command_1): Add "from_tty" parameter.  Update.
6326         (execute_control_command): Likewise.
6327
6328 2018-05-04  Tom Tromey  <tom@tromey.com>
6329
6330         PR python/22731:
6331         * NEWS: Mention that breakpoint commands are writable.
6332         * python/py-breakpoint.c (bppy_set_commands): New function.
6333         (breakpoint_object_getset) <"commands">: Use it.
6334
6335 2018-05-04  Tom Tromey  <tom@tromey.com>
6336
6337         * tracepoint.c (actions_command): Update.
6338         * mi/mi-cmd-break.c (mi_command_line_array)
6339         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6340         (mi_read_next_line): Remove.
6341         (mi_cmd_break_commands): Update.
6342         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6343         function_view.
6344         * cli/cli-script.c (get_command_line): Update.
6345         (process_next_line): Use function_view.  Constify.
6346         (recurse_read_control_structure, read_command_lines)
6347         (read_command_lines_1): Change argument types to function_view.
6348         (do_define_command, document_command): Update.
6349         * breakpoint.h (check_tracepoint_command): Don't declare.
6350         * breakpoint.c (check_tracepoint_command): Remove.
6351         (commands_command_1, create_tracepoint_from_upload): Update.
6352
6353 2018-05-04  Tom Tromey  <tom@tromey.com>
6354
6355         PR gdb/11750:
6356         * cli/cli-script.h (enum command_control_type) <define_control>:
6357         New constant.
6358         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6359         (build_command_line, execute_control_command_1)
6360         (process_next_line): Likewise.
6361         (do_define_command): New function, extracted from define_command.
6362         (define_command): Use it.
6363
6364 2018-05-04  Tom Tromey  <tom@tromey.com>
6365
6366         * tracepoint.c (actions_command): Update.
6367         * cli/cli-script.h (read_command_lines): Update.
6368         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6369         (MAX_TMPBUF): Remove define.
6370         (define_command): Use string_printf.
6371         (document_command): Likewise.
6372         * breakpoint.c (commands_command_1): Update.
6373
6374 2018-05-04  Tom Tromey  <tom@tromey.com>
6375
6376         * top.c (execute_command): Update.
6377         * cli/cli-script.h (print_command_lines): Now varargs.
6378         * cli/cli-script.c (print_command_lines): Now varargs.
6379         (execute_control_command_1) <case while_control, case if_control>:
6380         Update.
6381
6382 2018-05-04  Tom Tromey  <tom@tromey.com>
6383
6384         * tracepoint.c (all_tracepoint_actions): Rename from
6385         all_tracepoint_actions_and_cleanup.  Change return type.
6386         (actions_command, encode_actions_1, encode_actions)
6387         (trace_dump_actions, tdump_command): Update.
6388         * remote.c (remote_download_command_source): Update.
6389         * python/python.c (gdbpy_eval_from_control_command)
6390         (python_command, python_interactive_command): Update.
6391         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6392         * guile/guile.c (guile_command)
6393         (gdbscm_eval_from_control_command, guile_command): Update.
6394         * compile/compile.c (compile_code_command)
6395         (compile_print_command, compile_to_object): Update.
6396         * cli/cli-script.h (struct command_lines_deleter): New.
6397         (counted_command_line): New typedef.
6398         (struct command_line): Add constructor, destructor.
6399         <body_list>: Remove.
6400         <body_list_0, body_list_1>: New members.
6401         (command_line_up): Remove typedef.
6402         (read_command_lines, read_command_lines_1, get_command_line):
6403         Update.
6404         (copy_command_lines): Don't declare.
6405         * cli/cli-script.c (build_command_line): Use "new".
6406         (get_command_line): Return counted_command_line.
6407         (print_command_lines, execute_user_command)
6408         (execute_control_command_1, while_command, if_command): Update.
6409         (realloc_body_list): Remove.
6410         (process_next_line, recurse_read_control_structure): Update.
6411         (read_command_lines, read_command_lines_1): Return counted_command_line.
6412         (free_command_lines): Use "delete".
6413         (copy_command_lines): Remove.
6414         (define_command, document_command, show_user_1): Update.
6415         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6416         a counted_command_line.
6417         * breakpoint.h (counted_command_line): Remove typedef.
6418         (breakpoint_set_commands): Update.
6419         * breakpoint.c (check_no_tracepoint_commands)
6420         (validate_commands_for_breakpoint): Update.
6421         (breakpoint_set_commands): Change commands to be a
6422         counted_command_line.
6423         (commands_command_1, update_dprintf_command_list)
6424         (create_tracepoint_from_upload): Update.
6425
6426 2018-05-04  Tom Tromey  <tom@tromey.com>
6427
6428         * cli/cli-decode.h (cmd_list_element): New constructor.
6429         (~cmd_list_element): New destructor.
6430         (struct cmd_list_element): Add initializers.
6431         * cli/cli-decode.c (do_add_cmd): Use "new".
6432         (delete_cmd): Use "delete".
6433
6434 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6435             Pedro Alves <palves@redhat.com>
6436
6437         PR breakpoints/19806 and support for PR external/20207.
6438         * NEWS: Mention Aarch64 watchpoint improvements.
6439         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6440         watchpoints and PR external/20207 watchpoints.
6441         * nat/aarch64-linux-hw-point.c
6442         (kernel_supports_any_contiguous_range): New.
6443         (aarch64_watchpoint_offset): New.
6444         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6445         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6446         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6447         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6448         next_addr_orig_p.  Support PR external/20207 watchpoints.
6449         (aarch64_downgrade_regs): New.
6450         (aarch64_dr_state_insert_one_point): New parameters offset and
6451         addr_orig.
6452         (aarch64_dr_state_remove_one_point): Likewise.
6453         (aarch64_handle_breakpoint): Update caller.
6454         (aarch64_handle_aligned_watchpoint): Likewise.
6455         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6456         aligned_offset.
6457         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6458         aarch64_downgrade_regs.
6459         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6460         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6461         (DR_CONTROL_MASK): ... this.
6462         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6463         (unsigned int aarch64_watchpoint_offset): New prototype.
6464         (aarch64_linux_set_debug_regs): Remove const from state.
6465         * utils.c (align_up, align_down): Move to ...
6466         * common/common-utils.c (align_up, align_down): ... here.
6467         * utils.h (align_up, align_down): Move to ...
6468         * common/common-utils.h (align_up, align_down): ... here.
6469
6470 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6471
6472         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6473         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6474         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6475         Re-implement to match the ABI as summarized in GCC's
6476         gcc/config/sparc/sparc.c.  All callers updated.
6477         (sparc32_store_arguments): Remove assertion.
6478
6479 2018-05-04  Tom Tromey  <tom@tromey.com>
6480
6481         * printcmd.c: Don't include tui.h.
6482         (decode_format): Use skip_spaces.
6483
6484 2018-05-04  Tom Tromey  <tom@tromey.com>
6485
6486         PR gdb/22619:
6487         * printcmd.c (last_count): New global.
6488         (x_command): Use saved count when repeating.
6489
6490 2018-05-04  Tom Tromey  <tom@tromey.com>
6491
6492         * nto-procfs.c (do_closedir_cleanup): Remove.
6493         (procfs_pidlist): Use gdb_dir_up.
6494         * procfs.c (do_closedir_cleanup): Remove.
6495         (proc_update_threads): Use gdb_dir_up.
6496         * common/filestuff.h (struct gdb_dir_deleter): New.
6497         (gdb_dir_up): New typedef.
6498
6499 2018-05-04  Tom Tromey  <tom@tromey.com>
6500
6501         * ada-lang.c (print_mention_exception): Use std::string.
6502
6503 2018-05-04  Tom Tromey  <tom@tromey.com>
6504
6505         * ada-lang.c (create_excep_cond_exprs): Update.
6506         (ada_exception_catchpoint_cond_string): Use std::string.
6507
6508 2018-05-04  Tom Tromey  <tom@tromey.com>
6509
6510         * ada-lang.c (xget_renaming_scope): Return std::string.
6511         (old_renaming_is_invisible): Update.
6512
6513 2018-05-04  Tom Tromey  <tom@tromey.com>
6514
6515         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6516         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6517
6518 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6519
6520         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6521
6522 2018-05-04  Tom Tromey  <tom@tromey.com>
6523
6524         * remote.c (remote_query_supported_append): Change type.
6525         (remote_check_symbols): Update.
6526
6527 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6528
6529         PR gdb/11420
6530         * configure.ac: Prepend libpython.
6531         * python/python-config.py: Likewise.
6532         * configure: Regenerate.
6533
6534 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6535
6536         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6537
6538 2018-05-03  Pedro Alves  <palves@redhat.com>
6539
6540         * s390-linux-nat.c
6541         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6542         override.  Write 'true' instead of '1'.
6543         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6544         declaration.
6545
6546 2018-05-02  Pedro Alves  <palves@redhat.com>
6547
6548         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6549         add_inf_child_target.
6550         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6551         add_inf_child_target.
6552         * aix-thread.c (aix_thread_target_info): New.
6553         (aix_thread_target) <shortname, longname, doc>: Delete.
6554         <info>: New.
6555         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6556         add_inf_child_target.
6557         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6558         add_inf_child_target.
6559         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6560         add_inf_child_target.
6561         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6562         add_inf_child_target.
6563         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6564         add_inf_child_target.
6565         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6566         add_inf_child_target.
6567         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6568         add_inf_child_target.
6569         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6570         add_inf_child_target.
6571         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6572         add_inf_child_target.
6573         * bfd-target.c (target_bfd_target_info): New.
6574         (target_bfd) <shortname, longname, doc>: Delete.
6575         <info>: New.
6576         * bsd-kvm.c (bsd_kvm_target_info): New.
6577         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6578         <info>: New.
6579         (bsd_kvm_target::open): Rename to ...
6580         (bsd_kvm_target_open): ... this.  Adjust.
6581         * bsd-uthread.c (bsd_uthread_target_info): New.
6582         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6583         <info>: New.
6584         * corefile.c (core_file_command): Adjust.
6585         * corelow.c (core_target_info): New.
6586         (core_target) <shortname, longname, doc>: Delete.
6587         <info>: New.
6588         (core_target::open): Rename to ...
6589         (core_target_open): ... this.  Adjust.
6590         * ctf.c (ctf_target_info): New.
6591         (ctf_target) <shortname, longname, doc>: Delete.
6592         <info>: New.
6593         (ctf_target::open): Rename to ...
6594         (ctf_target_open): ... this.
6595         (_initialize_ctf): Adjust.
6596         * exec.c (exec_target_info): New.
6597         (exec_target) <shortname, longname, doc>: Delete.
6598         <info>: New.
6599         (exec_target::open): Rename to ...
6600         (exec_target_open): ... this.
6601         * gdbcore.h (core_target_open): Declare.
6602         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6603         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6604         add_inf_child_target.
6605         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6606         add_inf_child_target.
6607         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6608         add_inf_child_target.
6609         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6610         add_inf_child_target.
6611         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6612         add_inf_child_target.
6613         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6614         add_inf_child_target.
6615         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6616         add_inf_child_target.
6617         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6618         add_inf_child_target.
6619         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6620         add_inf_child_target.
6621         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6622         add_inf_child_target.
6623         * inf-child.c (inf_child_target_info): New.
6624         (inf_child_target::info): New.
6625         (inf_child_open_target): Remove 'target' parameter.  Use
6626         get_native_target instead.
6627         (inf_child_target::open): Delete.
6628         (add_inf_child_target): New.
6629         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6630         Delete.
6631         <info>: New.
6632         (add_inf_child_target): Declare.
6633         (inf_child_open_target): Declare.
6634         * linux-thread-db.c (thread_db_target_info): New.
6635         (thread_db_target) <shortname, longname, doc>: Delete.
6636         <info>: New.
6637         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6638         add_inf_child_target.
6639         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6640         add_inf_child_target.
6641         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6642         add_inf_child_target.
6643         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6644         add_inf_child_target.
6645         * make-target-delegates (print_class): Adjust.
6646         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6647         add_inf_child_target.
6648         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6649         add_inf_child_target.
6650         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6651         add_inf_child_target.
6652         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6653         add_inf_child_target.
6654         * nto-procfs.c (nto_native_target_info): New.
6655         (nto_procfs_target_native) <shortname, longname, doc>:
6656         Delete.
6657         <info>: New.
6658         (nto_procfs_target_info): New.
6659         (nto_procfs_target_procfs) <shortname, longname, doc>:
6660         Delete.
6661         <info>: New.
6662         (init_procfs_targets): Adjust.
6663         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6664         add_inf_child_target.
6665         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6666         add_inf_child_target.
6667         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6668         add_inf_child_target.
6669         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6670         add_inf_child_target.
6671         * ravenscar-thread.c (ravenscar_target_info): New.
6672         (ravenscar_thread_target) <shortname, longname, doc>:
6673         Delete.
6674         <info>: New.
6675         * record-btrace.c (record_btrace_target_info):
6676         (record_btrace_target) <shortname, longname, doc>: Delete.
6677         <info>: New.
6678         (record_btrace_target::open): Rename to ...
6679         (record_btrace_target_open): ... this.  Adjust.
6680         * record-full.c (record_longname, record_doc): New.
6681         (record_full_base_target) <shortname, longname, doc>: Delete.
6682         <info>: New.
6683         (record_full_target_info): New.
6684         (record_full_target): <shortname>: Delete.
6685         <info>: New.
6686         (record_full_core_open_1, record_full_open_1): Update comments.
6687         (record_full_base_target::open): Rename to ...
6688         (record_full_open): ... this.
6689         (cmd_record_full_restore): Update.
6690         (_initialize_record_full): Update.
6691         * remote-sim.c (remote_sim_target_info): New.
6692         (gdbsim_target) <shortname, longname, doc>: Delete.
6693         <info>: New.
6694         (gdbsim_target::open): Rename to ...
6695         (gdbsim_target_open): ... this.
6696         (_initialize_remote_sim): Adjust.
6697         * remote.c (remote_doc): New.
6698         (remote_target_info): New.
6699         (remote_target) <shortname, longname, doc>: Delete.
6700         <info>: New.
6701         (extended_remote_target_info): New.
6702         (extended_remote_target) <shortname, longname, doc>: Delete.
6703         <info>: New.
6704         (remote_target::open_1): Make static.  Adjust.
6705         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6706         * s390-linux-nat.c (_initialize_s390_nat): Use
6707         add_inf_child_target.
6708         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6709         add_inf_child_target.
6710         * sol-thread.c (thread_db_target_info): New.
6711         (sol_thread_target) <shortname, longname, doc>: Delete.
6712         <info>: New.
6713         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6714         add_inf_child_target.
6715         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6716         add_inf_child_target.
6717         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6718         add_inf_child_target.
6719         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6720         add_inf_child_target.
6721         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6722         add_inf_child_target.
6723         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6724         add_inf_child_target.
6725         * spu-linux-nat.c (_initialize_spu_nat): Use
6726         add_inf_child_target.
6727         * spu-multiarch.c (spu_multiarch_target_info): New.
6728         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6729         <info>: New.
6730         * target-delegates.c: Regenerate.
6731         * target.c: Include <unordered_map>.
6732         (target_ops_p): Delete.
6733         (DEF_VEC_P(target_ops_p)): Delete.
6734         (target_factories): New.
6735         (test_target_info): New.
6736         (test_target_ops::info): New.
6737         (open_target): Adjust to use target_factories.
6738         (add_target_with_completer): Rename to ...
6739         (add_target): ... this.  Change prototype.  Register target_info
6740         and open callback in target_factories.  Register target_info in
6741         command context instead of target_ops.
6742         (add_target): Delete old implementation.
6743         (add_deprecated_target_alias): Change prototype.  Adjust.
6744         (the_native_target): New.
6745         (set_native_target, get_native_target): New.
6746         (find_default_run_target): Use the_native_target.
6747         (find_attach_target, find_run_target): Simplify.
6748         (target_ops::open): Delete.
6749         (dummy_target_info): New.
6750         (dummy_target::shortname, dummy_target::longname)
6751         (dummy_target::doc): Delete.
6752         (dummy_target::info): New.
6753         (debug_target::shortname, debug_target::longname)
6754         (debug_target::doc): Delete.
6755         (debug_target::info): New.
6756         * target.h (struct target_info): New.
6757         (target_ops::~target_ops): Add comment.
6758         (target_ops::info): New.
6759         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6760         longer virtual.  Implement in terms of target_info.
6761         (set_native_target, get_native_target): Declare.
6762         (target_open_ftype): New.
6763         (add_target, add_target_with_completer)
6764         (add_deprecated_target_alias): Change prototype.
6765         (test_target) <shortname, longname, doc>: Delete.
6766         <info>: New.
6767         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6768         add_inf_child_target.
6769         * tracefile-tfile.c (tfile_target_info): New.
6770         (tfile_target) <shortname, longname, doc>: Delete.
6771         <info>: New.
6772         (tfile_target::open): Rename to ...
6773         (tfile_target_open): ... this.
6774         (_initialize_tracefile_tfile): Adjust.
6775         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6776         add_inf_child_target.
6777         * windows-nat.c (_initialize_windows_nat): Use
6778         add_inf_child_target.
6779         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6780         add_inf_child_target.
6781
6782 2018-05-02  Pedro Alves  <palves@redhat.com>
6783
6784         * linux-nat.h (linux_nat_target) <low_new_thread,
6785         low_delete_thread, low_new_fork, low_forget_process,
6786         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6787         New virtual methods.
6788         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6789         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6790         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6791         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6792         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6793         Delete.
6794         * linux-fork.c (delete_fork): Adjust to call low method.
6795         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6796         (linux_nat_new_fork, linux_nat_forget_process_hook)
6797         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6798         (linux_nat_status_is_event):
6799         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6800         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6801         to call low method.
6802         (sigtrap_is_event): Rename to ...
6803         (linux_nat_target::low_status_is_event): ... this.
6804         (linux_nat_set_status_is_event): Delete.
6805         (save_stop_reason, linux_nat_wait_1)
6806         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6807         low methods.
6808         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6809         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6810         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6811         (linux_nat_set_prepare_to_resume): Delete.
6812         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6813         low virtual methods.
6814         * amd64-linux-nat.c: Likewise.
6815         * arm-linux-nat.c: Likewise.
6816         * i386-linux-nat.c: Likewise.
6817         * ia64-linux-nat.c: Likewise.
6818         * mips-linux-nat.c: Likewise.
6819         * ppc-linux-nat.c: Likewise.
6820         * s390-linux-nat.c: Likewise.
6821         * sparc64-linux-nat.c: Likewise.
6822         * x86-linux-nat.c: Likewise.
6823         * x86-linux-nat.h: Include "nat/x86-linux.h".
6824         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6825         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6826         Override methods.
6827
6828 2018-05-02  Pedro Alves  <palves@redhat.com>
6829
6830         * target.h (target_ops)
6831         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6832         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6833         stopped_by_watchpoint, have_continuable_watchpoint,
6834         stopped_data_address, watchpoint_addr_within_range,
6835         can_accel_watchpoint_condition, can_run, thread_alive,
6836         has_all_memory, has_memory, has_stack, has_registers,
6837         has_execution, can_async_p, is_async_p, supports_non_stop,
6838         always_non_stop_p, can_execute_reverse, supports_multi_process,
6839         supports_enable_disable_tracepoint,
6840         supports_disable_randomization, supports_string_tracing,
6841         supports_evaluation_of_breakpoint_conditions,
6842         can_run_breakpoint_commands, filesystem_is_local,
6843         can_download_tracepoint, get_trace_state_variable_value,
6844         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6845         record_is_replaying, record_will_replay,
6846         augmented_libraries_svr4_read>: Adjust to return bool.
6847         * aarch64-linux-nat.c: All implementations adjusted.
6848         * aix-thread.c: All implementations adjusted.
6849         * arm-linux-nat.c: All implementations adjusted.
6850         * breakpoint.c: All implementations adjusted.
6851         * bsd-kvm.c: All implementations adjusted.
6852         * bsd-uthread.c: All implementations adjusted.
6853         * corelow.c: All implementations adjusted.
6854         * ctf.c: All implementations adjusted.
6855         * darwin-nat.c: All implementations adjusted.
6856         * darwin-nat.h: All implementations adjusted.
6857         * exec.c: All implementations adjusted.
6858         * fbsd-nat.c: All implementations adjusted.
6859         * fbsd-nat.h: All implementations adjusted.
6860         * gnu-nat.c: All implementations adjusted.
6861         * gnu-nat.h: All implementations adjusted.
6862         * go32-nat.c: All implementations adjusted.
6863         * ia64-linux-nat.c: All implementations adjusted.
6864         * inf-child.c: All implementations adjusted.
6865         * inf-child.h: All implementations adjusted.
6866         * inf-ptrace.c: All implementations adjusted.
6867         * inf-ptrace.h: All implementations adjusted.
6868         * linux-nat.c: All implementations adjusted.
6869         * linux-nat.h: All implementations adjusted.
6870         * mips-linux-nat.c: All implementations adjusted.
6871         * nto-procfs.c: All implementations adjusted.
6872         * ppc-linux-nat.c: All implementations adjusted.
6873         * procfs.c: All implementations adjusted.
6874         * ravenscar-thread.c: All implementations adjusted.
6875         * record-btrace.c: All implementations adjusted.
6876         * record-full.c: All implementations adjusted.
6877         * remote-sim.c: All implementations adjusted.
6878         * remote.c: All implementations adjusted.
6879         * s390-linux-nat.c: All implementations adjusted.
6880         * sol-thread.c: All implementations adjusted.
6881         * spu-multiarch.c: All implementations adjusted.
6882         * target-delegates.c: All implementations adjusted.
6883         * target.c: All implementations adjusted.
6884         * target.h: All implementations adjusted.
6885         * tracefile-tfile.c: All implementations adjusted.
6886         * tracefile.c: All implementations adjusted.
6887         * tracefile.h: All implementations adjusted.
6888         * windows-nat.c: All implementations adjusted.
6889         * x86-linux-nat.h: All implementations adjusted.
6890         * x86-nat.h: All implementations adjusted.
6891
6892 2018-05-02  Pedro Alves  <palves@redhat.com>
6893
6894         * make-target-delegates (scan_target_h): Don't trim lines here.
6895         Replace sequences of tabs and/or whitespace with a single
6896         whitespace.
6897         (top level, parsing methods): Trim each line before processing it
6898         here.
6899
6900 2018-05-02  Pedro Alves  <palves@redhat.com>
6901             John Baldwin  <jhb@freebsd.org>
6902
6903         * target.h (enum strata) <debug_stratum>: New.
6904         (struct target_ops) <all delegation methods>: Replace by C++
6905         virtual methods, and drop "to_" prefix.  All references updated
6906         throughout.
6907         <to_shortname, to_longname, to_doc, to_data,
6908         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6909         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6910         virtual methods.  All references updated throughout.
6911         <can_attach, supports_terminal_ours, can_create_inferior,
6912         get_thread_control_capabilities, attach_no_wait>: New
6913         virtual methods.
6914         <insert_breakpoint, remove_breakpoint>: Now
6915         TARGET_DEFAULT_NORETURN methods.
6916         <info_proc>: Now returns bool.
6917         <to_magic>: Delete.
6918         (OPS_MAGIC): Delete.
6919         (current_target): Delete.  All references replaced by references
6920         to ...
6921         (target_stack): ... this.  New.
6922         (target_shortname, target_longname): Adjust.
6923         (target_can_run): Now a function declaration.
6924         (default_child_has_all_memory, default_child_has_memory)
6925         (default_child_has_stack, default_child_has_registers)
6926         (default_child_has_execution): Remove target_ops parameter.
6927         (complete_target_initialization): Delete.
6928         (memory_breakpoint_target): New template class.
6929         (test_target_ops): Refactor as a C++ class with virtual methods.
6930         * make-target-delegates (NAME_PART): Tighten.
6931         (POINTER_PART, CP_SYMBOL): New.
6932         (SIMPLE_RETURN_PART): Reimplement.
6933         (VEC_RETURN_PART): Expect less.
6934         (RETURN_PART, VIRTUAL_PART): New.
6935         (METHOD): Adjust to C++ virtual methods.
6936         (scan_target_h): Remove reference to C99.
6937         (dname): Output "target_ops::" prefix.
6938         (write_function_header): Adjust to output a C++ class method.
6939         (write_declaration): New.
6940         (write_delegator): Adjust to output a C++ class method.
6941         (tdname): Output "dummy_target::" prefix.
6942         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6943         method.
6944         (tdefault_names, debug_names): Delete.
6945         (return_types, tdefaults, styles, argtypes_array): New.
6946         (top level): All methods are delegators.
6947         (print_class): New.
6948         (top level): Print dummy_target and debug_target classes.
6949         * target-delegates.c: Regenerate.
6950         * target-debug.h (target_debug_print_enum_info_proc_what)
6951         (target_debug_print_thread_control_capabilities)
6952         (target_debug_print_thread_info_p): New.
6953         * target.c (dummy_target): Delete.
6954         (the_dummy_target, the_debug_target): New.
6955         (target_stack): Now extern.
6956         (set_targetdebug): Push/unpush debug target.
6957         (default_child_has_all_memory, default_child_has_memory)
6958         (default_child_has_stack, default_child_has_registers)
6959         (default_child_has_execution): Remove target_ops parameter.
6960         (complete_target_initialization): Delete.
6961         (add_target_with_completer): No longer call
6962         complete_target_initialization.
6963         (target_supports_terminal_ours): Use regular delegation.
6964         (update_current_target): Delete.
6965         (push_target): No longer check magic number.  Don't call
6966         update_current_target.
6967         (unpush_target): Don't call update_current_target.
6968         (target_is_pushed): No longer check magic number.
6969         (target_require_runnable): Skip for all stratums over
6970         process_stratum.
6971         (target_ops::info_proc): New.
6972         (target_info_proc): Use find_target_at and
6973         find_default_run_target.
6974         (target_supports_disable_randomization): Use regular delegation.
6975         (target_get_osdata): Use find_target_at.
6976         (target_ops::open, target_ops::close, target_ops::can_attach)
6977         (target_ops::attach, target_ops::can_create_inferior)
6978         (target_ops::create_inferior, target_ops::can_run)
6979         (target_can_run): New.
6980         (default_fileio_target): Use regular delegation.
6981         (target_ops::fileio_open, target_ops::fileio_pwrite)
6982         (target_ops::fileio_pread, target_ops::fileio_fstat)
6983         (target_ops::fileio_close, target_ops::fileio_unlink)
6984         (target_ops::fileio_readlink): New.
6985         (target_fileio_open_1, target_fileio_unlink)
6986         (target_fileio_readlink): Always call the target method.  Handle
6987         FILEIO_ENOSYS.
6988         (return_zero, return_zero_has_execution): Delete.
6989         (init_dummy_target): Delete.
6990         (dummy_target::dummy_target, dummy_target::shortname)
6991         (dummy_target::longname, dummy_target::doc)
6992         (debug_target::debug_target, debug_target::shortname)
6993         (debug_target::longname, debug_target::doc): New.
6994         (target_supports_delete_record): Use regular delegation.
6995         (setup_target_debug): Delete.
6996         (maintenance_print_target_stack): Skip debug_stratum.
6997         (initialize_targets): Instantiate the_dummy_target and
6998         the_debug_target.
6999         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7000         use target_stack.
7001         (target_auxv_search, fprint_target_auxv): Adjust.
7002         (info_auxv_command): Adjust to use target_stack.
7003         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7004         * exceptions.c (print_flush): Handle a NULL target_stack.
7005         * regcache.c (target_ops_no_register): Refactor as class with
7006         virtual methods.
7007
7008         * exec.c (exec_target): New class.
7009         (exec_ops): Now an exec_target.
7010         (exec_open, exec_close_1, exec_get_section_table)
7011         (exec_xfer_partial, exec_files_info, exec_has_memory)
7012         (exec_make_note_section): Refactor as exec_target methods.
7013         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7014         Delete.
7015         (exec_target::find_memory_regions): New.
7016         (_initialize_exec): Don't call init_exec_ops.
7017         * gdbcore.h (exec_file_clear): Delete.
7018
7019         * corefile.c (core_target): Delete.
7020         (core_file_command): Adjust.
7021         * corelow.c (core_target): New class.
7022         (the_core_target): New.
7023         (core_close): Remove target_ops parameter.
7024         (core_close_cleanup): Adjust.
7025         (core_target::close): New.
7026         (core_open, core_detach, get_core_registers, core_files_info)
7027         (core_xfer_partial, core_thread_alive, core_read_description)
7028         (core_pid_to_str, core_thread_name, core_has_memory)
7029         (core_has_stack, core_has_registers, core_info_proc): Rework as
7030         core_target methods.
7031         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7032         (_initialize_corelow): Initialize the_core_target.
7033         * gdbcore.h (core_target): Delete.
7034         (the_core_target): New.
7035
7036         * ctf.c: (ctf_target): New class.
7037         (ctf_ops): Now a ctf_target.
7038         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7039         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7040         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7041         methods.
7042         (init_ctf_ops): Delete.
7043         (_initialize_ctf): Don't call it.
7044         * tracefile-tfile.c (tfile_target): New class.
7045         (tfile_ops): Now a tfile_target.
7046         (tfile_open, tfile_close, tfile_files_info)
7047         (tfile_get_tracepoint_status, tfile_trace_find)
7048         (tfile_fetch_registers, tfile_xfer_partial)
7049         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7050         Refactor as tfile_target methods.
7051         (tfile_xfer_partial_features): Remove target_ops parameter.
7052         (init_tfile_ops): Delete.
7053         (_initialize_tracefile_tfile): Don't call it.
7054         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7055         (tracefile_has_stack, tracefile_has_registers)
7056         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7057         tracefile_target methods.
7058         (init_tracefile_ops): Delete.
7059         (tracefile_target::tracefile_target): New.
7060         * tracefile.h: Include "target.h".
7061         (tracefile_target): New class.
7062         (init_tracefile_ops): Delete.
7063
7064         * spu-multiarch.c (spu_multiarch_target): New class.
7065         (spu_ops): Now a spu_multiarch_target.
7066         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7067         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7068         (spu_search_memory, spu_mourn_inferior): Refactor as
7069         spu_multiarch_target methods.
7070         (init_spu_ops): Delete.
7071         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7072         complete_target_initialization.
7073
7074         * ravenscar-thread.c (ravenscar_thread_target): New class.
7075         (ravenscar_ops): Now a ravenscar_thread_target.
7076         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7077         (ravenscar_thread_alive, ravenscar_pid_to_str)
7078         (ravenscar_fetch_registers, ravenscar_store_registers)
7079         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7080         (ravenscar_stopped_by_hw_breakpoint)
7081         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7082         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7083         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7084         methods.
7085         (init_ravenscar_thread_ops): Delete.
7086         (_initialize_ravenscar): Remove references to
7087         init_ravenscar_thread_ops and complete_target_initialization.
7088
7089         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7090         (bsd_uthread_target): New class.
7091         (bsd_uthread_ops): Now a bsd_uthread_target.
7092         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7093         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7094         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7095         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7096         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7097         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7098         (bsd_uthread_target): Delete function.
7099         (_initialize_bsd_uthread): Remove reference to
7100         complete_target_initialization.
7101
7102         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7103         (target_bfd): ... this new class.
7104         (target_bfd_xfer_partial, target_bfd_get_section_table)
7105         (target_bfd_close): Refactor as target_bfd methods.
7106         (target_bfd::~target_bfd): New.
7107         (target_bfd_reopen): Adjust.
7108         (target_bfd::close): New.
7109
7110         * record-btrace.c (record_btrace_target): New class.
7111         (record_btrace_ops): Now a record_btrace_target.
7112         (record_btrace_open, record_btrace_stop_recording)
7113         (record_btrace_disconnect, record_btrace_close)
7114         (record_btrace_async, record_btrace_info)
7115         (record_btrace_insn_history, record_btrace_insn_history_range)
7116         (record_btrace_insn_history_from, record_btrace_call_history)
7117         (record_btrace_call_history_range)
7118         (record_btrace_call_history_from, record_btrace_record_method)
7119         (record_btrace_is_replaying, record_btrace_will_replay)
7120         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7121         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7122         (record_btrace_store_registers, record_btrace_prepare_to_store)
7123         (record_btrace_to_get_unwinder)
7124         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7125         (record_btrace_commit_resume, record_btrace_wait)
7126         (record_btrace_stop, record_btrace_can_execute_reverse)
7127         (record_btrace_stopped_by_sw_breakpoint)
7128         (record_btrace_supports_stopped_by_sw_breakpoint)
7129         (record_btrace_stopped_by_hw_breakpoint)
7130         (record_btrace_supports_stopped_by_hw_breakpoint)
7131         (record_btrace_update_thread_list, record_btrace_thread_alive)
7132         (record_btrace_goto_begin, record_btrace_goto_end)
7133         (record_btrace_goto, record_btrace_stop_replaying_all)
7134         (record_btrace_execution_direction)
7135         (record_btrace_prepare_to_generate_core)
7136         (record_btrace_done_generating_core): Refactor as
7137         record_btrace_target methods.
7138         (init_record_btrace_ops): Delete.
7139         (_initialize_record_btrace): Remove reference to
7140         init_record_btrace_ops.
7141         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7142         the execution_direction global.
7143         (record_full_base_target, record_full_target)
7144         (record_full_core_target): New classes.
7145         (record_full_ops): Now a record_full_target.
7146         (record_full_core_ops): Now a record_full_core_target.
7147         (record_full_target::detach, record_full_target::disconnect)
7148         (record_full_core_target::disconnect)
7149         (record_full_target::mourn_inferior, record_full_target::kill):
7150         New.
7151         (record_full_open, record_full_close, record_full_async): Refactor
7152         as methods of the record_full_base_target class.
7153         (record_full_resume, record_full_commit_resume): Refactor
7154         as methods of the record_full_target class.
7155         (record_full_wait, record_full_stopped_by_watchpoint)
7156         (record_full_stopped_data_address)
7157         (record_full_stopped_by_sw_breakpoint)
7158         (record_full_supports_stopped_by_sw_breakpoint)
7159         (record_full_stopped_by_hw_breakpoint)
7160         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7161         methods of the record_full_base_target class.
7162         (record_full_store_registers, record_full_xfer_partial)
7163         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7164         Refactor as methods of the record_full_target class.
7165         (record_full_can_execute_reverse, record_full_get_bookmark)
7166         (record_full_goto_bookmark, record_full_execution_direction)
7167         (record_full_record_method, record_full_info, record_full_delete)
7168         (record_full_is_replaying, record_full_will_replay)
7169         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7170         (record_full_stop_replaying): Refactor as methods of the
7171         record_full_base_target class.
7172         (record_full_core_resume, record_full_core_kill)
7173         (record_full_core_fetch_registers)
7174         (record_full_core_prepare_to_store)
7175         (record_full_core_store_registers, record_full_core_xfer_partial)
7176         (record_full_core_insert_breakpoint)
7177         (record_full_core_remove_breakpoint)
7178         (record_full_core_has_execution): Refactor
7179         as methods of the record_full_core_target class.
7180         (record_full_base_target::supports_delete_record): New.
7181         (init_record_full_ops): Delete.
7182         (init_record_full_core_ops): Delete.
7183         (record_full_save): Refactor as method of the
7184         record_full_base_target class.
7185         (_initialize_record_full): Remove references to
7186         init_record_full_ops and init_record_full_core_ops.
7187
7188         * remote.c (remote_target, extended_remote_target): New classes.
7189         (remote_ops): Now a remote_target.
7190         (extended_remote_ops): Now an extended_remote_target.
7191         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7192         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7193         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7194         (remote_pass_signals, remote_set_syscall_catchpoint)
7195         (remote_program_signals, )
7196         (remote_thread_always_alive): Remove target_ops parameter.
7197         (remote_thread_alive, remote_thread_name)
7198         (remote_update_thread_list, remote_threads_extra_info)
7199         (remote_static_tracepoint_marker_at)
7200         (remote_static_tracepoint_markers_by_strid)
7201         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7202         (remote_open): Refactor as methods of remote_target.
7203         (extended_remote_open, extended_remote_detach)
7204         (extended_remote_attach, extended_remote_post_attach):
7205         (extended_remote_supports_disable_randomization)
7206         (extended_remote_create_inferior): : Refactor as method of
7207         extended_remote_target.
7208         (remote_set_permissions, remote_open_1, remote_detach)
7209         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7210         (remote_resume, remote_commit_resume, remote_stop)
7211         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7212         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7213         (remote_prepare_to_store, remote_store_registers)
7214         (remote_flash_erase, remote_flash_done, remote_files_info)
7215         (remote_kill, remote_mourn, remote_insert_breakpoint)
7216         (remote_remove_breakpoint, remote_insert_watchpoint)
7217         (remote_watchpoint_addr_within_range)
7218         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7219         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7220         (remote_supports_stopped_by_sw_breakpoint)
7221         (remote_stopped_by_hw_breakpoint)
7222         (remote_supports_stopped_by_hw_breakpoint)
7223         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7224         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7225         (remote_verify_memory): Refactor as methods of remote_target.
7226         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7227         parameter.
7228         (remote_xfer_partial, remote_get_memory_xfer_limit)
7229         (remote_search_memory, remote_rcmd, remote_memory_map)
7230         (remote_pid_to_str, remote_get_thread_local_address)
7231         (remote_get_tib_address, remote_read_description): Refactor as
7232         methods of remote_target.
7233         (remote_target::fileio_open, remote_target::fileio_pwrite)
7234         (remote_target::fileio_pread, remote_target::fileio_close): New.
7235         (remote_hostio_readlink, remote_hostio_fstat)
7236         (remote_filesystem_is_local, remote_can_execute_reverse)
7237         (remote_supports_non_stop, remote_supports_disable_randomization)
7238         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7239         (remote_supports_enable_disable_tracepoint)
7240         (remote_supports_string_tracing)
7241         (remote_can_run_breakpoint_commands, remote_trace_init)
7242         (remote_download_tracepoint, remote_can_download_tracepoint)
7243         (remote_download_trace_state_variable, remote_enable_tracepoint)
7244         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7245         (remote_trace_start, remote_get_trace_status)
7246         (remote_get_tracepoint_status, remote_trace_stop)
7247         (remote_trace_find, remote_get_trace_state_variable_value)
7248         (remote_save_trace_data, remote_get_raw_trace_data)
7249         (remote_set_disconnected_tracing, remote_core_of_thread)
7250         (remote_set_circular_trace_buffer, remote_traceframe_info)
7251         (remote_get_min_fast_tracepoint_insn_len)
7252         (remote_set_trace_buffer_size, remote_set_trace_notes)
7253         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7254         (remote_disable_btrace, remote_teardown_btrace)
7255         (remote_read_btrace, remote_btrace_conf)
7256         (remote_augmented_libraries_svr4_read, remote_load)
7257         (remote_pid_to_exec_file, remote_can_do_single_step)
7258         (remote_execution_direction, remote_thread_handle_to_thread_info):
7259         Refactor as methods of remote_target.
7260         (init_remote_ops, init_extended_remote_ops): Delete.
7261         (remote_can_async_p, remote_is_async_p, remote_async)
7262         (remote_thread_events, remote_upload_tracepoints)
7263         (remote_upload_trace_state_variables): Refactor as methods of
7264         remote_target.
7265         (_initialize_remote): Remove references to init_remote_ops and
7266         init_extended_remote_ops.
7267
7268         * remote-sim.c (gdbsim_target): New class.
7269         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7270         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7271         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7272         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7273         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7274         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7275         Refactor as methods of gdbsim_target.
7276         (gdbsim_ops): Now a gdbsim_target.
7277         (init_gdbsim_ops): Delete.
7278         (gdbsim_cntrl_c): Adjust.
7279         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7280
7281         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7282         (the_amd64_linux_nat_target): New.
7283         (amd64_linux_fetch_inferior_registers)
7284         (amd64_linux_store_inferior_registers): Refactor as methods of
7285         amd64_linux_nat_target.
7286         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7287         * i386-linux-nat.c: Don't include "linux-nat.h".
7288         (i386_linux_nat_target): New class.
7289         (the_i386_linux_nat_target): New.
7290         (i386_linux_fetch_inferior_registers)
7291         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7292         as methods of i386_linux_nat_target.
7293         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7294         * inf-child.c (inf_child_ops): Delete.
7295         (inf_child_fetch_inferior_registers)
7296         (inf_child_store_inferior_registers): Delete.
7297         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7298         methods of inf_child_target.
7299         (inf_child_target::supports_terminal_ours)
7300         (inf_child_target::terminal_init)
7301         (inf_child_target::terminal_inferior)
7302         (inf_child_target::terminal_ours_for_output)
7303         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7304         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7305         New.
7306         (inf_child_open, inf_child_disconnect, inf_child_close)
7307         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7308         (inf_child_post_startup_inferior, inf_child_can_run)
7309         (inf_child_pid_to_exec_file): Refactor as methods of
7310         inf_child_target.
7311         (inf_child_follow_fork): Delete.
7312         (inf_child_target::can_create_inferior)
7313         (inf_child_target::can_attach): New.
7314         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7315         (inf_child_target::has_stack, inf_child_target::has_registers)
7316         (inf_child_target::has_execution): New.
7317         (inf_child_fileio_open, inf_child_fileio_pwrite)
7318         (inf_child_fileio_pread, inf_child_fileio_fstat)
7319         (inf_child_fileio_close, inf_child_fileio_unlink)
7320         (inf_child_fileio_readlink, inf_child_use_agent)
7321         (inf_child_can_use_agent): Refactor as methods of
7322         inf_child_target.
7323         (return_zero, inf_child_target): Delete.
7324         (inf_child_target::inf_child_target): New.
7325         * inf-child.h: Include "target.h".
7326         (inf_child_target): Delete function prototype.
7327         (inf_child_target): New class.
7328         (inf_child_open_target, inf_child_mourn_inferior)
7329         (inf_child_maybe_unpush_target): Delete.
7330         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7331         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7332         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7333         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7334         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7335         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7336         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7337         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7338         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7339         methods of inf_ptrace_target.
7340         (inf_ptrace_target): Delete function.
7341         * inf-ptrace.h: Include "inf-child.h".
7342         (inf_ptrace_target): Delete function declaration.
7343         (inf_ptrace_target): New class.
7344         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7345         * linux-nat.c (linux_target): New.
7346         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7347         (linux_nat_target::~linux_nat_target): New.
7348         (linux_child_post_attach, linux_child_post_startup_inferior)
7349         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7350         (linux_child_remove_fork_catchpoint)
7351         (linux_child_insert_vfork_catchpoint)
7352         (linux_child_remove_vfork_catchpoint)
7353         (linux_child_insert_exec_catchpoint)
7354         (linux_child_remove_exec_catchpoint)
7355         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7356         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7357         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7358         (linux_nat_stopped_data_address)
7359         (linux_nat_stopped_by_sw_breakpoint)
7360         (linux_nat_supports_stopped_by_sw_breakpoint)
7361         (linux_nat_stopped_by_hw_breakpoint)
7362         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7363         (linux_nat_kill, linux_nat_mourn_inferior)
7364         (linux_nat_xfer_partial, linux_nat_thread_alive)
7365         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7366         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7367         (linux_child_static_tracepoint_markers_by_strid)
7368         (linux_nat_is_async_p, linux_nat_can_async_p)
7369         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7370         (linux_nat_supports_multi_process)
7371         (linux_nat_supports_disable_randomization, linux_nat_async)
7372         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7373         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7374         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7375         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7376         methods of linux_nat_target.
7377         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7378         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7379         parameter.
7380         (check_stopped_by_watchpoint): Adjust.
7381         (linux_xfer_partial): Delete.
7382         (linux_target_install_ops, linux_target, linux_nat_add_target):
7383         Delete.
7384         (linux_nat_target::linux_nat_target): New.
7385         * linux-nat.h: Include "inf-ptrace.h".
7386         (linux_nat_target): New.
7387         (linux_target, linux_target_install_ops, linux_nat_add_target):
7388         Delete function declarations.
7389         (linux_target): Declare global.
7390         * linux-thread-db.c (thread_db_target): New.
7391         (thread_db_target::thread_db_target): New.
7392         (thread_db_ops): Delete.
7393         (the_thread_db_target): New.
7394         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7395         (thread_db_update_thread_list, thread_db_pid_to_str)
7396         (thread_db_extra_thread_info)
7397         (thread_db_thread_handle_to_thread_info)
7398         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7399         (thread_db_resume): Refactor as methods of thread_db_target.
7400         (init_thread_db_ops): Delete.
7401         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7402         * x86-linux-nat.c: Don't include "linux-nat.h".
7403         (super_post_startup_inferior): Delete.
7404         (x86_linux_nat_target::~x86_linux_nat_target): New.
7405         (x86_linux_child_post_startup_inferior)
7406         (x86_linux_read_description, x86_linux_enable_btrace)
7407         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7408         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7409         methods of x86_linux_nat_target.
7410         (x86_linux_create_target): Delete.  Bits folded ...
7411         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7412         pointer.
7413         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7414         (x86_linux_nat_target): New class.
7415         (x86_linux_create_target): Delete.
7416         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7417         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7418         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7419         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7420         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7421         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7422         make extern.
7423         (x86_use_watchpoints): Delete.
7424         * x86-nat.h: Include "breakpoint.h" and "target.h".
7425         (x86_use_watchpoints): Delete.
7426         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7427         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7428         (x86_insert_watchpoint, x86_remove_watchpoint)
7429         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7430         (x86_stopped_by_hw_breakpoint): New declarations.
7431         (x86_nat_target): New template class.
7432
7433         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7434         (the_ppc_linux_nat_target): New.
7435         (ppc_linux_fetch_inferior_registers)
7436         (ppc_linux_can_use_hw_breakpoint)
7437         (ppc_linux_region_ok_for_hw_watchpoint)
7438         (ppc_linux_ranged_break_num_registers)
7439         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7440         (ppc_linux_insert_mask_watchpoint)
7441         (ppc_linux_remove_mask_watchpoint)
7442         (ppc_linux_can_accel_watchpoint_condition)
7443         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7444         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7445         (ppc_linux_watchpoint_addr_within_range)
7446         (ppc_linux_masked_watch_num_registers)
7447         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7448         (ppc_linux_read_description): Refactor as methods of
7449         ppc_linux_nat_target.
7450         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7451
7452         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7453         (procfs_target): New class.
7454         (the_procfs_target): New.
7455         (procfs_target): Delete function.
7456         (procfs_auxv_parse, procfs_attach, procfs_detach)
7457         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7458         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7459         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7460         (procfs_create_inferior, procfs_update_thread_list)
7461         (procfs_thread_alive, procfs_pid_to_str)
7462         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7463         (procfs_stopped_data_address, procfs_insert_watchpoint)
7464         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7465         (proc_find_memory_regions, procfs_info_proc)
7466         (procfs_make_note_section): Refactor as methods of procfs_target.
7467         (_initialize_procfs): Adjust.
7468         * sol-thread.c (sol_thread_target): New class.
7469         (sol_thread_ops): Now a sol_thread_target.
7470         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7471         (sol_thread_fetch_registers, sol_thread_store_registers)
7472         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7473         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7474         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7475         (init_sol_thread_ops): Delete.
7476         (_initialize_sol_thread): Adjust.  Remove references to
7477         init_sol_thread_ops and complete_target_initialization.
7478
7479         * windows-nat.c (windows_nat_target): New class.
7480         (windows_fetch_inferior_registers)
7481         (windows_store_inferior_registers, windows_resume, windows_wait)
7482         (windows_attach, windows_detach, windows_pid_to_exec_file)
7483         (windows_files_info, windows_create_inferior)
7484         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7485         (windows_close, windows_pid_to_str, windows_xfer_partial)
7486         (windows_get_tib_address, windows_get_ada_task_ptid)
7487         (windows_thread_name, windows_thread_alive): Refactor as
7488         windows_nat_target methods.
7489         (do_initial_windows_stuff): Adjust.
7490         (windows_target): Delete function.
7491         (_initialize_windows_nat): Adjust.
7492
7493         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7494         (darwin_mourn_inferior, darwin_kill_inferior)
7495         (darwin_create_inferior, darwin_attach, darwin_detach)
7496         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7497         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7498         (darwin_supports_multi_process): Refactor as darwin_nat_target
7499         methods.
7500         (darwin_resume_to, darwin_files_info): Delete.
7501         (_initialize_darwin_inferior): Rename to ...
7502         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7503         * darwin-nat.h: Include "inf-child.h".
7504         (darwin_nat_target): New class.
7505         (darwin_complete_target): Delete.
7506         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7507         (darwin_target): New.
7508         (i386_darwin_fetch_inferior_registers)
7509         (i386_darwin_store_inferior_registers): Refactor as methods of
7510         darwin_nat_target.
7511         (darwin_complete_target): Delete, with ...
7512         (_initialize_i386_darwin_nat): ... bits factored out here.
7513
7514         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7515         (the_alpha_linux_nat_target): New.
7516         (alpha_linux_register_u_offset): Refactor as
7517         alpha_linux_nat_target method.
7518         (_initialize_alpha_linux_nat): Adjust.
7519         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7520         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7521         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7522         methods of linux_nat_trad_target.
7523         (linux_trad_target): Delete.
7524         * linux-nat-trad.h (linux_trad_target): Delete function.
7525         (linux_nat_trad_target): New class.
7526         * mips-linux-nat.c (mips_linux_nat_target): New class.
7527         (super_fetch_registers, super_store_registers, super_close):
7528         Delete.
7529         (the_mips_linux_nat_target): New.
7530         (mips64_linux_regsets_fetch_registers)
7531         (mips64_linux_regsets_store_registers)
7532         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7533         (mips_linux_register_u_offset, mips_linux_read_description)
7534         (mips_linux_can_use_hw_breakpoint)
7535         (mips_linux_stopped_by_watchpoint)
7536         (mips_linux_stopped_data_address)
7537         (mips_linux_region_ok_for_hw_watchpoint)
7538         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7539         (mips_linux_close): Refactor as methods of mips_linux_nat.
7540         (_initialize_mips_linux_nat): Adjust to C++ification.
7541
7542         * aix-thread.c (aix_thread_target): New class.
7543         (aix_thread_ops): Now an aix_thread_target.
7544         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7545         (aix_thread_fetch_registers, aix_thread_store_registers)
7546         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7547         (aix_thread_thread_alive, aix_thread_pid_to_str)
7548         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7549         Refactor as methods of aix_thread_target.
7550         (init_aix_thread_ops): Delete.
7551         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7552         and complete_target_initialization.
7553         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7554         (rs6000_nat_target): New class.
7555         (the_rs6000_nat_target): New.
7556         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7557         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7558         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7559         (super_create_inferior): Delete.
7560         (_initialize_rs6000_nat): Adjust to C++ification.
7561
7562         * arm-linux-nat.c (arm_linux_nat_target): New class.
7563         (the_arm_linux_nat_target): New.
7564         (arm_linux_fetch_inferior_registers)
7565         (arm_linux_store_inferior_registers, arm_linux_read_description)
7566         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7567         (arm_linux_remove_hw_breakpoint)
7568         (arm_linux_region_ok_for_hw_watchpoint)
7569         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7570         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7571         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7572         arm_linux_nat_target.
7573         (_initialize_arm_linux_nat): Adjust to C++ification.
7574
7575         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7576         (the_aarch64_linux_nat_target): New.
7577         (aarch64_linux_fetch_inferior_registers)
7578         (aarch64_linux_store_inferior_registers)
7579         (aarch64_linux_child_post_startup_inferior)
7580         (aarch64_linux_read_description)
7581         (aarch64_linux_can_use_hw_breakpoint)
7582         (aarch64_linux_insert_hw_breakpoint)
7583         (aarch64_linux_remove_hw_breakpoint)
7584         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7585         (aarch64_linux_region_ok_for_hw_watchpoint)
7586         (aarch64_linux_stopped_data_address)
7587         (aarch64_linux_stopped_by_watchpoint)
7588         (aarch64_linux_watchpoint_addr_within_range)
7589         (aarch64_linux_can_do_single_step): Refactor as methods of
7590         aarch64_linux_nat_target.
7591         (super_post_startup_inferior): Delete.
7592         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7593
7594         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7595         (the_hppa_linux_nat_target): New.
7596         (hppa_linux_fetch_inferior_registers)
7597         (hppa_linux_store_inferior_registers): Refactor as methods of
7598         hppa_linux_nat_target.
7599         (_initialize_hppa_linux_nat): Adjust to C++ification.
7600
7601         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7602         (the_ia64_linux_nat_target): New.
7603         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7604         (ia64_linux_stopped_data_address)
7605         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7606         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7607         ia64_linux_nat_target methods.
7608         (super_xfer_partial): Delete.
7609         (_initialize_ia64_linux_nat): Adjust to C++ification.
7610
7611         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7612         (the_m32r_linux_nat_target): New.
7613         (m32r_linux_fetch_inferior_registers)
7614         (m32r_linux_store_inferior_registers): Refactor as
7615         m32r_linux_nat_target methods.
7616         (_initialize_m32r_linux_nat): Adjust to C++ification.
7617
7618         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7619         (the_m68k_linux_nat_target): New.
7620         (m68k_linux_fetch_inferior_registers)
7621         (m68k_linux_store_inferior_registers): Refactor as
7622         m68k_linux_nat_target methods.
7623         (_initialize_m68k_linux_nat): Adjust to C++ification.
7624
7625         * s390-linux-nat.c (s390_linux_nat_target): New class.
7626         (the_s390_linux_nat_target): New.
7627         (s390_linux_fetch_inferior_registers)
7628         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7629         (s390_insert_watchpoint, s390_remove_watchpoint)
7630         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7631         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7632         (s390_auxv_parse, s390_read_description): Refactor as methods of
7633         s390_linux_nat_target.
7634         (_initialize_s390_nat): Adjust to C++ification.
7635
7636         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7637         (the_sparc_linux_nat_target): New.
7638         (_initialize_sparc_linux_nat): Adjust to C++ification.
7639         * sparc-nat.c (sparc_fetch_inferior_registers)
7640         (sparc_store_inferior_registers): Remove target_ops parameter.
7641         * sparc-nat.h (sparc_fetch_inferior_registers)
7642         (sparc_store_inferior_registers): Remove target_ops parameter.
7643         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7644         (the_sparc64_linux_nat_target): New.
7645         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7646
7647         * spu-linux-nat.c (spu_linux_nat_target): New class.
7648         (the_spu_linux_nat_target): New.
7649         (spu_child_post_startup_inferior, spu_child_post_attach)
7650         (spu_child_wait, spu_fetch_inferior_registers)
7651         (spu_store_inferior_registers, spu_xfer_partial)
7652         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7653         methods.
7654         (_initialize_spu_nat): Adjust to C++ification.
7655
7656         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7657         (the_tilegx_linux_nat_target): New.
7658         (fetch_inferior_registers, store_inferior_registers):
7659         Refactor as methods.
7660         (_initialize_tile_linux_nat): Adjust to C++ification.
7661
7662         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7663         (the_xtensa_linux_nat_target): New.
7664         (xtensa_linux_fetch_inferior_registers)
7665         (xtensa_linux_store_inferior_registers): Refactor as
7666         xtensa_linux_nat_target methods.
7667         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7668
7669         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7670         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7671         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7672         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7673         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7674         (fbsd_stopped_by_sw_breakpoint)
7675         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7676         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7677         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7678         (fbsd_post_startup_inferior, fbsd_post_attach)
7679         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7680         (fbsd_set_syscall_catchpoint)
7681         (super_xfer_partial, super_resume, super_wait)
7682         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7683         (fbsd_handle_debug_trap): Remove target_ops parameter.
7684         (fbsd_nat_add_target): Delete.
7685         * fbsd-nat.h: Include "inf-ptrace.h".
7686         (fbsd_nat_add_target): Delete.
7687         (USE_SIGTRAP_SIGINFO): Define.
7688         (fbsd_nat_target): New class.
7689
7690         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7691         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7692         (amd64bsd_target): Delete.
7693         * amd64-bsd-nat.h: New file.
7694         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7695         "x86-bsd-nat.h".
7696         (amd64_fbsd_nat_target): New class.
7697         (the_amd64_fbsd_nat_target): New.
7698         (amd64fbsd_read_description): Refactor as method of
7699         amd64_fbsd_nat_target.
7700         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7701         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7702         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7703         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7704         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7705         (i386bsd_target): Delete.
7706         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7707         (i386bsd_fetch_inferior_registers)
7708         (i386bsd_store_inferior_registers): Declare.
7709         (i386_bsd_nat_target): New class.
7710         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7711         (the_i386_fbsd_nat_target): New.
7712         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7713         i386_fbsd_nat_target methods.
7714         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7715         (_initialize_i386fbsd_nat): Adjust to C++ification.
7716         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7717         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7718         (_initialize_x86_bsd_nat): Adjust to C++ification.
7719         * x86-bsd-nat.h: Include "x86-nat.h".
7720         (x86bsd_target): Delete declaration.
7721         (x86bsd_nat_target): New class.
7722
7723         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7724         (the_aarch64_fbsd_nat_target): New.
7725         (aarch64_fbsd_fetch_inferior_registers)
7726         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7727         aarch64_fbsd_nat_target.
7728         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7729         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7730         (the_alpha_bsd_nat_target): New.
7731         (alphabsd_fetch_inferior_registers)
7732         (alphabsd_store_inferior_registers): Refactor as
7733         alpha_bsd_nat_target methods.
7734         (_initialize_alphabsd_nat): Refactor as methods of
7735         alpha_bsd_nat_target.
7736         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7737         (the_amd64_nbsd_nat_target): New.
7738         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7739         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7740         (the_amd64_obsd_nat_target): New.
7741         (_initialize_amd64obsd_nat): Adjust to C++ification.
7742         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7743         (the_arm_fbsd_nat_target): New.
7744         (arm_fbsd_fetch_inferior_registers)
7745         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7746         (_initialize_arm_fbsd_nat): Refactor as methods of
7747         arm_fbsd_nat_target.
7748         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7749         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7750         (the_arm_netbsd_nat_target): New.
7751         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7752         arm_netbsd_nat_target.
7753         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7754         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7755         (the_hppa_nbsd_nat_target): New.
7756         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7757         hppa_nbsd_nat_target methods.
7758         (_initialize_hppanbsd_nat): Adjust to C++ification.
7759         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7760         (the_hppa_obsd_nat_target): New.
7761         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7762         methods of hppa_obsd_nat_target.
7763         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7764         add_target.
7765         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7766         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7767         add_target.
7768         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7769         (_initialize_i386obsd_nat): Use add_target.
7770         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7771         (the_m68k_bsd_nat_target): New.
7772         (m68kbsd_fetch_inferior_registers)
7773         (m68kbsd_store_inferior_registers): Refactor as methods of
7774         m68k_bsd_nat_target.
7775         (_initialize_m68kbsd_nat): Adjust to C++ification.
7776         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7777         (the_mips_fbsd_nat_target): New.
7778         (mips_fbsd_fetch_inferior_registers)
7779         (mips_fbsd_store_inferior_registers): Refactor as methods of
7780         mips_fbsd_nat_target.
7781         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7782         add_target.
7783         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7784         (the_mips_nbsd_nat_target): New.
7785         (mipsnbsd_fetch_inferior_registers)
7786         (mipsnbsd_store_inferior_registers): Refactor as methods of
7787         mips_nbsd_nat_target.
7788         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7789         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7790         (the_mips64_obsd_nat_target): New.
7791         (mips64obsd_fetch_inferior_registers)
7792         (mips64obsd_store_inferior_registers): Refactor as methods of
7793         mips64_obsd_nat_target.
7794         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7795         add_target.
7796         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7797         nbsd_nat_target.
7798         * nbsd-nat.h: Include "inf-ptrace.h".
7799         (nbsd_nat_target): New class.
7800         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7801         (obsd_wait): Refactor as methods of obsd_nat_target.
7802         (obsd_add_target): Delete.
7803         * obsd-nat.h: Include "inf-ptrace.h".
7804         (obsd_nat_target): New class.
7805         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7806         (the_ppc_fbsd_nat_target): New.
7807         (ppcfbsd_fetch_inferior_registers)
7808         (ppcfbsd_store_inferior_registers): Refactor as methods of
7809         ppc_fbsd_nat_target.
7810         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7811         add_target.
7812         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7813         (the_ppc_nbsd_nat_target): New.
7814         (ppcnbsd_fetch_inferior_registers)
7815         (ppcnbsd_store_inferior_registers): Refactor as methods of
7816         ppc_nbsd_nat_target.
7817         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7818         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7819         (the_ppc_obsd_nat_target): New.
7820         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7821         methods of ppc_obsd_nat_target.
7822         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7823         add_target.
7824         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7825         (the_sh_nbsd_nat_target): New.
7826         (shnbsd_fetch_inferior_registers)
7827         (shnbsd_store_inferior_registers): Refactor as methods of
7828         sh_nbsd_nat_target.
7829         (_initialize_shnbsd_nat): Adjust to C++ification.
7830         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7831         (inf_ptrace_xfer_partial): Delete.
7832         (sparc_xfer_partial, sparc_target): Delete.
7833         * sparc-nat.h (sparc_fetch_inferior_registers)
7834         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7835         (sparc_target): Delete function declaration.
7836         (sparc_target): New template class.
7837         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7838         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7839         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7840         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7841         add_target.
7842         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7843         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7844         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7845         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7846         add_target.
7847         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7848         (the_vax_bsd_nat_target): New.
7849         (vaxbsd_fetch_inferior_registers)
7850         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7851         methods.
7852         (_initialize_vaxbsd_nat): Adjust to C++ification.
7853
7854         * bsd-kvm.c (bsd_kvm_target): New class.
7855         (bsd_kvm_ops): Now a bsd_kvm_target.
7856         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7857         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7858         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7859         bsd_kvm_target.
7860         (bsd_kvm_return_one): Delete.
7861         (bsd_kvm_add_target): Adjust to C++ification.
7862
7863         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7864         (nto_procfs_target_procfs): New classes.
7865         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7866         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7867         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7868         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7869         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7870         (procfs_remove_hw_breakpoint, procfs_resume)
7871         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7872         (procfs_kill_inferior, procfs_store_registers)
7873         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7874         as methods of nto_procfs_target.
7875         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7876         (nto_native_ops): Delete.
7877         (procfs_open, procfs_native_open): Delete.
7878         (nto_native_ops): Now an nto_procfs_target_native.
7879         (init_procfs_targets): Adjust to C++ification.
7880         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7881         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7882         Refactor as methods of nto_procfs_target.
7883
7884         * go32-nat.c (go32_nat_target): New class.
7885         (the_go32_nat_target): New.
7886         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7887         (go32_store_registers, go32_xfer_partial, go32_files_info)
7888         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7889         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7890         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7891         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7892         (go32_target): Delete.
7893         (_initialize_go32_nat): Adjust to C++ification.
7894
7895         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7896         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7897         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7898         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7899         gnu_nat_target.
7900         (gnu_target): Delete.
7901         * gnu-nat.h (gnu_target): Delete.
7902         (gnu_nat_target): New class.
7903         * i386-gnu-nat.c (gnu_base_target): New.
7904         (i386_gnu_nat_target): New class.
7905         (the_i386_gnu_nat_target): New.
7906         (_initialize_i386gnu_nat): Adjust to C++ification.
7907
7908 2018-05-02  Pedro Alves  <palves@redhat.com>
7909
7910         * bfd-target.c (target_bfd_xclose): Rename to ...
7911         (target_bfd_close): ... this.
7912         (target_bfd_reopen): Adjust.
7913         * target.c (target_close): Remove references to to_xclose.
7914         * target.h (target_ops::to_xclose): Delete.
7915         (target_ops::to_close): Update comments.
7916
7917 2018-05-02  Pedro Alves  <palves@redhat.com>
7918
7919         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7920         "linux-nat.h".
7921         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7922         * inf-ptrace.c (inf_ptrace_register_u_offset)
7923         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7924         (inf_ptrace_store_register, inf_ptrace_store_registers)
7925         (inf_ptrace_trad_target): Move to ...
7926         * linux-nat-trad.c: ... this new file.
7927         * linux-nat-trad.h: New file.
7928         * linux-nat.c (linux_target_install_ops): Make extern.
7929         (linux_trad_target): Delete.
7930         * linux-nat.h (linux_trad_target): Delete declaration.
7931         (linux_target_install_ops): Declare.
7932         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7933         "linux-nat.h".
7934
7935 2018-05-02  Pedro Alves  <palves@redhat.com>
7936
7937         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7938         procfs_target/add_target here.
7939         * procfs.c (procfs_target): Make static.
7940         (_initialize_procfs): Call add_target here.
7941         * procfs.h (struct target_ops): Remove forward declaration.
7942         (procfs_target): Remove declaration.
7943         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7944
7945 2018-05-02  Pedro Alves  <palves@redhat.com>
7946
7947         * procfs.c (procfs_stopped_by_watchpoint)
7948         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7949         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7950         Forward declare.
7951         (procfs_use_watchpoints): Delete, move contents...
7952         (procfs_target): ... here.
7953         * procfs.h (procfs_use_watchpoints): Delete declaration.
7954         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7955         procfs_use_watchpoints.
7956         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7957         procfs_use_watchpoints.
7958
7959 2018-05-02  Tom Tromey  <tom@tromey.com>
7960
7961         PR python/20084:
7962         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7963         and var_zuinteger_unlimited.
7964         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7965         and PARAM_ZUINTEGER_UNLIMITED.
7966         (set_parameter_value): Handle var_zuinteger and
7967         var_zuinteger_unlimited.
7968         (add_setshow_generic): Likewise.
7969         (parmpy_init): Likewise.
7970
7971 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
7972
7973         PR rust/23124
7974         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7975         pointer is not null before dereferencing it.
7976
7977 2018-04-30  Tom Tromey  <tom@tromey.com>
7978
7979         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7980         is_mi_like_p.
7981
7982 2018-04-30  Tom Tromey  <tom@tromey.com>
7983
7984         * breakpoint.c (mention): Remove use of is_mi_like_p.
7985         (print_mention_ranged_breakpoint): Likewise.
7986         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7987         of is_mi_like_p.
7988
7989 2018-04-30  Tom Tromey  <tom@tromey.com>
7990
7991         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7992
7993 2018-04-30  Tom Tromey  <tom@tromey.com>
7994
7995         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7996         (info_spu_event_command): Remove some uses of is_mi_like_p.
7997
7998 2018-04-30  Tom Tromey  <tom@tromey.com>
7999
8000         * python/py-framefilter.c (py_print_single_arg)
8001         (enumerate_locals, py_print_args, py_print_frame): Remove some
8002         uses of is_mi_like_p.
8003
8004 2018-04-30  Tom Tromey  <tom@tromey.com>
8005
8006         * ui-out.c: Update.
8007         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8008         * ui-out.h (ui_out::is_mi_like_p): Now const.
8009         (ui_out::do_is_mi_like_p): Now const.
8010         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8011
8012 2018-04-30  Tom Tromey  <tom@tromey.com>
8013
8014         * varobj.c (varobj_set_visualizer): Use new_reference.
8015         * python/python.c (gdbpy_decode_line): Use new_reference.
8016         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8017         new_reference.
8018
8019 2018-04-30  Tom Tromey  <tom@tromey.com>
8020
8021         * varobj.c (install_new_value): Use new_reference.
8022         * value.h (value_incref): Return void.  Swap intro comment with
8023         value_decref.
8024         * value.c (set_value_parent): Use new_reference.
8025         (value_incref): Return void.  Update intro comment.
8026         (release_value): Use new_reference.
8027         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8028
8029 2018-04-30  Tom Tromey  <tom@tromey.com>
8030
8031         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8032         * gdb_bfd.h (new_bfd_ref): Remove.
8033         (gdb_bfd_open): Update comment.
8034         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8035         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8036         (gdb_bfd_fdopenr): Use new_reference.
8037         * exec.c (exec_file_attach): Use new_reference.
8038
8039 2018-04-30  Tom Tromey  <tom@tromey.com>
8040
8041         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8042         method.
8043
8044 2018-04-30  Tom Tromey  <tom@tromey.com>
8045
8046         * jit.c (jit_read_code_entry): Use type_align.
8047         * i386-tdep.c (i386_gdbarch_init): Don't call
8048         set_gdbarch_long_long_align_bit.
8049         * gdbarch.sh: Remove long_long_align_bit.
8050         * gdbarch.c, gdbarch.h: Rebuild.
8051         * arc-tdep.c (arc_type_align): New function.
8052         (arc_gdbarch_init): Use arc_type_align.  Don't call
8053         set_gdbarch_long_long_align_bit.
8054
8055 2018-04-30  Tom Tromey  <tom@tromey.com>
8056
8057         * rust-lang.c (rust_type_alignment): Remove.
8058         (rust_composite_type): Use type_align.
8059
8060 2018-04-30  Tom Tromey  <tom@tromey.com>
8061
8062         * NEWS: Mention Type.align.
8063         * python/py-type.c (typy_get_alignof): New function.
8064         (type_object_getset): Add "alignof".
8065
8066 2018-04-30  Tom Tromey  <tom@tromey.com>
8067
8068         PR exp/17095:
8069         * NEWS: Update.
8070         * std-operator.def (UNOP_ALIGNOF): New operator.
8071         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8072         New.
8073         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8074         * c-lang.c (c_op_print_tab): Add alignof.
8075         * c-exp.y (ALIGNOF): New token.
8076         (exp): Add "ALIGNOF" production.
8077         (ident_tokens): Add _Alignof and alignof.
8078
8079 2018-04-30  Tom Tromey  <tom@tromey.com>
8080
8081         * i386-tdep.c (i386_type_align): New function.
8082         (i386_gdbarch_init): Update.
8083         * gdbarch.sh (type_align): New method.
8084         * gdbarch.c, gdbarch.h: Rebuild.
8085         * arch-utils.h (default_type_align): Declare.
8086         * arch-utils.c (default_type_align): New function.
8087         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8088         (struct type) <align_log2>: New field.
8089         <instance_flags>: Now a bitfield.
8090         (TYPE_RAW_ALIGN): New macro.
8091         (type_align, type_raw_align, set_type_align): Declare.
8092         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8093         functions.
8094         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8095         (get_alignment, maybe_set_alignment): New functions.
8096         (read_structure_type, read_enumeration_type, read_array_type)
8097         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8098         (read_subrange_type, read_base_type): Set type alignment.
8099
8100 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8101
8102         * dwarf2read.c (read_index_from_section): Use bool.
8103
8104 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8105
8106         PR gdb/22950
8107         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8108         with #ifdef.
8109
8110 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8111
8112         PR build/22873
8113         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8114         last step, and do it atomically.
8115
8116 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8117
8118         * compile/compile-c-types.c (convert_int, convert_float):
8119         Update for C FE v1.
8120
8121 2018-04-27  Tom Tromey  <tom@tromey.com>
8122
8123         PR rust/22545:
8124         * rust-lang.c (rust_inclusive_range_type_p): New function.
8125         (rust_range): Handle inclusive ranges.
8126         (rust_compute_range): Likewise.
8127         * rust-exp.y (struct rust_op) <inclusive>: New field.
8128         (DOTDOTEQ): New constant.
8129         (range_expr): Add "..=" productions.
8130         (operator_tokens): Add "..=" token.
8131         (ast_range): Add "inclusive" parameter.
8132         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8133         ranges.
8134         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8135         bounds values.
8136         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8137         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8138         Update comments.
8139         * expprint.c (print_subexp_standard): Handle new bounds values.
8140         (dump_subexp_body_standard): Likewise.
8141
8142 2018-04-27  Tom Tromey  <tom@tromey.com>
8143
8144         * configure: Rebuild.
8145         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8146         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8147         "OVERRIDE".
8148         (class symbol_needs_eval_context): Likewise.
8149         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8150         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8151         "virtual".
8152         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8153         "override".
8154         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8155         * aarch64-tdep.c (instruction_reader::read): Use "override".
8156         (instruction_reader_test::read): Likewise.
8157         * arm-tdep.c (instruction_reader::read): Use "override".
8158         (instruction_reader_thumb::read): Likewise.
8159
8160 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8161
8162         PR remote/9665
8163         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8164         instead of remote_send.
8165         (remote_send): Remove.
8166
8167 2018-04-26  Pedro Alves  <palves@redhat.com>
8168
8169         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8170         find_function_start_sal instead of find_pc_line.
8171
8172 2018-04-26  Pedro Alves  <palves@redhat.com>
8173
8174         * breakpoint.c (set_breakpoint_location_function): Handle
8175         mst_data_gnu_ifunc.
8176         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8177         * elfread.c (elf_symtab_read): Give data symbols with
8178         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8179         (elf_rel_plt_read): Update comment.
8180         * linespec.c (convert_linespec_to_sals): Handle
8181         mst_data_gnu_ifunc.
8182         (minsym_found): Handle mst_data_gnu_ifunc.
8183         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8184         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8185         * parse.c (find_minsym_type_and_address): Handle
8186         mst_data_gnu_ifunc.
8187         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8188         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8189         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8190         comment.
8191         <mst_data_gnu_ifunc>: New enumerator.
8192
8193 2018-04-26  Pedro Alves  <palves@redhat.com>
8194
8195         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8196         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8197         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8198         Handle it.
8199         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8200         (lookup_minimal_symbol_by_pc): Adjust.
8201         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8202         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8203         * minsyms.h (lookup_msym_prefer): New enum.
8204         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8205         parameter by a lookup_msym_prefer parameter.
8206
8207 2018-04-26  Pedro Alves  <palves@redhat.com>
8208
8209         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8210         ends in "@plt" instead of looking at the symbol's section.
8211
8212 2018-04-26  Pedro Alves  <palves@redhat.com>
8213
8214         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8215         all references.
8216         (find_pc_partial_function_gnu_ifunc): Rename to ...
8217         (find_pc_partial_function): ... this, and remove references to
8218         'is_gnu_ifunc_p'.
8219         (find_pc_partial_function): Delete old implementation.
8220         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8221
8222 2018-04-26  Pedro Alves  <palves@redhat.com>
8223
8224         * linespec.c (struct bound_minimal_symbol_search_key): New.
8225         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8226         skip first line if we found a GNU ifunc minimal symbol by name.
8227         (compare_msymbols): Change parameters to work with a destructured
8228         lhs minsym.
8229         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8230         functions.
8231
8232 2018-04-26  Pedro Alves  <palves@redhat.com>
8233
8234         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8235         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8236         address/name.
8237         (add_location_to_breakpoint): Store the minsym and the objfile in
8238         the breakpoint location.
8239         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8240         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8241         Record the minsym in the sal.
8242         * symtab.h (symtab_and_line) <msymbol>: New field.
8243
8244 2018-04-26  Pedro Alves  <palves@redhat.com>
8245
8246         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8247         unless we actually resolved the ifunc.
8248
8249 2018-04-26  Pedro Alves  <palves@redhat.com>
8250
8251         * c-exp.y (variable production): Prefer ifunc minsyms over
8252         regular function symbols.
8253         * symtab.c (find_gnu_ifunc): New function.
8254         * minsyms.h (lookup_msym_prefer): New enum.
8255         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8256         parameter by a lookup_msym_prefer parameter.
8257         * symtab.h (find_gnu_ifunc): New declaration.
8258
8259 2018-04-26  Pedro Alves  <palves@redhat.com>
8260
8261         * blockframe.c (find_gnu_ifunc_target_type): New function.
8262         (find_function_type): New.
8263         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8264         return a value with a memory address.
8265         (eval_call): For calls to GNU ifunc functions, try to find the
8266         type of the target function from the type that the resolver
8267         returns.
8268         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8269         symbols.
8270         * infcall.c (find_function_return_type): Delete.
8271         (find_function_addr): Add 'function_type' parameter.  For calls to
8272         GNU ifunc functions, try to find the type of the target function
8273         from the type that the resolver returns, and return it via
8274         FUNCTION_TYPE.
8275         (call_function_by_hand_dummy): Adjust to use the function type
8276         returned by find_function_addr.
8277         (find_function_addr): Add 'function_type' parameter and move
8278         description here.
8279         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8280         declarations.
8281
8282 2018-04-26  Pedro Alves  <palves@redhat.com>
8283
8284         * c-exp.y (variable production): Skip finding an alias for ifunc
8285         symbols.
8286
8287 2018-04-26  Pedro Alves  <palves@redhat.com>
8288
8289         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8290
8291 2018-04-25  Pedro Alves  <palves@redhat.com>
8292
8293         * infcmd.c (kill_command): Print the pid as string, not the whole
8294         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8295         message.
8296         * remote.c (remote_detach_1): Print the pid as string, not the
8297         whole thread's ptid.
8298
8299 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8300             Sergio Durigan Junior  <sergiodj@redhat.com>
8301             Pedro Alves  <palves@redhat.com>
8302
8303         * infcmd.c (kill_command): Print message when inferior has
8304         been killed.
8305         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8306         '1'.
8307         (add_inferior): Improve message printed when
8308         'print_inferior_events' is on.
8309         (exit_inferior): Remove message printed when
8310         'print_inferior_events' is on.
8311         (detach_inferior): Improve message printed when
8312         'print_inferior_events' is on.
8313         (initialize_inferiors): Use 'add_inferior_silent' to set
8314         'current_inferior_'.
8315         * inferior.h (print_inferior_events): Declare here as
8316         'extern'.
8317         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8318         '[Detaching...]' messages when 'print_inferior_events' is on.
8319         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8320         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8321         'Detaching after fork from child...', replace it by '... from
8322         parent...'.
8323         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8324         prefix/suffix when printing 'Detaching...' messages.  Print
8325         them when 'print_inferior_events' is on.
8326         * remote.c (remote_detach_1): Print message when detaching
8327         from inferior and '!is_fork_parent'.
8328
8329 2018-04-24  Tom Tromey  <tom@tromey.com>
8330
8331         * cli-out.h: Reindent.
8332
8333 2018-04-24  Tom Tromey  <tom@tromey.com>
8334
8335         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8336         (cli_ui_out::do_field_string): Use fputs_filtered.
8337         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8338
8339 2018-04-23  Tom Tromey  <tom@tromey.com>
8340
8341         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8342         gdb::unique_xmalloc_ptr.
8343
8344 2018-04-23  Tom Tromey  <tom@tromey.com>
8345
8346         * configure: Rebuild.
8347
8348 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8349
8350         PR gdb/23095
8351         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8352         prepare_for_testing.  Set normal_bp to r_debug_state if target
8353         is bsd.
8354
8355 2018-04-21  Pedro Alves  <palves@redhat.com>
8356             Rajendra SY  <rajendra.sy@gmail.com>
8357
8358         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8359         * remote.c (extended_remote_attach): In all-stop mode, mark the
8360         thread as executing.
8361
8362 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8363
8364         * thread.c (thread_apply_all_command): Fix comment.
8365         (thread_command): Fix comment.
8366
8367 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8368
8369         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8370         parameter.
8371         * features/aarch64-core.c (create_feature_aarch64_core):
8372         Regenerate.
8373         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8374         Likewise.
8375         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8376         Likewise.
8377         * features/i386/32bit-avx512.c
8378         (create_feature_i386_32bit_avx512): Likewise.
8379         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8380         Likewise.
8381         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8382         Likewise.
8383         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8384         Likewise.
8385         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8386         Likewise.
8387         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8388         Likewise.
8389         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8390         Likewise.
8391         * features/i386/64bit-avx512.c
8392         (create_feature_i386_64bit_avx512): Likewise.
8393         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8394         Likewise.
8395         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8396         Likewise.
8397         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8398         Likewise.
8399         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8400         Likewise.
8401         * features/i386/64bit-segments.c
8402         (create_feature_i386_64bit_segments): Likewise.
8403         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8404         Likewise.
8405         * features/i386/x32-core.c
8406         (create_feature_i386_x32_core): Likewise.
8407         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8408         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8409         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8410         * target-descriptions.c: In generated code, don't pass xml
8411         filename.
8412
8413 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8414
8415         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8416         (print_xml_feature::visit_post): Likewise.
8417         (print_xml_feature::visit): Likewise.
8418         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8419         (print_xml_feature): Add new class.
8420         * regformats/regdat.sh: Null xmltarget on feature targets.
8421         * target-descriptions.c (struct target_desc): Add xmltarget.
8422         (maintenance_check_tdesc_xml_convert): Add unittest function.
8423         (tdesc_get_features_xml): Add function to get xml.
8424         (maintenance_check_xml_descriptions): Test xml generation.
8425         * xml-tdesc.c (string_read_description_xml): Add function.
8426         * xml-tdesc.h (string_read_description_xml): Add declaration.
8427
8428 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8429
8430         * features/Makefile: Add feature marker to targets with new style
8431         target descriptions.
8432         * regformats/aarch64.dat: Regenerate.
8433         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8434         * regformats/i386/amd64-avx-linux.dat: Likewise.
8435         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8436         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8437         * regformats/i386/amd64-linux.dat: Likewise.
8438         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8439         * regformats/i386/amd64.dat: Likewise.
8440         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8441         * regformats/i386/i386-avx-linux.dat: Likewise.
8442         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8443         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8444         * regformats/i386/i386-linux.dat: Likewise.
8445         * regformats/i386/i386-mmx-linux.dat: Likewise.
8446         * regformats/i386/i386-mpx-linux.dat: Likewise.
8447         * regformats/i386/i386.dat: Likewise.
8448         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8449         * regformats/i386/x32-avx-linux.dat: Likewise.
8450         * regformats/i386/x32-linux.dat: Likewise.
8451         * regformats/tic6x-c62x-linux.dat: Likewise.
8452         * regformats/tic6x-c64x-linux.dat: Likewise.
8453         * regformats/tic6x-c64xp-linux.dat: Likewise.
8454         * regformats/regdat.sh: Parse feature marker.
8455
8456 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8457
8458         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8459         (tdesc_osabi_name): Likewise.
8460         * target-descriptions.c (tdesc_architecture_name): Add new
8461         function.
8462         (tdesc_osabi_name): Likewise.
8463
8464 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8465
8466         * common/tdesc.c (tdesc_predefined_type): Move to here.
8467         (tdesc_named_type): Likewise.
8468         (tdesc_create_vector): Likewise.
8469         (tdesc_create_struct): Likewise.
8470         (tdesc_set_struct_size): Likewise.
8471         (tdesc_create_union): Likewise.
8472         (tdesc_create_flags): Likewise.
8473         (tdesc_create_enum): Likewise.
8474         (tdesc_add_field): Likewise.
8475         (tdesc_add_typed_bitfield): Likewise.
8476         (tdesc_add_bitfield): Likewise.
8477         (tdesc_add_flag): Likewise.
8478         (tdesc_add_enum_value): Likewise.
8479         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8480         (struct tdesc_type_vector): Likewise.
8481         (struct tdesc_type_field): Likewise.
8482         (struct tdesc_type_with_fields): Likewise.
8483         (tdesc_create_enum): Add declaration.
8484         (tdesc_add_typed_bitfield): Likewise.
8485         (tdesc_add_enum_value): Likewise.
8486         * target-descriptions.c (tdesc_type_field): Move from here.
8487         (tdesc_type_builtin): Likewise.
8488         (tdesc_type_vector): Likewise.
8489         (tdesc_type_with_fields): Likewise.
8490         (tdesc_predefined_types): Likewise.
8491         (tdesc_named_type): Likewise.
8492         (tdesc_create_vector): Likewise.
8493         (tdesc_create_struct): Likewise.
8494         (tdesc_set_struct_size): Likewise.
8495         (tdesc_create_union): Likewise.
8496         (tdesc_create_flags): Likewise.
8497         (tdesc_create_enum): Likewise.
8498         (tdesc_add_field): Likewise.
8499         (tdesc_add_typed_bitfield): Likewise.
8500         (tdesc_add_bitfield): Likewise.
8501         (tdesc_add_flag): Likewise.
8502         (tdesc_add_enum_value): Likewise.
8503         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8504         (tdesc_add_typed_bitfield): Likewise.
8505         (tdesc_add_enum_value): Likewise.
8506
8507 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8508
8509         * common/tdesc.c (tdesc_feature::accept): Move to here.
8510         (tdesc_feature::operator==): Likewise.
8511         (tdesc_create_reg): Likewise.
8512         * common/tdesc.h (tdesc_type_kind): Likewise.
8513         (struct tdesc_type): Likewise.
8514         (struct tdesc_feature): Likewise.
8515         * regformats/regdat.sh: Create a feature.
8516         * target-descriptions.c (tdesc_type_kind): Move from here.
8517         (tdesc_type): Likewise.
8518         (tdesc_type_up): Likewise.
8519         (tdesc_feature): Likewise.
8520         (tdesc_create_reg): Likewise.
8521
8522 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8523
8524         * Makefile.in: Add arch/tdesc.c
8525         * common/tdesc.c: New file.
8526         * common/tdesc.h (tdesc_element_visitor): Move to here.
8527         (tdesc_element): Likewise.
8528         (tdesc_reg): Likewise.
8529         (tdesc_reg_up): Likewise.
8530         * regformats/regdef.h (reg): Add offset to constructors.
8531         * target-descriptions.c (tdesc_element_visitor): Move from here.
8532         (tdesc_element): Likewise.
8533         (tdesc_reg): Likewise.
8534         (tdesc_reg_up): Likewise.
8535
8536 2018-04-17  Tom Tromey  <tom@tromey.com>
8537
8538         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8539         discriminant field.
8540
8541 2018-04-17  Tom Tromey  <tom@tromey.com>
8542
8543         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8544
8545 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8546
8547         * symtab.c (print_symbol_info): Skip printing filename and line
8548         number when `last' is NULL.
8549         (symtab_symbol_info): Use empty string instead of NULL for first
8550         invocation of print_symbol_info.
8551         (rbreak_command): Pass NULL to `last' parameter of
8552         print_symbol_info.
8553
8554 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8555
8556         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8557         instead of nullptr.
8558
8559 2018-04-16  Pedro Alves  <palves@redhat.com>
8560
8561         * MAINTAINERS (sh): Remove.
8562         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8563         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8564         (ALLDEPFILES): Remove sh64-tdep.c.
8565         * NEWS: Mentions that support for SH-5/SH64 is removed.
8566         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8567         (sh*-*-openbsd*): Ditto.
8568         (sh64-*-elf*): Remove.
8569         (sh*): Remove.
8570         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8571         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8572         * sh-tdep.c: No longer include "sh64-tdep.h".
8573         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8574         * sh64-tdep.c, sh64-tdep.h: Remove files.
8575
8576 2018-04-16  Pedro Alves  <palves@redhat.com>
8577
8578         * MAINTAINERS: Remove m88k.
8579         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8580         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8581         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8582         * NEWS: Mention that support for m88k was removed.
8583         * configure.host (m88*-*-*): Remove support.
8584         * configure.nat (m88k-*-*): Remove support.
8585         * configure.tgt (m88*-*-openbsd*): Remove.
8586         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8587
8588 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8589
8590         * configure.tgt (x86_tobjs): New variable.
8591         (amd64_tobjs, i386_tobjs): Use it.
8592
8593 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8594
8595         * symtab.c (print_symbol_info): Precede the symbol definition by
8596         the line number when available.
8597         * NEWS: Advertise this enhancement.
8598
8599 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8600
8601         * NEWS (New options): announce set/show record btrace cpu.
8602         * btrace.c: Include record-btrace.h.
8603         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8604         the vendor is unknown.
8605         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8606         Maybe overwrite the btrace configuration's cpu.
8607         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8608         (btrace_fetch): Add cpu parameter.  Update callers.
8609         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8610         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8611         errata workarounds if the vendor is unknown.
8612         * python/py-record-btrace.c: Include record-btrace.h.
8613         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8614         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8615         * record-btrace.c (record_btrace_cpu_state_kind): New.
8616         (record_btrace_cpu): New.
8617         (set_record_btrace_cpu_cmdlist): New.
8618         (record_btrace_get_cpu): New.
8619         (require_btrace_thread, record_btrace_info)
8620         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8621         (cmd_set_record_btrace_cpu_none): New.
8622         (cmd_set_record_btrace_cpu_auto): New.
8623         (cmd_set_record_btrace_cpu): New.
8624         (cmd_show_record_btrace_cpu): New.
8625         (_initialize_record_btrace): Initialize set/show record btrace cpu
8626         commands.
8627         * record-btrace.h (record_btrace_get_cpu): New.
8628
8629 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8630
8631         * record.c (set_record_command): Fix typo in message.
8632
8633 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8634
8635         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8636
8637 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8638
8639         * infrun.c (process_event_stop_test): Call
8640         gdbarch_in_indirect_branch_thunk.
8641         * gdbarch.sh (in_indirect_branch_thunk): New.
8642         * gdbarch.c: Regenerated.
8643         * gdbarch.h: Regenerated.
8644         * x86-tdep.h: New.
8645         * x86-tdep.c: New.
8646         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8647         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8648         (ALLDEPFILES): Add x86-tdep.c.
8649         * arch-utils.h (default_in_indirect_branch_thunk): New.
8650         * arch-utils.c (default_in_indirect_branch_thunk): New.
8651         * i386-tdep: Include x86-tdep.h.
8652         (i386_in_indirect_branch_thunk): New.
8653         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8654         function.
8655         * amd64-tdep: Include x86-tdep.h.
8656         (amd64_in_indirect_branch_thunk): New.
8657         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8658
8659 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8660
8661         PR gdb/23053
8662         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8663         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8664         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8665         regression.
8666
8667 2018-04-12  Tom Tromey  <tom@tromey.com>
8668
8669         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8670         (rust_evaluate_subexp): Likewise.
8671
8672 2018-04-12  Pedro Alves  <palves@redhat.com>
8673
8674         * procfs.c (procfs_detach): Make forward declaration's prototype
8675         match definition's protototype.
8676         (proc_get_LDT_entry): Remove stale do_cleanups call.
8677
8678 2018-04-12  Pedro Alves  <palves@redhat.com>
8679
8680         * target.h (target_ops::to_has_exited): Delete.
8681         (target_has_exited): Delete.
8682         * target-delegates.c: Regenerate.
8683
8684 2018-04-11  Pedro Alves  <palves@redhat.com>
8685
8686         * target.c (fileio_fh_t::t): Add comment.
8687         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8688         (target_fileio_close): Handle a NULL target.
8689         (invalidate_fileio_fh): New.
8690         (target_close): Call it.
8691         * remote.c (remote_hostio_send_command): No longer check whether
8692         remote_desc is open.
8693
8694 2018-04-11  Pedro Alves  <palves@redhat.com>
8695
8696         * target.c (fileio_fh_t): Make it a named struct instead of a
8697         typedef.
8698         (fileio_fh_t::is_closed): New method.
8699         (DEF_VEC_O (fileio_fh_t)): Remove.
8700         (fileio_fhandles): Now a std::vector.
8701         (is_closed_fileio_fh): Delete.
8702         (acquire_fileio_fd): Adjust.  Rename parameters.
8703         (release_fileio_fd): Adjust.
8704         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8705         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8706         (target_fileio_close): Adjust.
8707
8708 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8709
8710         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8711         index.
8712
8713 2018-04-10  Pedro Alves  <palves@redhat.com>
8714
8715         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8716         (scoped_finish_thread_state): New class.
8717         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8718         cleanup.
8719         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8720         (fetch_inferior_event, normal_stop): Likewise.
8721         * thread.c (finish_thread_state_cleanup): Delete.
8722
8723 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8724             Pedro Alves  <palves@redhat.com>
8725
8726         * value.c: Include "selftest.h" and "common/array-view.h".
8727         (struct range) <operator ==>: New.
8728         (test_ranges_contain): New.
8729         (check_ranges_vector): New.
8730         (test_insert_into_bit_range_vector): New.
8731         (_initialize_values): Register selftests.
8732         * common/array-view.h (operator==, operator!=): New.
8733
8734 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8735
8736         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8737         an iterator.
8738         * inline-frame.c: Include <algorithm>.
8739         (struct inline_state): Add constructor.
8740         (inline_state_s): Remove.
8741         (DEF_VEC_O(inline_state_s)): Remove.
8742         (inline_states): Change type to std::vector.
8743         (find_inline_frame_state): Adjust to std::vector.
8744         (allocate_inline_frame_state): Remove.
8745         (clear_inline_frame_state): Adjust to std::vector.
8746         (skip_inline_frames): Adjust to std::vector.
8747
8748 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8749
8750         * tracepoint.h (struct trace_state_variable): Add constructor.
8751         <name>: Change type to std::string.
8752         * tracepoint.c (tsv_s): Remove.
8753         (DEF_VEC_O(tsv_s)): Remove.
8754         (tvariables): Change to std::vector.
8755         (create_trace_state_variable): Adjust to std::vector.
8756         (find_trace_state_variable): Likewise.
8757         (find_trace_state_variable_by_number): Likewise.
8758         (delete_trace_state_variable): Likewise.
8759         (trace_variable_command): Adjust to std::string.
8760         (delete_trace_variable_command): Likewise.
8761         (tvariables_info_1): Adjust to std::vector.
8762         (save_trace_state_variables): Likewise.
8763         (start_tracing): Likewise.
8764         (merge_uploaded_trace_state_variables): Adjust to std::vector
8765         and std::string.
8766         * target.h (struct target_ops)
8767         <to_download_trace_state_variable>: Pass reference to
8768         trace_state_variable.
8769         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8770         * target-delegates.c: Re-generate.
8771         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8772         (mi_tsv_deleted): Likewise.
8773         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8774         * remote.c (remote_download_trace_state_variable): Change
8775         pointer to reference and adjust.
8776         * make-target-delegates (parse_argtypes): Handle references.
8777         (write_function_header): Likewise.
8778         (munge_type): Likewise.
8779
8780 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8781
8782         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8783         string_view-selftests.c.
8784         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8785         testsuite.
8786         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8787         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8788         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8789         * unittests/basic_string_view/element_access/char/1.cc:
8790         Likewise.
8791         * unittests/basic_string_view/element_access/char/empty.cc:
8792         Likewise.
8793         * unittests/basic_string_view/element_access/char/front_back.cc:
8794         Likewise.
8795         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8796         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8797         Likewise.
8798         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8799         Likewise.
8800         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8801         Likewise.
8802         * unittests/basic_string_view/operations/compare/char/1.cc:
8803         Likewise.
8804         * unittests/basic_string_view/operations/compare/char/13650.cc:
8805         Likewise.
8806         * unittests/basic_string_view/operations/copy/char/1.cc:
8807         Likewise.
8808         * unittests/basic_string_view/operations/data/char/1.cc:
8809         Likewise.
8810         * unittests/basic_string_view/operations/find/char/1.cc:
8811         Likewise.
8812         * unittests/basic_string_view/operations/find/char/2.cc:
8813         Likewise.
8814         * unittests/basic_string_view/operations/find/char/3.cc:
8815         Likewise.
8816         * unittests/basic_string_view/operations/find/char/4.cc:
8817         Likewise.
8818         * unittests/basic_string_view/operations/rfind/char/1.cc:
8819         Likewise.
8820         * unittests/basic_string_view/operations/rfind/char/2.cc:
8821         Likewise.
8822         * unittests/basic_string_view/operations/rfind/char/3.cc:
8823         Likewise.
8824         * unittests/basic_string_view/operations/substr/char/1.cc:
8825         Likewise.
8826         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8827         * unittests/string_view-selftests.c: New file.
8828
8829 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8830
8831         * unittests/basic_string_view/capacity/1.cc: New file.
8832         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8833         * unittests/basic_string_view/cons/char/1.cc: New file.
8834         * unittests/basic_string_view/cons/char/2.cc: New file.
8835         * unittests/basic_string_view/cons/char/3.cc: New file.
8836         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8837         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8838         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8839         * unittests/basic_string_view/element_access/char/1.cc: New file.
8840         * unittests/basic_string_view/element_access/char/2.cc: New file.
8841         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8842         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8843         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8844         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8845         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8846         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8847         * unittests/basic_string_view/include.cc: New file.
8848         * unittests/basic_string_view/inserters/char/1.cc: New file.
8849         * unittests/basic_string_view/inserters/char/2.cc: New file.
8850         * unittests/basic_string_view/inserters/char/3.cc: New file.
8851         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8852         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8853         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8854         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8855         * unittests/basic_string_view/literals/types.cc: New file.
8856         * unittests/basic_string_view/literals/values.cc: New file.
8857         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8858         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8859         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8860         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8861         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8862         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8863         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8864         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8865         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8866         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8867         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8868         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8869         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8870         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8871         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8872         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8873         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8874         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8875         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8876         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8877         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8878         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8879         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8880         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8881         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8882         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8883         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8884         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8885         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8886         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8887         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8888         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8889         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8890         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8891         * unittests/basic_string_view/operators/char/2.cc: New file.
8892         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8893         * unittests/basic_string_view/range_access/char/1.cc: New file.
8894         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8895         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8896         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8897         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8898         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8899         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8900         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8901         * unittests/basic_string_view/typedefs.cc: New file.
8902         * unittests/basic_string_view/types/1.cc: New file.
8903
8904 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8905
8906         * common/gdb_string_view.h: Remove libstdc++ implementation
8907         details, adjust to gdb reality.
8908         * common/gdb_string_view.tcc: Likewise.
8909         * cli/cli-script.c (struct string_view): Remove.
8910         (user_args) <m_args>: Change element type to gdb::string_view.
8911         (user_args::insert_args): Adjust.
8912
8913 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8914
8915         * common/gdb_string_view.h: New file.
8916         * common/gdb_string_view.tcc: New file.
8917
8918 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8919
8920         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8921         * configure: Re-generate.
8922
8923 2018-04-09  Pedro Alves  <palves@redhat.com>
8924
8925         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8926         (set_target_gdbarch): Call
8927         gdb::observers::architecture_changed.notify instead of
8928         observer_notify_architecture_changed.
8929
8930 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8931
8932         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8933         (do_restore_current_traceframe_cleanup): Remove.
8934         (restore_current_traceframe_cleanup_dtor): Remove.
8935         (make_cleanup_restore_current_traceframe): Remove.
8936         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8937         New.
8938         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8939         * infrun.c (fetch_inferior_event): Use
8940         scoped_restore_current_traceframe.
8941
8942 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8943
8944         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8945         Remove.
8946         <n_allocated_type_units>: Remove.
8947         <all_type_units>: Change to std::vector.
8948         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8949         to std::vector change.
8950         (dwarf2_per_objfile::get_cutu): Likewise.
8951         (dwarf2_per_objfile::get_tu): Likewise.
8952         (create_signatured_type_table_from_index): Likewise.
8953         (create_signatured_type_table_from_debug_names): Likewise.
8954         (dw2_symtab_iter_next): Likewise.
8955         (dw2_print_stats): Likewise.
8956         (dw2_expand_all_symtabs): Likewise.
8957         (dw2_expand_marked_cus): Likewise.
8958         (dw2_debug_names_iterator::next): Likewise.
8959         (dwarf2_initialize_objfile): Likewise.
8960         (add_signatured_type_cu_to_table): Likewise.
8961         (create_all_type_units): Likewise.
8962         (add_type_unit): Likewise.
8963         (struct tu_abbrev_offset): Add constructor.
8964         (build_type_psymtabs_1): Adjust to std::vector change.
8965         (print_tu_stats): Likewise.
8966         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8967         (write_debug_names): Likewise.
8968
8969 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8970
8971         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8972         Make an std::vector.
8973         <n_comp_units>: Remove.
8974         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8975         to std::vector change.
8976         (dwarf2_per_objfile::get_cutu): Likewise.
8977         (dwarf2_per_objfile::get_cu): Likewise.
8978         (create_cus_from_index): Likewise.
8979         (create_addrmap_from_index): Likewise.
8980         (create_addrmap_from_aranges): Likewise.
8981         (dwarf2_read_index): Likewise.
8982         (dw2_find_last_source_symtab): Likewise.
8983         (dw2_map_symtabs_matching_filename): Likewise.
8984         (dw2_symtab_iter_next): Likewise.
8985         (dw2_print_stats): Likewise.
8986         (dw2_expand_all_symtabs): Likewise.
8987         (dw2_expand_symtabs_with_fullname): Likewise.
8988         (dw2_expand_marked_cus): Likewise.
8989         (dw2_map_symbol_filenames): Likewise.
8990         (create_cus_from_debug_names): Likewise.
8991         (dwarf2_read_debug_names): Likewise.
8992         (dw2_debug_names_iterator::next): Likewise.
8993         (dwarf2_initialize_objfile): Likewise.
8994         (set_partial_user): Likewise.
8995         (dwarf2_build_psymtabs_hard): Likewise.
8996         (read_comp_units_from_section): Remove arguments, adjust to
8997         std::vector change.
8998         (create_all_comp_units): Adjust to std::vector and
8999         read_comp_units_from_section changes.
9000         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9001         change.
9002         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9003         (psyms_seen_size): Likewise.
9004         (write_gdbindex): Likewise.
9005         (write_debug_names): Likewise.
9006
9007 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9008
9009         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9010         with dwarf2_per_objfile.
9011         (create_cus_from_index): Likewise.
9012         (create_signatured_type_table_from_index): Likewise.
9013         (dwarf2_read_index): Likewise.
9014         (dwarf2_initialize_objfile): Likewise.
9015         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9016         per_cu rather than get_dwarf2_per_objfile.
9017
9018 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9019
9020         * dwarf2read.h (struct signatured_type): Forward declare.
9021         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9022         New methods.
9023         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9024         (dw2_get_cutu): ...this.
9025         (dwarf2_per_objfile::get_cu): Rename from...
9026         (dw2_get_cu): ...this.
9027         (dwarf2_per_objfile::get_tu): New.
9028         (create_addrmap_from_index): Adjust.
9029         (create_addrmap_from_aranges): Adjust.
9030         (dw2_find_last_source_symtab): Adjust.
9031         (dw2_map_symtabs_matching_filename): Adjust.
9032         (dw2_symtab_iter_next): Adjust.
9033         (dw2_print_stats): Adjust.
9034         (dw2_expand_all_symtabs): Adjust.
9035         (dw2_expand_symtabs_with_fullname): Adjust.
9036         (dw2_expand_marked_cus): Adjust.
9037         (dw_expand_symtabs_matching_file_matcher): Adjust.
9038         (dw2_map_symbol_filenames): Adjust.
9039         (dw2_debug_names_iterator::next): Adjust.
9040         (dwarf2_initialize_objfile): Adjust.
9041         (set_partial_user): Adjust.
9042         (dwarf2_build_psymtabs_hard): Adjust.
9043
9044 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9045
9046         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9047         Remove unused variables.
9048         (dw2_map_symtabs_matching_filename): Likewise.
9049         (dwarf2_record_block_ranges): Likewise.
9050         (dwarf2_read_addr_index): Likewise.
9051         (follow_die_offset): Likewise.
9052
9053 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9054
9055         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9056         to symbol_file_add_main.
9057
9058 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9059
9060         PR mi/22299
9061         * mi/mi-console.c (do_fputc_async_safe): New.
9062         (mi_console_file::write_async_safe): New.
9063         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9064         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9065         New.
9066         * ui-file.c (ui_file::putstrn): Adjust call to
9067         fputstrn_unfiltered.
9068         * utils.c (printchar): Replace do_fputs and do_fprintf
9069         parameters by do_fputc.
9070         (fputstr_filtered): Adjust call to printchar.
9071         (fputstr_unfiltered): Likewise.
9072         (fputstrn_filtered): Likewise.
9073         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9074         printchar.
9075         * utils.h (do_fputc_ftype): New typedef.
9076         (fputstrn_unfiltered): Add do_fputc parameter.
9077
9078 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9079
9080         * regformats/i386/i386-avx.dat: Remove.
9081
9082 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9083
9084         PR gdb/22979
9085         * amd64-tdep.c (amd64_none_init_abi): New function.
9086         (amd64_x32_none_init_abi): New function.
9087         (_initialize_amd64_tdep): Register handlers for x86-64 and
9088         x64_32 with GDB_OSABI_NONE.
9089         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9090         GDB_OSABI_NONE osabi.
9091
9092 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9093
9094         PR gdb/22980
9095         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9096         GDB_OSABI_NONE.
9097         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9098         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9099
9100 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9101
9102         * common/byte-vector.h (char_vector): New type.
9103         * target.h (target_read_alloc): Return
9104         gdb::optional<byte_vector>.
9105         (target_read_stralloc): Return gdb::optional<char_vector>.
9106         (target_get_osdata): Return gdb::optional<char_vector>.
9107         * target.c (target_read_alloc_1): Templatize.  Replacement
9108         manual memory management with vector.
9109         (target_read_alloc): Change return type, adjust.
9110         (target_read_stralloc): Change return type, adjust.
9111         (target_get_osdata): Change return type, adjust.
9112         * auxv.c (struct auxv_info) <length>: Remove.
9113         <data>: Change type to gdb::optional<byte_vector>.
9114         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9115         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9116         (target_auxv_search): Adjust.
9117         (fprint_target_auxv): Adjust.
9118         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9119         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9120         (linux_make_corefile_notes): Adjust.
9121         * osdata.c (get_osdata): Adjust.
9122         * remote.c (remote_get_threads_with_qxfer): Adjust.
9123         (remote_memory_map): Adjust.
9124         (remote_traceframe_info): Adjust.
9125         (btrace_read_config): Adjust.
9126         (remote_read_btrace): Adjust.
9127         (remote_pid_to_exec_file): Adjust.
9128         * solib-aix.c (solib_aix_get_library_list): Adjust.
9129         * solib-dsbt.c (decode_loadmap): Don't free buf.
9130         (dsbt_get_initial_loadmaps): Adjust.
9131         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9132         * solib-target.c (solib_target_current_sos): Adjust.
9133         * tracepoint.c (sdata_make_value): Adjust.
9134         * xml-support.c (xinclude_start_include): Adjust.
9135         (xml_fetch_content_from_file): Adjust.
9136         * xml-support.h (xml_fetch_another): Change return type.
9137         (xml_fetch_content_from_file): Change return type.
9138         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9139         * xml-tdesc.c (file_read_description_xml): Adjust.
9140         (fetch_available_features_from_target): Change return type.
9141         (target_fetch_description_xml): Adjust.
9142         (target_read_description_xml): Adjust.
9143
9144 2018-04-06  Tom Tromey  <tom@tromey.com>
9145
9146         * value.c (~value): Update.
9147         (struct value) <contents>: Now unique_xmalloc_ptr.
9148         (value_contents_bits_eq, allocate_value_contents)
9149         (value_contents_raw, value_contents_all_raw)
9150         (value_contents_for_printing, value_contents_for_printing_const)
9151         (set_value_enclosing_type): Update.
9152
9153 2018-04-06  Tom Tromey  <tom@tromey.com>
9154
9155         * value.c (range_s): Remove typedef, VEC.
9156         (struct range): Add operator<.
9157         (range_lessthan): Remove.
9158         (ranges_contain): Change type.
9159         (~value): Update.
9160         (struct value) <unavailable, optimized_out>: Now std::vector.
9161         (value_entirely_available)
9162         (value_entirely_covered_by_range_vector)
9163         (value_entirely_unavailable, value_entirely_optimized_out):
9164         Update.
9165         (insert_into_bit_range_vector): Change argument type.
9166         (find_first_range_overlap): Likewise.
9167         (struct ranges_and_idx, value_contents_bits_eq)
9168         (require_not_optimized_out, require_available): Update.
9169         (ranges_copy_adjusted): Change argument types.
9170         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9171
9172 2018-04-06  Tom Tromey  <tom@tromey.com>
9173
9174         * value.c (~value): Update.
9175         (struct value) <parent>: Now a value_ref_ptr.
9176         (value_parent, set_value_parent, value_address, value_copy):
9177         Update.
9178
9179 2018-04-06  Tom Tromey  <tom@tromey.com>
9180
9181         * value.c (struct value): Add constructor, destructor, and member
9182         initializers.
9183         (allocate_value_lazy, value_decref): Update.
9184
9185 2018-04-06  Tom Tromey  <tom@tromey.com>
9186
9187         * value.c (struct value) <released, next>: Remove.
9188         (all_values): Now a std::vector.
9189         (allocate_value_lazy): Update.
9190         (value_next): Remove.
9191         (value_mark, value_free_to_mark, release_value)
9192         (value_release_to_mark): Update.
9193
9194 2018-04-06  Tom Tromey  <tom@tromey.com>
9195
9196         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9197         (free_value_chain): Remove.
9198         * value.c (free_value_chain): Remove.
9199         (value_release_to_mark): Return a std::vector.
9200         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9201         std::vector.
9202         (check_condition): Update.
9203         * eval.c (fetch_subexp_value): Change "val_chain" to a
9204         std::vector.
9205         * breakpoint.c (update_watchpoint): Update.
9206         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9207
9208 2018-04-06  Tom Tromey  <tom@tromey.com>
9209
9210         * value.h (free_all_values): Remove.
9211         * value.c (free_all_values): Remove.
9212
9213 2018-04-06  Tom Tromey  <tom@tromey.com>
9214
9215         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9216         (value_history_chain, value_history_count): Remove.
9217         (value_history): New global.
9218         (record_latest_value, access_value_history, show_values)
9219         (preserve_values): Update.
9220
9221 2018-04-06  Tom Tromey  <tom@tromey.com>
9222
9223         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9224         * varobj.c (varobj_set_display_format, varobj_set_value)
9225         (install_default_visualizer, construct_visualizer)
9226         (install_new_value, ~varobj, varobj_get_value_type)
9227         (my_value_of_variable, varobj_editable_p): Update.
9228         * c-varobj.c (c_describe_child, c_value_of_variable)
9229         (cplus_number_of_children, cplus_describe_child): Update.
9230         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9231         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9232         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9233
9234 2018-04-06  Tom Tromey  <tom@tromey.com>
9235
9236         * printcmd.c (last_examine_address): Change type to
9237         value_ref_ptr.
9238         (do_examine, x_command): Update.
9239
9240 2018-04-06  Tom Tromey  <tom@tromey.com>
9241
9242         * value.c (release_value): Update.
9243         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9244         (struct bpstats) <val>: Now a value_ref_ptr.
9245         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9246         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9247         (~watchpoint, print_it_watchpoint, watch_command_1)
9248         (invalidate_bp_value_on_memory_change): Update.
9249
9250 2018-04-06  Tom Tromey  <tom@tromey.com>
9251
9252         * varobj.c (varobj_clear_saved_item)
9253         (update_dynamic_varobj_children, install_new_value, ~varobj):
9254         Update.
9255         * value.h (value_incref): Move declaration earlier.
9256         (value_decref): Rename from value_free.
9257         (struct value_ref_policy): New.
9258         (value_ref_ptr): New typedef.
9259         (struct value_deleter): Remove.
9260         (gdb_value_up): Remove typedef.
9261         (release_value): Change return type.
9262         (release_value_or_incref): Remove.
9263         * value.c (set_value_parent): Update.
9264         (value_incref): Change return type.
9265         (value_decref): Rename from value_free.
9266         (value_free_to_mark, free_all_values, free_value_chain): Update.
9267         (release_value): Return value_ref_ptr.
9268         (release_value_or_incref): Remove.
9269         (record_latest_value, set_internalvar, clear_internalvar):
9270         Update.
9271         * stack.c (info_frame_command): Don't call value_free.
9272         * python/py-value.c (valpy_dealloc, valpy_new)
9273         (value_to_value_object): Update.
9274         * printcmd.c (do_examine): Update.
9275         * opencl-lang.c (lval_func_free_closure): Update.
9276         * mi/mi-main.c (register_changed_p): Don't call value_free.
9277         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9278         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9279         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9280         value_free.
9281         * guile/scm-value.c (vlscm_free_value_smob)
9282         (vlscm_scm_from_value): Update.
9283         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9284         (frame_unwind_register_unsigned, get_frame_register_bytes)
9285         (put_frame_register_bytes): Don't call value_free.
9286         * findvar.c (address_from_register): Don't call value_free.
9287         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9288         * dwarf2loc.c (entry_data_value_free_closure)
9289         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9290         (dwarf2_evaluate_loc_desc_full): Update.
9291         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9292         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9293         (~watchpoint, watch_command_1)
9294         (invalidate_bp_value_on_memory_change): Update.
9295         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9296
9297 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9298
9299         PR gdb/23022
9300         * warning.m4: Add -Wno-error=deprecated-register.
9301         * configure: Re-generate.
9302
9303 2018-04-05  Tom Tromey  <tom@tromey.com>
9304
9305         * linespec.h: Remove include of "vec.h".
9306
9307 2018-04-05  Tom Tromey  <tom@tromey.com>
9308
9309         * linespec.c (typep): Remove typedef.
9310         (find_methods, find_superclass_methods): Take a std::vector.
9311         (find_method): Use std::vector.
9312
9313 2018-04-05  Tom Tromey  <tom@tromey.com>
9314
9315         * utils.c (compare_strings): Remove.
9316         * utils.h (compare_strings): Remove.
9317         * objc-lang.h (find_imps): Update.
9318         * objc-lang.c (find_methods): Take a std::vector.
9319         (uniquify_strings, find_imps): Likewise.
9320         * linespec.c (find_methods): Take a std::vector.
9321         (decode_objc): Use std::vector.
9322         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9323         a std::vector.
9324         (find_method, find_function_symbols): Use std::vector.
9325
9326 2018-04-05  Tom Tromey  <tom@tromey.com>
9327
9328         * completer.c (completion_tracker::completion_tracker): Remove
9329         cast.
9330         (completion_tracker::discard_completions): Likewise.
9331         * breakpoint.c (ambiguous_names_p): Remove cast.
9332         * ada-lang.c (_initialize_ada_language): Remove cast.
9333         * utils.h (streq): Update.
9334         (streq_hash): Add new declaration.
9335         * utils.c (streq): Return bool.
9336         (streq_hash): New function.
9337
9338 2018-04-05  Tom Tromey  <tom@tromey.com>
9339
9340         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9341         Remove a string copy.
9342
9343 2018-04-05  Tom Tromey  <tom@tromey.com>
9344
9345         * linespec.c (filter_results): Use std::vector.
9346         (decode_line_2, decode_line_full): Update.
9347
9348 2018-04-05  Tom Tromey  <tom@tromey.com>
9349
9350         * linespec.c (canonical_to_fullform): Return std::string.
9351         (filter_results): Update.
9352         (struct decode_line_2_item): Add constructor.
9353         <fullform, displayform>: Now std::string.
9354         (decode_line_2_compare_items): Now a std::sort comparator.
9355         (decode_line_2): Update.
9356
9357 2018-04-05  Tom Tromey  <tom@tromey.com>
9358
9359         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9360         (unexpected_linespec_error): Update.
9361         (linespec_parse_basic, parse_linespec): Update.
9362
9363 2018-04-05  Tom Tromey  <tom@tromey.com>
9364
9365         * linespec.c (linespec_parse_basic): Reindent.
9366
9367 2018-04-05  Tom Tromey  <tom@tromey.com>
9368
9369         * minsyms.h (iterate_over_minimal_symbols): Update.
9370         * minsyms.c (iterate_over_minimal_symbols): Take a
9371         gdb::function_view.
9372         * linespec.c (struct collect_minsyms): Remove.
9373         (compare_msyms): Now a std::sort comparator.
9374         (add_minsym): Add parameters.
9375         (search_minsyms_for_name): Update.  Use std::vector.
9376
9377 2018-04-03  Tom Tromey  <tom@tromey.com>
9378
9379         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9380         gdb::byte_vector.
9381
9382 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9383
9384         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9385
9386 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9387
9388         PR gdb/16959
9389         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9390         printing static type.
9391
9392 2018-04-01  Tom Tromey  <tom@tromey.com>
9393
9394         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9395         (rs6000_xfer_shared_libraries): Update.
9396
9397 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9398
9399         * common/gdb_vecs.h (char_ptr): Remove.
9400         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9401
9402 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9403
9404         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9405         with std::vector.
9406         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9407
9408 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9409
9410         * tracepoint.h (struct uploaded_tp): Initialize fields.
9411         <actions, step_actions, cmd_strings>: Change type to
9412         std::vector<char *>.
9413         * tracepoint.c (get_uploaded_tp): Allocate with new.
9414         (free_uploaded_tps): Free with delete.
9415         (parse_tracepoint_definition): Adjust to std::vector change.
9416         * breakpoint.c (read_uploaded_action): Likewise.
9417         (create_tracepoint_from_upload): Likewise.
9418         * ctf.c (ctf_write_uploaded_tp): Likewise.
9419         (SET_ARRAY_FIELD): Likewise.
9420         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9421
9422 2018-03-30  Tom Tromey  <tom@tromey.com>
9423
9424         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9425         std::unique_ptr.
9426         (svr4_keep_data_in_core): Update.
9427         (svr4_read_so_list): Update.
9428
9429 2018-03-30  Tom Tromey  <tom@tromey.com>
9430
9431         * windows-nat.c (handle_output_debug_string, handle_exception):
9432         Update.
9433         * target.h (target_read_string): Update.
9434         * target.c (target_read_string): Change "string" to
9435         unique_xmalloc_ptr.
9436         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9437         Update.
9438         * solib-frv.c (frv_current_sos): Update.
9439         * solib-dsbt.c (dsbt_current_sos): Update.
9440         * solib-darwin.c (darwin_current_sos): Update.
9441         * linux-thread-db.c (inferior_has_bug): Update.
9442         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9443         Update.  Remove alloca.
9444         * ada-lang.c (ada_main_name): Update.
9445
9446 2018-03-30  Tom Tromey  <tom@tromey.com>
9447
9448         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9449         (struct dwo_file_deleter): New.
9450         (dwo_file_up): New typedef.
9451         (open_and_init_dwo_file): Use dwo_file_up.
9452         (free_dwo_file_cleanup): Remove.
9453
9454 2018-03-30  Tom Tromey  <tom@tromey.com>
9455
9456         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9457         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9458
9459 2018-03-30  Tom Tromey  <tom@tromey.com>
9460
9461         * dwarf2read.c (class free_cached_comp_units): New class.
9462         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9463         (free_cached_comp_units): Remove function.
9464
9465 2018-03-30  Tom Tromey  <tom@tromey.com>
9466
9467         * utils.h (make_cleanup_unpush_target): Remove.
9468         * inf-ptrace.c (struct target_unpusher): New.
9469         (target_unpush_up) New typedef.
9470         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9471         target_unpush_up.
9472         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9473
9474 2018-03-27  Tom Tromey  <tom@tromey.com>
9475
9476         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9477
9478 2018-03-27  Pedro Alves  <palves@redhat.com>
9479             Tom Tromey  <tom@tromey.com>
9480
9481         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9482         destructor.  Now a class.
9483         (gdb_readline_wrapper_cleanup): Remove function.
9484         (gdb_readline_wrapper): Remove cleanups.
9485
9486 2018-03-27  Tom Tromey  <tom@tromey.com>
9487
9488         * typeprint.h (struct type_print_options) <local_typedefs,
9489         global_typedefs>: Remove "struct" keyword.
9490         (class typedef_hash_table): New class.
9491         (recursively_update_typedef_hash, add_template_parameters)
9492         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9493         (find_typedef_in_hash): Don't declare.
9494         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9495         (typedef_hash_table::recursively_update): Rename from
9496         recursively_update_typedef_hash.  Now a member.
9497         (typedef_hash_table::add_template_parameters): Rename from
9498         add_template_parameters.  Now a member.
9499         (typedef_hash_table::typedef_hash_table): Now a constructor;
9500         rename from create_typedef_hash.
9501         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9502         rename from free_typedef_hash.
9503         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9504         (do_free_global_table): Remove.
9505         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9506         from copy_type_recursive.
9507         (create_global_typedef_table): Remove.
9508         (typedef_hash_table::find_global_typedef): Now a member of
9509         typedef_hash_table.
9510         (typedef_hash_table::find_typedef): Rename from
9511         find_typedef_in_hash; now a member.
9512         (whatis_exp): Update.
9513         * extension.h (struct ext_lang_type_printers): Add constructor and
9514         destructor.
9515         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9516         declare.
9517         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9518         Now a constructor; rename from start_ext_lang_type_printers.
9519         (ext_lang_type_printers): Now a destructor; rename from
9520         free_ext_lang_type_printers.
9521         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9522         Update.
9523         (c_type_print_base_struct_union): Update.  Remove cleanups.
9524
9525 2018-03-27  Tom Tromey  <tom@tromey.com>
9526
9527         * dwarf-index-write.c: Include <cmath>.
9528
9529 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9530
9531         * NEWS: Add entry describing new "set|show varsize-limit" command.
9532         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9533         command.
9534         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9535         "set variable".
9536
9537 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9538
9539         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9540         dwarf-index-write.c
9541         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9542         * dwarf-index-common.c: New file.
9543         * dwarf-index-common.h: New file.
9544         * dwarf-index-write.c: New file.
9545         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9546         (struct dwarf2_section_info): Move from here.
9547         (dwarf2_section_info_def): Likewise.
9548         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9549         (offset_type): Likewise.
9550         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9551         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9552         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9553         (byte_swap): Likewise.
9554         (MAYBE_SWAP): Likewise.
9555         (dwarf2_per_cu_ptr): Likewise.
9556         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9557         (struct tu_stats): Likewise.
9558         (struct dwarf2_per_objfile): Likewise.
9559         (struct dwarf2_per_cu_data): Likewise.
9560         (struct signatured_type): Likewise.
9561         (sig_type_ptr): Likewise.
9562         (DEF_VEC_P (sig_type_ptr)): Likewise.
9563         (INDEX4_SUFFIX): Likewise.
9564         (INDEX5_SUFFIX): Likewise.
9565         (DEBUG_STR_SUFFIX): Likewise.
9566         (dwarf2_read_section): Make non-static.
9567         (mapped_index_string_hash): Move from here.
9568         (dwarf5_djb_hash): Likewise.
9569         (file_write): Likewise.
9570         (class data_buf): Likewise.
9571         (struct symtab_index_entry): Likewise.
9572         (struct mapped_symtab): Likewise.
9573         (find_slot): Likewise.
9574         (hash_expand): Likewise.
9575         (add_index_entry): Likewise.
9576         (uniquify_cu_indices): Likewise.
9577         (class c_str_view): Likewise.
9578         (class c_str_view_hasher): Likewise.
9579         (class vector_hasher): Likewise.
9580         (write_hash_table): Likewise.
9581         (psym_index_map): Likewise.
9582         (struct addrmap_index_data): Likewise.
9583         (add_address_entry): Likewise.
9584         (add_address_entry_worker): Likewise.
9585         (write_address_map): Likewise.
9586         (symbol_kind): Likewise.
9587         (write_psymbols): Likewise.
9588         (struct signatured_type_index_data): Likewise.
9589         (write_one_signatured_type): Likewise.
9590         (recursively_count_psymbols): Likewise.
9591         (recursively_write_psymbols): Likewise.
9592         (class debug_names): Likewise.
9593         (check_dwarf64_offsets): Likewise.
9594         (psyms_seen_size): Likewise.
9595         (write_gdbindex): Likewise.
9596         (write_debug_names): Likewise.
9597         (assert_file_size): Likewise.
9598         (write_psymtabs_to_index): Likewise.
9599         (save_gdb_index_command): Likewise.
9600         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9601         command.
9602         * dwarf2read.h: New file.
9603
9604 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9605
9606         PR gdb/22670
9607         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9608         symbol name if the CU's language stores symbol names in linkage
9609         format.
9610         * language.h (struct language_defn)
9611         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9612         all instances of this struct.
9613
9614 2018-03-26  Tom Tromey  <tom@tromey.com>
9615
9616         * stack.c (backtrace_command_1): Remove verbose code.
9617
9618 2018-03-26  Tom Tromey  <tom@tromey.com>
9619
9620         * python/py-framefilter.c (py_print_type): Don't catch
9621         exceptions.  Return void.
9622         (py_print_value): Likewise.
9623         (py_print_single_arg): Likewise.
9624         (enumerate_args): Don't catch exceptions.
9625         (py_print_args): Likewise.
9626         (py_print_frame): Likewise.
9627         (gdbpy_apply_frame_filter): Catch exceptions here.
9628
9629 2018-03-26  Tom Tromey  <tom@tromey.com>
9630
9631         * stack.c (_initialize_stack): Remove trailing newlines from help
9632         text.  Add "Usage" line to "backtrace" help.
9633
9634 2018-03-26  Tom Tromey  <tom@tromey.com>
9635
9636         PR python/16486:
9637         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9638
9639 2018-03-26  Tom Tromey  <tom@tromey.com>
9640
9641         * python/py-framefilter.c (py_print_single_arg): Return
9642         EXT_LANG_BT_ERROR from catch.
9643
9644 2018-03-26  Tom Tromey  <tom@tromey.com>
9645
9646         PR backtrace/15584:
9647         * stack.c (backtrace_command_1): Move some code into no-filters
9648         "if".
9649
9650 2018-03-26  Tom Tromey  <tom@tromey.com>
9651
9652         * python/py-framefilter.c (throw_quit_or_print_exception): New
9653         function.
9654         (gdbpy_apply_frame_filter): Use it.
9655
9656 2018-03-26  Tom Tromey  <tom@tromey.com>
9657
9658         PR cli/17716:
9659         * python/py-framefilter.c (py_print_type, py_print_value)
9660         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9661         RETURN_MASK_ERROR.
9662
9663 2018-03-26  Tom Tromey  <tom@tromey.com>
9664
9665         * python/py-framefilter.c (enumerate_args): Use
9666         gdb::unique_xmalloc_ptr.
9667
9668 2018-03-26  Tom Tromey  <tom@tromey.com>
9669
9670         * python/py-framefilter.c (py_print_frame): Return
9671         EXT_LANG_BT_OK.
9672         (gdbpy_apply_frame_filter): Update comment.
9673         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9674         Remove.
9675         <EXT_LANG_BT_NO_FILTERS>: Change value.
9676
9677 2018-03-26  Tom Tromey  <tom@tromey.com>
9678
9679         PR backtrace/15582:
9680         * stack.c (backtrace_command): Parse "hide" argument.
9681         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9682         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9683         constant.
9684
9685 2018-03-26  Tom Tromey  <tom@tromey.com>
9686
9687         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9688         add "flags".
9689         (backtrace_command): Remove "fulltrace", add "flags".
9690
9691 2018-03-26  Tom Tromey  <tom@tromey.com>
9692
9693         * stack.c (backtrace_command): Rewrite command line parsing.
9694
9695 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9696
9697         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9698
9699 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9700
9701         * filename-seen-cache.h: Add include guard.
9702
9703 2018-03-26  Keith Seitz  <keiths@redhat.com>
9704
9705         * symfile.c (place_section): Remove "struct" from section_addr_info
9706         in comment.
9707         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9708         "struct" keyword from section_addr_info.
9709
9710 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9711
9712         * regformats/regdef.h (reg): Add constructors.
9713
9714 2018-03-25  Pedro Alves  <palves@redhat.com>
9715
9716         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9717         if then/else bodies in var_func_name extraction.
9718
9719 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9720
9721         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9722         lookup_minimal_symbol() to find symbol entry.
9723         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9724
9725 2018-03-23  Keith Seitz  <keiths@redhat.com>
9726
9727         PR c++/22968
9728         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9729         nested type definitions for C++, too.
9730
9731 2018-03-23  Tom Tromey  <tom@tromey.com>
9732
9733         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9734         a typedef.
9735         (macho_register_oso): Remove.
9736         (macho_symtab_read): Take a std::vector.
9737         (oso_el_compare_name): Now a std::sort comparator.
9738         (macho_symfile_read_all_oso): Take a std::vector.
9739         (macho_symfile_read): Use std::vector.  Remove cleanups.
9740
9741 2018-03-22  Tom Tromey  <tom@tromey.com>
9742
9743         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9744         (record_full_goto_bookmark): Use std::string.
9745
9746 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9747
9748         PR tdep/18295
9749         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9750         a single mask.
9751
9752 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9753
9754         * rs6000-tdep.c (store_insn_p): New function.
9755         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9756         and cr_reg to their unshifted values. Use store_insn_p to
9757         match LR saves using either R1 or fdata->alloca_reg. Use
9758         store_insn_p to match CR saves. Set alloca_reg_offset
9759         when alloca_reg and framep are set. Remove lr_reg shift
9760         when assigning to fdata->lr_register.
9761
9762 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9763
9764         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9765         command line args instead of emitting a warning.
9766
9767 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9768
9769         * tracepoint.h (struct static_tracepoint_marker): Initialize
9770         fields, define default constructor, move constructor and move
9771         assignment, disable the rest.
9772         <str_id, extra>: Make std::string.
9773         (release_static_tracepoint_marker): Remove.
9774         (free_current_marker): Remove.
9775         * tracepoint.c (free_current_marker): Remove.
9776         (parse_static_tracepoint_marker_definition): Adjust to
9777         std::string, use new hex2str overload.
9778         (release_static_tracepoint_marker): Remove.
9779         (print_one_static_tracepoint_marker): Get marker by reference
9780         and adjust to std::string.
9781         (info_static_tracepoint_markers_command): Adjust to std::vector
9782         changes
9783         * target.h (static_tracepoint_marker_p): Remove typedef.
9784         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9785         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9786         bool.
9787         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9788         * target-debug.h
9789         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9790         (target_debug_print_std_vector_static_tracepoint_marker): New.
9791         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9792         to...
9793         (target_debug_print_static_tracepoint_marker_p): ... this.
9794         * target-delegates.c: Re-generate.
9795         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9796         Make std::string.
9797         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9798         (decode_static_tracepoint_spec): Adjust to std::vector.
9799         (tracepoint_print_one_detail): Adjust to std::string.
9800         (strace_marker_decode_location): Adjust to std::string.
9801         (update_static_tracepoint): Adjust to std::string, remove call
9802         to release_static_tracepoint_marker.
9803         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9804         Adjust to std::vector.
9805         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9806         (remote_static_tracepoint_markers_by_strid): Adjust to
9807         std::vector.
9808         * common/rsp-low.h (hex2str): New overload with explicit count
9809         of bytes.
9810         * common/rsp-low.c (hex2str): New overload with explicit count
9811         of bytes.
9812         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9813         (_initialize_rsp_low_selftests): Add test_hex2str test.
9814         * unittests/tracepoint-selftests.c
9815         (test_parse_static_tracepoint_marker_definition): Adjust to
9816         std::string.
9817
9818 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9819
9820         * tracepoint.c (parse_static_tracepoint_marker_definition):
9821         Consider case where the definition is followed by more
9822         definitions.
9823         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9824         tracepoint-selftests.c.
9825         * unittests/tracepoint-selftests.c: New.
9826
9827 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9828
9829         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9830         Carvalho.
9831
9832 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9833
9834         * symtab.c (find_pc_sect_line): fixed indentation.
9835
9836 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9837
9838         * symtab.c (find_pc_sect_line): now uses binary search.
9839
9840 2018-03-19  Tom Tromey  <tom@tromey.com>
9841
9842         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9843         "IDENT" production.
9844
9845 2018-03-19  Pedro Alves  <palves@redhat.com>
9846             Tom Tromey  <tom@tromey.com>
9847
9848         * unittests/observable-selftests.c: New file.
9849         * common/observable.h: New file.
9850         * observable.h: New file.
9851         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9852         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9853         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9854         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9855         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9856         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9857         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9858         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9859         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9860         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9861         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9862         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9863         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9864         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9865         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9866         tui/tui-interp.c, valops.c: Update all users.
9867         * tui/tui-hooks.c (tui_bp_created_observer)
9868         (tui_bp_deleted_observer, tui_bp_modified_observer)
9869         (tui_inferior_exit_observer, tui_before_prompt_observer)
9870         (tui_normal_stop_observer, tui_register_changed_observer):
9871         Remove.
9872         (tui_observers_token): New global.
9873         (attach_or_detach, tui_attach_detach_observers): New functions.
9874         (tui_install_hooks, tui_remove_hooks): Use
9875         tui_attach_detach_observers.
9876         * record-btrace.c (record_btrace_thread_observer): Remove.
9877         (record_btrace_thread_observer_token): New global.
9878         * observer.sh: Remove.
9879         * observer.c: Rename to observable.c.
9880         * observable.c (namespace gdb_observers): Define new objects.
9881         (observer_debug): Move into gdb_observers namespace.
9882         (struct observer, struct observer_list, xalloc_observer_list_node)
9883         (xfree_observer_list_node, generic_observer_attach)
9884         (generic_observer_detach, generic_observer_notify): Remove.
9885         (_initialize_observer): Update.
9886         Don't include observer.inc.
9887         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9888         (clean mostlyclean): Likewise.
9889         (observer.h, observer.inc): Remove targets.
9890         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9891         (COMMON_SFILES): Use observable.c, not observer.c.
9892         * .gitignore: Remove observer.h.
9893
9894 2018-03-18  Tom Tromey  <tom@tromey.com>
9895
9896         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9897         gdb::def_vector.
9898         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9899
9900 2018-03-17  Tom Tromey  <tom@tromey.com>
9901
9902         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9903
9904 2018-03-17  Tom Tromey  <tom@tromey.com>
9905
9906         * target.c (class scoped_target_fd): New.
9907         (target_fileio_close_cleanup): Remove.
9908         (target_fileio_read_alloc_1): Use scoped_target_fd.
9909
9910 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9911
9912         * silent-rules.mk: New.
9913         * Makefile.in: Include silent-rules.mk
9914         (srcdir, VPATH, top_srcdir): Move up.
9915         (COMPILE): Add ECHO_CXX.
9916         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9917         (init.c): Add ECHO_INIT_C.
9918         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9919         (version.c): Add ECHO_GEN.
9920         (printcmd.o): Add ECHO_CXX.
9921         (target-float.o): Add ECHO_CXX.
9922         (ada-exp.o): Add ECHO_CXX.
9923         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9924         (insight$(EXEEXT)): Add ECHO_CXXLD.
9925         * gnulib/configure.ac: Add AM_SILENT_RULES.
9926         * gnulib/aclocal.m4: Re-generate.
9927         * gnulib/configure: Re-generate.
9928         * gnulib/import/Makefile.in: Re-generate.
9929
9930 2018-03-16  Tom Tromey  <tom@tromey.com>
9931
9932         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9933         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9934         * utils.c (do_free_section_addr_info)
9935         (make_cleanup_free_section_addr_info): Remove.
9936         * symfile.h (struct other_sections): Add constructor.
9937         (struct section_addr_info): Remove.
9938         (section_addr_info): New typedef.
9939         (struct sym_fns) <sym_offsets>: Change type of parameter.
9940         (build_section_addr_info_from_objfile)
9941         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9942         (default_symfile_offsets, symbol_file_add)
9943         (symbol_file_add_from_bfd)
9944         (build_section_addr_info_from_section_table): Update.
9945         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9946         * symfile.c (alloc_section_addr_info): Remove.
9947         (build_section_addr_info_from_section_table): Change return type.
9948         Update.
9949         (build_section_addr_info_from_bfd)
9950         (build_section_addr_info_from_objfile): Likewise.
9951         (free_section_addr_info): Remove.
9952         (relative_addr_info_to_section_offsets): Change type of "addrs".
9953         (addrs_section_compar): Now a std::sort comparator.
9954         (addrs_section_sort): Change return type.
9955         (addr_info_make_relative): Change type of "addrs".  Update.
9956         (default_symfile_offsets, syms_from_objfile_1)
9957         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9958         (symbol_file_add_separate): Update.
9959         (symbol_file_add): Change type of "addrs".  Update.
9960         (add_symbol_file_command): Update.  Remove cleanups.
9961         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
9962         cleanups.
9963         * symfile-debug.c (debug_sym_offsets): Change type of "info".
9964         * solib.c (solib_read_symbols): Update.
9965         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
9966         * machoread.c (macho_symfile_offsets): Update.
9967         * jit.c (jit_bfd_try_read_symtab): Update.
9968
9969 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
9970
9971         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9972         unittests/utils-selftests.c.
9973         * unittests/utils-selftests.c: New file.
9974
9975 2018-03-14  Tom Tromey  <tom@tromey.com>
9976
9977         PR cli/14977:
9978         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9979         for NULL.
9980
9981 2018-03-14  Tom Tromey  <tom@tromey.com>
9982
9983         PR cli/19918:
9984         * printcmd.c (printf_pointer): Allow "-" in format.
9985
9986 2018-03-14  Tom Tromey  <tom@tromey.com>
9987
9988         * printcmd.c (_initialize_printcmd): Add usage to printf.
9989
9990 2018-03-14  Yao Qi  <qiyao@sourceware.org>
9991
9992         * MAINTAINERS: Update my email address.
9993
9994 2018-03-13  Tom Tromey  <tom@tromey.com>
9995
9996         * machoread.c (macho_check_dsym): Change filenamep to a
9997         std::string*.
9998         (macho_symfile_read): Update.
9999         * symfile.c (load_command): Use std::string.
10000
10001 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10002
10003         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10004         to error message string.
10005         (riscv_register_name): Use xsnprintf instead of sprintf.
10006         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10007         internal_error.
10008         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10009         error.
10010         (riscv_push_dummy_call): Likewise.
10011
10012 2018-03-12  Tom Tromey  <tom@tromey.com>
10013
10014         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10015         Use gdb::byte_vector.
10016         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10017
10018 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10019
10020         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10021         parameter type to readable_regcache.
10022         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10023         the declaration.
10024
10025 2018-03-11  Tom Tromey  <tom@tromey.com>
10026
10027         * dwarf2read.c (struct nextfield): Add initializers.
10028         (struct nextfnfield): Remove.
10029         (struct fnfieldlist): Add initializers.  Remove "length" and
10030         "head", use std::vector.
10031         (struct decl_field_list): Remove.
10032         (struct field_info): Add initializers.
10033         <fields, baseclasses>: Now std::vector.
10034         <nbaseclasses, nfnfields, typedef_field_list_count,
10035         nested_types_list_count>: Remove.
10036         (dwarf2_add_field, dwarf2_add_type_defn)
10037         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10038         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10039         (process_structure_scope): Update.
10040
10041 2018-03-11  Tom Tromey  <tom@tromey.com>
10042
10043         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10044         for use by std::sort.
10045         (build_type_psymtabs_1): Use std::vector.
10046
10047 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10048
10049         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10050         and LIBMPFR in the printed configuration.
10051
10052 2018-03-08  Tom Tromey  <tom@tromey.com>
10053
10054         * source.c (get_filename_and_charpos): Use scoped_fd.
10055         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10056         (procfs_pidlist): Likewise.
10057         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10058         (iterate_over_mappings): Likewise.
10059
10060 2018-03-08  Tom Tromey  <tom@tromey.com>
10061
10062         * infcall.c (struct call_return_meta_info)
10063         <stack_temporaries_enabled>: Remove.
10064         (get_call_return_value, call_function_by_hand_dummy): Update.
10065         * thread.c (disable_thread_stack_temporaries): Remove.
10066         (enable_thread_stack_temporaries): Remove.
10067         (thread_stack_temporaries_enabled_p): Return bool.
10068         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10069         (get_last_thread_stack_temporary): Update.
10070         * eval.c (evaluate_subexp): Update.
10071         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10072         class, not a function.
10073         (value_ptr, value_vec): Remove typedefs.
10074         (class thread_info) <stack_temporaries_enabled>: Now bool.
10075         <stack_temporaries>: Now a std::vector.
10076         (thread_stack_temporaries_enabled_p)
10077         (value_in_thread_stack_temporaries): Return bool.
10078
10079 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10080
10081         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10082         (getpkt_or_notif_sane_1): Likewise.
10083
10084 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10085
10086         * build-id.c (build_id_to_debug_bfd): Use std::string.
10087
10088 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10089
10090         * build-id.c (find_separate_debug_file_by_buildid): Return
10091         std::string.
10092         * build-id.h (find_separate_debug_file_by_buildid): Return
10093         std::string.
10094         * coffread.c (coff_symfile_read): Adjust to std::string.
10095         * elfread.c (elf_symfile_read): Adjust to std::string.
10096         * symfile.c (separate_debug_file_exists): Change parameter to
10097         std::string.
10098         (find_separate_debug_file): Return std::string.
10099         (find_separate_debug_file_by_debuglink): Return std::string.
10100         * symfile.h (find_separate_debug_file_by_debuglink): Return
10101         std::string.
10102
10103 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10104
10105         * common/xml-utils.c (xml_escape_text): Move code to...
10106         (xml_escape_text_append): ... this new function.
10107         * common/xml-utils.h (xml_escape_text_append): New declaration.
10108         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10109         New function.
10110         (_initialize_xml_utils): register test_xml_escape_text_append as
10111         a selftest.
10112
10113 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10114
10115         * defs.h: Remove MAX_REGISTER_SIZE.
10116         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10117         asserts.
10118         * python/py-unwind.c (pyuw_sniffer): Likewise.
10119
10120 2018-03-07  Tom Tromey  <tom@tromey.com>
10121
10122         * linux-tdep.c (linux_info_proc): Update.
10123         * target.h (struct target_ops) <to_fileio_readlink>: Return
10124         optional<string>.
10125         (target_fileio_readlink): Return optional<string>.
10126         * remote.c (remote_hostio_readlink): Return optional<string>.
10127         * inf-child.c (inf_child_fileio_readlink): Return
10128         optional<string>.
10129         * target.c (target_fileio_readlink): Return optional<string>.
10130
10131 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10132
10133         * regcache.c (cooked_read_test): Add riscv to the list of
10134         architectures that have a save_reggroup.
10135
10136 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10137
10138         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10139         value is not a dynamic class object.
10140
10141 2018-03-06  Tom Tromey  <tom@tromey.com>
10142
10143         * rust-exp.y: Formatting fixes.
10144
10145 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10146
10147         * riscv-tdep.c (riscv_register_name): Remove target description
10148         support.
10149         (riscv_gdbarch_init): Remove target description check.
10150
10151 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10152
10153         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10154         comment.
10155         * riscv-tdep.h: Likewise.
10156
10157 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10158
10159         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10160         (riscv_pseudo_register_write): Delete.
10161         (riscv_gdbarch_init): Remove all use of pseudo registers.
10162
10163 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10164
10165         * record-btrace.c (btrace_print_lines): Replace cleanup
10166         parameter with RAII equivalents.
10167         (btrace_insn_history): Replace cleanup with RAII equivalents.
10168         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10169         make_cleanup_ui_out_tuple_begin_end): Remove.
10170         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10171         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10172         make_cleanup_ui_out_list_begin_end): Remove.
10173
10174 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10175
10176         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10177         parameter types to std::vector.  Use bool.
10178         (record_btrace_wait): Replace VEC(tp_t) with
10179         std::vector<thread_info *>.
10180         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10181
10182 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10183
10184         * record-btrace.c (record_btrace_disable_callback): Remove.
10185         (struct scoped_btrace_disable): New.
10186         (record_btrace_open): Use scoped_btrace_disable.
10187
10188 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10189
10190         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10191         reading values from registers.
10192
10193 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10194
10195         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10196         where appropriate.
10197
10198 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10199
10200         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10201         change parameter type.  Use GDB's print functions, and use
10202         core_addr_to_string where appropriate.
10203         (riscv_push_dummy_call): Use core_addr_to_string where
10204         appropriate, update call to riscv_print_arg_location, and reindent
10205         a few lines.
10206         (riscv_return_value): Update call to riscv_print_arg_location.
10207
10208 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10209             Tim Newsome <tim@sifive.com>
10210             Albert Ou <a0u@eecs.berkeley.edu>
10211             Darius Rad <darius@bluespec.com>
10212
10213         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10214         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10215         (ALLDEPFILES): Add riscv-tdep.c
10216         * configure.tgt: Add riscv support.
10217         * riscv-tdep.c: New file.
10218         * riscv-tdep.h: New file.
10219         * NEWS: Mention new target.
10220         * MAINTAINERS: Add entry for riscv.
10221
10222 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10223
10224         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10225         fields within aggregates.
10226
10227 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10228
10229         * record-btrace.c (btrace_print_lines): Change type of flags to
10230         gdb_disassembly_flags.
10231
10232 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10233
10234         * fbsd-nat.c: Include "inf-ptrace.h".
10235         (USE_SIGTRAP_SIGINFO): Conditionally define.
10236         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10237         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10238         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10239         function.
10240         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10241         Likewise.
10242         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10243         Likewise.
10244         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10245         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10246         "supports_stopped_by_hw_breakpoint" target methods.
10247
10248 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10249
10250         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10251         * fbsd-nat.c (debug_fbsd_nat): New variable.
10252         (show_fbsd_nat_debug): New function.
10253         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10254         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10255
10256 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10257
10258         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10259         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10260         prototype.
10261         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10262         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10263         method.
10264
10265 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10266
10267         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10268         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10269
10270 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10271
10272         * charset.c (struct charset_vector): New.
10273         (charsets): Change type to charset_vector.
10274         (find_charset_names): Adjust.
10275         (add_one): Adjust.
10276         (_initialize_charset): Adjust.
10277
10278 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10279
10280         * progspace.h (struct program_space) <deleted_solibs>: Change
10281         type to std::vector<std::string>.
10282         * progspace.c (clear_program_space_solib_cache): Adjust.
10283         * breakpoint.c (print_solib_event): Adjust.
10284         (check_status_catch_solib): Adjust.
10285         * solib.c (update_solib_list): Adjust.
10286         * ui-out.h (class ui_out) <field_string>: New overload.
10287         * ui-out.c (ui_out::field_string): New overload.
10288
10289 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10290
10291         * progspace.h (struct program_space): Add constructor and
10292         destructor, initialize fields.
10293         (add_program_space): Remove.
10294         * progspace.c (add_program_space): Rename to...
10295         (program_space::program_space): ... this.
10296         (release_program_space): Rename to...
10297         (program_space::~program_space): ... this.
10298         (delete_program_space): Use delete to delete program_space.
10299         (initialize_progspace): Use new to allocate program_space.
10300         * inferior.c (add_inferior_with_spaces): Likewise.
10301         (clone_inferior_command): Likewise.
10302         * infrun.c (follow_fork_inferior): Likewise.
10303         (handle_vfork_child_exec_or_exit): Likewise.
10304
10305 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10306
10307         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10308         (delim_string_to_char_ptr_vec): Return std::vector of
10309         gdb::unique_xmalloc_ptr.
10310         (dirnames_to_char_ptr_vec_append): Take std::vector of
10311         gdb::unique_xmalloc_ptr.
10312         (dirnames_to_char_ptr_vec): Return std::vector of
10313         gdb::unique_xmalloc_ptr.
10314         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10315         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10316         (delim_string_to_char_ptr_vec): Return an std::vector of
10317         gdb::unique_xmalloc_ptr, adjust the code.
10318         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10319         gdb::unique_xmalloc_ptr, adjust the code.
10320         (dirnames_to_char_ptr_vec): Return an std::vector of
10321         gdb::unique_xmalloc_ptr, adjust the code.
10322         * auto-load.c (auto_load_safe_path_vec): Change type to
10323         std::vector of gdb::unique_xmalloc_ptr.
10324         (auto_load_expand_dir_vars): Return an std::vector of
10325         gdb::unique_xmalloc_ptr, adjust the code.
10326         (auto_load_safe_path_vec_update): Adjust.
10327         (filename_is_in_auto_load_safe_path_vec): Adjust.
10328         (auto_load_objfile_script_1): Adjust.
10329         * build-id.c (build_id_to_debug_bfd): Adjust.
10330         * linux-thread-db.c (thread_db_load_search): Adjust.
10331         * source.c (add_path): Adjust.
10332         (openp): Adjust.
10333         * symfile.c (find_separate_debug_file): Adjust.
10334         * utils.c (do_free_char_ptr_vec): Remove.
10335         (make_cleanup_free_char_ptr_vec): Remove.
10336
10337 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10338
10339         PR gdb/22907
10340         * common/pathstuff.c: Conditionally include "<windows.h>".
10341
10342 2018-03-01  Georg Sauthoff  <mail@georg.so>
10343
10344         PR gdb/22888
10345         * gcore.in: Quote variables and switch interpreter to bash.
10346
10347 2018-03-01  Tom Tromey  <tom@tromey.com>
10348
10349         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10350         assertion.  Add assertion for discriminant_index.
10351         (quirk_rust_enum): Use correct base type name in univariant case.
10352
10353 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10354
10355         * record.c (get_call_history_modifiers): Return a
10356         record_print_flags.
10357         (cmd_record_call_history): Adjust.
10358         * record-btrace.c (record_btrace_call_history): Adjust.
10359         (record_btrace_call_history_range): Adjust.
10360         (record_btrace_call_history_from): Adjust.
10361         * target-debug.h (target_debug_print_record_print_flags): New.
10362         * target-delegates.c: Re-generate.
10363         * target.c (target_call_history): Change flags type.
10364         (target_call_history_from): Likewise.
10365         (target_call_history_range): Likewise.
10366         * target.h (struct target_ops) <target_call_history>: Likewise.
10367         (target_call_history_from): Likewise.
10368         (target_call_history_range): Likewise.
10369
10370 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10371             Simon Marchi  <simon.marchi@polymtl.ca>
10372
10373         * common/common-utils.c: Include "sys/stat.h".
10374         (is_regular_file): Move here from "source.c"; change return
10375         type to "bool".
10376         * common/common-utils.h (is_regular_file): New prototype.
10377         * common/pathstuff.c (contains_dir_separator): New function.
10378         * common/pathstuff.h (contains_dir_separator): New prototype.
10379         * source.c: Don't include "sys/stat.h".
10380         (is_regular_file): Move to "common/common-utils.c".
10381
10382 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10383
10384         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10385         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10386         * auto-load.c: Include "common/pathstuff.h".
10387         * common/common-def.h (current_directory): Move here.
10388         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10389         function.
10390         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10391         prototype.
10392         * common/pathstuff.c: New file.
10393         * common/pathstuff.h: New file.
10394         * compile/compile.c: Include "common/pathstuff.h".
10395         * defs.h (current_directory): Move to "common/common-defs.h".
10396         * dwarf2read.c: Include "common/pathstuff.h".
10397         * exec.c: Likewise.
10398         * guile/scm-safe-call.c: Likewise.
10399         * linux-thread-db.c: Likewise.
10400         * main.c: Likewise.
10401         * nto-tdep.c: Likewise.
10402         * objfiles.c: Likewise.
10403         * source.c: Likewise.
10404         * symtab.c: Likewise.
10405         * utils.c: Include "common/pathstuff.h".
10406         (gdb_realpath): Move to "common/pathstuff.c".
10407         (gdb_realpath_keepfile): Likewise.
10408         (gdb_abspath): Likewise.
10409         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10410         (gdb_realpath_keepfile): Likewise.
10411         (gdb_abspath): Likewise.
10412
10413 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10414
10415         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10416         wildcard process pid for super_resume for kernels with a
10417         specific bug.
10418
10419 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10420
10421         * compile/compile.c (get_args): Add additional comments
10422         explaining function.
10423
10424 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10425             Tom Tromey  <tom@tromey.com>
10426
10427         * target.h (memory_write_request_s): Remove typedef.  Don't define
10428         VEC.
10429         (target_write_memory_blocks): Change argument to std::vector.
10430         (struct memory_write_request): Add constructor.
10431         * target-memory.c (compare_block_starting_address): Return bool.
10432         Change argument types.
10433         (claim_memory): Change arguments to use std::vector.
10434         (split_regular_and_flash_blocks, blocks_to_erase)
10435         (compute_garbled_blocks): Likewise.
10436         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10437         (target_write_memory_blocks): Change argument to std::vector.
10438         * symfile.c (struct load_section_data): Add constructor and
10439         destructor.  Use std::vector for "requests".
10440         (struct load_progress_data): Add initializers.
10441         (load_section_callback): Update.  Use "new".
10442         (clear_memory_write_data): Remove.
10443         (generic_load): Update.
10444
10445 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10446
10447         * arch/aarch64.h: Use common/tdesc.h.
10448
10449 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10450
10451         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10452         architecture with a 64-bit ABI.
10453
10454 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10455
10456         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10457         ahead of target description loading.
10458
10459 2018-02-26  Tom Tromey  <tom@tromey.com>
10460
10461         * stack.c (backtrace_command_1): Update.
10462         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10463         of "flags".
10464         * python/py-framefilter.c (py_print_frame)
10465         (gdbpy_apply_frame_filter): Change type of "flags".
10466         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10467         of "flags".
10468         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10469         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10470         * extension.h (enum frame_filter_flag): Rename from
10471         frame_filter_flags.
10472         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10473         (apply_ext_lang_frame_filter): Change type of "flags".
10474         * extension.c (apply_ext_lang_frame_filter): Change type of
10475         "flags".
10476         * extension-priv.h (struct extension_language_ops)
10477         <apply_frame_filter>: Change type of "flags".
10478
10479 2018-02-26  Tom Tromey  <tom@tromey.com>
10480
10481         PR python/16497:
10482         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10483         off-by-one in py_end computation.
10484         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10485         PRINT_MORE_FRAMES.
10486         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10487         constant.
10488
10489 2018-02-26  Tom Tromey  <tom@tromey.com>
10490
10491         * dwarf2read.c (struct variant_field): New.
10492         (struct nextfield) <variant>: New field.
10493         (dwarf2_add_field): Handle DW_TAG_variant_part.
10494         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10495         discriminated union.
10496         (read_structure_type): Handle DW_TAG_variant_part.
10497         (handle_struct_member_die): New function, extracted from
10498         process_structure_scope.  Handle DW_TAG_variant.
10499         (process_structure_scope): Handle discriminated unions.  Call
10500         handle_struct_member_die.
10501
10502 2018-02-26  Tom Tromey  <tom@tromey.com>
10503
10504         * rust-lang.h (rust_last_path_segment): Declare.
10505         * rust-lang.c (rust_last_path_segment): Now public.  Change
10506         contract.
10507         (struct disr_info): Remove.
10508         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10509         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10510         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10511         (rust_enum_p, rust_enum_variant): New function.
10512         (rust_underscore_fields): Remove "offset" parameter.
10513         (rust_print_enum): New function.
10514         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10515         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10516         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10517         enums.
10518         (rust_internal_print_type): New function, from rust_print_type.
10519         Remove enum code.
10520         (rust_print_type): Call rust_internal_print_type.
10521         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10522         Update enum handling.
10523         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10524         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10525         (rust_union_quirks): New functions.
10526         (process_full_comp_unit, process_full_type_unit): Call
10527         rust_union_quirks.
10528         (process_structure_scope): Update rust_unions if necessary.
10529
10530 2018-02-26  Tom Tromey  <tom@tromey.com>
10531
10532         * value.h (value_union_variant): Declare.
10533         * valops.c (value_union_variant): New function.
10534         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10535         (struct discriminant_info): New.
10536         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10537         enumerator.
10538         (struct main_type) <flag_discriminated_union>: New field.
10539
10540 2018-02-26  Tom Tromey  <tom@tromey.com>
10541
10542         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10543         unittests/unpack-selftests.c.
10544         * unittests/unpack-selftests.c: New file.
10545         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10546
10547 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10548
10549         * dwarf2read.c (struct partial_die_info) <read>: New method.
10550         (read_partial_die): Remove the declaration.
10551         (load_partial_dies): Update.
10552         (partial_die_info::partial_die_info):
10553         (read_partial_die): Change it to partial_die_info::read.
10554
10555 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10556
10557         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10558         (fixup_partial_die): Remove declaration.
10559         (scan_partial_symbols): Update.
10560         (partial_die_parent_scope): Likewise.
10561         (partial_die_full_name): Likewise.
10562         (fixup_partial_die): Change it to partial_die_info::fixup.
10563
10564 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10565
10566         * dwarf2read.c (read_partial_die): Update the declaration.
10567         (load_partial_dies): Caller update.
10568         (read_partial_die): Remove one argument abbrev_len.
10569
10570 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10571
10572         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10573         assignment operator.
10574         (load_partial_dies): Use ctor and copy ctor.
10575         (read_partial_die): Update.
10576         (dwarf2_cu::find_partial_die): Use ctor.
10577
10578 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10579
10580         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10581         (find_partial_die_in_comp_unit): Change it to
10582         dwarf2_cu::find_partial_die.
10583         (find_partial_die): Update.
10584
10585 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10586
10587         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10588         is NULL.
10589
10590 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10591
10592         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10593
10594 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10595
10596         * arch/amd64.h: Use common/tdesc.h.
10597         * arch/i386.c: Likewise.
10598         * arch/i386.h: Likewise.
10599         * arch/tic6x.c: Likewise.
10600         * arch/tdesc.h: Move file from here...
10601         * common/tdesc.h: ...to here.
10602         * features/aarch64-core.c: Regenerate.
10603         * features/aarch64-fpu.c: Regenerate.
10604         * features/i386/32bit-avx.c: Regenerate.
10605         * features/i386/32bit-avx512.c: Regenerate.
10606         * features/i386/32bit-core.c: Regenerate.
10607         * features/i386/32bit-linux.c: Regenerate.
10608         * features/i386/32bit-mpx.c: Regenerate.
10609         * features/i386/32bit-pkeys.c: Regenerate.
10610         * features/i386/32bit-sse.c: Regenerate.
10611         * features/i386/64bit-avx.c: Regenerate.
10612         * features/i386/64bit-avx512.c: Regenerate.
10613         * features/i386/64bit-core.c: Regenerate.
10614         * features/i386/64bit-linux.c: Regenerate.
10615         * features/i386/64bit-mpx.c: Regenerate.
10616         * features/i386/64bit-pkeys.c: Regenerate.
10617         * features/i386/64bit-segments.c: Regenerate.
10618         * features/i386/64bit-sse.c: Regenerate.
10619         * features/i386/x32-core.c: Regenerate.
10620         * features/tic6x-c6xp.c: Regenerate.
10621         * features/tic6x-core.c: Regenerate.
10622         * features/tic6x-gp.c: Regenerate.
10623         * target-descriptions.c: Use common/tdesc.h.
10624         * target-descriptions.h: Likewise.
10625
10626 2018-02-24  Tom Tromey  <tom@tromey.com>
10627
10628         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10629         (try_thread_db_load_from_dir, thread_db_load_search): Use
10630         std::string.
10631         (info_auto_load_libthread_db_compare): Return bool.  Change
10632         argument types.
10633         (info_auto_load_libthread_db): Use std::vector, std::string.
10634         Remove cleanups.
10635
10636 2018-02-24  Tom Tromey  <tom@tromey.com>
10637
10638         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10639         std::string.
10640         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10641         std::string*.
10642         * gdbarch.c: Rebuild.
10643         * gdbarch.h: Rebuild.
10644         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10645         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10646         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10647         std::string*.
10648
10649 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10650
10651         * gdbtypes.h (sect_offset): Change type to uint64_t.
10652         (sect_offset_str): New function.
10653         * dwarf2read.c (create_addrmap_from_aranges): Use
10654         sect_offset_str.
10655         (error_check_comp_unit_head): Likewise.
10656         (create_debug_type_hash_table): Likewise.
10657         (read_cutu_die_from_dwo): Likewise.
10658         (init_cutu_and_read_dies): Likewise.
10659         (init_cutu_and_read_dies_no_follow): Likewise.
10660         (process_psymtab_comp_unit_reader): Likewise.
10661         (partial_die_parent_scope): Likewise.
10662         (peek_die_abbrev): Likewise.
10663         (process_queue): Likewise.
10664         (dwarf2_physname): Likewise.
10665         (read_namespace_alias): Likewise.
10666         (read_import_statement): Likewise.
10667         (create_dwo_cu_reader): Likewise.
10668         (create_cus_hash_table): Likewise.
10669         (lookup_dwo_cutu): Likewise.
10670         (inherit_abstract_dies): Likewise.
10671         (read_func_scope): Likewise.
10672         (read_call_site_scope): Likewise.
10673         (dwarf2_add_member_fn): Likewise.
10674         (read_common_block): Likewise.
10675         (read_module_type): Likewise.
10676         (read_typedef): Likewise.
10677         (read_subrange_type): Likewise.
10678         (load_partial_dies): Likewise.
10679         (read_partial_die): Likewise.
10680         (find_partial_die): Likewise.
10681         (read_str_index): Likewise.
10682         (dwarf2_string_attr): Likewise.
10683         (build_error_marker_type): Likewise.
10684         (lookup_die_type): Likewise.
10685         (dump_die_shallow): Likewise.
10686         (follow_die_ref): Likewise.
10687         (dwarf2_fetch_die_loc_sect_off): Likewise.
10688         (dwarf2_fetch_constant_bytes): Likewise.
10689         (follow_die_sig): Likewise.
10690         (get_signatured_type): Likewise.
10691         (get_DW_AT_signature_type): Likewise.
10692         (dwarf2_find_containing_comp_unit): Likewise.
10693         (set_die_type): Likewise.
10694
10695 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10696
10697         * arch/aarch64.c: Include "common-defs.h".
10698         * arch/amd64.c: Likewise.
10699         * arch/i386.c: Likewise.
10700
10701 2018-02-21  Tom Tromey  <tom@tromey.com>
10702
10703         * value.h: (extract_field_op): Update.
10704         * eval.c (extract_field_op): Return a const char *.
10705         * expression.h (parse_expression_for_completion): Update.
10706         * completer.c (complete_expression): Update.
10707         (add_struct_fields): Make fieldname const.
10708         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10709         (mark_completion_tag, parse_exp_in_context_1): Update.
10710         (parse_expression_for_completion): Change "name" to
10711         unique_xmalloc_ptr*.
10712
10713 2018-02-21  Tom Tromey  <tom@tromey.com>
10714
10715         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10716
10717 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10718
10719         * avr-tdep.c (avr_read_pc): Change parameter type to
10720         readable_regcache.
10721         * gdbarch.sh (read_pc): Likewise.
10722         * gdbarch.c: Re-generated.
10723         * gdbarch.h: Re-generated.
10724         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10725         readable_regcache.
10726         * ia64-tdep.c (ia64_read_pc): Likewise.
10727         * mips-tdep.c (mips_read_pc): Likewise.
10728         * spu-tdep.c (spu_read_pc): Likewise.
10729
10730 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10731
10732         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10733         * regcache-dump.c: New file.
10734         * regcache.c: Move register_dump to regcache-dump.c.
10735         (maintenance_print_registers): Likewise.
10736         (maintenance_print_raw_registers): Likewise.
10737         (maintenance_print_cooked_registers): Likewise.
10738         (maintenance_print_register_groups): Likewise.
10739         (maintenance_print_remote_registers): Likewise.
10740         (_initialize_regcache): Likewise.
10741         * regcache.h (register_dump): Moved from regcache.c.
10742
10743 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10744
10745         * regcache.c (regcache::regcache): Update.
10746         (regcache::invalidate): Move it to detached_regcache::invalidate.
10747         (get_thread_arch_aspace_regcache): Update.
10748         (regcache::raw_update): Update.
10749         (regcache::cooked_read): Remove some code.
10750         (regcache::cooked_read_value): Likewise.
10751         (regcache::raw_write): Remove assert on m_readonly_p.
10752         (regcache::raw_supply_integer): Move it to
10753         detached_regcache::raw_supply_integer.
10754         (regcache::raw_supply_zeroed): Likewise.
10755         * regcache.h (detached_regcache) <raw_supply_integer>: New
10756         declaration.
10757         <raw_supply_zeroed, invalidate>: Likewise.
10758         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10759         <invalidate>: Likewise.
10760         <m_readonly_p>: Removed.
10761
10762 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10763
10764         * infcmd.c (get_return_value): Let stop_regs point to
10765         get_current_regcache.
10766         * regcache.c (regcache::regcache): Remove.
10767         (register_dump_reg_buffer): New class.
10768         (regcache_print): Adjust.
10769         * regcache.h (regcache): Remove constructors.
10770
10771 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10772
10773         * regcache.c (class register_dump): New class.
10774         (register_dump_regcache, register_dump_none): New class.
10775         (register_dump_remote, register_dump_groups): New class.
10776         (regcache_print): Update.
10777         * regcache.h (regcache_dump_what): Move it to regcache.c.
10778         (regcache) <dump>: Remove.
10779
10780 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10781
10782         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10783          reg_buffer_rw *.
10784         (jit_unwind_reg_set_impl): Call raw_supply.
10785         (jit_frame_sniffer): Use reg_buffer_rw.
10786         * record-full.c (record_full_core_regbuf): Change its type.
10787         (record_full_core_open_1): Use reg_buffer_rw.
10788         (record_full_close): Likewise.
10789         (record_full_core_fetch_registers): Use regcache->raw_supply.
10790         (record_full_core_store_registers): Likewise.
10791         * regcache.c (regcache::get_register_status): Move it to
10792         reg_buffer.
10793         (regcache_raw_set_cached_value): Remove.
10794         (regcache::raw_set_cached_value): Remove.
10795         (regcache::raw_write): Call raw_supply.
10796         (regcache::raw_supply): Move it to reg_buffer_rw.
10797         * regcache.h (regcache_raw_set_cached_value): Remove.
10798         (reg_buffer_rw): New class.
10799
10800 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10801
10802         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10803         readonly_detached_regcache.
10804         (dummy_frame_prev_register): Use regcache->cooked_read.
10805         * frame.c (frame_save_as_regcache): Change return type.
10806         (frame_pop): Update.
10807         * frame.h (frame_save_as_regcache): Update declaration.
10808         * inferior.h (get_infcall_suspend_state_regcache): Update
10809         declaration.
10810         * infrun.c (infcall_suspend_state) <registers>: use
10811         readonly_detached_regcache.
10812         (save_infcall_suspend_state): Don't use regcache_dup.
10813         (get_infcall_suspend_state_regcache): Change return type.
10814         * linux-fork.c (struct fork_info) <savedregs>: Change to
10815         readonly_detached_regcache.
10816         <pc>: New field.
10817         (fork_save_infrun_state): Don't use regcache_dup.
10818         (info_checkpoints_command): Adjust.
10819         * mi/mi-main.c (register_changed_p): Update declaration.
10820         (mi_cmd_data_list_changed_registers): Use
10821         readonly_detached_regcache.
10822         (register_changed_p): Change parameter type to
10823         readonly_detached_regcache.
10824         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10825         readonly_detached_regcache.
10826         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10827         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10828         New.
10829         (regcache::save): Move it to reg_buffer.
10830         (regcache::restore): Change parameter type.
10831         (regcache_dup): Remove.
10832         * regcache.h (reg_buffer) <save>: New method.
10833         (readonly_detached_regcache): New class.
10834         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10835         readonly_detached_regcache.
10836         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10837
10838 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10839
10840         * frame.c (frame_save_as_regcache): Use regcache method save.
10841         (frame_pop): Use regcache method restore.
10842         * infrun.c (restore_infcall_suspend_state): Likewise.
10843         * linux-fork.c (fork_load_infrun_state): Likewise.
10844         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10845         save.
10846         * regcache.c (regcache_save): Remove.
10847         (regcache::restore): More asserts.
10848         (regcache_cpy): Remove.
10849         * regcache.h (regcache_save): Remove the declaration.
10850         (regcache::restore): Move from private to public.
10851         Remove the friend declaration of regcache_cpy.
10852         (regcache_cpy): Remove declaration.
10853
10854 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10855
10856         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10857         parameter type to 'readable_regcache *'.
10858         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10859         * arm-tdep.c (arm_neon_quad_read): Likewise.
10860         (arm_pseudo_read): Likewise.
10861         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10862         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10863         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10864         * gdbarch.c: Re-generated.
10865         * gdbarch.h: Re-generated.
10866         * gdbarch.sh (pseudo_register_read): Change parameter type to
10867         'readable_regcache *'.
10868         (pseudo_register_read_value): Likewise.
10869         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10870         (h8300_pseudo_register_read): Likewise.
10871         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10872         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10873         (i386_pseudo_register_read_into_value): Likewise.
10874         (i386_pseudo_register_read_value): Likewise.
10875         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10876         declaration.
10877         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10878         * m32c-tdep.c (m32c_raw_read): Likewise.
10879         (m32c_read_flg): Likewise.
10880         (m32c_banked_register): Likewise.
10881         (m32c_banked_read): Likewise.
10882         (m32c_sb_read): Likewise.
10883         (m32c_part_read): Likewise.
10884         (m32c_cat_read): Likewise.
10885         (m32c_r3r2r1r0_read): Likewise.
10886         (m32c_pseudo_register_read): Likewise.
10887         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10888         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10889         (mep_pseudo_cr64_read): Likewise.
10890         (mep_pseudo_register_read): Likewise.
10891         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10892         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10893         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10894         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10895         (regcache::cooked_read): Likewise.
10896         (regcache::cooked_read_value): Likewise.
10897         (regcache_cooked_read_signed):
10898         (regcache::cooked_read): Likewise.
10899         * regcache.h (readable_regcache): New class.
10900         (regcache): Inherit readable_regcache.  Move some methods to
10901         readable_regcache.
10902         * rl78-tdep.c (rl78_pseudo_register_read): Change
10903         parameter type to 'readable_regcache *'.
10904         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10905         (e500_pseudo_register_read): Change parameter type to
10906         'readable_regcache *'.
10907         (dfp_pseudo_register_read): Likewise.
10908         (vsx_pseudo_register_read): Likewise.
10909         (efpr_pseudo_register_read): Likewise.
10910         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10911         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10912         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10913         (sh64_pseudo_register_read): Likewise.
10914         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10915         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10916         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10917         (spu_pseudo_register_read): Likewise.
10918         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10919         (xtensa_pseudo_register_read): Likewise.
10920
10921 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10922
10923         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10924         (regcache::arch): Move it to reg_buffer::arch.
10925         (regcache::register_buffer): Likewise.
10926         (regcache::assert_regnum): Likewise.
10927         (regcache::num_raw_registers): Likewise.
10928         * regcache.h (reg_buffer): New class.
10929         (regcache): Inherit reg_buffer.
10930
10931 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10932
10933         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10934         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10935
10936 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
10937
10938         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10939
10940 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
10941
10942         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10943         (SFILES): Remove common/*.c files.
10944         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10945         * common/common.host: Add common reference.
10946         * configure.ac: Likewise.
10947         * configure: Regenerate.
10948
10949 2018-02-16  Yao Qi  <yao.qi@linaro.org>
10950
10951         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10952         (block_initialize_namespace): Use new.
10953         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10954         (dwarf2_free_objfile): Use delete.
10955         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10956         (copy_type_recursive): Use new.
10957         * gdb_obstack.h (allocate_on_obstack): New.
10958
10959 2018-02-15  Yao Qi  <yao.qi@linaro.org>
10960
10961         PR gdb/22849
10962         * inferior.c (exit_inferior_1): Reset inf->control.
10963
10964 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
10965
10966         * ada-lang.c (ada_to_fixed_value_create): Delete advance
10967         declaration.
10968
10969 2018-02-14  Pedro Alves  <palves@redhat.com>
10970
10971         * frame-unwind.c (frame_unwind_try_unwinder): Always call
10972         frame_cleanup_after_sniffer on exception.
10973
10974 2018-02-14  Tom Tromey  <tom@tromey.com>
10975
10976         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10977         const.
10978         (solib_bfd_open): Make pathname const.
10979         * solib.c (solib_bfd_open): Make pathname const.
10980         * solib-spu.c (spu_bfd_fopen): Make name const.
10981         (spu_bfd_open): Make pathname const.
10982         * solib-darwin.c (darwin_bfd_open): Make pathname const.
10983         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10984
10985 2018-02-14  Tom Tromey  <tom@tromey.com>
10986
10987         * symfile.c (symfile_bfd_open): Update.
10988         * source.h (openp, source_full_path_of, find_and_open_source):
10989         Change argument type to unique_xmalloc_ptr.
10990         * source.c (openp): Take a unique_xmalloc_ptr.
10991         (source_full_path_of, find_and_open_source): Likewise.
10992         (open_source_file, symtab_to_fullname): Update.
10993         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10994         unique_xmalloc_ptr.
10995         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10996         (exec_file_find): Update.
10997         * psymtab.c (psymtab_to_fullname): Update.
10998         * nto-tdep.h (nto_find_and_open_solib): Update.
10999         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11000         unique_xmalloc_ptr.
11001         * exec.c (exec_file_attach): Update.
11002         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11003         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11004
11005 2018-02-14  Tom Tromey  <tom@tromey.com>
11006
11007         * solib.c: Include source.h.
11008         * nto-tdep.c: Include source.h.
11009         * mi/mi-cmd-env.c: Include source.h.
11010         * infcmd.c: Include source.h.
11011         * exec.c: Include source.h.
11012         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11013         (add_path, directory_switch, source_path, init_source_path): Move
11014         declarations...
11015         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11016         (add_path, directory_switch, source_path, init_source_path):
11017         ...here.
11018
11019 2018-02-14  Tom Tromey  <tom@tromey.com>
11020
11021         * solist.h (exec_file_find, solib_find): Return
11022         unique_xmalloc_ptr.
11023         (solib_bfd_fopen): Take a const char *.
11024         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11025         (exec_file_find, solib_find): Likewise.
11026         (solib_bfd_fopen): Do not take ownership of "pathname".
11027         (solib_bfd_open): Use unique_xmalloc_ptr.
11028         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11029         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11030         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11031         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11032
11033 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11034
11035         * ada-lang.c (name_match_type_from_name): Remove reference to
11036         ada_name_for_lookup in function's documentation.
11037         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11038
11039 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11040
11041         * defs.h (enum openp_flags): New enum.
11042         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11043         Move to enum openp_flags.
11044         (openp_flags): New enum flags.
11045         (openp): Change parameter type to openp_flags.
11046         * source.c (openp): Change parameter type to openp_flags.
11047         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11048         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11049
11050 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11051
11052         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11053         per-command.
11054
11055 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11056
11057         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11058         into...
11059         (class dwarf2_queue_guard): ...the destructor of this new class.
11060         (dw2_do_instantiate_symtab): Create instance of the new class
11061         dwarf2_queue_guard, remove cleanup.
11062
11063 2018-02-09  Tom Tromey  <tom@tromey.com>
11064
11065         * source.c (find_source_lines): Don't reference past the end of
11066         the vector.
11067
11068 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11069
11070         * remote.c (remote_btrace_maybe_reopen): Change error message.
11071         * btrace.c (btrace_enable): Likewise.
11072         (parse_xml_btrace): Likewise.
11073         (parse_xml_btrace_conf): Likewise.
11074
11075 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11076
11077         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11078         (linux_enable_pt, linux_enable_bts): Call
11079         diagnose_perf_event_open_fail.
11080
11081 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11082
11083         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11084         Remove parameter and change return type.  Update callers.  Move it.
11085         (linux_enable_bts, linux_enable_pt): Improve error message.
11086         (linux_enable_pt): Remove zero buffer size check.
11087         (linux_enable_btrace): Improve error messages.  Remove NULL return
11088         check.
11089
11090 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11091
11092         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11093         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11094         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11095         (linux_supports_pt, linux_supports_btrace): Remove.
11096         (linux_enable_bts): Call cpu_supports_bts.
11097         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11098         * remote.c (remote_supports_btrace): Remove.
11099         (init_remote_ops): Remove remote_supports_btrace.
11100         * target-delegates.c: Regenerated.
11101         * target.c (target_supports_btrace): Remove.
11102         * target.h (target_ops) <to_supports_btrace>: Remove
11103         (target_supports_btrace): Remove.
11104         * x86-linux-nat.c (x86_linux_create_target): Remove
11105         linux_supports_btrace.
11106
11107 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11108
11109         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11110         btrace failed.
11111         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11112         exception and use message in own exception.
11113
11114 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11115
11116         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11117         (perf_event_pt_event_type): Use gdb_file_up.
11118         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11119         scoped_fd, and scoped_mmap.
11120
11121 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11122
11123         * common/scoped_mmap.h: New.
11124         * unittests/scoped_mmap-selftest.c: New.
11125         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11126         unittests/scoped_mmap-selftest.c.
11127
11128 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11129
11130         * common/scoped_fd.h: New.
11131         * unittests/scoped_fd-selftest.c: New.
11132         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11133         unittests/scoped_fd-selftest.c.
11134
11135 2018-02-09  Tom Tromey  <tom@tromey.com>
11136
11137         * auto-load.c (auto_load_section_scripts): Use
11138         gdb::unique_xmalloc_ptr.
11139
11140 2018-02-09  Tom Tromey  <tom@tromey.com>
11141
11142         * auto-load.c (execute_script_contents): Use std::string.
11143
11144 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11145
11146         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11147         Python function, rather than a new command.
11148
11149 2018-02-08  Tom Tromey  <tom@tromey.com>
11150
11151         * solib.c (solib_find_1): Use std::string.
11152         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11153
11154 2018-02-08  Tom Tromey  <tom@tromey.com>
11155
11156         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11157
11158 2018-02-08  Tom Tromey  <tom@tromey.com>
11159
11160         * source.c (find_source_lines): Use gdb::def_vector.
11161
11162 2018-02-08  Tom Tromey  <tom@tromey.com>
11163
11164         * macrocmd.c (struct temporary_macro_definition): New.
11165         (macro_define_command): Use temporary_macro_definition.  Remove
11166         cleanups.
11167         (free_macro_definition_ptr): Remove.
11168
11169 2018-02-08  Tom Tromey  <tom@tromey.com>
11170
11171         * macroexp.c (maybe_expand): Use std::string.
11172
11173 2018-02-08  Tom Tromey  <tom@tromey.com>
11174
11175         * macroexp.c (struct macro_buffer): Add initializers for some
11176         members.
11177         (init_buffer, init_shared_buffer, free_buffer)
11178         (free_buffer_return_text): Remove.
11179         (macro_buffer): New constructors.
11180         (~macro_buffer): New destructor.
11181         (macro_buffer::set_shared): New method.
11182         (macro_buffer::resize_buffer, macro_buffer::appendc)
11183         (macro_buffer::appendmem): Now methods, not free functions.
11184         (set_token, append_tokens_without_splicing, stringify)
11185         (macro_stringify): Update.
11186         (gather_arguments): Change return type.  Remove argc_p argument,
11187         add args_ptr argument.  Use std::vector.
11188         (substitute_args): Remove argc argument.  Accept std::vector.
11189         (expand): Update.  Use std::vector.
11190         (scan, macro_expand, macro_expand_next): Update.
11191
11192 2018-02-08  Tom Tromey  <tom@tromey.com>
11193
11194         * symtab.c (default_collect_symbol_completion_matches_break_on):
11195         Use unique_xmalloc_ptr.
11196         * macroscope.h: (sal_macro_scope, user_macro_scope)
11197         (default_macro_scope): Return unique_xmalloc_ptr.
11198         * macroscope.c (sal_macro_scope, user_macro_scope)
11199         (default_macro_scope): Return unique_xmalloc_ptr.
11200         * macroexp.h (macro_expand, macro_expand_once): Return
11201         unique_xmalloc_ptr.
11202         * macroexp.c (macro_expand, macro_expand_once): Return
11203         unique_xmalloc_ptr.
11204         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11205         (info_macro_command, info_macros_command): Use
11206         unique_xmalloc_ptr.
11207         * compile/compile-c-support.c (write_macro_definitions): Use
11208         unique_xmalloc_ptr.
11209         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11210
11211 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11212
11213         * value.c (value_static_field): Assign field type instead of
11214         containing type when returning an optimized out value.
11215
11216 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11217
11218         * ft32-tdep.c (ft32_read_pc): Remove.
11219         (ft32_write_pc): Remove.
11220         (ft32_gdbarch_init): Update.
11221         * m32r-tdep.c (m32r_read_pc): Remove.
11222         (m32r_gdbarch_init): Update.
11223         * mep-tdep.c (mep_read_pc): Remove.
11224         (mep_gdbarch_init): Update.
11225         * microblaze-tdep.c (microblaze_write_pc): Remove.
11226         (microblaze_gdbarch_init): Update.
11227         * mn10300-tdep.c (mn10300_read_pc): Remove.
11228         (mn10300_write_pc): Remove.
11229         (mn10300_gdbarch_init): Update.
11230         * moxie-tdep.c (moxie_read_pc): Remove.
11231         (moxie_write_pc): Remove.
11232         (moxie_gdbarch_init): Update.
11233
11234 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11235
11236         * expprint.c (print_subexp_standard): Handle
11237         OP_F77_UNDETERMINED_ARGLIST.
11238         (dump_subexp_body_standard): Likewise.
11239
11240 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11241
11242         * target-descriptions.c (tdesc_element_visitor) Add empty
11243         implementations.
11244         (tdesc_type): Move make_gdb_type from here.
11245         (tdesc_type_builtin): Likewise.
11246         (tdesc_type_vector): Likewise.
11247         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11248         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11249         (make_gdb_type_union): Likewise.
11250         (make_gdb_type_flags): Likewise.
11251         (make_gdb_type_enum): Likewise.
11252         (make_gdb_type): New function.
11253         (tdesc_register_type): Use static make_gdb_type.
11254
11255 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11256
11257         * infcmd.c (default_print_one_register_info): Align natural-format
11258         column values consistently one under another.
11259         (pad_to_column): New function.
11260
11261 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11262
11263         * dwarf2read.c (dwarf2_physname): Move commment.
11264
11265 2018-02-01  Leszek Swirski  <leszeks@google.com>
11266
11267         * varobj.c (varobj_formatted_print_options): Allow recursive
11268         pretty printing if pretty printing is enabled.
11269
11270 2018-02-01  Leszek Swirski  <leszeks@google.com>
11271
11272         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11273         names after a structop as a filename.
11274
11275 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11276
11277         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11278         (arm_record_coproc_data_proc): Likewise.
11279
11280 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11281
11282         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11283
11284 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11285
11286         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11287         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11288
11289 2018-01-31  Pedro Alves  <palves@redhat.com>
11290
11291         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11292         * inflow.c (child_terminal_save_inferior): Wrap reference to
11293         tcgetpgrp in HAVE_TERMIOS_H.
11294         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11295         _WIN32.
11296         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11297         always iterate over all inferiors.
11298         (gdbsim_cntrl_c): Adjust.
11299         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11300
11301 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11302
11303         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11304         index type is objfile-owned if the element type is as well.
11305
11306 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11307
11308         GDB 8.1 released.
11309
11310 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11311
11312         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11313         "features/s390x-linux64.c".
11314         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11315         s390_linux32 and s390x_linux64.
11316         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11317         default tdesc.
11318         * s390-tdep.c: Include "features/s390-linux32.c" and
11319         "features/s390x-linux64.c".
11320         (s390_tdesc_valid): Add check for tdesc_has_registers.
11321         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11322         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11323         tdesc_s390x_linux64.
11324         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11325         tdesc_s390x_linux64 to...
11326         * s390-tdep.h: ...here.
11327
11328 2018-01-30  Pedro Alves  <palves@redhat.com>
11329
11330         PR gdb/13211
11331         * config.in, configure: Regenerate.
11332         * configure.ac: Check for getpgid.
11333         * go32-nat.c (go32_pass_ctrlc): New.
11334         (go32_target): Install it.
11335         * inf-child.c (inf_child_target): Install
11336         child_terminal_save_inferior, child_pass_ctrlc and
11337         child_interrupt.
11338         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11339         (inf_ptrace_target): No longer install it.
11340         * infcmd.c (interrupt_target_1): Adjust.
11341         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11342         (child_interrupt): Declare.
11343         (inferior::terminal_state): New.
11344         * inflow.c (struct terminal_info): Update comments.
11345         (inferior_process_group): Delete.
11346         (terminal_is_ours): Delete.
11347         (gdb_tty_state): New.
11348         (child_terminal_init): Adjust.
11349         (is_gdb_terminal, sharing_input_terminal_1)
11350         (sharing_input_terminal): New functions.
11351         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11352         Set the process's actual process group in the foreground if
11353         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11354         mark terminal as the inferior's if not sharing GDB's terminal.
11355         Don't check attach_flag.
11356         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11357         pass down a target_terminal_state.
11358         (child_terminal_save_inferior): New, factored out from ...
11359         (child_terminal_ours_1): ... this.  Handle
11360         target_terminal_state::is_ours_for_output.
11361         (child_interrupt, child_pass_ctrlc): New.
11362         (inflow_inferior_exit): Clear the inferior's terminal_state.
11363         (copy_terminal_info): Copy the inferior's terminal state.
11364         (_initialize_inflow): Remove reference to terminal_is_ours.
11365         * inflow.h (inferior_process_group): Delete.
11366         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11367         * procfs.c (procfs_target): Don't install procfs_interrupt.
11368         (procfs_interrupt): Delete.
11369         * remote.c (remote_serial_quit_handler): Adjust.
11370         (remote_interrupt): Remove ptid parameter.  Adjust.
11371         * target-delegates.c: Regenerate.
11372         * target.c: Include "terminal.h".
11373         (target_terminal::terminal_state): Rename to ...
11374         (target_terminal::m_terminal_state): ... this.
11375         (target_terminal::init): Adjust.
11376         (target_terminal::inferior): Adjust to per-inferior
11377         terminal_state.
11378         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11379         (target_terminal::ours, target_terminal::ours_for_output): Use
11380         target_terminal_is_ours_kind.
11381         (target_interrupt): Remove ptid parameter.  Adjust.
11382         (default_target_pass_ctrlc): Adjust.
11383         * target.h (target_ops::to_terminal_save_inferior): New field.
11384         (target_ops::to_interrupt): Remove ptid_t parameter.
11385         (target_interrupt): Remove ptid_t parameter.  Update comment.
11386         (target_pass_ctrlc): Update comment.
11387         * target/target.h (target_terminal_state): New scoped enum,
11388         factored out of ...
11389         (target_terminal::terminal_state): ... here.
11390         (target_terminal::inferior): Update comments.
11391         (target_terminal::restore_inferior): New.
11392         (target_terminal::is_inferior, target_terminal::is_ours)
11393         (target_terminal::is_ours_for_output): Adjust.
11394         (target_terminal::scoped_restore_terminal_state): Adjust to
11395         rename, and call restore_inferior() instead of inferior().
11396         (target_terminal::scoped_restore_terminal_state::m_state): Change
11397         type.
11398         (target_terminal::terminal_state): Rename to ...
11399         (target_terminal::m_terminal_state): ... this and change type.
11400
11401 2018-01-30  Pedro Alves  <palves@redhat.com>
11402
11403         * linux-nat.c (wait_for_signal): New function.
11404         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11405         directly.
11406         (async_terminal_is_ours)
11407         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11408         (linux_nat_add_target): Don't override
11409         to_terminal_inferior/to_terminal_ours.
11410
11411 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11412
11413         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11414
11415 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11416
11417         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11418         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11419         dwarf2_per_objfile_free here.
11420         (dwarf2_per_objfile_free): Remove.
11421         (_initialize_dwarf2_read): Don't register
11422         dwarf2_per_objfile_free as a registry cleanup.
11423
11424 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11425
11426         Avoid compilation errors in MinGW native builds
11427
11428         The error is triggered by including python-internal.h, and the
11429         error message is:
11430
11431              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11432                       from build-gnulib/import/math.h:27,
11433                       from d:/usr/Python26/include/pyport.h:235,
11434                       from d:/usr/Python26/include/Python.h:58,
11435                       from python/python-internal.h:94,
11436                       from python/py-arch.c:24:
11437              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11438         using ::hypot;
11439                 ^~~~~
11440
11441         This happens because Python headers define 'hypot' to expand t
11442         '_hypot' in the Windows builds.
11443         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11444         'hypoth'.  This avoids a compilation error.
11445
11446 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11447
11448         * MAINTAINERS (Write After Approval): Fix ordering.
11449
11450 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11451
11452         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11453
11454 2018-01-26  Alan Modra  <amodra@gmail.com>
11455
11456         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11457         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11458         Remove nop.  Make const.  Comment.
11459         (powerpc32_plt_stub_so_2): New.
11460         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11461         Correct count.  Update uses.
11462         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11463         Move common code reading PLT entry word.  Correct
11464         powerpc32_plt_stub PLT address calculation.
11465         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11466         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11467         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11468         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11469         (ppc64_standard_linkage8): Likewise.
11470         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11471         Correct insns description.
11472         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11473
11474 2018-01-24  Pedro Alves  <palves@redhat.com>
11475
11476         GCC PR libstdc++/83906
11477         * gdbtypes.c (operator==(const dynamic_prop &,
11478         const dynamic_prop &)): New.
11479         (operator==(const range_bounds &, const range_bounds &)): New.
11480         (check_types_equal): Use them instead of memcmp.
11481         * gdbtypes.h (operator==(const dynamic_prop &,
11482         const dynamic_prop &)): Declare.
11483         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11484         (operator==(const range_bounds &, const range_bounds &)): Declare.
11485         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11486
11487 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11488
11489         * s390-linux-tdep.c (s390_record_address_mask)
11490         (s390_record_calc_disp_common, s390_record_calc_disp)
11491         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11492         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11493         (s390_process_record): Move to s390-tdep.c.
11494         (s390_linux_init_abi_any): Adjust.
11495         * s390-tdep.c (s390_record_address_mask)
11496         (s390_record_calc_disp_common, s390_record_calc_disp)
11497         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11498         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11499         (s390_process_record): Moved from s390-linux-tdep.c
11500         (s390_gdbarch_init): Adjust.
11501
11502 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11503
11504         * s390-linux-nat.c (s390-tdep.h): New include.
11505         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11506         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11507         (ALLDEPFILES): Add s390-tdep.c.
11508         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11509         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11510         * s390-tdep.h: ...this.  New file.
11511         * s390-linux-tdep.c (s390-tdep.h): New include.
11512         (_initialize_s390_tdep): Rename to...
11513         (_initialize_s390_linux_tdep): ...this and adjust.
11514         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11515         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11516         s390-tdep.h.
11517         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11518         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11519         (s390_is_partial_instruction, s390_software_single_step)
11520         (is_non_branch_ril, s390_displaced_step_copy_insn)
11521         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11522         (s390_prologue_data, s390_addr, s390_store, s390_load)
11523         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11524         (s390_register_call_saved, s390_guess_tracepoint_registers)
11525         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11526         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11527         (s390_pseudo_register_name, s390_pseudo_register_type)
11528         (s390_pseudo_register_read, s390_pseudo_register_write)
11529         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11530         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11531         (s390_addr_bits_remove, s390_address_class_type_flags)
11532         (s390_address_class_type_flags_to_name)
11533         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11534         (s390_function_arg_float, s390_function_arg_vector)
11535         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11536         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11537         (s390_frame_align, s390_register_return_value, s390_return_value)
11538         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11539         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11540         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11541         (s390_trad_frame_prev_register, s390_unwind_cache)
11542         (s390_prologue_frame_unwind_cache)
11543         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11544         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11545         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11546         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11547         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11548         (s390_frame_base_address, s390_local_base_address)
11549         (s390_frame_base, s390_gcc_target_options)
11550         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11551         (s390_validate_reg_range, s390_tdesc_valid)
11552         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11553         * s390-tdep.c: ...this.  New file.
11554
11555 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11556
11557         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11558         (s390_process_record, s390_gdbarch_tdep_alloc)
11559         (s390_linux_init_abi_any): Use/set new hook.
11560
11561 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11562
11563         * s390-linux-tdep.c (osabi.h): New include.
11564         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11565         (s390_linux_init_abi_any): New functions.
11566         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11567
11568 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11569
11570         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11571         tdesc_has_registers check
11572
11573 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11574
11575         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11576         (s390_validate_reg_range): New macro.
11577         (s390_gdbarch_init): Adjust.
11578
11579 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11580
11581         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11582         (s390_gdbarch_tdep_alloc): Adjust.
11583         (s390_gdbarch_init): Adjust.
11584
11585 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11586
11587         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11588         <have_tdb>: Change type to bool.
11589         (s390_gdbarch_tdep_alloc): Adjust.
11590         (s390_gdbarch_init): Adjust.
11591
11592 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11593
11594         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11595         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11596         (s390_gdbarch_tdep_alloc): New function.
11597         (s390_gdbarch_init): Allocate tdep at start and use its fields
11598         instead of separate variables.
11599
11600 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11601
11602         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11603         when looking for cached gdbarch and add comment for remaining.
11604
11605 2018-01-22  Pedro Alves  <palves@redhat.com>
11606             Sergio Durigan Junior  <sergiodj@redhat.com>
11607
11608         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11609         case.
11610
11611 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11612
11613         * MAINTAINERS: Update my company e-mail address.
11614
11615 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11616
11617         * regcache.c (cooked_write_test): New function.
11618         (_initialize_regcache): Register the test.
11619
11620 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11621
11622         * ia64-tdep.c (ia64_pseudo_register_read): Call
11623         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11624         * m32c-tdep.c (m32c_cat_read): Likewise.
11625         (m32c_r3r2r1r0_read): Likewise.
11626         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11627         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11628
11629 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11630
11631         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11632         method raw_read instead of regcache_raw_read.
11633         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11634         * arm-tdep.c (arm_neon_quad_read): Likewise.
11635         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11636         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11637         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11638         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11639         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11640         (i386_pseudo_register_read_into_value): Likewise.
11641         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11642         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11643         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11644         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11645         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11646         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11647         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11648         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11649         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11650
11651 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11652
11653         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11654         * configure.tgt: Remove target mt.
11655         * mt-tdep.c: Remove.
11656         * regcache.c (cooked_read_test): Remove the check for mt.
11657
11658 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11659
11660         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11661         instead of gdbarch_pseudo_register_read_value.
11662
11663 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11664
11665         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11666         language is Ada.
11667
11668 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11669
11670         * linespec.c (create_sals_line_offset): Remove code that preserved
11671         the symtab_and_line's line number.
11672
11673 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11674
11675         * varobj.c (varobj_create): Don't set valid_block when creating a
11676         floating varobj.
11677
11678 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11679
11680         * varobj.c (varobj_create): Remove out of date comment.
11681
11682 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11683
11684         PR mi/20395
11685         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11686         updating innermost block.
11687         * parse.c (innermost_block_tracker::update): Take extra type
11688         parameter, and check types match before updating innermost block.
11689         (write_dollar_variable): Update innermost block for registers.
11690         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11691         (innermost_block_tracker::innermost_block_tracker): Initialise
11692         m_types member.
11693         (innermost_block_tracker::reset): Take type parameter.
11694         (innermost_block_tracker::update): Take type parameter, and pass
11695         type through as needed.
11696         (innermost_block_tracker::m_types): New member.
11697         * varobj.c (varobj_create): Pass type when reseting innermost
11698         block.
11699
11700 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11701
11702         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11703         * ada-lang.c (resolve_subexp): Likewise.
11704         * breakpoint.c (set_breakpoint_condition) Likewise.
11705         (watch_command_1) Likewise.
11706         * c-exp.y (variable): Likewise.
11707         * d-exp.y (PrimaryExpression): Likewise.
11708         * f-exp.y (variable): Likewise.
11709         * go-exp.y (variable): Likewise.
11710         * m2-exp.y (variable): Likewise.
11711         * objfiles.c (objfile::~objfile): Likewise.
11712         * p-exp.y (variable): Likewise.
11713         * parse.c (innermost_block): Change type.
11714         * parser-defs.h (class innermost_block_tracker): New.
11715         (innermost_block): Change to innermost_block_tracker.
11716         * printcmd.c (display_command): Switch to innermost_block API.
11717         (do_one_display): Likewise.
11718         * rust-exp.y (do_one_display): Likewise.
11719         * symfile.c (clear_symtab_users): Likewise.
11720         * varobj.c (varobj_create): Switch to innermost_block API, replace
11721         use of innermost_block with block stored on varobj object.
11722
11723 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11724
11725         * expression.h (innermost_block): Remove declaration.
11726         * varobj.c: Add 'parser-defs.h' include.
11727
11728 2018-01-19  Tom Tromey  <tom@tromey.com>
11729
11730         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11731         symbols in the static and global blocks.
11732
11733 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11734
11735         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11736         gdb_ptrace.h, and move including gdb_wait.h ...
11737         * nat/linux-ptrace.h: ... to here.
11738
11739 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11740
11741         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11742         inf_ptrace_detach_success.
11743         (inf_ptrace_detach_success): Add inferior parameter, use it
11744         instead of inferior_ptid, pass it to detach_inferior.
11745         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11746         parameter.
11747         * inferior.c (detach_inferior): Add overload that takes an
11748         inferior object.
11749         * inferior.h (detach_inferior): Likewise.
11750         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11751         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11752         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11753
11754 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11755
11756         * target.h (struct target_ops) <to_detach>: Add inferior
11757         parameter.
11758         (target_detach): Likewise.
11759         * target.c (dispose_inferior): Pass inferior down.
11760         (target_detach): Pass inferior down.  Assert that it is equal to
11761         the current inferior.
11762         * aix-thread.c (aix_thread_detach): Pass inferior down.
11763         * corefile.c (core_file_command): Pass current_inferior() down.
11764         * corelow.c (core_detach): Add inferior parameter.
11765         * darwin-nat.c (darwin_detach): Likewise.
11766         * gnu-nat.c (gnu_detach): Likewise.
11767         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11768         * infcmd.c (detach_command): Pass current_inferior() down to
11769         target_detach.
11770         * infrun.c (follow_fork_inferior): Pass parent_inf to
11771         target_detach.
11772         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11773         target_detach.
11774         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11775         * linux-thread-db.c (thread_db_detach): Likewise.
11776         * nto-procfs.c (procfs_detach): Likewise.
11777         * procfs.c (procfs_detach): Likewise.
11778         * record.c (record_detach): Likewise.
11779         * record.h (struct inferior): Forward-declare.
11780         (record_detach): Add inferior parameter.
11781         * remote-sim.c (gdbsim_detach): Likewise.
11782         * remote.c (remote_detach_1): Likewise.
11783         (remote_detach): Likewise.
11784         (extended_remote_detach): Likewise.
11785         * sol-thread.c (sol_thread_detach): Likewise.
11786         * target-debug.h (target_debug_print_inferior_p): New macro.
11787         * target-delegates.c: Re-generate.
11788         * top.c (kill_or_detach): Pass inferior down to target_detach.
11789         * windows-nat.c (windows_detach): Add inferior parameter.
11790
11791 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11792
11793         * target.h (struct target_ops) <to_detach>: Remove args
11794         parameter.
11795         (target_detach): Likewise.
11796         * target.c (dispose_inferior): Adjust.
11797         (target_detach): Remove args parameter, adjust.
11798         * aix-thread.c (aix_thread_detach): Adjust.
11799         * corefile.c (core_file_command): Adjust.
11800         * corelow.c (core_detach): Adjust.
11801         * darwin-nat.c (darwin_detach): Adjust.
11802         * gnu-nat.c (gnu_detach): Adjust.
11803         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11804         * infcmd.c (detach_command): Adjust
11805         * infrun.c (follow_fork_inferior): Adjust.
11806         (handle_vfork_child_exec_or_exit): Adjust.
11807         * linux-fork.c (linux_fork_detach): Remove args parameter.
11808         * linux-fork.h (linux_fork_detach): Likewise.
11809         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11810         * linux-thread-db.c (thread_db_detach): Likewise.
11811         * nto-procfs.c (procfs_detach): Likewise.
11812         * procfs.c (procfs_detach): Likewise.
11813         (do_detach): Remove signo parameter.
11814         * record.c (record_detach): Remove args parameter.
11815         * record.h (record_detach): Likewise.
11816         * remote-sim.c (gdbsim_detach): Likewise.
11817         * remote.c (remote_detach_1): Likewise.
11818         (remote_detach): Likewise.
11819         (extended_remote_detach): Likewise.
11820         * sol-thread.c (sol_thread_detach): Likewise.
11821         * target-delegates.c: Re-generate.
11822         * top.c (struct qt_args) <args>: Remove field.
11823         (kill_or_detach): Don't pass args.
11824         (quit_force): Don't set args.
11825         * windows-nat.c (windows_detach): Remove args parameter.
11826
11827 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11828
11829         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11830         (arm_linux_init_abi): Install it.
11831
11832 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11833
11834         * osabi.c (gdb_osabi_names): Extend the regexp for
11835         arm-linux-gnueabihf.
11836
11837 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11838
11839         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11840         m_abbrevs.
11841         (abbrev_table::add_abbrev): Update.
11842         (abbrev_table::lookup_abbrev): Update.
11843
11844 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11845
11846         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11847
11848 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11849
11850         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11851         to "std::string".
11852
11853 2018-01-17  Tom Tromey  <tom@tromey.com>
11854
11855         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11856
11857 2018-01-17  Tom Tromey  <tom@tromey.com>
11858
11859         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11860         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11861         (create_array_type_with_stride): Update.
11862         * dwarf2read.c (set_die_type): Update.
11863
11864 2018-01-17  Tom Tromey  <tom@tromey.com>
11865
11866         * dwarf2read.c (delayed_method_info): Remove typedef.
11867         (dwarf2_cu::method_info): Now a std::vector.
11868         (add_to_method_list): Update.
11869         (free_delayed_list): Remove.
11870         (compute_delayed_physnames): Update.
11871         (process_full_comp_unit, process_full_type_unit): Clear the method
11872         list.  Remove cleanups.
11873         (psymtab_include_file_name): Add name_holder parameter.  Use
11874         unique_xmalloc_ptr.
11875         (dwarf_decode_lines): Update.
11876
11877 2018-01-17  Tom Tromey  <tom@tromey.com>
11878             Simon Marchi  <simon.marchi@ericsson.com>
11879
11880         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11881         (dwarf2_per_objfile::free_cached_comp_units)
11882         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11883         (init_cutu_and_read_dies_no_follow): Update.
11884         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11885         (dwarf2_cu::~dwarf2_cu): New.
11886         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11887         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11888
11889 2018-01-17  Tom Tromey  <tom@tromey.com>
11890             Simon Marchi  <simon.marchi@ericsson.com>
11891
11892         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11893         (struct die_reader_specs) <abbrev_table>: New member.
11894         (struct abbrev_table): Add constructor.
11895         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11896         <abbrev_obstack>: Now an auto_obstack.
11897         (abbrev_table_up): New typedef.
11898         (init_cu_die_reader): Add abbrev_table parameter.
11899         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11900         Add result_dwo_abbrev_table.
11901         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11902         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11903         Update.
11904         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11905         parameter.
11906         (skip_children): Update.
11907         (abbrev_table::alloc_abbrev): Rename from
11908         abbrev_table_alloc_abbrev.
11909         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11910         (abbrev_table::lookup_abbrev): Rename from
11911         abbrev_table_lookup_abbrev.
11912         (abbrev_table_read_table): Return abbrev_table_up.
11913         (abbrev_table_free, abbrev_table_free_cleanup)
11914         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11915         (load_partial_dies): Update.
11916
11917 2018-01-17  Tom Tromey  <tom@tromey.com>
11918
11919         * dwarf2read.c (dwarf2_compute_name): Update comment.
11920         (read_func_scope, read_variable): Update.
11921         (new_symbol): Remove.
11922         (new_symbol_full): Rename to new_symbol.
11923
11924 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11925
11926         PR gdb/16577
11927         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11928         a warning instead of throwing an error, set section size to 0 and return
11929         NULL.
11930         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11931
11932 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11933
11934         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11935         std::string.
11936         (linux_ptrace_attach_fail_reason_string): Likewise.
11937         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11938         Likewise.
11939         (linux_ptrace_attach_fail_reason_string): Likewise.
11940         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11941
11942 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11943
11944         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11945
11946 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
11947
11948         PR gdb/21559
11949         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11950         checking for fs_base/gs_base fields in struct user_regs_struct.
11951         * configure: Regenerate.
11952
11953 2018-01-17  Yao Qi  <yao.qi@linaro.org>
11954
11955         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11956         function.
11957         (aarch64_linux_init_abi): Install it to gdbarch hook
11958         gcc_target_options.
11959
11960 2018-01-15  Pedro Alves  <palves@redhat.com>
11961
11962         * common/signals-state-save-restore.c
11963         (save_original_signals_state): Fix typos.
11964
11965 2017-01-12  Tom Tromey  <tom@tromey.com>
11966             Sergio Durigan Junior  <sergiodj@redhat.com>
11967
11968         * Makefile.in (install-only): Install gdb-add-index.
11969
11970 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
11971
11972         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11973
11974 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11975
11976         * infrun.c (keep_going_pass_signal): Clear step-over info when
11977         insert_breakpoints fails.
11978
11979 2018-01-11  Pedro Alves  <palves@redhat.com>
11980
11981         PR gdb/22583
11982         * infrun.c (resume): Rename to ...
11983         (resume_1): ... this.
11984         (resume): Reimplement as wrapper around resume_1.
11985
11986 2018-01-11  Pedro Alves  <palves@redhat.com>
11987
11988         PR remote/22597
11989         * remote.c (remote_parse_stop_reply): Default to the last-set
11990         general thread instead of to 'magic_null_ptid'.
11991
11992 2018-01-10  Pedro Alves  <palves@redhat.com>
11993
11994         * language.h (language_get_symbol_name_matcher): Rename ...
11995         (get_symbol_name_matcher): ... this.
11996         * language.c (language_get_symbol_name_matcher): Ditto.
11997         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11998         callers adjusted.
11999
12000 2018-01-10  Pedro Alves  <palves@redhat.com>
12001
12002         PR gdb/22670
12003         * dwarf2read.c
12004         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12005         Adjust to use language_get_symbol_name_matcher instead of
12006         language_defn::la_get_symbol_name_matcher.
12007         * language.c (language_get_symbol_name_matcher): If in Ada mode
12008         and the lookup name is a verbatim match, return Ada's matcher.
12009         * language.h (language_get_symbol_name_matcher): Adjust comment.
12010         (ada_lookup_name_info::verbatim_p):: New method.
12011
12012 2018-01-10  Pedro Alves  <palves@redhat.com>
12013
12014         PR gdb/22670
12015         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12016         minsym's language is language_auto or language_cplus, pass down
12017         language_ada instead.
12018         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12019
12020 2018-01-10  Pedro Alves  <palves@redhat.com>
12021
12022         PR gdb/22670
12023         * minsyms.c (linkage_name_str): New function.
12024         (iterate_over_minimal_symbols): Use it.
12025
12026 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12027
12028         * NEWS: Document that 'info proc' now works on FreeBSD.
12029
12030 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12031
12032         * configure.ac: Check for kinfo_getfile in libutil.
12033         * configure: Regenerate.
12034         * config.in: Regenerate.
12035         * fbsd-nat.c: Include "fbsd-tdep.h".
12036         (fbsd_fetch_cmdline): New.
12037         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12038         rather than calling error.
12039         (fbsd_info_proc): New.
12040         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12041         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12042         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12043
12044 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12045
12046         * fbsd-nat.c (struct free_deleter): Remove.
12047         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12048
12049 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12050
12051         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12052         NULL for an empty pathname.
12053
12054 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12055
12056         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12057         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12058         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12059         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12060         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12061         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12062         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12063         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12064         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12065         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12066         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12067         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12068         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12069         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12070         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12071
12072 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12073
12074         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12075         (gnu_xfer_auxv): New function.
12076         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12077         TARGET_OBJECT_AUXV.
12078
12079 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12080             Simon Marchi  <simon.marchi@ericsson.com>
12081
12082         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12083         common/selftest.c.
12084         (COMMON_OBS): Remove selftest.o.
12085         * configure.ac: Append selftest-arch.c and common/selftest.c to
12086         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12087         * configure: Re-generated.
12088         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12089         GDB_SELF_TEST.
12090         (maintenance_info_selftests): Likewise.
12091
12092 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12093
12094         * ada-valprint.c (val_print_packed_array_elements): Use
12095         proper number of elements when printing an array indexed
12096         by an enumeration type.
12097
12098 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12099
12100         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12101         (dw2_get_file_names_reader): Adjust.
12102         (lookup_dwo_signatured_type): Adjust.
12103         (lookup_dwp_signatured_type): Adjust.
12104         (lookup_signatured_type): Adjust.
12105         (create_type_unit_group): Adjust.
12106         (get_type_unit_group): Adjust.
12107         (process_psymtab_comp_unit_reader): Adjust.
12108         (build_type_psymtabs_reader): Adjust.
12109         (scan_partial_symbols): Adjust.
12110         (add_partial_symbol): Adjust.
12111         (add_partial_subprogram): Adjust.
12112         (peek_die_abbrev): Adjust.
12113         (fixup_go_packaging): Adjust.
12114         (process_imported_unit_die): Adjust.
12115         (dwarf2_compute_name): Adjust.
12116         (dwarf2_physname): Adjust.
12117         (read_import_statement): Adjust.
12118         (handle_DW_AT_stmt_list): Adjust.
12119         (read_file_scope): Adjust.
12120         (read_func_scope): Adjust.
12121         (read_lexical_block_scope): Adjust.
12122         (read_call_site_scope): Adjust.
12123         (read_variable): Adjust.
12124         (dwarf2_rnglists_process): Adjust.
12125         (dwarf2_ranges_process): Adjust.
12126         (dwarf2_ranges_read): Adjust.
12127         (dwarf2_get_pc_bounds): Adjust.
12128         (dwarf2_record_block_ranges): Adjust.
12129         (dwarf2_add_field): Adjust.
12130         (dwarf2_add_member_fn): Adjust.
12131         (read_structure_type): Adjust.
12132         (process_structure_scope): Adjust.
12133         (read_enumeration_type): Adjust.
12134         (read_array_type): Adjust.
12135         (mark_common_block_symbol_computed): Adjust.
12136         (read_common_block): Adjust.
12137         (read_namespace_type): Adjust.
12138         (read_namespace): Adjust.
12139         (read_module_type): Adjust.
12140         (read_tag_pointer_type): Adjust.
12141         (read_tag_ptr_to_member_type): Adjust.
12142         (read_tag_string_type): Adjust.
12143         (read_subroutine_type): Adjust.
12144         (read_typedef): Adjust.
12145         (read_base_type): Adjust.
12146         (attr_to_dynamic_prop): Adjust.
12147         (read_subrange_type): Adjust.
12148         (read_unspecified_type): Adjust.
12149         (dwarf2_read_abbrevs): Adjust.
12150         (load_partial_dies): Adjust.
12151         (read_partial_die): Adjust.
12152         (find_partial_die): Adjust.
12153         (guess_partial_die_structure_name): Adjust.
12154         (fixup_partial_die): Adjust.
12155         (read_attribute_value): Adjust.
12156         (read_addr_index): Adjust.
12157         (read_addr_index_from_leb128): Adjust.
12158         (read_str_index): Adjust.
12159         (dwarf2_string_attr): Adjust.
12160         (get_debug_line_section): Adjust.
12161         (dwarf_decode_line_header): Adjust.
12162         (lnp_state_machine::check_line_address): Adjust.
12163         (dwarf_decode_lines_1): Adjust.
12164         (dwarf_decode_lines): Adjust.
12165         (dwarf2_start_symtab): Adjust.
12166         (var_decode_location): Adjust.
12167         (new_symbol_full): Adjust.
12168         (dwarf2_const_value_data): Adjust.
12169         (dwarf2_const_value_attr): Adjust.
12170         (dwarf2_const_value): Adjust.
12171         (die_type): Adjust.
12172         (die_containing_type): Adjust.
12173         (build_error_marker_type): Adjust.
12174         (lookup_die_type): Adjust.
12175         (guess_full_die_structure_name): Adjust.
12176         (anonymous_struct_prefix): Adjust.
12177         (determine_prefix): Adjust.
12178         (dwarf2_name): Adjust.
12179         (follow_die_ref_or_sig): Adjust.
12180         (follow_die_offset): Adjust.
12181         (follow_die_ref): Adjust.
12182         (follow_die_sig_1): Adjust.
12183         (follow_die_sig): Adjust.
12184         (get_signatured_type): Adjust.
12185         (get_DW_AT_signature_type): Adjust.
12186         (decode_locdesc): Adjust.
12187         (dwarf_decode_macros): Adjust.
12188         (cu_debug_loc_section): Adjust.
12189         (fill_in_loclist_baton): Adjust.
12190         (dwarf2_symbol_mark_computed): Adjust.
12191         (init_one_comp_unit): Don't assign
12192         dwarf2_cu::dwarf2_per_objfile.
12193         (set_die_type): Adjust.
12194
12195 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12196
12197         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12198         <dwarf2_per_objfile>: New field.
12199         (dwarf2_per_objfile): Remove global.
12200         (get_dwarf2_per_objfile): New function.
12201         (set_dwarf2_per_objfile): New function.
12202         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12203         dwarf2_per_objfile.
12204         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12205         (read_abbrev_offset): Likewise.
12206         (read_indirect_string): Likewise.
12207         (read_indirect_line_string): Likewise.
12208         (read_indirect_string_at_offset): Likewise.
12209         (read_indirect_string_from_dwz): Likewise.
12210         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12211         dwarf2_per_objfile.
12212         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12213         (create_all_comp_units): Change objfile parameter to
12214         dwarf2_per_objfile.
12215         (create_all_type_units): Likewise.
12216         (process_queue): Add dwarf2_per_objfile parameter.
12217         (read_and_check_comp_unit_head): Likewise.
12218         (lookup_dwo_unit_in_dwp): Likewise.
12219         (get_dwp_file): Likewise.
12220         (process_cu_includes): Likewise.
12221         (struct free_dwo_file_cleanup_data): New struct.
12222         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12223         set_dwarf2_per_objfile.
12224         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12225         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12226         context, adjust calls.
12227         (dw2_instantiate_symtab): Likewise.
12228         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12229         (dw2_get_cu): Likewise.
12230         (create_cu_from_index_list): Change objfile parameter to
12231         dwarf2_per_objfile.
12232         (create_cus_from_index_list): Get dwarf2_per_objfile from
12233         context, adjust calls.
12234         (create_cus_from_index): Likewise.
12235         (create_signatured_type_table_from_index): Change objfile
12236         parameter to dwarf2_per_objfile.
12237         (create_signatured_type_table_from_debug_names): Change objfile
12238         parameter to dwarf2_per_objfile.
12239         (create_addrmap_from_index): Likewise.
12240         (create_addrmap_from_aranges): Likewise.
12241         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12242         (dw2_setup): Remove.
12243         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12244         context.
12245         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12246         get_dwarf2_per_objfile.
12247         (dw2_forget_cached_source_info): Likewise.
12248         (dw2_map_symtabs_matching_filename): Likewise.
12249         (struct dw2_symtab_iterator) <index>: Remove.
12250         <dwarf2_per_objfile>: New field.
12251         (dw2_symtab_iter_init): Replace index parameter with
12252         dwarf2_per_objfile.
12253         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12254         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12255         (dw2_print_stats): Likewise.
12256         (dw2_dump): Likewise.
12257         (dw2_expand_symtabs_for_function): Likewise.
12258         (dw2_expand_all_symtabs): Likewise.
12259         (dw2_expand_symtabs_with_fullname): Likewise.
12260         (dw2_expand_marked_cus): Replace index and objfile parameters
12261         with dwarf2_per_objfile.
12262         (dw_expand_symtabs_matching_file_matcher): Add
12263         dwarf2_per_objfile parameter and adjust calls.
12264         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12265         adjust calls.
12266         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12267         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12268         adjust calls.
12269         (create_cus_from_debug_names_list): Replace objfile parameter
12270         with dwarf2_per_objfile and adjust calls.
12271         (create_cus_from_debug_names): Likewise.
12272         (dwarf2_read_debug_names): Likewise.
12273         (mapped_debug_names::namei_to_name): Adjust call.
12274         (dw2_debug_names_iterator::next): Likewise.
12275         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12276         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12277         (dw2_debug_names_dump): Likewise.
12278         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12279         (dw2_debug_names_expand_symtabs_matching): Likewise.
12280         (dwarf2_initialize_objfile): Likewise.
12281         (dwarf2_build_psymtabs): Likewise.
12282         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12283         this_cu.
12284         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12285         (read_and_check_comp_unit_head): Likewise.
12286         (read_abbrev_offset): Likewise.
12287         (create_debug_type_hash_table): Likewise.
12288         (create_debug_types_hash_table): Likewise.
12289         (create_all_type_units): Replace objfile parameter with
12290         dwarf2_per_objfile.
12291         (add_type_unit): Add dwarf2_per_objfile parameter.
12292         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12293         with dwarf2_per_objfile.
12294         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12295         (lookup_dwp_signatured_type): Likewise.
12296         (lookup_signatured_type): Likewise.
12297         (read_cutu_die_from_dwo): Likewise.
12298         (init_tu_and_read_dwo_dies): Likewise.
12299         (init_cutu_and_read_dies): Likewise.
12300         (init_cutu_and_read_dies_no_follow): Likewise.
12301         (allocate_type_unit_groups_table): Add objfile parameter.
12302         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12303         (get_type_unit_group): Likewise.
12304         (process_psymtab_comp_unit): Update call.
12305         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12306         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12307         (print_tu_stats): Likewise.
12308         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12309         in void* parameter.
12310         (build_type_psymtabs): Change objfile parameter to
12311         dwarf2_per_objfile.
12312         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12313         passed in void* parameter.
12314         (process_skeletonless_type_units): Change objfile parameter to
12315         dwarf2_per_objfile.
12316         (set_partial_user): Likewise.
12317         (dwarf2_build_psymtabs_hard): Likewise.
12318         (read_comp_units_from_section): Likewise.
12319         (create_all_comp_units): Likewise.
12320         (scan_partial_symbols): Update calls.
12321         (add_partial_symbol): Likewise.
12322         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12323         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12324         (process_queue): Add dwarf2_per_objfile parameter.
12325         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12326         (compute_compunit_symtab_includes): Likewise.
12327         (process_cu_includes): Add dwarf2_per_objfile parameter.
12328         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12329         (process_full_type_unit): Likewise.
12330         (process_imported_unit_die): Update call.
12331         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12332         (read_file_scope): Likewise.
12333         (allocate_dwo_file_hash_table): Add objfile parameter.
12334         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12335         (create_cus_hash_table): Likewise.
12336         (create_dwp_hash_table): Likewise.
12337         (create_dwo_unit_in_dwp_v1): Likewise.
12338         (create_dwp_v2_section): Likewise.
12339         (create_dwo_unit_in_dwp_v2): Likewise.
12340         (lookup_dwo_unit_in_dwp): Likewise.
12341         (try_open_dwop_file): Likewise.
12342         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12343         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12344         cleanup to include a reference to dwarf2_per_objfile.
12345         (open_dwp_file): Add dwarf2_per_objfile parameter.
12346         (open_and_init_dwp_file): Likewise.
12347         (get_dwp_file): Likewise.
12348         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12349         (queue_and_load_all_dwo_tus): Update call.
12350         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12351         data.
12352         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12353         (dwarf2_ranges_process): Likewise.
12354         (dwarf2_get_pc_bounds): Likewise.
12355         (mark_common_block_symbol_computed): Likewise.
12356         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12357         (dwarf2_read_abbrevs): Update call.
12358         (read_partial_die): Use dwarf2_per_objfile from cu.
12359         (find_partial_die): Likewise.
12360         (fixup_partial_die): Likewise.
12361         (read_attribute_value): Likewise.
12362         (read_indirect_string_at_offset_from): Add objfile parameter.
12363         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12364         parameter.
12365         (read_indirect_string_from_dwz): Add objfile parameter.
12366         (read_indirect_string): Add objfile parameter.
12367         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12368         (read_addr_index): Use dwarf2_per_objfile from cu.
12369         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12370         call dw2_setup.
12371         (read_str_index): Use dwarf2_per_objfile from cu.
12372         (get_debug_line_section): Likewise.
12373         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12374         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12375         (new_symbol_full): Use dwarf2_per_objfile from cu.
12376         (build_error_marker_type): Likewise.
12377         (lookup_die_type): Likewise.
12378         (determine_prefix): Likewise.
12379         (follow_die_offset): Likewise.
12380         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12381         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12382         (dwarf2_fetch_die_type_sect_off): Likewise.
12383         (dwarf2_get_die_type): Likewise.
12384         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12385         (get_signatured_type): Likewise.
12386         (get_DW_AT_signature_type): Likewise.
12387         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12388         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12389         (cu_debug_loc_section): Likewise.
12390         (fill_in_loclist_baton): Likewise.
12391         (dwarf2_symbol_mark_computed): Likewise.
12392         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12393         dwarf2_per_objfile.
12394         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12395         parameter.
12396         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12397         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12398         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12399         (set_die_type): Use dwarf2_free_objfile from cu.
12400         (get_die_type_at_offset): Likewise.
12401         (dwarf2_per_objfile_free): Don't assign global variable.
12402         (debug_names) <constructor>: Add dwarf2_per_objfile
12403         parameter, update m_debugstrlookup construction.
12404         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12405         parameter.
12406         <m_dwarf2_per_objfile>: New field.
12407         <lookup>: Use m_dwarf2_per_objfile.
12408         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12409         (psyms_seen_size): Likewise.
12410         (write_gdbindex): Replace objfile parameter with
12411         dwarf2_per_objfile.
12412         (write_debug_names): Likewise.
12413         (write_psymtabs_to_index): Likewise.
12414         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12415         calls.
12416
12417 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12418
12419         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12420         <dwarf2_per_objfile>: New field.
12421         (struct dwarf2_per_cu_data) <objfile>: Remove.
12422         <dwarf2_per_objfile>: New field.
12423         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12424         of objfile.
12425         (create_signatured_type_table_from_index): Likewise.
12426         (create_debug_type_hash_table): Likewise.
12427         (fill_in_sig_entry_from_dwo_entry): Likewise.
12428         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12429         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12430         objfile.
12431         (create_partial_symtab): Access objfile through
12432         dwarf2_per_objfile.
12433         (process_psymtab_comp_unit_reader): Likewise.
12434         (read_comp_units_from_section): Likewise.
12435         (scan_partial_symbols): Likewise.
12436         (add_partial_symbol): Likewise.
12437         (add_partial_subprogram): Likewise.
12438         (peek_die_abbrev): Likewise.
12439         (fixup_go_packaging): Likewise.
12440         (process_full_comp_unit): Likewise.
12441         (process_full_type_unit): Likewise.
12442         (process_imported_unit_die): Likewise.
12443         (dwarf2_compute_name): Likewise.
12444         (dwarf2_physname): Likewise.
12445         (read_import_statement): Likewise.
12446         (create_cus_hash_table): Assign dwarf2_physname instead of
12447         objfile.
12448         (read_func_scope): Access objfile through dwarf2_per_objfile.
12449         (read_lexical_block_scope): Likewise.
12450         (read_call_site_scope): Likewise.
12451         (read_variable): Likewise.
12452         (dwarf2_rnglists_process): Likewise.
12453         (dwarf2_ranges_process): Likewise.
12454         (dwarf2_ranges_read): Likewise.
12455         (dwarf2_record_block_ranges): Likewise.
12456         (dwarf2_add_field): Likewise.
12457         (dwarf2_add_member_fn): Likewise.
12458         (read_structure_type): Likewise.
12459         (process_structure_scope): Likewise.
12460         (read_enumeration_type): Likewise.
12461         (read_array_type): Likewise.
12462         (read_common_block): Likewise.
12463         (read_namespace_type): Likewise.
12464         (read_namespace): Likewise.
12465         (read_module_type): Likewise.
12466         (read_tag_pointer_type): Likewise.
12467         (read_tag_ptr_to_member_type): Likewise.
12468         (read_tag_string_type): Likewise.
12469         (read_subroutine_type): Likewise.
12470         (read_typedef): Likewise.
12471         (read_base_type): Likewise.
12472         (attr_to_dynamic_prop): Likewise.
12473         (read_subrange_type): Likewise.
12474         (read_unspecified_type): Likewise.
12475         (load_partial_dies): Likewise.
12476         (read_partial_die): Likewise.
12477         (find_partial_die): Likewise.
12478         (guess_partial_die_structure_name): Likewise.
12479         (fixup_partial_die): Likewise.
12480         (read_attribute_value): Likewise.
12481         (read_addr_index_from_leb128): Likewise.
12482         (dwarf2_read_addr_index): Likewise.
12483         (dwarf2_string_attr): Likewise.
12484         (lnp_state_machine::check_line_address): Likewise.
12485         (dwarf_decode_lines_1): Likewise.
12486         (dwarf_decode_lines): Likewise.
12487         (dwarf2_start_symtab): Likewise.
12488         (var_decode_location): Likewise.
12489         (new_symbol_full): Likewise.
12490         (dwarf2_const_value_data): Likewise.
12491         (dwarf2_const_value_attr): Likewise.
12492         (dwarf2_const_value): Likewise.
12493         (die_type): Likewise.
12494         (die_containing_type): Likewise.
12495         (lookup_die_type): Likewise.
12496         (guess_full_die_structure_name): Likewise.
12497         (anonymous_struct_prefix): Likewise.
12498         (dwarf2_name): Likewise.
12499         (follow_die_ref_or_sig): Likewise.
12500         (follow_die_offset): Likewise.
12501         (follow_die_ref): Likewise.
12502         (dwarf2_fetch_die_loc_sect_off): Likewise.
12503         (dwarf2_fetch_constant_bytes): Likewise.
12504         (dwarf2_fetch_die_type_sect_off): Likewise.
12505         (dwarf2_get_die_type): Likewise.
12506         (follow_die_sig): Likewise.
12507         (decode_locdesc): Likewise.
12508         (dwarf2_per_cu_objfile): Likewise.
12509         (dwarf2_per_cu_text_offset): Likewise.
12510         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12511         objfile.
12512         (set_die_type): Access objfile through
12513         dwarf2_per_objfile.
12514
12515 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12516
12517         * valprint.c (converted_character_d): Remove typedef.
12518         (DEF_VEC_O (converted_character_d)): Remove.
12519         (count_next_character): Use std::vector.
12520         (print_converted_chars_to_obstack): Likewise.
12521         (generic_printstr): Likewise.
12522
12523 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12524
12525         * xml-support.h (struct gdb_xml_value): Add constructor.
12526         <value>: Change type to unique_xmalloc_ptr.
12527         (gdb_xml_value_s): Remove typedef.
12528         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12529         (gdb_xml_element_start_handler): Change parameter type to
12530         std::vector.
12531         (xml_find_attribute): Likewise.
12532         * xml-support.c (xml_find_attribute): Change parameter type to
12533         std::vector and adjust.
12534         (gdb_xml_values_cleanup): Remove.
12535         (gdb_xml_parser::start_element): Adjust to std::vector.
12536         (xinclude_start_include): Change paraeter type to std::vector
12537         and adjust.
12538         * btrace.c (check_xml_btrace_version): Likewise.
12539         (parse_xml_btrace_block): Likewise.
12540         (parse_xml_btrace_pt_config_cpu): Likewise.
12541         (parse_xml_btrace_pt): Likewise.
12542         (parse_xml_btrace_conf_bts): Likewise.
12543         (parse_xml_btrace_conf_pt): Likewise.
12544         * memory-map.c (memory_map_start_memory): Likewise.
12545         (memory_map_start_property): Likewise.
12546         * osdata.c (osdata_start_osdata): Likewise.
12547         (osdata_start_item): Likewise.
12548         (osdata_start_column): Likewise.
12549         * remote.c (start_thread): Likewise.
12550         * solib-aix.c (library_list_start_library): Likewise.
12551         (library_list_start_list): Likewise.
12552         * solib-svr4.c (library_list_start_library): Likewise.
12553         (svr4_library_list_start_list): Likewise.
12554         * solib-target.c (library_list_start_segment): Likewise.
12555         (library_list_start_section): Likewise.
12556         (library_list_start_library): Likewise.
12557         (library_list_start_list): Likewise.
12558         * tracepoint.c (traceframe_info_start_memory): Likewise.
12559         (traceframe_info_start_tvar): Likewise.
12560         * xml-syscall.c (syscall_start_syscall): Likewise.
12561         * xml-tdesc.c (tdesc_start_target): Likewise.
12562         (tdesc_start_feature): Likewise.
12563         (tdesc_start_reg): Likewise.
12564         (tdesc_start_union): Likewise.
12565         (tdesc_start_struct): Likewise.
12566         (tdesc_start_flags): Likewise.
12567         (tdesc_start_enum): Likewise.
12568         (tdesc_start_field): Likewise.
12569         (tdesc_start_enum_value): Likewise.
12570         (tdesc_start_vector): Likewise.
12571
12572 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12573
12574         * extension.h (struct xmethod_worker) <clone>: Remove.
12575         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12576         Remove.
12577         (python_xmethod_worker::clone): Remove.
12578         * valops.c (find_overload_match): Use std::move instead of
12579         clone.
12580
12581 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12582
12583         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12584         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12585         <free_xmethod_worker_data>: Remove.
12586         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12587         <get_xmethod_arg_types>: Remove.
12588         <get_xmethod_result_type>: Remove.
12589         <invoke_xmethod>: Remove.
12590         * extension.c (new_xmethod_worker): Remove.
12591         (clone_xmethod_worker): Remove.
12592         (get_matching_xmethod_workers): Return void, pass std::vector by
12593         pointer.
12594         (get_xmethod_arg_types): Rename to...
12595         (xmethod_worker::get_arg_types): ... this, and adjust.
12596         (get_xmethod_result_type): Rename to...
12597         (xmethod_worker::get_result_type): ... this, and adjust.
12598         (invoke_xmethod): Remove.
12599         (free_xmethod_worker): Remove.
12600         (free_xmethod_worker_vec): Remove.
12601         * extension.h (enum ext_lang_rc): Move here from
12602         extension-priv.h.
12603         (struct xmethod_worker): Add constructor and destructor.
12604         <data>: Remove.
12605         <value>: Remove.
12606         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12607         virtual pure methods.
12608         <get_arg_types, get_result_type>: New methods.
12609         (xmethod_worker_ptr): Remove typedef.
12610         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12611         (xmethod_worker_vec): Remove typedef.
12612         (xmethod_worker_up): New typedef.
12613         (invoke_xmethod): Remove.
12614         (clone_xmethod_worker): Remove.
12615         (free_xmethod_worker): Remove.
12616         (free_xmethod_worker_vec): Remove.
12617         (get_xmethod_arg_types): Remove.
12618         (get_xmethod_result_type): Remove.
12619         * valops.c (find_method_list): Use std::vector, don't use
12620         intermediate vector.
12621         (value_find_oload_method_list): Use std::vector.
12622         (find_overload_match): Use std::vector.
12623         (find_oload_champ): Use std::vector.
12624         * value.c (value_free): Use operator delete.
12625         (value_of_xmethod): Rename to...
12626         (value_from_xmethod): ... this.  Don't assign
12627         xmethod_worker::value, take rvalue-reference.
12628         (result_type_of_xmethod): Adjust.
12629         (call_xmethod): Adjust.
12630         * value.h: Include extension.h.
12631         (struct xmethod_worker): Don't forward-declare.
12632         (value_of_xmethod): Rename to...
12633         (value_from_xmethod): ... this, take rvalue-reference.
12634         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12635         (struct python_xmethod_worker): ... this, add constructor and
12636         destructor.
12637         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12638         (gdbpy_free_xmethod_worker_data): Rename to...
12639         (python_xmethod_worker::~python_xmethod_worker): ... this and
12640         adjust.
12641         (gdbpy_clone_xmethod_worker_data): Rename to...
12642         (python_xmethod_worker::clone): ... this and adjust.
12643         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12644         temporary vector.
12645         (gdbpy_get_xmethod_arg_types): Rename to...
12646         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12647         (gdbpy_get_xmethod_result_type): Rename to...
12648         (python_xmethod_worker::do_get_result_type): ... this and
12649         adjust.
12650         (gdbpy_invoke_xmethod): Rename to...
12651         (python_xmethod_worker::invoke): ... this and adjust.
12652         (new_python_xmethod_worker): Rename to...
12653         (python_xmethod_worker::python_xmethod_worker): ... this and
12654         adjust.
12655         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12656         Remove.
12657         (gdbpy_free_xmethod_worker_data): Remove.
12658         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12659         (gdbpy_get_xmethod_arg_types): Remove.
12660         (gdbpy_get_xmethod_result_type): Remove.
12661         (gdbpy_invoke_xmethod): Remove.
12662         * python/python.c (python_extension_ops): Remove obsolete
12663         callbacks.
12664
12665 2018-01-05  Pedro Alves  <palves@redhat.com>
12666
12667         PR gdb/18653
12668         * common/signals-state-save-restore.c
12669         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12670         find a custom handler preinstalled, instead of internal erroring.
12671         But only warn if !quiet.
12672         * common/signals-state-save-restore.h
12673         (save_original_signals_state): New parameter 'quiet'.
12674         * main.c (captured_main_1): Move save_original_signals_state call
12675         after option handling, and pass QUIET.
12676
12677 2018-01-05  Pedro Alves  <palves@redhat.com>
12678
12679         * spu-tdep.c (spu_catch_start): Pass
12680         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12681
12682 2018-01-05  Pedro Alves  <palves@redhat.com>
12683
12684         PR gdb/22670
12685         * ada-lang.c (literal_symbol_name_matcher): New function.
12686         (ada_get_symbol_name_matcher): Use it for
12687         symbol_name_match_type::SEARCH_NAME.
12688         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12689         it down instead of assuming symbol_name_match_type::FULL.
12690         * block.h (block_lookup_symbol): New parameter 'match_type'.
12691         * c-valprint.c (print_unpacked_pointer): Use
12692         lookup_symbol_search_name instead of lookup_symbol.
12693         * compile/compile-object-load.c (get_out_value_type): Pass down
12694         symbol_name_match_type::SEARCH_NAME.
12695         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12696         symbol_name_match_type::FULL.
12697         * cp-support.c (cp_get_symbol_name_matcher): Handle
12698         symbol_name_match_type::SEARCH_NAME.
12699         * infrun.c (insert_exception_resume_breakpoint): Use
12700         lookup_symbol_search_name.
12701         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12702         * psymtab.c (maintenance_check_psymtabs): Use
12703         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12704         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12705         SYMBOL_SEARCH_NAME.
12706         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12707         if symbol_name_match_type::SEARCH_NAME.
12708         (lookup_symbol_in_language): Pass down
12709         symbol_name_match_type::FULL.
12710         (lookup_symbol_search_name): New.
12711         (lookup_language_this): Pass down
12712         symbol_name_match_type::SEARCH_NAME.
12713         (lookup_symbol_aux, lookup_local_symbol): New parameter
12714         'match_type'.  Pass it down.
12715         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12716         (lookup_symbol_search_name): New declaration.
12717         (lookup_symbol_in_block): New 'match_type' parameter.
12718
12719 2018-01-05  Pedro Alves  <palves@redhat.com>
12720
12721         PR gdb/22670
12722         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12723         ada_lookup_symbol.
12724         (ada_lookup_symbol): Reimplement in terms of
12725         ada_lookup_symbol_list, bits factored out from
12726         ada_lookup_encoded_symbol.
12727
12728 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12729
12730         * ada-exp.y (write_object_renaming): When subscripting an array
12731         using a symbol as the index, pass the block in call to
12732         ada_lookup_encoded_symbol when looking that symbol up.
12733
12734 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12735
12736         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12737         TYPE_INDEX_TYPE.
12738
12739 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12740
12741         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12742         the case where VALUE_LVAL (val0) is not lval_memory.
12743
12744 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12745
12746         * ada-valprint.c (print_optional_low_bound): Handle
12747         character-indexed array printing like boolean-indexed array
12748         printing.
12749
12750 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12751
12752         * NEWS: Create a new section for the next release branch.
12753         Rename the section of the current branch, now that it has
12754         been cut.
12755
12756 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12757
12758         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12759         * version.in: Bump version to 8.1.50.DATE-git.
12760
12761 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12762
12763         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12764         Add field.
12765         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12766         Add field.
12767         (default_exception_support_info) <catch_handlers_sym>: Add field.
12768         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12769         (ada_exception_name_addr_1): Add "catch handlers" handling.
12770         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12771         Update all callers.
12772         (create_excep_cond_exprs) <ex>: Add parameter.
12773         (re_set_exception): Update create_excep_cond_exprs call.
12774         (print_it_exception, print_one_exception, print_mention_exception)
12775         (print_recreate_exception): Add "catch handler" handling.
12776         (allocate_location_catch_handlers, re_set_catch_handlers)
12777         (check_status_catch_handlers, print_it_catch_handlers)
12778         (print_one_catch_handlers, print_mention_catch_handlers)
12779         (print_recreate_catch_handlers): New function.
12780         (catch_handlers_breakpoint_ops): New variable.
12781         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12782         Add parameter.  Add "catch handler" handling.
12783         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12784         Add "catch handler" handling.
12785         (ada_exception_catchpoint_cond_string): Add "catch handler"
12786         handling.
12787         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12788         call.
12789         (catch_ada_handlers_command): New function.
12790         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12791         operations structure.
12792         (_initialize_ada_language): Add "catch handlers" command entry.
12793         * NEWS: Document "catch handlers" feature.
12794
12795 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12796
12797         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12798         account when creating the array type of the slice.
12799         (ada_value_slice): Likewise.
12800
12801 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12802
12803         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12804         New enum value.
12805         (create_array_type_with_stride): Add byte_stride_prop parameter.
12806         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12807         New parameter.  Update all callers in this file.
12808         (array_type_has_dynamic_stride): New function.
12809         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12810         of arrays with dynamic byte strides.
12811         * dwarf2read.c (read_array_type): Add support for dynamic
12812         DW_AT_byte_stride attributes.
12813
12814 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12815
12816         * dwarf2read.c (read_unspecified_type): Treat
12817         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12818
12819 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12820
12821         Update copyright year range in all GDB files.
12822
12823 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12824
12825         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12826         and gdb/testsuite/gdb.base/step-line.c.
12827
12828 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12829
12830         * copyright.py (main): Dump the contents of
12831         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12832         even if BY_HAND is empty.
12833
12834 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12835
12836         * top.c (print_gdb_version): Update Copyright year in version
12837         message.
12838
12839 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12840
12841         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12842
12843 For older changes see ChangeLog-2017.
12844 \f
12845 Local Variables:
12846 mode: change-log
12847 left-margin: 8
12848 fill-column: 74
12849 version-control: never
12850 coding: utf-8
12851 End: