(Ada) slightly incorrect bounds for type of array indexed by enum
[external/binutils.git] / gdb / ChangeLog
1 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2
3         * ada-typeprint.c (print_range): Print the bounds using TYPE
4         rather than its TYPE_TARGET_TYPE.
5
6 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
7
8         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
9         call to ada_to_fixed_value_create.
10
11 2018-09-08  Jerome Guitton  <guitton@adacore.com>
12
13         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
14
15 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
16
17         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
18         by calls to error.
19
20 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
21
22         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
23         Move update of loop variable "fi".
24
25 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
26
27         * ada-lang.c (value_assign_to_component): In the case of
28         big-endian targets, extract the bits of the given VAL
29         using an src_offset of zero if container is not a scalar.
30
31 2018-09-06  Simon Ser  <contact@emersion.fr>
32
33         PR gdb/23105
34         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
35         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
36         * fbsd-tdep.c (fbsd_make_note_desc): New.
37         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
38         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
39         * target.h (enum target_object) Add FreeBSD-specific
40         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
41
42 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
43
44         * compile/compile-c.h (generate_c_for_variable_locations):
45         Change reference to pointer.
46         * compile/compile-c-support.c (compile_program) <compute>:
47         Likewise.
48         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
49         (generate_c_for_for_one_variable): Likewise
50         (generate_c_for_variable_locations): Likewise
51         * compile/compile-c-types.c (compile_c_instance::convert_type):
52         Likewise
53         * compile/compile-cplus-symbols.c (convert_one_symbol):
54         std::move the scope passed to enter_scope.
55         * compile/compile-cplus-types.c
56         (compile_cplus_instance::enter_scope): Make parameter
57         rvalue-reference.
58         (compile_cplus_instance::new_scope): Change reference to
59         pointer.
60         (compile_cplus_instance::convert_type): Likewise
61         (compile_cplus_convert_typedef): std::move the scope passed to
62         enter_scope.
63         (compile_cplus_convert_struct_or_union): Likewise.
64         (compile_cplus_convert_enum): Likewise.
65         (compile_cplus_convert_namespace): Likewise.
66         * compile/compile-cplus.h (compile_cplus_instance)
67         <enter_scope>: Make parameter rvalue-reference.
68         * compile/compile-internal.h (compile_instance)
69         <get_cached_type>: Likewise
70         * compile/compile-loc2c.c (push): Likewise
71         (pushf): Likewise
72         (unary): Likewise
73         (binary): Likewise
74         (print_label): Likewise
75         (pushf_register_address): Likewise
76         (pushf_register): Likewise
77         (do_compile_dwarf_expr_to_c): Likewise
78         (compile_dwarf_expr_to_c): Likewise
79         (compile_dwarf_bounds_to_c): Likewise
80         * compile/compile.c (compile_instance::get_cached_type):
81         Likewise
82         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
83         (compile_dwarf_bounds_to_c): Likewise
84         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
85         (dwarf2_compile_property_to_c): Likewise
86         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
87         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
88         Likewise
89
90 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
91
92         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
93         * tui/tui-data.c (init_content_element): Don't initialize it.
94
95 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
96
97         * tui/tui-data.h (struct tui_win_info)
98         <detail::opaque>: Remove.
99         * tui/tui-data.c (init_win_info): Remove assignment.
100
101 2018-09-05  Tom Tromey  <tom@tromey.com>
102
103         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
104         -Wformat-nonliteral.
105         * target-float.c (host_float_ops<T>::to_string)
106         (host_float_ops<T>::from_string): Use
107         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
108         * configure: Rebuild.
109
110 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
111
112         * printcmd.c (printf_c_string): Use
113         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
114         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
115
116 2018-09-05  Tom Tromey  <tom@tromey.com>
117
118         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
119
120 2018-09-05  Tom de Vries  <tdevries@suse.de>
121
122         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
123         with resolve_abstract_p == true.
124         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
125         defaulting to false. Propagate resolve_abstract_p to
126         dwarf2_fetch_die_loc_sect_off.
127         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
128         parameter, defaulting to false.
129         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
130         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
131         parameter.
132         * dwarf2read.h (struct die_info): Forward-declare.
133         (die_info_ptr): New typedef.
134         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
135
136 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
137
138         GDB 8.2 released.
139
140 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
141             Pedro Alves  <palves@redhat.com>
142
143         * gnulib/Makefile.in (aclocal_m4_deps): Move to
144         "aclocal-m4-deps.mk".  Include file here.
145         $(srcdir)/aclocal.m4: Add "configure.ac".
146         * gnulib/aclocal-m4-deps.mk: New file.
147         * gnulib/update-gnulib.sh: Automatically update
148         "aclocal-m4-deps.mk".
149
150 2018-09-04  Tom Tromey  <tom@tromey.com>
151
152         * configure: Rebuild.
153         * configure.ac: Remove multi-ice code.
154
155 2018-09-04  Tom Tromey  <tom@tromey.com>
156
157         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
158         (ada-exp.o): Update.
159
160 2018-09-04  Tom Tromey  <tom@tromey.com>
161
162         * Makefile.in (printcmd.o, target-float.o): Remove.
163         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
164
165 2018-09-04  Tom Tromey  <tom@tromey.com>
166
167         * gnulib/Makefile.in: Remove obsolete comment.
168         * Makefile.in: Remove obsolete comment.
169
170 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
171
172         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
173         line with '+'.
174
175 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
176
177         * riscv-tdep.c: Add 'prologue-value.h' include.
178         (struct riscv_unwind_cache): New struct.
179         (riscv_debug_unwinder): New global.
180         (riscv_scan_prologue): Update arguments, capture register details
181         from prologue scan.
182         (riscv_skip_prologue): Reformat arguments line, move end of
183         prologue calculation into riscv_scan_prologue.
184         (riscv_frame_cache): Update return type, create
185         riscv_unwind_cache, scan the prologue, and fill in remaining cache
186         details.
187         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
188         (riscv_frame_prev_register): Use the trad_frame within the
189         riscv_unwind_cache.
190         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
191         flag.
192
193 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
194
195         * trad-frame.h (trad_frame_set_realreg): Declare.
196         (trad_frame_set_addr): Declare.
197         * trad-frame.c (trad_frame_set_realreg): Define new function.
198         (trad_frame_set_addr): Define new function.
199         (trad_frame_set_reg_realreg): Use new function.
200         (trad_frame_set_reg_addr): Use new function.
201
202 2018-09-01  Keith Seitz  <keiths@redhat.com>
203
204         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
205         pulongest instead of "%lld".
206         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
207         ATTRIBUTE_UNUSED.
208
209 2018-08-31  Tom Tromey  <tom@tromey.com>
210
211         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
212         variant part type.
213
214 2018-08-31  Pedro Alves  <palves@redhat.com>
215
216         * gdbarch.h: Regenerate.
217
218 2018-08-31  Pedro Alves  <palves@redhat.com>
219
220         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
221         * target.h (Hardware watchpoint interfaces): Describe
222         continuable/steppable/non-steppable watchpoints.
223         * gdbarch.h, gdbarch.c: Regenerate.
224
225 2018-08-31  Pedro Alves  <palves@redhat.com>
226
227         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
228         Delete.
229         * s390-linux-nat.c
230         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
231         * target.h (target_ops::have_continuable_watchpoint): Delete.
232         (target_have_continuable_watchpoint): Delete.
233         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
234         * target-delegates.c: Regenerate.
235
236 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
237
238         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
239         the files present in "gnulib/import/m4/".
240
241 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
242
243         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
244         c.sw, c.swsp, and c.sdsp.
245
246 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
247
248         * riscv-tdep.c (struct riscv_inferior_data): Delete.
249         (riscv_read_misa_reg): Don't cache value read into inferior data.
250         (riscv_new_inferior_data): Delete.
251         (riscv_inferior_data_cleanup): Delete.
252         (riscv_inferior_data): Delete.
253         (riscv_invalidate_inferior_data): Delete.
254         (_initialize_riscv_tdep): Remove initialisation of inferior data.
255
256 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
257
258         * compile/compile-cplus-types.c
259         (compile_cplus_instance::leave_scope): Take the address of scope
260         object.
261         (compile_cplus_instance::convert_qualified_base): Compare quals
262         to 0.
263
264 2018-08-30  Keith Seitz  <keiths@redhat.com>
265
266         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
267         Use "%s" and host_address_to_string instead of "%p" in printf.
268
269 2018-08-29  Keith Seitz  <keiths@redhat.com>
270
271         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
272         and compile-cplus-types.c.
273         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
274         * c-lang.c (cplus_language_defn): Set C++ compile functions.
275         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
276         Declare.
277         * compile/compile-c-support.c: Include compile-cplus.h.
278         (load_libcompile): Templatize.
279         (get_compile_context): "New" function.
280         (c_get_compile_context): Use get_compile_context.
281         (cplus_get_compile_context): New function.
282         (cplus_push_user_expression, cplus_pop_user_expression)
283         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
284         (cplus_compute_program): Define new structs/functions.
285         * compile/compile-cplus-symmbols.c: New file.
286         * compile/compile-cplus-types.c: New file.
287         * compile/compile-cplus.h: New file.
288         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
289         Declare.
290         * compile/compile-object-load.c (get_out_value_type): Use
291         strncmp_iw when comparing symbol names.
292         (compile_object_load): Add mst_bss and mst_data.
293         * compile/compile.c (_initialize_compile): Remove
294         -Wno-implicit-function-declaration from `compile_args'.
295         * compile/gcc-cp-plugin.h: New file.
296         * NEWS: Mention C++ compile support and new debug options.
297
298 2018-08-29  Keith Seitz  <keiths@redhat.com>
299
300         * linespec.c (collect_info::add_symbol): Make virtual.
301         (struct symbol_searcher_collect_info): New struct.
302         (symbol_searcher::find_all_symbols): New method.
303         * symtab.h (class symbol_searcher): New class.
304
305 2018-08-29  Keith Seitz  <keiths@redhat.com>
306
307         * linespec.c (struct linespec) <function_symbols, label_symbols>:
308         Change to vector of block_symbol.  Update all users.
309         (struct collect_info) <symbols>: Likewise.
310         (collect_info::add_symbol): Take block_symbol as argument.
311         Update all callers.
312         (decode_compound_collector) <m_symbols>: Change type to vector
313         of block_symbol.  Update all users.
314         (decode_compound_collector::operator ()): Change parameter type
315         to block_symbol.
316         (find_method, find_function_symbols, find_linespec_symbols)
317         (find_label_symbols_in_block, find_label_symbols): Change symbol
318         vectors to block_symbol vectors.
319         * symtab.h (symbol_found_callback_ftype): Change parameter type to
320         block_symbol.
321
322 2018-08-29  Keith Seitz  <keiths@redhat.com>
323
324         * linespec.c (symbolp): Remove typedef and VEC definitions.
325         (bound_minimal_symbol_d): Likewise.
326
327 2018-08-29  Keith Seitz  <keiths@redhat.com>
328
329         * linespec.c (decode_compound_collector::decode_compound_collector):
330         Remove initialization for `m_symtabs'.
331         (decode_compound_collector::release_symbols): Change return type
332         to std::vector.  Update all callers.
333         (class decode_compound_collector) <m_symbols>: Change type to
334         std::vector.
335         (lookup_prefix_sym): Change return type to std::vector.  Update all
336         callers.
337         (compare_symbols): Remove.
338         (std_compare_symbols): Rename to `compare_symbols'.
339         (find_method): Change `sym_classes' parameter to std::vector.
340         Update all callers.  Use std::sort to sort sym_classes.
341         (find_linespec_symbols): Remove cleanup.
342
343 2018-08-29  Keith Seitz  <keiths@redhat.com>
344
345         * linespec.c (struct linespec) <minimal_symbols>: Change type to
346         std::vector.  Update all users.
347         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
348         (struct collect_info) <minimal_symbols>: Likewise.
349         (compare_msymbols): Return bool.  Change parameters to const
350         bound_minimal_symbol references.
351         (find_method, find_function_symbols, find_linespec_symbols): Change
352         `minsyms' parameter to std::vector.  Update all callers.
353
354 2018-08-29  Keith Seitz  <keiths@redhat.com>
355
356         * linespec.c (struct linespec) <label_symbols>: Change type to
357         std::vector.  Update all users.
358         (find_label_symbols_in_block): Change `result' parameter to
359         std::vector.  Update all callers.
360         (find_label_symbols): Return std::vector.  Update all callers.
361
362 2018-08-29  Keith Seitz  <keiths@redhat.com>
363
364         * linespec.c (struct linespec) <function_symbols>: Change type to
365         std::vector.  Update all users.
366         (struct collect_info) <function_symbols>: Likewise.
367         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
368         (std_compare_symbols): New function.
369         (find_method, find_function_symbols, find_linespec_symbols)
370         (find_label_symbols_in_block): Change `symbols' parameter to
371         std::vector.  Update all callers.
372         (find_label_symbols): Likewise for `function_symbols' and
373         `label_funcs_ret'.
374
375 2018-08-29  Keith Seitz  <keiths@redhat.com>
376
377         * linespec.c (symtab_vector_up): Define.
378         (struct linespec) <file_symtabs>: Change type to std::vector *.
379         Update all uses.
380         (struct collect_info) <file_symtabs>: Likewise.
381         (collect_symtabs_from_filename): Return symtab_vector_up.
382         Update all callers.
383         (decode_objc): Remove cleanup.
384         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
385         (symtab_collector::release_symtabs): Return symtab_vector_up.
386         Update all callers.
387         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
388         Update all users.
389         (collect_symtabs_from_filename, symtabs_from_filename): Return
390         symtab_vector_up.  Update all callers.
391
392 2018-08-29  Tom Tromey  <tom@tromey.com>
393
394         * csky-tdep.c (csky_analyze_prologue): Use
395         core_addr_to_string_nz.
396
397 2018-08-29  Tom Tromey  <tom@tromey.com>
398
399         * windows-nat.c (struct xlate_exception) <them>: Change type to
400         DWORD.
401         (xlate): Fix formatting.  Remove last entry.
402         (struct xlate_exception, xlate): Comment out.
403         (windows_nat_target::resume): Use ranged for.
404
405 2018-08-29  Jim Wilson  <jimw@sifive.com>
406
407         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
408         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
409         of NT_PRFPREG.
410         (riscv_linux_nat_target::store_registers): Likewise.
411
412 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
413
414         PR gdb/23555
415         PR gdb/23558
416         * gnulib/aclocal.m4: Regenerate.
417         * gnulib/config.in: Regenerate.
418         * gnulib/configure: Regenerate.
419         * gnulib/import/Makefile.am: Update.
420         * gnulib/import/Makefile.in: Update.
421         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
422         * gnulib/import/_Noreturn.h: ... this.
423         * gnulib/import/alloca.in.h: Update.
424         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
425         * gnulib/import/arg-nonnull.h: ... this.
426         * gnulib/import/assure.h: Update.
427         * gnulib/import/at-func.c: Update.
428         * gnulib/import/basename-lgpl.c: Update.
429         * gnulib/import/extra/snippet/c++defs.h: Rename to...
430         * gnulib/import/c++defs.h: ... this.
431         * gnulib/import/canonicalize-lgpl.c: Update.
432         * gnulib/import/cdefs.h: Update.
433         * gnulib/import/chdir-long.c: Update.
434         * gnulib/import/chdir-long.h: Update.
435         * gnulib/import/cloexec.c: Update.
436         * gnulib/import/cloexec.h: Update.
437         * gnulib/import/close.c: Update.
438         * gnulib/import/closedir.c: Update.
439         * gnulib/import/config.charset: Update.
440         * gnulib/import/dirent-private.h: Update.
441         * gnulib/import/dirent.in.h: Update.
442         * gnulib/import/dirfd.c: Update.
443         * gnulib/import/dirname-lgpl.c: Update.
444         * gnulib/import/dirname.h: Update.
445         * gnulib/import/dosname.h: Update.
446         * gnulib/import/dup-safer-flag.c: Update.
447         * gnulib/import/dup-safer.c: Update.
448         * gnulib/import/dup.c: Update.
449         * gnulib/import/dup2.c: Update.
450         * gnulib/import/errno.in.h: Update.
451         * gnulib/import/error.c: Update.
452         * gnulib/import/error.h: Update.
453         * gnulib/import/exitfail.c: Update.
454         * gnulib/import/exitfail.h: Update.
455         * gnulib/import/extra/update-copyright: Update.
456         * gnulib/import/fchdir.c: Update.
457         * gnulib/import/fcntl.c: Update.
458         * gnulib/import/fcntl.in.h: Update.
459         * gnulib/import/fd-hook.c: Update.
460         * gnulib/import/fd-hook.h: Update.
461         * gnulib/import/fd-safer-flag.c: Update.
462         * gnulib/import/fd-safer.c: Update.
463         * gnulib/import/fdopendir.c: Update.
464         * gnulib/import/filename.h: Update.
465         * gnulib/import/filenamecat-lgpl.c: Update.
466         * gnulib/import/filenamecat.h: Update.
467         * gnulib/import/flexmember.h: Update.
468         * gnulib/import/float+.h: Update.
469         * gnulib/import/float.c: Update.
470         * gnulib/import/float.in.h: Update.
471         * gnulib/import/fnmatch.c: Update.
472         * gnulib/import/fnmatch.in.h: Update.
473         * gnulib/import/fnmatch_loop.c: Update.
474         * gnulib/import/fpucw.h: Update.
475         * gnulib/import/frexp.c: Update.
476         * gnulib/import/frexpl.c: Update.
477         * gnulib/import/fstat.c: Update.
478         * gnulib/import/fstatat.c: Update.
479         * gnulib/import/getcwd-lgpl.c: Update.
480         * gnulib/import/getcwd.c: Update.
481         * gnulib/import/getdtablesize.c: Update.
482         * gnulib/import/getlogin_r.c: Update.
483         * gnulib/import/getprogname.c: Update.
484         * gnulib/import/getprogname.h: Update.
485         * gnulib/import/gettext.h: Update.
486         * gnulib/import/gettimeofday.c: Update.
487         * gnulib/import/glob-libc.h: Update.
488         * gnulib/import/glob.c: Update.
489         * gnulib/import/glob.in.h: Update.
490         * gnulib/import/glob_internal.h: Update.
491         * gnulib/import/glob_pattern_p.c: Update.
492         * gnulib/import/globfree.c: Update.
493         * gnulib/import/hard-locale.c: Update.
494         * gnulib/import/hard-locale.h: Update.
495         * gnulib/import/intprops.h: Update.
496         * gnulib/import/inttypes.in.h: Update.
497         * gnulib/import/isnan.c: Update.
498         * gnulib/import/isnand-nolibm.h: Update.
499         * gnulib/import/isnand.c: Update.
500         * gnulib/import/isnanl-nolibm.h: Update.
501         * gnulib/import/isnanl.c: Update.
502         * gnulib/import/itold.c: Update.
503         * gnulib/import/libc-config.h: Update.
504         * gnulib/import/limits.in.h: Update.
505         * gnulib/import/localcharset.c: Update.
506         * gnulib/import/localcharset.h: Update.
507         * gnulib/import/localtime-buffer.c: Update.
508         * gnulib/import/localtime-buffer.h: Update.
509         * gnulib/import/lstat.c: Update.
510         * gnulib/import/m4/00gnulib.m4: Update.
511         * gnulib/import/m4/__inline.m4: Update.
512         * gnulib/import/m4/absolute-header.m4: Update.
513         * gnulib/import/m4/alloca.m4: Update.
514         * gnulib/import/m4/builtin-expect.m4: Update.
515         * gnulib/import/m4/canonicalize.m4: Update.
516         * gnulib/import/m4/chdir-long.m4: Update.
517         * gnulib/import/m4/close.m4: Update.
518         * gnulib/import/m4/closedir.m4: Update.
519         * gnulib/import/m4/configmake.m4: Update.
520         * gnulib/import/m4/d-ino.m4: Update.
521         * gnulib/import/m4/d-type.m4: Update.
522         * gnulib/import/m4/dirent_h.m4: Update.
523         * gnulib/import/m4/dirfd.m4: Update.
524         * gnulib/import/m4/dirname.m4: Update.
525         * gnulib/import/m4/double-slash-root.m4: Update.
526         * gnulib/import/m4/dup.m4: Update.
527         * gnulib/import/m4/dup2.m4: Update.
528         * gnulib/import/m4/eealloc.m4: Update.
529         * gnulib/import/m4/environ.m4: Update.
530         * gnulib/import/m4/errno_h.m4: Update.
531         * gnulib/import/m4/error.m4: Update.
532         * gnulib/import/m4/exponentd.m4: Update.
533         * gnulib/import/m4/exponentl.m4: Update.
534         * gnulib/import/m4/extensions.m4: Update.
535         * gnulib/import/m4/extern-inline.m4: Update.
536         * gnulib/import/m4/fchdir.m4: Update.
537         * gnulib/import/m4/fcntl-o.m4: Update.
538         * gnulib/import/m4/fcntl.m4: Update.
539         * gnulib/import/m4/fcntl_h.m4: Update.
540         * gnulib/import/m4/fdopendir.m4: Update.
541         * gnulib/import/m4/filenamecat.m4: Update.
542         * gnulib/import/m4/flexmember.m4: Update.
543         * gnulib/import/m4/float_h.m4: Update.
544         * gnulib/import/m4/fnmatch.m4: Update.
545         * gnulib/import/m4/fnmatch_h.m4: Update.
546         * gnulib/import/m4/fpieee.m4: Update.
547         * gnulib/import/m4/frexp.m4: Update.
548         * gnulib/import/m4/frexpl.m4: Update.
549         * gnulib/import/m4/fstat.m4: Update.
550         * gnulib/import/m4/fstatat.m4: Update.
551         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
552         * gnulib/import/m4/getcwd-path-max.m4: Update.
553         * gnulib/import/m4/getcwd.m4: Update.
554         * gnulib/import/m4/getdtablesize.m4: Update.
555         * gnulib/import/m4/getlogin.m4: Update.
556         * gnulib/import/m4/getlogin_r.m4: Update.
557         * gnulib/import/m4/getpagesize.m4: Update.
558         * gnulib/import/m4/getprogname.m4: Update.
559         * gnulib/import/m4/gettimeofday.m4: Update.
560         * gnulib/import/m4/glibc21.m4: Update.
561         * gnulib/import/m4/glob.m4: Update.
562         * gnulib/import/m4/glob_h.m4: Update.
563         * gnulib/import/m4/gnulib-cache.m4: Update.
564         * gnulib/import/m4/gnulib-common.m4: Update.
565         * gnulib/import/m4/gnulib-comp.m4: Update.
566         * gnulib/import/m4/gnulib-tool.m4: Update.
567         * gnulib/import/m4/hard-locale.m4: Update.
568         * gnulib/import/m4/include_next.m4: Update.
569         * gnulib/import/m4/inttypes-pri.m4: Update.
570         * gnulib/import/m4/inttypes.m4: Update.
571         * gnulib/import/m4/isnand.m4: Update.
572         * gnulib/import/m4/isnanl.m4: Update.
573         * gnulib/import/m4/largefile.m4: Update.
574         * gnulib/import/m4/limits-h.m4: Update.
575         * gnulib/import/m4/localcharset.m4: Update.
576         * gnulib/import/m4/locale-fr.m4: Update.
577         * gnulib/import/m4/locale-ja.m4: Update.
578         * gnulib/import/m4/locale-zh.m4: Update.
579         * gnulib/import/m4/localtime-buffer.m4: Update.
580         * gnulib/import/m4/longlong.m4: Update.
581         * gnulib/import/m4/lstat.m4: Update.
582         * gnulib/import/m4/malloc.m4: Update.
583         * gnulib/import/m4/malloca.m4: Update.
584         * gnulib/import/m4/math_h.m4: Update.
585         * gnulib/import/m4/mbrtowc.m4: Update.
586         * gnulib/import/m4/mbsinit.m4: Update.
587         * gnulib/import/m4/mbsrtowcs.m4: Update.
588         * gnulib/import/m4/mbstate_t.m4: Update.
589         * gnulib/import/m4/memchr.m4: Update.
590         * gnulib/import/m4/memmem.m4: Update.
591         * gnulib/import/m4/mempcpy.m4: Update.
592         * gnulib/import/m4/memrchr.m4: Update.
593         * gnulib/import/m4/mkdir.m4: Update.
594         * gnulib/import/m4/mkstemp.m4: Update.
595         * gnulib/import/m4/mmap-anon.m4: Update.
596         * gnulib/import/m4/mode_t.m4: Update.
597         * gnulib/import/m4/msvc-inval.m4: Update.
598         * gnulib/import/m4/msvc-nothrow.m4: Update.
599         * gnulib/import/m4/multiarch.m4: Update.
600         * gnulib/import/m4/nocrash.m4: Update.
601         * gnulib/import/m4/off_t.m4: Update.
602         * gnulib/import/m4/onceonly.m4: Update.
603         * gnulib/import/m4/open-cloexec.m4: Update.
604         * gnulib/import/m4/open.m4: Update.
605         * gnulib/import/m4/openat.m4: Update.
606         * gnulib/import/m4/opendir.m4: Update.
607         * gnulib/import/m4/pathmax.m4: Update.
608         * gnulib/import/m4/rawmemchr.m4: Update.
609         * gnulib/import/m4/readdir.m4: Update.
610         * gnulib/import/m4/readlink.m4: Update.
611         * gnulib/import/m4/realloc.m4: Update.
612         * gnulib/import/m4/rename.m4: Update.
613         * gnulib/import/m4/rewinddir.m4: Update.
614         * gnulib/import/m4/rmdir.m4: Update.
615         * gnulib/import/m4/save-cwd.m4: Update.
616         * gnulib/import/m4/secure_getenv.m4: Update.
617         * gnulib/import/m4/setenv.m4: Update.
618         * gnulib/import/m4/signal_h.m4: Update.
619         * gnulib/import/m4/ssize_t.m4: Update.
620         * gnulib/import/m4/stat-time.m4: Update.
621         * gnulib/import/m4/stat.m4: Update.
622         * gnulib/import/m4/std-gnu11.m4: Update.
623         * gnulib/import/m4/stdbool.m4: Update.
624         * gnulib/import/m4/stddef_h.m4: Update.
625         * gnulib/import/m4/stdint.m4: Update.
626         * gnulib/import/m4/stdio_h.m4: Update.
627         * gnulib/import/m4/stdlib_h.m4: Update.
628         * gnulib/import/m4/strchrnul.m4: Update.
629         * gnulib/import/m4/strdup.m4: Update.
630         * gnulib/import/m4/strerror.m4: Update.
631         * gnulib/import/m4/string_h.m4: Update.
632         * gnulib/import/m4/strstr.m4: Update.
633         * gnulib/import/m4/strtok_r.m4: Update.
634         * gnulib/import/m4/sys_socket_h.m4: Update.
635         * gnulib/import/m4/sys_stat_h.m4: Update.
636         * gnulib/import/m4/sys_time_h.m4: Update.
637         * gnulib/import/m4/sys_types_h.m4: Update.
638         * gnulib/import/m4/tempname.m4: Update.
639         * gnulib/import/m4/time_h.m4: Update.
640         * gnulib/import/m4/unistd-safer.m4: Update.
641         * gnulib/import/m4/unistd_h.m4: Update.
642         * gnulib/import/m4/warn-on-use.m4: Update.
643         * gnulib/import/m4/wchar_h.m4: Update.
644         * gnulib/import/m4/wchar_t.m4: Update.
645         * gnulib/import/m4/wctype_h.m4: Update.
646         * gnulib/import/m4/wint_t.m4: Update.
647         * gnulib/import/malloc.c: Update.
648         * gnulib/import/malloc/scratch_buffer.h: Update.
649         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
650         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
651         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
652         * gnulib/import/malloca.c: Update.
653         * gnulib/import/malloca.h: Update.
654         * gnulib/import/malloca.valgrind: Update.
655         * gnulib/import/math.in.h: Update.
656         * gnulib/import/mbrtowc.c: Update.
657         * gnulib/import/mbsinit.c: Update.
658         * gnulib/import/mbsrtowcs-impl.h: Update.
659         * gnulib/import/mbsrtowcs-state.c: Update.
660         * gnulib/import/mbsrtowcs.c: Update.
661         * gnulib/import/memchr.c: Update.
662         * gnulib/import/memmem.c: Update.
663         * gnulib/import/mempcpy.c: Update.
664         * gnulib/import/memrchr.c: Update.
665         * gnulib/import/mkdir.c: Update.
666         * gnulib/import/mkstemp.c: Update.
667         * gnulib/import/msvc-inval.c: Update.
668         * gnulib/import/msvc-inval.h: Update.
669         * gnulib/import/msvc-nothrow.c: Update.
670         * gnulib/import/msvc-nothrow.h: Update.
671         * gnulib/import/open.c: Update.
672         * gnulib/import/openat-die.c: Update.
673         * gnulib/import/openat-priv.h: Update.
674         * gnulib/import/openat-proc.c: Update.
675         * gnulib/import/openat.c: Update.
676         * gnulib/import/openat.h: Update.
677         * gnulib/import/opendir.c: Update.
678         * gnulib/import/pathmax.h: Update.
679         * gnulib/import/pipe-safer.c: Update.
680         * gnulib/import/rawmemchr.c: Update.
681         * gnulib/import/readdir.c: Update.
682         * gnulib/import/readlink.c: Update.
683         * gnulib/import/realloc.c: Update.
684         * gnulib/import/ref-add.sin: Update.
685         * gnulib/import/ref-del.sin: Update.
686         * gnulib/import/rename.c: Update.
687         * gnulib/import/rewinddir.c: Update.
688         * gnulib/import/rmdir.c: Update.
689         * gnulib/import/same-inode.h: Update.
690         * gnulib/import/save-cwd.c: Update.
691         * gnulib/import/save-cwd.h: Update.
692         * gnulib/import/scratch_buffer.h: Update.
693         * gnulib/import/secure_getenv.c: Update.
694         * gnulib/import/setenv.c: Update.
695         * gnulib/import/signal.in.h: Update.
696         * gnulib/import/stat-time.c: Update.
697         * gnulib/import/stat-time.h: Update.
698         * gnulib/import/stat-w32.c: Update.
699         * gnulib/import/stat-w32.h: Update.
700         * gnulib/import/stat.c: Update.
701         * gnulib/import/stdbool.in.h: Update.
702         * gnulib/import/stddef.in.h: Update.
703         * gnulib/import/stdint.in.h: Update.
704         * gnulib/import/stdio.in.h: Update.
705         * gnulib/import/stdlib.in.h: Update.
706         * gnulib/import/str-two-way.h: Update.
707         * gnulib/import/strchrnul.c: Update.
708         * gnulib/import/strdup.c: Update.
709         * gnulib/import/streq.h: Update.
710         * gnulib/import/strerror-override.c: Update.
711         * gnulib/import/strerror-override.h: Update.
712         * gnulib/import/strerror.c: Update.
713         * gnulib/import/string.in.h: Update.
714         * gnulib/import/stripslash.c: Update.
715         * gnulib/import/strnlen1.c: Update.
716         * gnulib/import/strnlen1.h: Update.
717         * gnulib/import/strstr.c: Update.
718         * gnulib/import/strtok_r.c: Update.
719         * gnulib/import/sys_stat.in.h: Update.
720         * gnulib/import/sys_time.in.h: Update.
721         * gnulib/import/sys_types.in.h: Update.
722         * gnulib/import/tempname.c: Update.
723         * gnulib/import/tempname.h: Update.
724         * gnulib/import/time.in.h: Update.
725         * gnulib/import/unistd--.h: Update.
726         * gnulib/import/unistd-safer.h: Update.
727         * gnulib/import/unistd.in.h: Update.
728         * gnulib/import/unsetenv.c: Update.
729         * gnulib/import/verify.h: Update.
730         * gnulib/import/extra/snippet/warn-on-use.h: Update.
731         * gnulib/import/wchar.in.h: Update.
732         * gnulib/import/wctype.in.h: Update.
733         * gnulib/import/xalloc-oversized.h: Update.
734         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
735         "53e2c179f26a890fa6685af4b6c1397ee370433b".
736
737 2018-08-16  Gary Benson <gbenson@redhat.com>
738
739         PR gdb/13000:
740         * gdb/main.c (captured_main_1): Exit with nonzero status
741         in batch mode if the last command to be executed failed.
742         * NEWS: Mention the above.
743
744 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
745
746         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
747         end of warning message.
748
749 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
750
751         PR gdb/22943:
752         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
753         (aarch64_extract_return_value): Use
754         aapcs_is_vfp_call_or_return_candidate.
755         (aarch64_return_in_memory): Likewise.
756         (aarch64_store_return_value): Likewise.
757
758 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
759
760         * aarch64-tdep.c
761         (aapcs_is_vfp_call_or_return_candidate): Make static
762         (pass_in_v_or_stack): Remove function.
763         (pass_in_v_vfp_candidate): New function.
764         (aarch64_push_dummy_call): Check for float register candidates.
765
766 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
767
768         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
769         (aapcs_is_vfp_call_or_return_candidate_1): New function.
770         (aapcs_is_vfp_call_or_return_candidate): Likewise.
771
772 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
773
774         PR build/23399
775         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
776         (struct ipa_sym_addresses): Rename to...
777         (struct ipa_sym_addresses_common): ... this.
778         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
779
780 2018-08-28  Tom Tromey  <tom@tromey.com>
781
782         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
783         (token_fifo): Now a std::vector.
784         (yylex, c_parse): Update.
785         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
786         (token_fifo): Now a std::vector.
787         (yylex, d_parse): Update.
788         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
789         (token_fifo): Now a std::vector.
790         (yylex, go_parse): Update.
791
792 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
793
794         * parser-defs.h (struct type_stack) <elements>: Change type to
795         std::vector<union type_stack_elt>.
796         <depth, size>: Remove.
797         * parse.c (parse_exp_in_context_1): Adjust.
798         (type_stack_reserve): Remove.
799         (check_type_stack_depth): Remove.
800         (insert_into_type_stack): Adjust to std::vector.
801         (insert_type): Likewise.
802         (push_type): Likewise.
803         (push_type_int): Likewise.
804         (insert_type_address_space): Likewise.
805         (pop_type): Likewise.
806         (pop_type_int): Likewise.
807         (pop_typelist): Likewise.
808         (pop_type_stack): Likewise.
809         (append_type_stack): Likewise.
810         (push_type_stack): Likewise.
811         (get_type_stack): Likewise.
812         (type_stack_cleanup): Likewise.
813         (push_typelist): Likewise.
814         (follow_types): Likewise.
815         (_initialize_parse): Likewise.
816
817 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
818
819         * NEWS: Mention csky target.
820
821 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
822             Hafiz Abid Qadeer  <abidh@codesourcery.com>
823             Don Breazeal  <donb@codesourcery.com>
824
825         * csky-linux-tdep.c: New file.
826         * csky-tdep.c: Likewise.
827         * csky-tdep.h: Likewise.
828         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
829         csky-tdep.o.
830         (HFILES_NO_SRCDIR): Add csky-tdep.h.
831         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
832         * configure.tgt: Add csky support.
833
834 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
835
836         * python/py-framefilter.c (py_print_frame): Print frame architecture
837         when printing on an MI output.
838
839 2018-08-27  Tom Tromey  <tom@tromey.com>
840
841         PR build/23087:
842         * configure: Rebuild.
843         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
844
845 2018-08-27  Tom Tromey  <tom@tromey.com>
846
847         * aarch64-linux-tdep.c
848         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
849         casts to int.
850
851 2018-08-27  Tom Tromey  <tom@tromey.com>
852
853         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
854         unsigned.
855         (ppc64_standard_linkage1, ppc64_standard_linkage2)
856         (ppc64_standard_linkage3, ppc64_standard_linkage4)
857         (ppc64_standard_linkage5, ppc64_standard_linkage6)
858         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
859         unsigned.
860
861 2018-08-27  Tom Tromey  <tom@tromey.com>
862
863         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
864         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
865
866 2018-08-27  Tom Tromey  <tom@tromey.com>
867
868         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
869         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
870         ULONGEST_MAX.
871         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
872         ULONGEST_MAX.
873         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
874         ULONGEST_MAX.
875         * sparc-linux-tdep.c (sparc32_linux_sigframe)
876         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
877         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
878         ULONGEST_MAX.
879         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
880         (ppc64_linux_sigaction_tramp_frame)
881         (ppc32_linux_sighandler_tramp_frame)
882         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
883         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
884         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
885         * mn10300-linux-tdep.c (am33_linux_sigframe)
886         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
887         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
888         * mips-linux-tdep.c (mips_linux_o32_sigframe)
889         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
890         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
891         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
892         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
893         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
894         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
895         * microblaze-linux-tdep.c
896         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
897         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
898         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
899         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
900         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
901         * common/common-types.h (ULONGEST_MAX): New define.
902         (CORE_ADDR_MAX): Fix formatting.
903         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
904         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
905         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
906         (arm_linux_rt_sigreturn_tramp_frame)
907         (arm_eabi_linux_sigreturn_tramp_frame)
908         (arm_eabi_linux_rt_sigreturn_tramp_frame)
909         (thumb2_eabi_linux_sigreturn_tramp_frame)
910         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
911         (arm_linux_restart_syscall_tramp_frame)
912         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
913         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
914         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
915         ULONGEST_MAX.
916         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
917
918 2018-08-27  Tom Tromey  <tom@tromey.com>
919
920         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
921         CORE_ADDR_MAX.
922         * mips-tdep.c (mips_deal_with_atomic_sequence)
923         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
924         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
925         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
926         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
927         CORE_ADDR_MAX.
928         * aarch64-tdep.c (aarch64_software_single_step): Use
929         CORE_ADDR_MAX.
930
931 2018-08-27  Tom Tromey  <tom@tromey.com>
932
933         * linespec.c (complete_linespec_component): Add cast to "char".
934         * completer.c (completion_tracker::build_completion_result): Add
935         cast to "char".
936
937 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
938
939         * solist.h (struct solist, struct target_so_ops): Fix
940         indentation.
941
942 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
943
944         * ada-tasks.c (ada_task_info_s): Remove typedef.
945         (DEF_VEC_O(ada_task_info_s)): Remove.
946         (struct ada_tasks_inferior_data): Initialize fields.
947         <task_list>: Make an std::vector.
948         (get_ada_tasks_inferior_data): Allocate with new.
949         (ada_get_task_number): Adjust.
950         (get_task_number_from_id): Likewise.
951         (valid_task_id): Likewise.
952         (ada_get_task_info_from_ptid): Likewise.
953         (iterate_over_live_ada_tasks): Likewise.
954         (add_ada_task): Likewise.
955         (read_known_tasks): Likewise.
956         (ada_build_task_list): Likewise.
957         (print_ada_task_info): Likewise.
958         (info_task): Likewise.
959         (task_command_1): Likewise.
960
961 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
962
963         * ada-lang.c (add_angle_brackets): Return std::string.
964
965 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
966
967         * python/py-threadevent.c (py_get_event_thread): Initialize
968         pythread.
969
970 2018-08-24  Pedro Alves  <palves@redhat.com>
971
972         * python/py-bpevent.c (create_breakpoint_event_object): Use
973         copy-initialization.
974         * python/py-continueevent.c (emit_continue_event): Use
975         copy-initialization.
976         * python/py-exitedevent.c (create_exited_event_object): Return a
977         gdbpy_ref<>.
978         (emit_exited_event): Use copy-initialization.
979         * python/py-inferior.c (python_new_inferior)
980         (python_inferior_deleted, add_thread_object): Use
981         copy-initialization.
982         * python/py-infevents.c (create_inferior_call_event_object)
983         (create_register_changed_event_object)
984         (create_memory_changed_event_object): Return a gdbpy_ref<>.
985         (emit_inferior_call_event, emit_memory_changed_event)
986         (emit_register_changed_event): Use copy-initialization.
987         * python/py-newobjfileevent.c (create_new_objfile_event_object):
988         Return a gdbpy_ref<>.
989         (emit_new_objfile_event): Use copy-initialization.
990         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
991         (emit_clear_objfiles_event): Use copy-initialization.
992         * python/py-signalevent.c (create_signal_event_object): Use
993         copy-initialization.
994         * python/py-threadevent.c (create_thread_event_object): Use
995         copy-initialization.
996
997 2018-08-24  Pedro Alves  <palves@redhat.com>
998             Simon Marchi  <simon.marchi@ericsson.com>
999
1000         PR gdb/23379
1001         * python/py-continueevent.c: Include "gdbthread.h".
1002         (create_continue_event_object): Add intro comment.  Add 'ptid'
1003         parameter.  Use it to find thread to pass to
1004         create_thread_event_object.
1005         (emit_continue_event): Pass PTID down to
1006         create_continue_event_object.
1007         * python/py-event.h (py_get_event_thread): Declare.
1008         (create_thread_event_object): Remove default from 'thread'
1009         parameter.
1010         * python/py-stopevent.c (create_stop_event_object): Use
1011         py_get_event_thread.
1012         * python/py-threadevent.c (get_event_thread): Rename to ...
1013         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1014         and use it to find the thread.
1015         (create_thread_event_object): Assert that THREAD isn't null.
1016         Don't find the event thread here.
1017
1018 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1019
1020         * block.h (blockrange, blockranges): New struct declarations.
1021         (struct block): Add new field named `ranges'.
1022         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1023         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1024         macros for accessing ranges in struct block.
1025         (make_blockranges): New declaration.
1026         block.c (make_blockranges): New function.
1027         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1028         for block.
1029         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1030         * blockframe.c (cache_pc_function_block): New static global.
1031         (clear_pc_function_cache): Clear cache_pc_function_block.
1032         (find_pc_partial_function): Move comment to symtab.h.  Add
1033         support for non-contiguous blocks.
1034         * cli/cli-cmds.c (block.h): Include.
1035         (print_disassembly): Handle printing of non-contiguous blocks.
1036         (disassemble_current_function): Likewise.
1037         (disassemble_command): Likewise.
1038
1039         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1040         BLOCK_START.
1041         * blockframe.c (get_pc_function_start): Likewise.
1042         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1043         (gcc_symbol_address): Likewise.
1044         * compile/compile-object-run.c (compile_object_run): Likewise.
1045         * compile/compile.c (get_expr_block_and_pc): Likewise.
1046         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1047         (func_addr_to_tail_call_list): Likewise.
1048         * findvar.c (default_read_var_value): Likewise.
1049         * inline-frame.c (inline_frame_this_id): Likewise.
1050         (skip-inline_frames): Likewise.
1051         * infcmd.c (until_next_command): Likewise.
1052         * linespec.c (convert_linespec_to_sals): Likewise.
1053         * parse.c (parse_exp_in_context_1): Likewise.
1054         * printcmd.c (build_address_symbolic): likewise.
1055         (info_address_command): Likewise.
1056         symtab.c (find_function_start_sal): Likewise.
1057         (skip_prologue_sal): Likewise.
1058         (find_function_alias_target): Likewise.
1059         (find_gnu_ifunc): Likewise.
1060         * stack.c (find_frame_funname): Likewise.
1061         * symtab.c (fixup_symbol_section): Likewise.
1062         (find_function_start_sal): Likewise.
1063         (skip_prologue_sal): Likewsie.
1064         (find_function_alias_target): Likewise.
1065         (find_gnu_ifunc): Likewise.
1066         * tracepoint.c (info_scope_command): Likewise.
1067         * value.c (value_fn_field): Likewise.
1068
1069         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1070         in place of find_pc_partial_function.
1071         * blockframe.c (find_function_entry_range_from_pc): New function.
1072         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1073         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1074         for each range in a block.
1075
1076
1077 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1078
1079         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1080         incrementation.
1081
1082 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1083
1084         * solib-svr4.c (read_program_headers_from_bfd): Return
1085         gdb::optional<gdb::byte_vector>.
1086         (svr4_exec_displacement): Adjust.
1087
1088 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1089
1090         * solib-svr4.c (read_program_header): Return
1091         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1092         (find_program_interpreter): Return
1093         gdb::optional<gdb::byte_vector>.
1094         (scan_dyntag_auxv): Adjust.
1095         (enable_break): Adjust.
1096         (svr4_exec_displacement): Adjust.
1097
1098 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1099
1100         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1101         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1102
1103 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1104
1105         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1106         string_vprintf.
1107         * guile/scm-utils.c (gdbscm_printf): Likewise.
1108         * serial.c (serial_printf): Likewise.
1109         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1110
1111 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1112
1113         * stack.c (print_frame): Print frame architecture when printing on
1114         an MI output.
1115         * NEWS: Mention new "arch" attribute in frame output.
1116
1117 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1118
1119         * arch/aarch64.h (aarch64_regnum): Update comment.
1120
1121 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1122
1123         * NEWS: Add SVE to 8.2 section.
1124
1125 2018-08-21  Pedro Alves  <palves@redhat.com>
1126
1127         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1128         out from gdbscm_parse_function_args.
1129         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1130         gdbscm_parse_function_args_1.
1131
1132 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1133
1134         PR gdb/17816
1135         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1136         operator.
1137
1138 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1139
1140         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1141
1142 2018-08-19  Michael Spang  <spang@google.com>
1143
1144         PR gdb/11786
1145         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1146         for PT_TLS segments.
1147
1148 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1149
1150         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1151         dwarf_variable_value.
1152         * dwarf2-frame.c (class dwarf_expr_executor):
1153         Add override for dwarf_variable_value.
1154         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1155         (class symbol_needs_eval_context): Likewise.
1156         (indirect_synthetic_pointer): Add forward declaration.
1157         (sect_variable_value): New function.
1158         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1159         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1160         for DW_OP_GNU_variable_value.
1161
1162 2018-08-16  Tom Tromey  <tom@tromey.com>
1163
1164         * top.c (read_command_file): Update.
1165         (command_line_input): Remove "repeat" argument.
1166         * ada-lang.c (get_selections): Update.
1167         * linespec.c (decode_line_2): Update.
1168         * defs.h (command_line_input): Remove argument.
1169         * cli/cli-script.c (read_next_line): Update.
1170         * python/py-gdb-readline.c: Update.
1171
1172 2018-08-17  Tom Tromey  <tom@tromey.com>
1173
1174         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1175         command_line_input.
1176
1177 2018-08-15  Tom Tromey  <tom@tromey.com>
1178
1179         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1180
1181 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1182
1183         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1184         If used, use find_pc_partial_function to find address range
1185         to disassemble.
1186         * mi/mi-main.c (mi_cmd_list_features): Report
1187         "data-disassemble-a-option" feature.
1188         * NEWS: Mention new -data-disassemble option -a.
1189
1190 2018-08-13  Tom Tromey  <tom@tromey.com>
1191
1192         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1193
1194 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1195
1196         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1197         (aarch64_linux_collect_sve_regset): Likewise.
1198         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1199         * regcache.h (regcache_map_entry_size): New function.
1200
1201 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1202
1203         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1204         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1205         (SVE_HEADER_VL_LENGTH): Likewise.
1206         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1207         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1208         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1209         (SVE_HEADER_SIZE_OFFSET): Likewise.
1210         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1211         (SVE_HEADER_VL_OFFSET): Likewise.
1212         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1213         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1214         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1215         (SVE_HEADER_SIZE): Likewise.
1216         (aarch64_linux_core_read_vq): Add function.
1217         (aarch64_linux_core_read_description): Check for SVE section.
1218
1219 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1220
1221         * aarch64-fbsd-tdep.c
1222         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1223         collect_size.
1224         * aarch64-linux-tdep.c
1225         (aarch64_linux_iterate_over_regset_sections): Likewise.
1226         * alpha-linux-tdep.c
1227         (alpha_linux_iterate_over_regset_sections):
1228         * alpha-nbsd-tdep.c
1229         (alphanbsd_iterate_over_regset_sections): Likewise.
1230         * amd64-fbsd-tdep.c
1231         (amd64fbsd_iterate_over_regset_sections): Likewise.
1232         * amd64-linux-tdep.c
1233         (amd64_linux_iterate_over_regset_sections): Likewise.
1234         * arm-bsd-tdep.c
1235         (armbsd_iterate_over_regset_sections): Likewise.
1236         * arm-fbsd-tdep.c
1237         (arm_fbsd_iterate_over_regset_sections): Likewise.
1238         * arm-linux-tdep.c
1239         (arm_linux_iterate_over_regset_sections): Likewise.
1240         * corelow.c (get_core_registers_cb): Likewise.
1241         (core_target::fetch_registers): Likewise.
1242         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1243         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1244         * gdbarch.h (void): Regenerate.
1245         * gdbarch.sh: Add supply_size and collect_size.
1246         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1247         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1248         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1249         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1250         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1251         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1252         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1253         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1254         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1255         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1256         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1257         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1258         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1259         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1260         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1261         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1262         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1263         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1264         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1265         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1266         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1267         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1268         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1269         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1270         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1271         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1272         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1273         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1274         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1275         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1276
1277 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1278
1279         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1280         with string_printf.
1281
1282 2018-08-10  Keith Seitz  <keiths@redhat.com>
1283
1284         * compile/compile-c-support.c (add_code_header, add_code_footer):
1285         Move into policy class.
1286         (c_push_user_expression, pop_user_expression_nop)
1287         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1288         (compile_program): New host class.
1289         (c_compile_program): New typedef.
1290         (c_compute_porgram): Use c_compile_program.
1291
1292 2018-08-10  Keith Seitz  <keiths@redhat.com>
1293
1294         * compile/compile-internal.h (compile_instance::~compile_instance):
1295         Remove calls to htab_delete.
1296         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1297         * compile.c (compile_instance::compile_instance): Initialize
1298         htab unique pointers.
1299         (compile_instance::get_cached_type, compile_instance::insert_type)
1300         (compile_instance::error_symbol_once): Update for unique_ptr.
1301
1302 2018-08-10  Keith Seitz  <keiths@redhat.com>
1303
1304         * compile/compile-c-symbols.c (struct symbol_error)
1305         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1306         (compile_instance::insert_symbol_error)
1307         (compile_instance::error_symbol_once): Move to ...
1308         * compile/compile.c: ... here.
1309
1310 2018-08-10  Keith Seitz  <keiths@redhat.com>
1311
1312         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1313         instead of `new_compile_instance'.
1314         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1315         Update description.
1316         If the symbol error map is not initialized, create it.
1317         (generate_c_for_for_one_symbol): Do not check/initialize
1318         the symbol error map.
1319         * compile/compile-c-types.c (compile_c_instance): Make a class.
1320         Update all callers.
1321         (compile_instance::compile_instance): Initialize the type cache.
1322         (get_cached_type): New function.
1323         (insert_type): Update description.
1324         (compile_c_instance::m_default_cflags): Define.
1325         (convert_type): Update description.  Use get_cached_type.
1326         (delete_instance): Moved to destructor.
1327         (new_compile_instance): Moved to constructor.
1328         * compile/compile-c.h (compile_c_instance): Make class inheriting
1329         from compile_instance.
1330         <base>: Remove field.
1331         <type_map, symbol_err_map>: Move to base class.
1332         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1333         * compile/compile-internal.h (compile_instance): Make class.
1334         <type_map_t, symbol_err_map_t>: Define.
1335         <fe>: Rename to `m_gcc_fe'.
1336         <scope, block, gcc_target_options>: Add `m_' prefix.
1337         <m_type_map, m_symbol_err_map>: New fields, moved from
1338         compile_c_instance.
1339         <destroy>: Remove.
1340         (convert_type, new_compile_instance): Remove.
1341         * compile/compile.c (cleanup_compile_instance): Remove.
1342         (compile_to_object): Use unique_ptr to eliminate cleanups.
1343         (compile_instance::set_print_callback, compile_instance::version)
1344         (compile_instance::set_verbose)
1345         (compile_instance::set_driver_filename)
1346         (compile_instance::set_triplet_regexp)
1347         (compile_instance::set_arguments)
1348         (compile_instance::set_source_file)
1349         (compile_instance::compile): Define.
1350
1351 2018-08-10  Keith Seitz  <keiths@redhat.com>
1352
1353         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1354         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1355         gcc-c-fe.def to define C plugin.
1356         (delete_instance): Delete `c_plugin'.
1357         (new_compile_instance): Initialize `c_plugin'.
1358         * compile/compile-c.h: Include gcc_c_plugin.h.
1359         (struct compile_c_instance) <c_plugin>: New member.
1360         * gcc-c-plugin.h: New file.
1361         Update all callers with API change.
1362
1363 2018-08-10  Keith Seitz  <keiths@redhat.com>
1364
1365         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1366         (HFILES_NO_SRCDIR): ... to here.
1367         Add compile-internal.h and compile-c.h.
1368         * compile/compile-c-support.c: Include compile-c.h.
1369         * compile/compile-c-symbols.c: Include compile-c.h.
1370         (generate_c_for_variable_locations): Update comment.
1371         * compile/compile-c-types.c: Include compile-c.h.
1372         * compile/compile-c.h: New file -- moved C language declarations
1373         from other files here.
1374         * compile/compile-internal.h: Do not include hashtab.h or
1375         common/enum-flags.h.
1376         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1377         (gcc_convert_symbol, gcc_symbol_address)
1378         (generate_c_for_variable_locations, c_get_mode_for_size)
1379         (c_get_range_decl_name): Definitions moved to compile-c.h.
1380         * compile/compile-loc2c.c: Include compile-c.h.
1381
1382 2018-08-10  Keith Seitz  <keiths@redhat.com>
1383
1384         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1385         (c_symbol_substitution_name): ... this.
1386         Update all callers.
1387
1388 2018-08-10  Keith Seitz  <keiths@redhat.com>
1389
1390         * compile/compile-c-support.c (c_compute_program): Use
1391         unique_xmalloc_ptr to eliminate cleanup.
1392         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1393         Return a unique_xmalloc_ptr and eliminate cleanup.
1394         * compile/compile-internal.h (generate_c_for_variable_locations):
1395         Return unique_xmalloc_ptr and update description.
1396
1397 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1398
1399         * corelow.c (core_target::get_core_register_section): Rename
1400         min_size to section_min_size.
1401
1402 2018-08-09  Jim Wilson  <jimw@sifive.com>
1403
1404         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1405         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1406         * NEWS: Mention new GNU/Linux RISC-V target.
1407         * configure.host: Add riscv*-*-linux*.
1408         * configure.nat: Add riscv*.
1409         * configure.tgt: Add riscv*-*-linux*.
1410         * riscv-linux-nat.c: New file.
1411         * riscv-linux-tdep.c: New file.
1412
1413 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1414
1415         * infrun.c (resume): Make static, add forward declaration.
1416         (proceed): Update header comment.
1417         * infrun.h (resume): Delete declaration.
1418
1419 2018-08-09  Tom Tromey  <tom@tromey.com>
1420
1421         * riscv-tdep.h: Minor formatting fixes.
1422
1423 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1424
1425         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1426         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1427         (test_mkdir_recursive): Likewise.
1428         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1429
1430 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1431
1432         * valarith.c (value_subscripted_rvalue): If an array is not in
1433         memory, and we don't know the upper bound, then we can't know that
1434         the requested element exists or not.
1435
1436 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1437
1438         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1439         (target_options_to_string): Add comment.
1440
1441 2018-08-08  Tom Tromey  <tom@tromey.com>
1442
1443         * unittests/scoped_mmap-selftests.c: Check result of "write".
1444
1445 2018-08-08  Jim Wilson  <jimw@sifive.com>
1446
1447         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1448         (decode_register_index_short): New.
1449         (decode_j_type_insn, decode_cj_type_insn): New.
1450         (decode_b_type_insn, decode_cb_type_insn): New.
1451         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1452         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1453         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1454         is_c_sw_insn instead of is_sw_insn.
1455         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1456         (riscv_software_single_step): New.
1457         * riscv-tdep.h (riscv_software_single_step): Declare.
1458
1459         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1460         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1461
1462 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1463
1464         PR gdb/18050:
1465         * target.c (dispose_inferior): Don't dispose of inferiors that are
1466         already killed.
1467
1468 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1469
1470         * remote.c (remote_target::download_tracepoint): Change char* to
1471         const char*.
1472
1473 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1474
1475         * target.h (target_options_to_string): Return an std::string.
1476         * target.c (str_comma_list_concat_elem): Return void, use
1477         std::string.
1478         (do_option): Likewise.
1479         (target_options_to_string): Return an std::string.
1480         * linux-nat.c (linux_nat_target::wait): Adjust.
1481         * target-debug.h (target_debug_print_options): Adjust.
1482
1483 2018-08-07  Tom Tromey  <tom@tromey.com>
1484
1485         * Makefile.in (CPPFLAGS): New variable.
1486         (INTERNAL_CPPFLAGS): Use it.
1487
1488 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1489
1490         * NEWS: Mention the index cache.
1491
1492 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1493
1494         * common/pathstuff.h (get_standard_cache_dir): New.
1495         * common/pathstuff.c (get_standard_cache_dir): New.
1496         * build-id.h (build_id_to_string): New.
1497         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1498         DEBUG_STR_SUFFIX): Move to here.
1499         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1500         DEBUG_STR_SUFFIX): Move from there.
1501         (write_psymtabs_to_index): Make non-static, add basename
1502         parameter.  Write to temporary files, rename when done.
1503         (save_gdb_index_command): Adjust call to
1504         write_psymtabs_to_index.
1505         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1506         field.
1507         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1508         (get_gdb_index_contents_from_cache): New.
1509         (get_gdb_index_contents_from_cache_dwz): New.
1510         (dwarf2_initialize_objfile): Read index from cache.
1511         (dwarf2_build_psymtabs): Save to index.
1512         * dwarf-index-cache.h: New file.
1513         * dwarf-index-cache.c: New file.
1514         * dwarf-index-write.h: New file.
1515
1516 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1517
1518         * gnulib/aclocal.m4: Re-generate.
1519         * gnulib/config.in: Re-generate.
1520         * gnulib/configure: Re-generate.
1521         * gnulib/import/Makefile.am: Re-generate.
1522         * gnulib/import/Makefile.in: Re-generate.
1523         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1524         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1525         * gnulib/import/m4/mkdir.m4: New file.
1526         * gnulib/import/mkdir.c: New file.
1527         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1528         module.
1529
1530 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1531
1532         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1533         * common/scoped_mmap.c: New file.
1534         * common/scoped_mmap.h (destroy): New method.
1535         (~scoped_mmap, reset): Use destroy.
1536         (scoped_mmap): New move constructor.
1537         (mmap_file): New declaration.
1538         * unittests/scoped_mmap-selftests.c (test_normal,
1539         test_invalid_filename, run_tests): New functions.
1540         (_initialize_scoped_mmap_selftests): Register selftest.
1541
1542 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1543
1544         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1545         (read_gdb_index_from_buffer): ... this.  Remove section
1546         parameter, add buffer parameter.
1547         (get_gdb_index_contents_ftype,
1548         get_gdb_index_contents_dwz_ftype): New typedefs.
1549         (dwarf2_read_gdb_index): Add callback parameters to get the
1550         index contents.
1551         (get_gdb_index_contents_from_section): New.
1552         (dwarf2_initialize_objfile): Update call to
1553         dwarf2_read_gdb_index.
1554
1555 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1556
1557         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1558         (gdb_open_cloexec): Likewise.
1559         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1560         (commandline_from_pid): Likewise.
1561         (linux_xfer_osdata_threads): Likewise.
1562         (linux_xfer_osdata_fds): Likewise.
1563         * ada-lang.c (is_package_name): Likewise.
1564         * auxv.c (procfs_xfer_auxv): Likewise.
1565         * breakpoint.c (print_one_breakpoint_location): Use
1566         uiout::field_fmt.
1567         (print_one_catch_solib): Use string_printf.
1568         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1569         (add_pe_forwarded_sym): Likewise.
1570         * dwarf2read.c (create_type_unit_group): Likewise.
1571         (build_error_marker_type): Likewise.
1572         * infcall.c (get_function_name): Likewise.
1573         * valprint.c (print_converted_chars_to_obstack): Likewise.
1574         * xtensa-tdep.c (xtensa_register_type): Likewise.
1575
1576 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1577
1578         * remote.c (remote_target::download_tracepoint): Fix format
1579         string errors.
1580
1581 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1582
1583         * tracefile.c: Include common/byte-vector.h.
1584         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1585         with trace_regblock_size if needed.  Update uses of buf.
1586
1587 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1588
1589         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1590         std::vector<unsigned char>.
1591         * tracepoint.c (collection_list::collection_list): Remove
1592         m_regs_mask initializer from initializer list.  Resize
1593         m_regs_mask using the largest remote register number.
1594         (collection_list::add_remote_register): Remove size check on
1595         m_regs_mask.  Use at to access element.
1596         (collection_list::stringify): Change type of temp_buf to
1597         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1598         stringify the register mask.  Use pack_hex_byte for the register
1599         mask.
1600
1601 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1602
1603         * tracepoint.h (class collection_list) <add_register>: Remove.
1604         <add_remote_register, add_ax_registers, add_local_register>:
1605         Declare.
1606         <add_memrange>: Add scope parameter.
1607         * tracepoint.c (encode_actions_1): Likewise.
1608         (collection_list::add_register): Rename to ...
1609         (collection_list::add_remote_register): ... this.  Update
1610         comment.
1611         (collection_list::add_ax_registers, add_local_register): New
1612         methods.
1613         (collection_list::add_memrange): Add scope parameter.  Call
1614         add_local_register instead of add_register.
1615         (finalize_tracepoint_aexpr): New function.
1616         (collection_list::collect_symbol): Update calls to add_memrange.
1617         Call add_local_register instead of add_register.  Call
1618         add_ax_registers.  Call finalize_tracepoint_aexpr.
1619         (encode_actions_1): Get remote regnos for $reg action.  Call
1620         add_remote_register, add_ax_registers, and add_local_register.
1621         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1622         (validate_actionline): Call finalize_tracepoint_aexpr.
1623
1624 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1625
1626         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1627         Replace array buf with gdb::char_vector buf, of size
1628         get_remote_packet_size ().  Replace references to buf and
1629         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1630         and xsnprintf with snprintf.  Raise errors if the buffer is too
1631         small.
1632
1633 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1634
1635         * remote.c (remote_target::download_tracepoint): Fix the has_more
1636         predicate in the QTDP action list iteration.
1637
1638 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1639
1640         * remote.c (remote_target::download_tracepoint): Fix indentation
1641         in for block.
1642
1643 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1644
1645         * proc-api.c (_initialize_proc_api): Remove c, unused.
1646         * procfs.c (procfs_init_inferior): Remove signals, unused.
1647         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1648         unused.
1649
1650 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1651             Andrew Burgess  <andrew.burgess@embecosm.com>
1652
1653         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1654         'W_STOPCODE (0)' as this could be ambiguous.
1655
1656 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1657
1658         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1659         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1660         "ai_socktype").
1661
1662 2018-08-02  Tom Tromey  <tom@tromey.com>
1663
1664         PR symtab/16842.
1665         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1666         symbols.
1667         (process_structure_scope): Likewise.
1668
1669 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1670
1671         PR gdb/22629:
1672         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1673         kill inferior.
1674
1675 2018-08-02  Tom Tromey  <tom@tromey.com>
1676
1677         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1678         (darwin_suspend_inferior, darwin_resume_inferior)
1679         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1680         (darwin_check_new_threads): Check result of get_darwin_inferior.
1681
1682 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1683
1684         GDB 8.1.1 released.
1685
1686 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1687
1688         * varobj.c (varobj_get_path_expr_parent): Report an error if
1689         parent is a dynamic varobj.
1690
1691 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1692
1693         * gnulib/aclocal.m4: Re-generate.
1694         * gnulib/config.in: Re-generate.
1695         * gnulib/configure: Re-generate.
1696         * gnulib/import/Makefile.in: Re-generate.
1697         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1698         * gnulib/import/m4/onceonly.m4: Re-generate.
1699
1700 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1701
1702         * target-descriptions.c (struct xml_test_tdesc): New.
1703         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1704         (record_xml_tdesc): Update.
1705         (maintenance_check_xml_descriptions): Update.
1706         * target-descriptions.h (record_xml_tdesc): Update comment.
1707
1708 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1709
1710         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1711         checking array bounds are defined.
1712
1713 2018-07-30  Tom Tromey  <tom@tromey.com>
1714
1715         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1716         irreflexivity violation.
1717
1718 2018-07-30  Tom Tromey  <tom@tromey.com>
1719
1720         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1721         * value.c (unpack_long): Remove lint code.
1722         * valops.c (value_ind): Remove lint code.
1723         * valarith.c (value_x_binop, value_x_unop, value_equal)
1724         (value_pos): Remove lint code.
1725
1726 2018-07-28  Tom de Vries  <tdevries@suse.de>
1727
1728         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1729         with undefined upper bound as <optimized out>.
1730
1731 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1732
1733         * gcore.in: Rename variable "name" to "prefix".  Expand
1734         "usage" text.
1735
1736 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1737
1738         * windows-nat.c (windows_nat_target::create_inferior): Update to
1739         call close() in global namespace.
1740
1741 2018-07-26  Tom Tromey  <tom@tromey.com>
1742
1743         * dwarf-index-write.c (add_address_entry): Don't add objfile
1744         offsets.
1745         * dbxread.c (find_stab_function): Rename from
1746         find_stab_function_addr.  Return a bound_minimal_symbol.
1747         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1748         Don't add objfile offsets.
1749         (end_psymtab): Use raw_text_low, raw_text_high,
1750         MSYMBOL_VALUE_RAW_ADDRESS.
1751         (read_ofile_symtab): Update.
1752         (process_one_symbol): Update.
1753         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1754         offsets.
1755         (dw2_relocate): Remove.
1756         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1757         searching addrmap.
1758         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1759         Update.
1760         (process_psymtab_comp_unit_reader, add_partial_symbol)
1761         (add_partial_subprogram, dwarf2_ranges_read): Update.
1762         (load_partial_dies): Update.
1763         (add_address_entry): Don't add objfile offsets.
1764         (dwarf2_build_include_psymtabs): Update.
1765         (create_addrmap_from_aranges): Don't add objfile offsets.
1766         (dw2_find_pc_sect_compunit_symtab): Update.
1767         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1768         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1769         Update.
1770         (parse_partial_symbols): Don't add objfile offsets.  Use
1771         raw_text_low, raw_text_high.  Update.
1772         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1773         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1774         or call 'relocate' quick function.  Clear psymbol_map.
1775         * psympriv.h (struct partial_symbol) <address>: Add section
1776         offset.
1777         <set_unrelocated_address>: Rename from set_address.
1778         <raw_text_low, raw_text_high>: New methods.
1779         <text_low, text_high>: Add objfile parameter.
1780         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1781         set_unrelocated_address.
1782         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1783         (find_pc_psymbol): Update.
1784         (fixup_psymbol_section, relocate_psymtabs): Remove.
1785         (dump_psymtab, psym_functions): Update.
1786         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1787         parameter.
1788         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1789         (start_psymtab_common): Update.
1790         * symfile-debug.c (debug_qf_relocate): Remove.
1791         (debug_sym_quick_functions): Update.
1792         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1793         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1794         Update.
1795
1796 2018-07-26  Tom Tromey  <tromey@redhat.com>
1797
1798         * dbxread.c (end_psymtab): Use text_high_valid and
1799         text_low_valid.
1800         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1801         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1802         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1803         Update comment.
1804         <text_low_valid, text_high_valid>: New fields.
1805         <set_text_low, set_text_high>: Update.
1806         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1807
1808 2018-07-26  Tom Tromey  <tom@tromey.com>
1809
1810         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1811         Update.
1812         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1813         textlow and texthigh fields.
1814         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1815         Update.
1816         * mdebugread.c (parse_lines, parse_partial_symbols)
1817         (psymtab_to_symtab_1): Update.
1818         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1819         Rename fields.  Update comment.  Now private.
1820         <text_low, text_high, set_text_low, set_text_high>: New methods.
1821         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1822         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1823         (start_psymtab_common, maintenance_info_psymtabs)
1824         (maintenance_check_psymtabs): Update.
1825         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1826         texthigh fields.
1827         (scan_xcoff_symtab): Update.
1828
1829 2018-07-26  Tom Tromey  <tromey@redhat.com>
1830
1831         * psympriv.h (struct partial_symbol) <unrelocated_address,
1832         address, set_address>: New methods.
1833         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1834         (fixup_psymbol_section, relocate_psymtabs): Update.
1835         (print_partial_symbols): Add 'objfile' parameter.  Update.
1836         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1837         Update.
1838
1839 2018-07-26  Tom Tromey  <tom@tromey.com>
1840
1841         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1842         (debug_names::write_psymbols): Update.
1843         * psympriv.h (struct partial_symbol): Derive from
1844         general_symbol_info.
1845         <obj_section>: New method.
1846         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1847         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1848         (find_pc_sect_psymbol, fixup_psymbol_section)
1849         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1850         (print_partial_symbols, recursively_search_psymtabs)
1851         (compare_psymbols, psymbol_hash, psymbol_compare)
1852         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1853         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1854
1855 2018-07-26  Tom Tromey  <tromey@redhat.com>
1856
1857         * dbxread.c (end_psymtab): Remove dead code.
1858
1859 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1860
1861         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1862         DWARF unwinders are disabled.
1863         * dwarf2-frame.c: Add dwarf2read.h include.
1864         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1865         disabled.
1866         (dwarf2_frame_unwinders_enabled_p): Define.
1867         (show_dwarf_unwinders_enabled_p): New function.
1868         (_initialize_dwarf2_frame): Register switch to control DWARF
1869         unwinder use.
1870         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1871         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1872         (show_dwarf_cmdlist): Remove static keyword.
1873         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1874         (show_dwarf_cmdlist): Declare.
1875         * NEWS: Document new feature.
1876
1877 2018-07-26  Tom de Vries  <tdevries@suse.de>
1878
1879         PR breakpoints/23366
1880         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1881
1882 2018-07-26  Tom de Vries  <tdevries@suse.de>
1883
1884         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1885         DW_AT_count can't be translated to a dynamic prop.
1886
1887 2018-07-25  Tom de Vries  <tdevries@suse.de>
1888
1889         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1890         try/catch.
1891
1892 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1893
1894         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1895
1896 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1897
1898         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1899
1900 2018-07-24  Keith Seitz  <keiths@redhat.comt
1901
1902         PR symtab/23010
1903         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1904         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1905         instead of add_symbol_to_list.
1906         (read_file_scope): Call prepare_one_comp_unit before reading
1907         any other DIEs.
1908
1909 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1910
1911         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1912
1913 2018-07-24  Tom Tromey  <tom@tromey.com>
1914
1915         * utils.c (malloc, realloc, free): Don't declare.
1916         * configure, config.in: Rebuild.
1917         * configure.ac: Don't check for declarations of free, malloc, or
1918         realloc.
1919
1920 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1921
1922         * aarch64-linux-nat.c
1923         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1924         variable.
1925         * arm-linux-nat.c (fetch_regs): Likewise.
1926         (store_regs): Likewise.
1927         (fetch_vfp_regs): Likewise.
1928         (store_vfp_regs): Likewise.
1929         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1930         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1931         (arm_linux_nat_target::insert_watchpoint): Likewise.
1932         (arm_linux_nat_target::remove_watchpoint): Likewise.
1933         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1934         Likewise.
1935         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1936         Likewise.
1937         * ppc-linux-nat.c (fetch_register): Likewise.
1938         (fetch_all_gp_regs): Likewise.
1939         (fetch_ppc_registers): Likewise.
1940         (store_all_gp_regs): Likewise.
1941         (store_ppc_registers): Likewise.
1942         (hwdebug_insert_point): Likewise.
1943         (can_use_watchpoint_cond_accel): Likewise.
1944         * remote-sim.c (gdb_os_write_stdout): Likewise.
1945
1946 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1947             Tom Tromey  <tom@tromey.com>
1948
1949         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1950         test for it.
1951         * configure: Rebuild.
1952
1953 2018-07-22  Tom Tromey  <tom@tromey.com>
1954
1955         * regformats/regdat.sh: Define xmltarget_${name} inside
1956         #ifndef IN_PROCESS_AGENT.
1957
1958 2018-07-22  Tom Tromey  <tom@tromey.com>
1959
1960         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1961
1962 2018-07-22  Tom Tromey  <tom@tromey.com>
1963
1964         * symfile.c (reread_symbols): Notify iter, not objfile.
1965
1966 2018-07-22  Tom Tromey  <tom@tromey.com>
1967
1968         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1969         Use arch_ops.
1970         (ravenscar_thread_target::prepare_to_store): Likewise.
1971
1972 2018-07-22  Tom Tromey  <tom@tromey.com>
1973
1974         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1975         unused variable.  Call value_fetch_lazy when needed.
1976         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1977         Remove unused variable.  Call value_fetch_lazy when needed.
1978
1979 2018-07-22  Tom Tromey  <tom@tromey.com>
1980
1981         * m32c-tdep.c (mark_dma): Return void.
1982         (make_regs): Remove unused declarations.
1983
1984 2018-07-22  Tom Tromey  <tom@tromey.com>
1985
1986         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1987         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1988         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1989         bkscm_get_valid_block_smob_arg_unsafe for effect.
1990
1991 2018-07-22  Tom Tromey  <tom@tromey.com>
1992
1993         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1994         value_type.
1995
1996 2018-07-22  Tom Tromey  <tom@tromey.com>
1997
1998         * windows-nat.c (saved_context): Conditionally define.
1999         * remote.c (remote_target::remote_btrace_maybe_reopen):
2000         Conditionally declare "warned".
2001         * inflow.c (sigquit_ours): Conditionally define.
2002         (new_tty): Move "tty" declaration inside #if.
2003         * guile/guile.c (guile_datadir): Conditionally define.
2004         * charset.c (set_be_le_names): Move some declarations inside #if.
2005         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2006         #if.
2007         (parse_xml_btrace_conf): Likewise.
2008
2009 2018-07-22  Tom Tromey  <tom@tromey.com>
2010
2011         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2012
2013 2018-07-22  Tom Tromey  <tom@tromey.com>
2014
2015         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2016         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2017         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2018         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2019         * stack.c (frame_apply_level_command): Remove unused variable.
2020         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2021         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2022         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2023         unused variable.
2024         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2025         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2026         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2027         variable.
2028         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2029         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2030         variable.
2031         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2032         Remove unused variable.
2033         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2034         variable.
2035         * common/tdesc.c (print_xml_feature::visit): Remove unused
2036         variable.
2037         * compile/compile-object-load.c (store_regs): Remove unused
2038         variables.
2039         * complaints.c (clear_complaints): Remove unused variable.
2040         * corelow.c (core_target_open): Remove unused variable.
2041         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2042         variable.
2043         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2044         variable.
2045         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2046         variable.
2047         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2048         variable.
2049         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2050         variable.
2051         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2052         variable.
2053         * ia64-tdep.c (examine_prologue): Remove unused variable.
2054         * infcall.c (run_inferior_call): Remove unused variable.
2055         * inferior.c (exit_inferior): Remove unused variable.
2056         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2057         * linespec.c (decode_line_2): Remove unused variable.
2058         * linux-nat.c (super_close): Remove.
2059         * linux-tdep.c (linux_info_proc): Remove unused variable.
2060         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2061         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2062         Remove unused variable.
2063         * parse.c (find_minsym_type_and_address): Remove unused variable.
2064         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2065         variable.
2066         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2067         variable.
2068         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2069         variables.
2070         * record-btrace.c (record_btrace_target::store_registers): Remove
2071         unused variable.
2072         (cmd_show_record_btrace_cpu): Remove unused variable.
2073         * riscv-tdep.c (riscv_register_reggroup_p)
2074         (riscv_push_dummy_call, riscv_return_value): Remove unused
2075         variable.
2076         * rust-exp.y (literal): Remove unused variable.
2077         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2078         unused variable.
2079         <STRUCTOP_ANONYMOUS>: Likewise.
2080         * s390-linux-tdep.c (s390_linux_init_abi_31)
2081         (s390_linux_init_abi_64): Remove unused variable.
2082         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2083         (file_select_thread, net_windows_open, _initialize_ser_windows):
2084         Remove unused variables.
2085         * symtab.c (find_pc_sect_line): Remove unused variable.
2086         * target-memory.c (compute_garbled_blocks): Remove unused
2087         variable.
2088         (target_write_memory_blocks): Remove unused variable.
2089         * target.c (target_stack::unpush): Remove unused variables.
2090         * tracepoint.c (start_tracing, all_tracepoint_actions)
2091         (merge_uploaded_trace_state_variables)
2092         (print_one_static_tracepoint_marker): Remove unused variable.
2093         * unittests/basic_string_view/element_access/char/1.cc (test01):
2094         Remove unused variable.
2095         * windows-nat.c (windows_continue, windows_add_all_dlls)
2096         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2097         Remove unused variables.
2098
2099 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2100
2101         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2102         attr_profile in HAVE_ELF.
2103         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2104         HAVE_ELF.
2105
2106 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2107
2108         * frame.c (frame_register_unwind): Change parameter name.
2109         (frame_unwind_register): Likewise.
2110         (frame_unwind_register_value): Likewise.
2111         (frame_unwind_register_signed): Likewise.
2112         (frame_unwind_register_unsigned): Likewise.
2113         * frame.h (frame_register_unwind): Likewise.
2114         (frame_unwind_register): Likewise.
2115         (frame_unwind_register_value): Likewise.
2116         (frame_unwind_register_signed): Likewise.
2117         (frame_unwind_register_unsigned): Likewise.
2118         (frame_unwind_arch): Likewise.
2119
2120 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2121
2122         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2123         ISA maintenance.
2124
2125 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2126
2127         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2128         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2129         hand.
2130
2131 2018-07-20  Keith Seitz  <keiths@redhat.com>
2132
2133         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2134         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2135         m_compunit_symtab, m_language>: Add "m_" prefix.
2136         Update all uses.
2137         * buildsym.c: Update all uses.
2138
2139 2018-07-20  Tom Tromey  <tom@tromey.com>
2140
2141         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2142         * buildsym.h (record_line_ftype): Remove typedef.
2143
2144 2018-07-20  Tom Tromey  <tom@tromey.com>
2145
2146         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2147         (end_expandable_symtab): Likewise.
2148         (end_symtab_get_static_block): Likewise.
2149         (end_symtab_from_static_block): Likewise.
2150         * buildsym-legacy.c (augment_type_symtab): Remove.
2151         (end_expandable_symtab): Remove.
2152         (end_symtab_get_static_block): Remove.
2153         (end_symtab_from_static_block): Remove.
2154
2155 2018-07-20  Tom Tromey  <tom@tromey.com>
2156
2157         * dwarf2read.c: Include buildsym.h.
2158         (struct dwarf2_cu) <builder>: New method.
2159         (fixup_go_packaging): Update.
2160         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2161         use scoped_free_pendings.
2162         (using_directives): Add "cu" parameter, remove "language".
2163         (read_import_statement, setup_type_unit_groups, )
2164         (read_func_scope, read_lexical_block_scope)
2165         (dwarf2_record_block_ranges, read_namespace): Update.
2166         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2167         (lnp_state_machine::handle_end_sequence): Update.
2168         (class lnp_state_machine) <m_cu>: New member.
2169         <m_record_line_callback>: Remove.
2170         <m_currently_recording_lines>: New member.
2171         (lnp_state_machine::handle_set_file): Update.
2172         (noop_record_line): Remove.
2173         (dwarf_record_line_p): Add cu parameter.
2174         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2175         (lnp_state_machine::record_line)
2176         (lnp_state_machine::lnp_state_machine)
2177         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2178         (dwarf_decode_lines): Update.
2179         (dwarf2_start_subfile): Add cu parameter.
2180         (dwarf2_start_symtab, new_symbol): Update.
2181         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2182         Remove dwarf2_per_objfile parameter.
2183         (dwarf_decode_macros): Update.
2184
2185 2018-07-20  Tom Tromey  <tom@tromey.com>
2186
2187         * stabsread.c (define_symbol): Update.
2188         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2189         * dwarf2read.c (new_symbol): Update.
2190         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2191         * cp-namespace.c: Include buildsym.h.
2192         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2193         * buildsym-legacy.c (get_buildsym_compunit): New function.
2194
2195 2018-07-20  Tom Tromey  <tom@tromey.com>
2196
2197         * xcoffread.c: Include buildsym-legacy.h.
2198         * windows-nat.c: Include buildsym-legacy.h.
2199         * stabsread.c: Include buildsym-legacy.h.
2200         * mdebugread.c: Include buildsym-legacy.h.
2201         * buildsym-legacy.h: New file.
2202         * buildsym-legacy.c: New file, from buildsym.c.
2203         * go32-nat.c: Include buildsym-legacy.h.
2204         * dwarf2read.c: Include buildsym-legacy.h.
2205         * dbxread.c: Include buildsym-legacy.h.
2206         * cp-namespace.c: Include buildsym-legacy.h.
2207         * coffread.c: Include buildsym-legacy.h.
2208         * buildsym.h: Move some contents to buildsym-legacy.h.
2209         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2210         buildsym-legacy.c.
2211         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2212
2213 2018-07-20  Tom Tromey  <tom@tromey.com>
2214
2215         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2216         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2217         (buildsym_compunit::buildsym_compunit)
2218         (buildsym_compunit::~buildsym_compunit)
2219         (buildsym_compunit::get_macro_table): Define.
2220
2221 2018-07-20  Tom Tromey  <tom@tromey.com>
2222
2223         * buildsym.c (reset_symtab_globals): Remove.
2224         (buildsym_compunit::end_symtab_from_static_block): Update.
2225         (buildsym_compunit::augment_type_symtab): Update.
2226         (end_symtab_from_static_block): Call free_buildsym_compunit.
2227         (augment_type_symtab, end_symtab, end_expandable_symtab):
2228         Likewise.
2229
2230 2018-07-20  Tom Tromey  <tom@tromey.com>
2231
2232         * arch-utils.c: Do not include buildsym.h.
2233         * mipsread.c: Do not include buildsym.h.
2234         * machoread.c: Do not include buildsym.h.
2235         * elfread.c: Do not include buildsym.h.
2236
2237 2018-07-20  Tom Tromey  <tom@tromey.com>
2238
2239         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2240         initialization.
2241         (buildsym_compunit): Add new constructor.
2242         (struct buildsym_compunit) <get_last_source_file, finish_block,
2243         record_block_range, start_subfile, patch_subfile_names,
2244         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2245         set_last_source_start_addr, get_last_source_start_addr,
2246         get_local_using_directives, set_local_using_directives,
2247         get_global_using_directives, outermost_context_p,
2248         get_current_context_stack, get_context_stack_depth,
2249         get_current_subfile, get_local_symbols, get_file_symbols,
2250         get_global_symbols, record_debugformat, record_producer,
2251         push_context, pop_context, end_symtab_get_static_block,
2252         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2253         New public methods.
2254         <record_pending_block, finish_block_internal, make_blockvector,
2255         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2256         private methods.
2257         Update all users.
2258
2259 2018-05-22  Tom Tromey  <tom@tromey.com>
2260
2261         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2262         parameter.
2263         (finish_block_internal): Update.
2264
2265 2018-07-20  Tom Tromey  <tom@tromey.com>
2266
2267         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2268         parameter.
2269         (finish_block_internal): Update.
2270
2271 2018-07-20  Tom Tromey  <tom@tromey.com>
2272
2273         * buildsym.h (EXTERN): Don't define or undef.
2274         * buildsym.c (EXTERN): Don't define.
2275
2276 2018-07-20  Tom Tromey  <tom@tromey.com>
2277
2278         * buildsym.c: Remove TODO comment.
2279
2280 2018-07-20  Tom Tromey  <tom@tromey.com>
2281
2282         * coffread.c (coff_symtab_read): Update.
2283         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2284         (xcoff_new_init): Update.
2285         * mipsread.c (mipscoff_new_init): Update.
2286         * mdebugread.c (mdebug_build_psymtabs): Update.
2287         * elfread.c (elf_new_init): Update.
2288         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2289         Update.
2290         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2291         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2292         (stabsect_build_psymtabs): Update.
2293         * buildsym.h (buildsym_init): Don't declare.
2294         * buildsym.c: Update comment.
2295         (prepare_for_building): Remove.
2296         (start_symtab, restart_symtab): Update.
2297         (reset_symtab_globals): Update comment.
2298         (buildsym_init): Remove.
2299
2300 2018-07-20  Tom Tromey  <tom@tromey.com>
2301
2302         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2303         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2304         (read_enum_type, common_block_start, common_block_end)
2305         (cleanup_undefined_types_1, finish_global_stabs): Update.
2306         * mdebugread.c (psymtab_to_symtab_1): Update.
2307         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2308         (read_lexical_block_scope, new_symbol): Update.
2309         * dbxread.c (process_one_symbol): Update.
2310         * coffread.c (coff_symtab_read, process_coff_symbol)
2311         (coff_read_enum_type): Update.
2312         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2313         declare.
2314         (get_local_symbols, get_file_symbols, get_global_symbols): New
2315         functions.
2316         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2317         m_global_symbols.
2318         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2319         (~scoped_free_pendings): Update.
2320         (finish_block, prepare_for_building, reset_symtab_globals)
2321         (end_symtab_get_static_block, end_symtab_with_blockvector)
2322         (augment_type_symtab, push_context): Update.
2323         (get_local_symbols, get_file_symbols, get_global_symbols): New
2324         functions.
2325         (buildsym_init): Update.
2326
2327 2018-07-20  Tom Tromey  <tom@tromey.com>
2328
2329         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2330         (process_full_type_unit): Likewise.
2331         (dwarf2_start_symtab): Set list_in_scope.
2332
2333 2018-07-20  Tom Tromey  <tom@tromey.com>
2334
2335         * dwarf2read.c (process_psymtab_comp_unit_reader)
2336         (build_type_psymtabs_reader): Do not set list_in_scope.
2337
2338 2018-07-20  Tom Tromey  <tom@tromey.com>
2339
2340         * buildsym.c (free_pendings): Remove.
2341         (add_symbol_to_list, scoped_free_pendings)
2342         (finish_block_internal, buildsym_init): Update.
2343
2344 2018-07-20  Tom Tromey  <tom@tromey.com>
2345
2346         * xcoffread.c (read_xcoff_symtab): Update.
2347         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2348         Update.
2349         * dbxread.c (process_one_symbol): Update.
2350         * coffread.c (coff_symtab_read): Update.
2351         * buildsym.h (finish_block): Update.
2352         * buildsym.c (finish_block): Remove "listhead" argument.
2353         (end_symtab_get_static_block): Update.
2354
2355 2018-07-20  Tom Tromey  <tom@tromey.com>
2356
2357         * buildsym.h (class scoped_free_pendings): Remove constructor.
2358         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2359         method.
2360         <m_pending_block_obstack, m_pending_blocks>: New members.
2361         (pending_block_obstack, pending_blocks): Remove.
2362         (scoped_free_pendings::scoped_free_pendings): Default.
2363         (~scoped_free_pendings): Update.
2364         (free_pending_blocks): Remove.
2365         (finish_block_internal, record_pending_block, make_blockvector)
2366         (end_symtab_get_static_block, augment_type_symtab, push_context)
2367         (buildsym_init): Update.
2368
2369 2018-07-20  Tom Tromey  <tom@tromey.com>
2370
2371         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2372         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2373         members.
2374         (pending_addrmap, pending_addrmap_obstack)
2375         (pending_addrmap_interesting): Remove.
2376         (scoped_free_pendings, record_block_range, make_blockvector)
2377         (prepare_for_building, reset_symtab_globals, buildsym_init):
2378         Update.
2379
2380 2018-07-20  Tom Tromey  <tom@tromey.com>
2381
2382         * xcoffread.c (process_linenos): Update.
2383         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2384         * mdebugread.c (psymtab_to_symtab_1): Update.
2385         * dwarf2read.c (setup_type_unit_groups)
2386         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2387         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2388         * dbxread.c (process_one_symbol): Update.
2389         * coffread.c (coff_symtab_read, enter_linenos)
2390         (process_coff_symbol): Update.
2391         * buildsym.h (current_subfile): Don't declare.
2392         (get_current_subfile): Declare.
2393         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2394         member.
2395         (start_subfile, free_buildsym_compunit, push_subfile)
2396         (prepare_for_building, start_symtab): Update.
2397         (get_current_subfile): New function.
2398
2399 2018-07-20  Tom Tromey  <tom@tromey.com>
2400
2401         * coffread.c (coff_symtab_read): Update.
2402         * xcoffread.c (read_xcoff_symtab): Update.
2403         * dwarf2read.c (new_symbol): Update.
2404         (read_func_scope, read_lexical_block_scope): Update.
2405         * dbxread.c (process_one_symbol): Update.
2406         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2407         (outermost_context_p): Remove macro.
2408         (outermost_context_p, get_current_context_stack)
2409         (get_context_stack_depth): Declare.
2410         (pop_context): Return struct context_stack.
2411         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2412         member.
2413         (context_stack_size): Remove.
2414         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2415         (prepare_for_building, end_symtab_get_static_block)
2416         (augment_type_symtab, push_context): Update.
2417         (pop_context): Return struct context_stack.
2418         (outermost_context_p, get_current_context_stack)
2419         (get_context_stack_depth): New functions.
2420         (buildsym_init): Update.
2421
2422 2018-07-20  Tom Tromey  <tom@tromey.com>
2423
2424         * rust-exp.y: Now a pure parser.  Update all rules.
2425         (%union): Move earlier.
2426         (current_parser, work_obstack): Remove globals.
2427         (rust_parser, ~rust_parser): Update.
2428         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2429         lex_character, lex_number, lex_string, lex_identifier,
2430         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2431         convert_name, convert_params_to_expression,
2432         convert_ast_to_expression, ast_basic_type, ast_operation,
2433         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2434         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2435         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2436         ast_array_type, ast_slice_type, ast_reference_type,
2437         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2438         (rust_parse): Update.
2439         (rustyyerror, rustyylex): Add parser parameter.
2440         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2441         (rust_lex_stringish_test, rust_lex_test_sequence)
2442         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2443         (rust_lex_test_push_back, rust_lex_tests): Update.
2444
2445 2018-07-19  Pedro Alves  <palves@redhat.com>
2446
2447         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2448         gdb::unique_xmalloc_ptr.
2449         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2450         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2451         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2452         copy-initialization.
2453         * guile/scm-pretty-print.c (ppscm_print_children): Use
2454         gdb::unique_xmalloc_ptr instead of cleanups.
2455         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2456         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2457         gdb::unique_xmalloc_ptr.
2458         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2459         Adjust to use gdb::unique_xmalloc_ptr.
2460         * guile/scm-utils.c (extract_arg): Adjust.
2461         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2462         gdb::unique_xmalloc_ptr instead of a cleanup.
2463
2464 2018-07-19  Tom Tromey  <tom@tromey.com>
2465
2466         * utils.c (do_value_free_to_mark)
2467         (make_cleanup_value_free_to_mark): Remove.
2468         * utils.h (make_cleanup_value_free_to_mark): Remove.
2469
2470 2018-07-19  Pedro Alves  <palves@redhat.com>
2471
2472         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2473         forwarding reference.
2474
2475 2018-07-18  Pedro Alves  <palves@redhat.com>
2476
2477         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2478         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2479         cleanup.
2480
2481 2018-07-18  Pedro Alves  <palves@redhat.com>
2482
2483         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2484         exceptions.
2485         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2486         (gdbscm_wrap): New.
2487         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2488         directly instead of a cleanup.
2489         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2490         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2491         (vlscm_binop_gdbthrow): New, factored out from ...
2492         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2493         (vlscm_rich_compare): Use gdbscm_wrap.
2494         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2495         instead of a cleanup.
2496         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2497         cleanup.
2498         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2499         Use xfree directly instead of a cleanup.
2500         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2501         Adjust to use gdbscm_wrap and scoped_value_mark.
2502         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2503         (gdbscm_value_address, gdbscm_value_dereference)
2504         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2505         scoped_value_mark.
2506         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2507         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2508         scoped_value_mark.
2509         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2510         gdbscm_wrap and scoped_value_mark.
2511         (gdbscm_value_to_string): Use xfree directly instead of a
2512         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2513         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2514         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2515         scoped_value_mark.
2516         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2517         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2518         scoped_value_mark.
2519         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2520         gdbscm_wrap.
2521
2522 2018-07-18  Tom de Vries  <tdevries@suse.de>
2523
2524         * findvar.c (default_read_var_value): Also resolve dynamic type for
2525         LOC_OPTIMIZED_OUT vars.
2526
2527 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2528
2529         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2530         decoding.
2531
2532 2018-07-17  Tom Tromey  <tom@tromey.com>
2533
2534         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2535         (compute_enum_list, pascm_set_param_value_x)
2536         (gdbscm_parameter_value): Update.
2537         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2538         (gdbscm_scm_to_host_string): Update.
2539         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2540         Update.
2541         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2542         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2543         * guile/scm-string.c (gdbscm_scm_to_string): Return
2544         unique_xmalloc_ptr.
2545         (gdbscm_scm_to_host_string): Likewise.
2546
2547 2018-07-17  Tom Tromey  <tom@tromey.com>
2548
2549         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2550         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2551         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2552         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2553         unique_xmalloc_ptr.
2554
2555 2018-07-17  Tom Tromey  <tom@tromey.com>
2556
2557         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2558         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2559         Update.
2560         * guile/scm-cmd.c (cmdscm_function): Update.
2561         * guile/scm-pretty-print.c
2562         (ppscm_print_exception_unless_memory_error): Update.
2563         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2564         Return unique_xmalloc_ptr.
2565
2566 2018-07-17  Tom Tromey  <tom@tromey.com>
2567
2568         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2569         Use string_printf.
2570
2571 2018-07-17  Jim Wilson  <jimw@sifive.com>
2572
2573         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2574         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2575         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2576         unecessary braces after EF_RISCV_RVC test.  Delete call to
2577         set_gdbarch_decr_pc_after_break.
2578
2579         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2580         RISCV_LAST_FP_REGNUM + 1.
2581         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2582
2583 2018-07-17  Tom Tromey  <tom@tromey.com>
2584
2585         * configure.ac: Remove --disable-gdbcli.
2586         * configure: Rebuild.
2587         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2588         (SUBDIR_CLI_CFLAGS): Remove.
2589         (SFILES): Use SUBDIR_CLI_SRCS.
2590         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2591
2592 2018-07-17  Tom Tromey  <tom@tromey.com>
2593
2594         PR gdb/18624:
2595         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2596
2597 2018-07-16  Jim Wilson  <jimw@sifive.com>
2598
2599         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2600
2601 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2602
2603         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2604         variable.
2605         (libunwind_frame_sniffer): Likewise.
2606         (libunwind_frame_prev_register): Likewise.
2607         (libunwind_sigtramp_frame_sniffer): Likewise.
2608         * ia64-tdep.c (ia64_access_reg): Likewise.
2609         (ia64_access_rse_reg): Likewise.
2610         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2611         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2612
2613 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2614
2615         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2616
2617 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2618
2619         * remote-sim.c (gdbsim_target::close,
2620         gdbsim_target::mourn_inferior): Remove unused variables.
2621
2622 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2623
2624         * ia64-tdep.c (ktab_buf): New global.
2625         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2626         (get_kernel_table): Adjust.
2627
2628 2018-07-16  Tom Tromey  <tom@tromey.com>
2629
2630         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2631         * dwarf2read.c (using_directives, new_symbol): Use
2632         outermost_context_p.
2633         * dbxread.c (process_one_symbol): Use outermost_context_p.
2634         * coffread.c (coff_symtab_read): Use outermost_context_p.
2635
2636 2018-07-16  Tom Tromey  <tom@tromey.com>
2637
2638         * dwarf2read.c (using_directives, read_func_scope)
2639         (read_lexical_block_scope): Update.
2640         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2641         * buildsym.h (local_using_directives, global_using_directives):
2642         Don't declare.
2643         (get_local_using_directives, set_local_using_directives)
2644         (get_global_using_directives): Declare.
2645         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2646         m_global_using_directives>: New members.
2647         (finish_block_internal, prepare_for_building)
2648         (reset_symtab_globals, end_symtab_get_static_block)
2649         (push_context): Update.
2650         (get_local_using_directives, set_local_using_directives)
2651         (get_global_using_directives): New functions.
2652         (buildsym_init): Update.
2653
2654 2018-07-16  Tom Tromey  <tom@tromey.com>
2655
2656         * xcoffread.c (xcoff_initial_scan): Don't call
2657         free_pending_blocks.
2658         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2659         * buildsym.h (class scoped_free_pendings): Add constructor.
2660         (free_pending_blocks): Don't declare.
2661         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2662         (free_pending_blocks): Now static.
2663
2664 2018-07-16  Tom Tromey  <tom@tromey.com>
2665
2666         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2667         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2668         member.
2669         (struct subfile_stack): Remove.
2670         (subfile_stack): Remove.
2671         (push_subfile, pop_subfile, buildsym_init): Update.
2672
2673 2018-07-16  Tom Tromey  <tom@tromey.com>
2674
2675         * buildsym.c (push_subfile): Use gdb_assert.
2676         (pop_subfile): Use gdb_assert.
2677
2678 2018-07-16  Tom Tromey  <tom@tromey.com>
2679
2680         * buildsym.h (merge_symbol_lists): Remove.
2681         * buildsym.c (merge_symbol_lists): Remove.
2682
2683 2018-07-16  Tom Tromey  <tom@tromey.com>
2684
2685         * stabsread.c (scan_file_globals): Update comment.
2686         * stabsread.h (scan_file_globals): Move from buildsym.h.
2687         * buildsym.h (scan_file_globals): Move to stabsread.h.
2688
2689 2018-07-16  Tom Tromey  <tom@tromey.com>
2690
2691         * xcoffread.c (xcoff_new_init): Update.
2692         * mipsread.c (mipscoff_new_init): Update.
2693         * mdebugread.c (mdebug_build_psymtabs): Update.
2694         * elfread.c (elf_new_init): Update.
2695         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2696         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2697         * buildsym.h (buildsym_new_init): Don't declare.
2698         * buildsym.c (buildsym_new_init): Remove.
2699
2700 2018-07-16  Tom Tromey  <tom@tromey.com>
2701
2702         * stabsread.h (within_function): Move from buildsym.h.
2703         * stabsread.c (start_stabs): Clear within_function.
2704         * coffread.c (coff_start_symtab): Clear within_function.
2705         * buildsym.h (within_function): Move to stabsread.h.
2706         * buildsym.c (prepare_for_building): Update.
2707
2708 2018-07-16  Tom Tromey  <tom@tromey.com>
2709
2710         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2711         * dwarf2read.c (dwarf2_start_symtab): Don't set
2712         processing_gcc_compilation.
2713         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2714
2715 2018-07-16  Tom Tromey  <tom@tromey.com>
2716
2717         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2718         (next_symbol_text_func): Move from buildsym.h.
2719         * stabsread.c (hashname): Move from buildsym.c.
2720         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2721         (next_symbol_text_func, hashname): Move to stabsread.h.
2722         * buildsym.c: Don't include bcache.h
2723         (hashname): Move to stasbread.c.
2724
2725 2018-07-16  Tom Tromey  <tom@tromey.com>
2726
2727         * buildsym.h (context_stack_size): Don't declare.
2728         * buildsym.c (context_stack_size): New global.
2729
2730 2018-07-16  Tom Tromey  <tom@tromey.com>
2731
2732         * dbxread.c (processing_acc_compilation): New global.
2733         * buildsym.h (processing_acc_compilation): Don't declare.
2734
2735 2018-07-16  Tom Tromey  <tom@tromey.com>
2736
2737         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2738         * dbxread.c (read_ofile_symtab): Update.
2739         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2740         * buildsym.h (last_source_start_addr): Remove.
2741         (set_last_source_start_addr, get_last_source_start_addr):
2742         Declare.
2743         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2744         parameter.
2745         (struct buildsym_compunit) <m_last_source_start_addr>: New
2746         member.
2747         (prepare_for_building): Remove start_addr parameter.
2748         (start_symtab, restart_symtab, end_symtab_get_static_block)
2749         (end_symtab_with_blockvector): Update.
2750         (set_last_source_start_addr, get_last_source_start_addr): New
2751         functions.
2752
2753 2018-07-16  Tom Tromey  <tom@tromey.com>
2754
2755         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2756         member.
2757         (have_line_numbers): Remove.
2758         (record_line, prepare_for_building, end_symtab_get_static_block)
2759         (augment_type_symtab): Update.
2760
2761 2018-07-16  Tom Tromey  <tom@tromey.com>
2762
2763         * buildsym.c (~buildsym_compunit): Free the macro table.
2764         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2765         methods.
2766         <m_pending_macros>: New member.
2767         (pending_macros): Remove.
2768         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2769         (reset_symtab_globals, end_symtab_get_static_block)
2770         (end_symtab_with_blockvector, augment_type_symtab)
2771         (buildsym_init): Update.
2772
2773 2018-07-16  Tom Tromey  <tom@tromey.com>
2774
2775         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2776         parameter.
2777         (buildsym_compunit::set_last_source_file): New method.
2778         <m_last_source_file>: New member.
2779         (prepare_for_building): Remove "name" parameter.
2780         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2781         (last_source_file): Remove.
2782         (set_last_source_file, get_last_source_file): Update.
2783
2784 2018-07-16  Tom Tromey  <tom@tromey.com>
2785
2786         * buildsym.c (prepare_for_building): Add assert.
2787
2788 2018-07-16  Tom Tromey  <tom@tromey.com>
2789
2790         * buildsym.c (~buildsym_compunit): Update.
2791         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2792         (start_subfile, patch_subfile_names)
2793         (end_symtab_with_blockvector): Update.
2794
2795 2018-07-16  Tom Tromey  <tom@tromey.com>
2796
2797         * buildsym.c (struct buildsym_compunit): Add constructor,
2798         destructor, initializers.
2799         (start_buildsym_compunit): Remove.
2800         (free_buildsym_compunit): Use "delete".
2801         (start_symtab, restart_symtab): Use "new".
2802
2803 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2804
2805         * symfile.c (set_objfile_default_section_offset): Remove struct
2806         keyword.
2807
2808 2018-07-14  Stafford Horne  <shorne@gmail.com>
2809
2810         * (Responsible Maintainers): Add myself as or1k maintainer.
2811
2812 2018-07-13  Tom Tromey  <tom@tromey.com>
2813
2814         * symfile.c (set_objfile_default_section_offset): Use extra braces
2815         around initializer.
2816
2817 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2818
2819         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2820         non-branching basr.
2821
2822 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2823
2824         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2825         unittests/cli-utils-selftests.c
2826         * unittests/cli-utils-selftests.c: New file.
2827
2828 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2829
2830         * NEWS: Mention new commands. Mention change to 'thread apply'.
2831
2832 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2833
2834         * thread.c (thr_try_catch_cmd): New function.
2835         (thread_apply_all_command): Handle qcs flags.
2836         (thread_apply_command): Handle qcs flags.
2837         (taas_command): New function.
2838         (tfaas_command): New function.
2839         (_initialize_thread): Update to setup the new commands 'taas
2840         and 'tfaas'. Change doc string for 'thread apply'.
2841
2842 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2843
2844         * stack.c: (trailing_outermost_frame): New function, mostly
2845         extracted from backtrace_command_1.
2846         (leading_innermost_frame): New function.
2847         (backtrace_command_1): Update to call trailing_outermost_frame.
2848         (frame_apply_command_count): New function.
2849         (frame_apply_level_command): New function.
2850         (frame_apply_all_command): New function.
2851         (frame_apply_command): New function.
2852         (faas_command): New function.
2853         (frame_cmd_list): New variable.
2854         (_initialize_stack): Update to setup the new commands 'frame apply'
2855         and 'faas'.
2856
2857 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2858
2859         * cli-utils.c (number_or_range_parser::get_number): Only handle
2860         numbers or convenience var as numbers.
2861         (parse_flags): New function.
2862         (parse_flags_qcs): New function.
2863         (number_or_range_parser::finished): Ensure parsing end is detected
2864         before end of string.
2865         * cli-utils.h (parse_flags): New function.
2866         (parse_flags_qcs): New function.
2867         (number_or_range_parser): Remove m_finished bool.
2868         (number_or_range_parser::skip_range): Set m_in_range to false.
2869
2870 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2871
2872         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2873         on Windows.
2874
2875 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2876             Jan Kratochvil  <jan.kratochvil@redhat.com>
2877             Paul Fertser  <fercerpav@gmail.com>
2878             Tsutomu Seki  <sekiriki@gmail.com>
2879             Pedro Alves  <palves@redhat.com>
2880
2881         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2882         'unittests/parse-connection-spec-selftests.c'.
2883         (COMMON_SFILES): Add 'common/netstuff.c'.
2884         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2885         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2886         * common/netstuff.c: New file.
2887         * common/netstuff.h: New file.
2888         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2889         (wait_for_connect): Update comment.  New parameter
2890         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2891         Use 'sock' directly instead of 'scb->fd'.
2892         (try_connect): New function, with code from 'net_open'.
2893         (net_open): Rewrite main loop to deal with multiple
2894         sockets/addresses.  Handle IPv6-style hostnames; implement
2895         support for IPv6 connections.
2896         * unittests/parse-connection-spec-selftests.c: New file.
2897
2898 2018-07-11  Pedro Alves  <palves@redhat.com>
2899
2900         PR gdb/23377
2901         * remote.c (remote_target::remote_detach_pid): Call
2902         set_current_process.
2903
2904 2018-07-11  Pedro Alves  <palves@redhat.com>
2905
2906         * h8300-tdep.c (h8300_gdbarch_init): Remove
2907         set_gdbarch_ecoff_reg_to_regnum calls.
2908
2909 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2910
2911         PR c++/23373
2912         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2913         offsets/sizes for static members of a class/struct.
2914
2915 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2916
2917         * target-descriptions.c (tdesc_register_bitsize): Rename.
2918         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2919         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2920         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2921
2922 2018-07-10  Tom Tromey  <tom@tromey.com>
2923
2924         * breakpoint.c (moribund_locations): Now static and a
2925         std::vector.
2926         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2927         (build_bpstat_chain, update_global_location_list)
2928         (breakpoint_retire_moribund): Update.
2929         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2930         VEC.
2931
2932 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2933
2934         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2935         (riscv_register_reggroup_p): Use new function, remove unneeded
2936         parenthesis.
2937         (riscv_push_dummy_call): Extend assert to compare against xlen or
2938         flen based on register type.
2939
2940 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2941
2942         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2943
2944 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2945
2946         * remote.c (show_hardware_watchpoint_limit): New function.
2947         (show_hardware_watchpoint_length_limit): New function.
2948         (show_hardware_breakpoint_limit): New function.
2949         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2950         where appropriate, update help text.
2951
2952 2018-07-09  Tom Tromey  <tom@tromey.com>
2953
2954         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2955         (CLIBS): Don't mention NAT_CLIBS.
2956
2957 2018-07-09  Tom Tromey  <tom@tromey.com>
2958
2959         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2960         (LIBGDB_OBS, clean mostlyclean): Update.
2961         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2962
2963 2018-07-09  Tom Tromey  <tom@tromey.com>
2964
2965         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2966         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2967         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2968
2969 2018-07-09  Tom Tromey  <tom@tromey.com>
2970
2971         * Makefile.in (ALLDEPFILES): Remove exec.c.
2972         (COMMON_OBS): Remove exec.o.
2973         (COMMON_SFILES): Add exec.c.
2974
2975 2018-07-09  Tom Tromey  <tom@tromey.com>
2976
2977         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2978
2979 2018-07-09  Tom Tromey  <tom@tromey.com>
2980
2981         * Makefile.in (clean mostlyclean): Remove stamp-version.
2982         (version.c): Depend on stamp-version.
2983         (stamp-version): New rule, from version.c rule.
2984
2985 2018-07-09  Tom Tromey  <tom@tromey.com>
2986
2987         * Makefile.in (init.c): Depend on stamp-init.
2988         (stamp-init): New rule, from init.c rule.
2989         (clean mostlyclean): Remove stamp-init.
2990
2991 2018-07-09  Tom Tromey  <tom@tromey.com>
2992
2993         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2994         SUBDIR_GCC_COMPILE_SRCS.
2995
2996 2018-07-09  Tom Tromey  <tom@tromey.com>
2997
2998         * Makefile.in (init.c): Remove some unused sed rules.
2999
3000 2018-07-09  Tom Tromey  <tom@tromey.com>
3001
3002         * Makefile.in (TSOBS): Remove.
3003         (INIT_FILES): Update.
3004         (LIBGDB_OBS): Update.
3005         (COMMON_SFILES): Add inflow.c.
3006         (SFILES): Remove inflow.c.
3007
3008 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3009
3010         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3011
3012 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3013
3014         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3015         get_saveloc_name, is_signal_frame_name, step_name,
3016         init_remote_name, create_addr_space_name,
3017         destroy_addr_space_name, search_unwind_table_name,
3018         find_dyn_list_name): Constify.
3019
3020 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3021
3022         * darwin-nat.c (darwin_pthread_kill): New function.
3023         (darwin_resume_thread): Use darwin_pthread_kill.
3024
3025 2018-07-05  Tom de Vries  <tdevries@suse.de>
3026
3027         * macroexp.c (macro_buffer) <operator=>: New member function.
3028
3029 2018-07-04  Tom Tromey  <tom@tromey.com>
3030
3031         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3032
3033 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3034
3035         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3036         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3037         * maint.c: Likewise.
3038         * top.c: Likewise.
3039
3040 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3041
3042         * NEWS: Create a new section for the next release branch.
3043         Rename the section of the current branch, now that it has
3044         been cut.
3045
3046 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3047
3048         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3049         * version.in: Bump version to 8.2.50.DATE-git.
3050
3051 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3052             Pedro Alves  <palves@redhat.com>
3053
3054         * linux-nat.c (linux_init_ptrace): Rename to ...
3055         (linux_init_ptrace_procfs): ... this.  Call
3056         linux_proc_init_warnings.
3057         (linux_nat_target::post_attach)
3058         (linux_nat_target::post_startup_inferior): Adjust.
3059         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3060         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3061
3062 2018-07-04  Tom de Vries  <tdevries@suse.de>
3063
3064         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3065         check ...
3066         (read_comp_unit_head): ... here.
3067
3068 2018-07-03  Tom Tromey  <tom@tromey.com>
3069
3070         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3071         (stop_tracing, tstatus_command)
3072         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3073         (print_one_static_tracepoint_marker): Update.
3074         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3075         std::vector.
3076         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3077         VEC.
3078         (all_tracepoints, static_tracepoints_here): Return std::vector.
3079
3080 2018-07-03  Tom Tromey  <tom@tromey.com>
3081
3082         * common/ptid.c (ptid_equal): Remove.
3083         * common/ptid.h (ptid_equal): Don't declare.
3084         * ada-tasks.c: Update.
3085         * breakpoint.c: Update.
3086         * common/agent.c: Update.
3087         * corelow.c: Update.
3088         * darwin-nat-info.c: Update.
3089         * darwin-nat.c: Update.
3090         * dcache.c: Update.
3091         * dtrace-probe.c: Update.
3092         * dummy-frame.c: Update.
3093         * fbsd-nat.c: Update.
3094         * frame.c: Update.
3095         * gdbthread.h: Update.
3096         * gnu-nat.c: Update.
3097         * go32-nat.c: Update.
3098         * inf-loop.c: Update.
3099         * inf-ptrace.c: Update.
3100         * infcall.c: Update.
3101         * infcmd.c: Update.
3102         * inflow.c: Update.
3103         * infrun.c: Update.
3104         * linux-fork.c: Update.
3105         * linux-nat.c: Update.
3106         * linux-thread-db.c: Update.
3107         * mi/mi-cmd-var.c: Update.
3108         * mi/mi-interp.c: Update.
3109         * mi/mi-main.c: Update.
3110         * nto-procfs.c: Update.
3111         * ppc-linux-tdep.c: Update.
3112         * procfs.c: Update.
3113         * python/py-inferior.c: Update.
3114         * python/py-record-btrace.c: Update.
3115         * python/py-record.c: Update.
3116         * ravenscar-thread.c: Update.
3117         * regcache.c: Update.
3118         * remote-sim.c: Update.
3119         * remote.c: Update.
3120         * sol-thread.c: Update.
3121         * solib.c: Update.
3122         * target.c: Update.
3123         * tui/tui-stack.c: Update.
3124         * varobj.c: Update.
3125         * windows-nat.c: Update.
3126         * windows-tdep.c: Update.
3127
3128 2018-07-03  Tom Tromey  <tom@tromey.com>
3129
3130         * common/ptid.c (ptid_match): Remove.
3131         * common/ptid.h (ptid_match): Don't declare.
3132         * fbsd-nat.c: Update.
3133         * infcmd.c: Update.
3134         * infrun.c: Update.
3135         * linux-nat.c: Update.
3136         * record-btrace.c: Update.
3137         * regcache.c: Update.
3138         * remote.c: Update.
3139
3140 2018-07-03  Tom Tromey  <tom@tromey.com>
3141
3142         * common/ptid.c (ptid_tid_p): Remove.
3143         * common/ptid.h (ptid_tid_p): Don't declare.
3144         * sol-thread.c: Update.
3145
3146 2018-07-03  Tom Tromey  <tom@tromey.com>
3147
3148         * common/ptid.c (ptid_lwp_p): Remove.
3149         * common/ptid.h (ptid_lwp_p): Don't declare.
3150         * fbsd-nat.c: Update.
3151         * linux-nat.c: Update.
3152         * nat/linux-procfs.c: Update.
3153         * nat/x86-linux-dregs.c: Update.
3154         * sol-thread.c: Update.
3155
3156 2018-07-03  Tom Tromey  <tom@tromey.com>
3157
3158         * common/ptid.c (ptid_is_pid): Remove.
3159         * common/ptid.h (ptid_is_pid): Don't declare.
3160         * infrun.c: Update.
3161         * linux-nat.c: Update.
3162         * mi/mi-interp.c: Update.
3163         * remote.c: Update.
3164         * thread.c: Update.
3165
3166 2018-07-03  Tom Tromey  <tom@tromey.com>
3167
3168         * common/ptid.c (ptid_get_tid): Remove.
3169         * common/ptid.h (ptid_get_tid): Don't declare.
3170         * ada-tasks.c: Update.
3171         * aix-thread.c: Update.
3172         * bsd-uthread.c: Update.
3173         * darwin-nat.c: Update.
3174         * fbsd-nat.c: Update.
3175         * i386-darwin-nat.c: Update.
3176         * infrun.c: Update.
3177         * linux-tdep.c: Update.
3178         * nto-procfs.c: Update.
3179         * ppc-ravenscar-thread.c: Update.
3180         * python/py-infthread.c: Update.
3181         * ravenscar-thread.c: Update.
3182         * sol-thread.c: Update.
3183         * sparc-ravenscar-thread.c: Update.
3184         * windows-nat.c: Update.
3185
3186 2018-07-03  Tom Tromey  <tom@tromey.com>
3187
3188         * common/ptid.c (ptid_get_lwp): Remove.
3189         * common/ptid.h (ptid_get_lwp): Don't declare.
3190         * aarch64-linux-nat.c: Update.
3191         * ada-tasks.c: Update.
3192         * aix-thread.c: Update.
3193         * amd64-linux-nat.c: Update.
3194         * arm-linux-nat.c: Update.
3195         * corelow.c: Update.
3196         * fbsd-nat.c: Update.
3197         * fbsd-tdep.c: Update.
3198         * gnu-nat.c: Update.
3199         * i386-cygwin-tdep.c: Update.
3200         * i386-gnu-nat.c: Update.
3201         * i386-linux-nat.c: Update.
3202         * ia64-linux-nat.c: Update.
3203         * inf-ptrace.c: Update.
3204         * infrun.c: Update.
3205         * linux-fork.c: Update.
3206         * linux-nat.c: Update.
3207         * linux-tdep.c: Update.
3208         * linux-thread-db.c: Update.
3209         * mips-linux-nat.c: Update.
3210         * nat/aarch64-linux-hw-point.c: Update.
3211         * nat/aarch64-linux.c: Update.
3212         * nat/linux-btrace.c: Update.
3213         * nat/linux-osdata.c: Update.
3214         * nat/linux-procfs.c: Update.
3215         * nat/x86-linux-dregs.c: Update.
3216         * obsd-nat.c: Update.
3217         * ppc-fbsd-nat.c: Update.
3218         * ppc-linux-nat.c: Update.
3219         * procfs.c: Update.
3220         * python/py-infthread.c: Update.
3221         * ravenscar-thread.c: Update.
3222         * remote.c: Update.
3223         * s390-linux-nat.c: Update.
3224         * sol-thread.c: Update.
3225         * sol2-tdep.c: Update.
3226         * spu-linux-nat.c: Update.
3227         * x86-linux-nat.c: Update.
3228         * xtensa-linux-nat.c: Update.
3229
3230 2018-07-03  Tom Tromey  <tom@tromey.com>
3231
3232         * common/ptid.c (ptid_get_pid): Remove.
3233         * common/ptid.h (ptid_get_pid): Don't declare.
3234         * aarch64-linux-nat.c: Update.
3235         * ada-lang.c: Update.
3236         * aix-thread.c: Update.
3237         * alpha-bsd-nat.c: Update.
3238         * amd64-fbsd-nat.c: Update.
3239         * amd64-linux-nat.c: Update.
3240         * arm-linux-nat.c: Update.
3241         * arm-nbsd-nat.c: Update.
3242         * auxv.c: Update.
3243         * break-catch-syscall.c: Update.
3244         * breakpoint.c: Update.
3245         * bsd-uthread.c: Update.
3246         * corelow.c: Update.
3247         * ctf.c: Update.
3248         * darwin-nat.c: Update.
3249         * fbsd-nat.c: Update.
3250         * fbsd-tdep.c: Update.
3251         * gcore.c: Update.
3252         * gnu-nat.c: Update.
3253         * hppa-nbsd-nat.c: Update.
3254         * hppa-obsd-nat.c: Update.
3255         * i386-fbsd-nat.c: Update.
3256         * ia64-linux-nat.c: Update.
3257         * inf-ptrace.c: Update.
3258         * infcmd.c: Update.
3259         * inferior.c: Update.
3260         * inferior.h: Update.
3261         * inflow.c: Update.
3262         * infrun.c: Update.
3263         * linux-fork.c: Update.
3264         * linux-nat.c: Update.
3265         * linux-tdep.c: Update.
3266         * linux-thread-db.c: Update.
3267         * m68k-bsd-nat.c: Update.
3268         * mi/mi-interp.c: Update.
3269         * mi/mi-main.c: Update.
3270         * mips-linux-nat.c: Update.
3271         * mips-nbsd-nat.c: Update.
3272         * mips64-obsd-nat.c: Update.
3273         * nat/aarch64-linux-hw-point.c: Update.
3274         * nat/aarch64-linux.c: Update.
3275         * nat/linux-btrace.c: Update.
3276         * nat/linux-osdata.c: Update.
3277         * nat/linux-procfs.c: Update.
3278         * nat/x86-linux-dregs.c: Update.
3279         * nto-procfs.c: Update.
3280         * obsd-nat.c: Update.
3281         * ppc-linux-nat.c: Update.
3282         * ppc-nbsd-nat.c: Update.
3283         * ppc-obsd-nat.c: Update.
3284         * proc-service.c: Update.
3285         * procfs.c: Update.
3286         * python/py-inferior.c: Update.
3287         * python/py-infthread.c: Update.
3288         * ravenscar-thread.c: Update.
3289         * record.c: Update.
3290         * remote-sim.c: Update.
3291         * remote.c: Update.
3292         * rs6000-nat.c: Update.
3293         * s390-linux-nat.c: Update.
3294         * sh-nbsd-nat.c: Update.
3295         * sol-thread.c: Update.
3296         * sparc-nat.c: Update.
3297         * sparc64-tdep.c: Update.
3298         * spu-linux-nat.c: Update.
3299         * spu-tdep.c: Update.
3300         * target-debug.h: Update.
3301         * target.c: Update.
3302         * thread.c: Update.
3303         * tid-parse.c: Update.
3304         * tracefile-tfile.c: Update.
3305         * vax-bsd-nat.c: Update.
3306         * windows-nat.c: Update.
3307         * x86-linux-nat.c: Update.
3308         * x86-nat.c: Update.
3309
3310 2018-07-03  Tom Tromey  <tom@tromey.com>
3311
3312         * common/ptid.c (pid_to_ptid): Remove.
3313         * common/ptid.h (pid_to_ptid): Don't declare.
3314         * aix-thread.c: Update.
3315         * arm-linux-nat.c: Update.
3316         * common/ptid.c: Update.
3317         * common/ptid.h: Update.
3318         * corelow.c: Update.
3319         * ctf.c: Update.
3320         * darwin-nat.c: Update.
3321         * fbsd-nat.c: Update.
3322         * fork-child.c: Update.
3323         * gnu-nat.c: Update.
3324         * go32-nat.c: Update.
3325         * inf-ptrace.c: Update.
3326         * infcmd.c: Update.
3327         * inferior.c: Update.
3328         * infrun.c: Update.
3329         * linux-fork.c: Update.
3330         * linux-nat.c: Update.
3331         * nat/aarch64-linux-hw-point.c: Update.
3332         * nat/fork-inferior.c: Update.
3333         * nat/x86-linux-dregs.c: Update.
3334         * nto-procfs.c: Update.
3335         * obsd-nat.c: Update.
3336         * procfs.c: Update.
3337         * progspace.c: Update.
3338         * remote.c: Update.
3339         * rs6000-nat.c: Update.
3340         * s390-linux-nat.c: Update.
3341         * sol-thread.c: Update.
3342         * spu-linux-nat.c: Update.
3343         * target.c: Update.
3344         * top.c: Update.
3345         * tracefile-tfile.c: Update.
3346         * windows-nat.c: Update.
3347
3348 2018-07-03  Tom Tromey  <tom@tromey.com>
3349
3350         * common/ptid.h (ptid_build): Don't declare.
3351         * common/ptid.c (ptid_build): Remove.
3352         * aix-thread.c: Update.
3353         * bsd-kvm.c: Update.
3354         * bsd-uthread.c: Update.
3355         * common/agent.c: Update.
3356         * common/ptid.c: Update.
3357         * common/ptid.h: Update.
3358         * corelow.c: Update.
3359         * darwin-nat.c: Update.
3360         * fbsd-nat.c: Update.
3361         * gnu-nat.c: Update.
3362         * linux-fork.c: Update.
3363         * linux-nat.c: Update.
3364         * linux-thread-db.c: Update.
3365         * nat/linux-osdata.c: Update.
3366         * nat/linux-procfs.c: Update.
3367         * nto-procfs.c: Update.
3368         * obsd-nat.c: Update.
3369         * proc-service.c: Update.
3370         * procfs.c: Update.
3371         * ravenscar-thread.c: Update.
3372         * remote-sim.c: Update.
3373         * remote.c: Update.
3374         * sol-thread.c: Update.
3375         * target.c: Update.
3376         * windows-nat.c: Update.
3377
3378 2018-07-03  Tom Tromey  <tom@tromey.com>
3379
3380         * infrun.c (follow_exec): Use exit_inferior_silent.
3381         * inferior.c (exit_inferior_num_silent): Remove.
3382         * inferior.h (exit_inferior_num_silent): Don't declare.
3383
3384 2018-07-03  Tom Tromey  <tom@tromey.com>
3385
3386         PR cli/23340:
3387         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3388         inferior_ptid on error.
3389
3390 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3391             Simon Marchi  <simon.marchi@polymtl.ca>
3392
3393         PR tdep/8282
3394         * disasm.h (gdb_disassembler): Add
3395         `m_disassembler_options_holder'. member
3396         * disasm.c (get_all_disassembler_options): New function.
3397         (gdb_disassembler::gdb_disassembler): Use it.
3398         (gdb_buffered_insn_length_init_dis): Likewise.
3399         (gdb_buffered_insn_length): Adjust accordingly.
3400         (set_disassembler_options): Handle options with arguments.
3401         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3402         line if showing options with descriptions.
3403         (disassembler_options_completer): Adapt to using the
3404         `disasm_options_and_args_t' structure.
3405         * mips-tdep.c (mips_disassembler_options): New variable.
3406         (mips_disassembler_options_o32): Likewise.
3407         (mips_disassembler_options_n32): Likewise.
3408         (mips_disassembler_options_n64): Likewise.
3409         (gdb_print_insn_mips): Don't set `disassembler_options'.
3410         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3411         functions.
3412         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3413         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3414         `gdbarch_disassembler_options_implicit' and
3415         `gdbarch_valid_disassembler_options'.
3416         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3417         `disasm_options_and_args_t' structure.
3418         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3419         method.
3420         (valid_disassembler_options): Switch from `disasm_options_t' to
3421         the `disasm_options_and_args_t' structure.
3422         * NEWS: Document `set disassembler-options' support for the MIPS
3423         target.
3424         * gdbarch.h: Regenerate.
3425         * gdbarch.c: Regenerate.
3426
3427 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3428
3429         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3430
3431 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3432
3433         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3434         parameter in call to amd64_target_description.
3435         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3436         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3437         (amd64fbsd_init_abi): Likewise.
3438         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3439         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3440         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3441         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3442
3443 2018-06-29  Pedro Alves  <palves@redhat.com>
3444
3445         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3446         "segments" parameter.
3447         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3448         (_initialize_amd64_tdep): Update call to
3449         amd64_create_target_description.
3450         (amd64_target_description): Add "segments" parameter.  Adjust
3451         the implementation to use it.
3452         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3453         call to amd64_create_target_description.
3454         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3455         * gdb/arch/amd64.h (amd64_create_target_description): Add
3456         "segments" register.
3457         * gdb/arch/amd64.c (amd64_create_target_description): Add
3458         "segments" parameter.  Call create_feature_i386_64bit_segments
3459         only if SEGMENTS is true.
3460         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3461         call to amd64_create_target_description.
3462
3463 2018-06-29  Pedro Alves  <palves@redhat.com>
3464
3465         * thread.c (thread_target_id_str): New, factored out from ...
3466         (print_thread_info_1): ... here.  Use it to compute the max
3467         "Target Id" column width.
3468
3469 2018-06-29  Pedro Alves  <palves@redhat.com>
3470
3471         * remote.c (remote_target::extra_thread_info): Delete
3472         'display_buf' and 'n' locals.  from the cache, regardless of
3473         packet mechanims is in use.  Use cache for qThreadExtra and qP
3474         methods too.
3475
3476 2018-06-29  Pedro Alves  <palves@redhat.com>
3477
3478         * blockframe.c (find_pc_sect_containing_function): New function.
3479         * breakpoint.c (print_breakpoint_location): Don't call
3480         find_pc_sect_function.
3481         * linespec.c (create_sals_line_offset): Record the location's
3482         symbol in the sal.
3483         * linespec.c (convert_address_location_to_sals): Fill in sal's
3484         symbol with find_pc_sect_containing_function.
3485         * symtab.c (find_function_start_sal): Rename to ...
3486         (find_function_start_sal_1): ... this.
3487         (find_function_start_sal): Reimplement as wrapper around
3488         find_function_start_sal_1, and use
3489         find_pc_sect_containing_function to fill in the sal's symbol.
3490         (find_function_start_sal(symbol*, bool)): Adjust.
3491         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3492         comments.
3493         (find_pc_sect_containing_function): Declare.
3494
3495 2018-06-29  Pedro Alves  <palves@redhat.com>
3496
3497         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3498         true if the the location has no symbol.
3499
3500 2018-06-28  Tom Tromey  <tom@tromey.com>
3501
3502         * NEWS: Mention --enable-codesign.
3503         * silent-rules.mk (ECHO_SIGN): New variable.
3504         * configure.ac: Add --enable-codesign.
3505         * configure: Rebuild.
3506         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3507         (gdb$(EXEEXT)): Optionally invoke codesign.
3508
3509 2018-06-28  Pedro Alves  <palves@redhat.com>
3510
3511         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3512         comments.
3513         (switch_to_thread_no_regs): Adjust comment.
3514         * infcmd.c (stop_pc): Delete.
3515         (post_create_inferior, info_program_command): Replace references
3516         to stop_pc with references to thread_info->suspend.stop_pc.
3517         * inferior.h (stop_pc): Delete declaration.
3518         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3519         (handle_inferior_event_1, handle_signal_stop)
3520         (process_event_stop_test, keep_going_stepped_thread)
3521         (handle_step_into_function, handle_step_into_function_backward)
3522         (print_stop_location): Replace references to stop_pc with
3523         references to thread_info->suspend.stop_pc.
3524         (struct infcall_suspend_state) <stop_pc>: Delete field.
3525         (save_infcall_suspend_state, restore_infcall_suspend_state):
3526         Remove references to inf_stat->stop_pc.
3527         * linux-fork.c (fork_load_infrun_state): Likewise.
3528         * record-btrace.c (record_btrace_set_replay): Likewise.
3529         * record-full.c (record_full_goto_entry): Likewise.
3530         * remote.c (print_one_stopped_thread): Likewise.
3531         * target.c (target_resume): Extend comment.
3532         * thread.c (set_executing_thread): New.
3533         (set_executing): Use it.
3534         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3535         Remove references to stop_pc.
3536
3537 2018-06-28  Pedro Alves  <palves@redhat.com>
3538
3539         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3540         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3541
3542 2018-06-28  Tom Tromey  <tom@tromey.com>
3543
3544         * coffread.c (coff_symfile_finish): Update.
3545         * xcoffread.c (xcoff_symfile_finish): Update.
3546         * elfread.c (elf_symfile_finish): Update.
3547         * symfile.h (dwarf2_free_objfile): Don't declare.
3548         * dwarf2read.c (_initialize_dwarf2_read): Use
3549         register_objfile_data_with_cleanup.
3550         (dwarf2_free_objfile): Now static.  Change signature.
3551
3552 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3553
3554         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3555         option "-o" to add-symbol-file-load to add an offset to each
3556         section's load address.
3557         * symfile.c (set_objfile_default_section_offset): New function.
3558
3559 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3560
3561         * symfile.c (add_symbol_file_command): Make sure that sections
3562         with the same name are sorted in the same order.
3563
3564 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3565
3566         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3567         require the second argument.  If omitted, load sections at the
3568         addresses specified in the file.
3569
3570 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3571
3572         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3573         (_initialize_symfile): Add option "-o" to symbol-file to add an
3574         offset to each section of the symbol file.
3575
3576 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3577
3578         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3579
3580 2018-06-27  Tom Tromey  <tom@tromey.com>
3581
3582         * stack.c (_initialize_stack): Update "func" help text.
3583
3584 2018-06-27  Tom Tromey  <tom@tromey.com>
3585
3586         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3587         std::vector.
3588         (unwind_infopy_str, pyuw_create_unwind_info)
3589         (unwind_infopy_add_saved_register, pyuw_sniffer)
3590         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3591         Update.
3592         (struct saved_reg): Add constructor.
3593         <value>: Now a gdbpy_ref<>.
3594
3595 2018-06-27  Tom Tromey  <tom@tromey.com>
3596
3597         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3598
3599 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3600
3601         * gdb-gdb.py.in: Format using autopep8.
3602
3603 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3604
3605         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3606         (type_lookup_function): Recognize CORE_ADDR values.
3607
3608 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3609
3610         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3611         print tag_name.
3612
3613 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3614
3615         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3616         <__lt__>: Add.
3617
3618 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3619
3620         * gdb-gdb.py: Move to...
3621         * gdb-gdb.py.in: ... here.
3622         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3623         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3624         dependencies.
3625         (distclean): Remove gdb-gdb.py when cleaning.
3626         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3627         * configure: Re-generate.
3628
3629 2018-06-27  Pedro Alves  <palves@redhat.com>
3630
3631         * proc-service.c (get_ps_regcache): New.
3632         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3633         (ps_lsetfpregs): Use it.
3634
3635 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3636
3637         PR gdb/21695
3638         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3639         (dwarf_decode_lines_1): Adjust.
3640
3641 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3642
3643         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3644         override.
3645         <info_proc>: Likewise.
3646
3647 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3648
3649         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3650         to windows_fetch_one_register, and only handle the case of
3651         fetching one register.  Move the code that reloads the context
3652         and iterates over all registers if R is negative to...
3653         (windows_nat_target::fetch_registers): ... here.
3654         (do_windows_store_inferior_registers): Rename to
3655         windows_store_one_register, and only handle the case of storing
3656         one register.  Move the code that handles the case where r is
3657         negative to...
3658         (windows_nat_target::store_registers) ... here.
3659
3660 2018-06-26  Tom Tromey  <tom@tromey.com>
3661
3662         PR rust/22574:
3663         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3664         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3665         Update.
3666         (rust_internal_print_type): Add podata parameter.
3667         (rust_print_type): Update.
3668
3669 2018-06-26  Tom Tromey  <tom@tromey.com>
3670
3671         * typeprint.h (struct print_offset_data) <update, finish,
3672         maybe_print_hole>: New methods.
3673         <indentation>: New constant.
3674         * typeprint.c (print_offset_data::indentation): Define.
3675         (print_offset_data::maybe_print_hole, print_offset_data::update)
3676         (print_offset_data::finish): Move from c-typeprint.c and rename.
3677         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3678         (print_spaces_filtered_with_print_options): Update.
3679         (c_print_type_union_field_offset, maybe_print_hole)
3680         (c_print_type_struct_field_offset): Move to typeprint.c and
3681         rename.
3682         (c_type_print_base_struct_union): Update.
3683
3684 2018-06-25  Pedro Alves  <palves@redhat.com>
3685
3686         * gdbthread.h (thread_info_ref, delete_thread)
3687         (delete_thread_silent, first_thread_of_inferior)
3688         (any_thread_of_inferior, switch_to_thread)
3689         (enable_thread_stack_temporaries)
3690         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3691         (get_last_thread_stack_temporary)
3692         (value_in_thread_stack_temporaries, can_access_registers_thread):
3693         Spell out "struct thread_info" instead of just "thread_info".
3694         * inferior.h (notice_new_inferior): Likewise.
3695
3696 2018-06-25  Pedro Alves  <palves@redhat.com>
3697
3698         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3699         pass thread_info pointer to delete_thread.
3700         (windows_nat_target::detach): Pass inferior pointer to
3701         detach_inferior.
3702         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3703         delete_thread.
3704         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3705         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3706         and pass a thread_info pointer to delete_thread.
3707         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3708         pass thread_info pointer to delete_thread.
3709         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3710         delete_thread_silent call.
3711         * procfs.c (procfs_target::detach): Pass inferior pointer to
3712         detach_inferior.
3713         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3714         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3715         delete_thread_silent call.
3716         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3717         pass thread_info pointer to delete_thread.
3718         (windows_nat_target::detach): Pass inferior pointer to
3719         delete_inferior.
3720
3721 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3722
3723         * regcache.c (readable_regcache::read_part): Fix asserts.
3724         (reg_buffer::raw_collect_part): New function.
3725         (regcache::write_part): Fix asserts.
3726         (reg_buffer::raw_supply_part): New function.
3727         (regcache::transfer_regset_register): New helper function.
3728         (regcache::transfer_regset): Call new functions.
3729         (regcache_supply_regset): Use gdb_byte*.
3730         (regcache::supply_regset): Likewise.
3731         (regcache_collect_regset): Likewise.
3732         (regcache::collect_regset): Likewise.
3733         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3734         (reg_buffer::raw_supply_part): Likewise.
3735         (regcache::transfer_regset_register): Likewise.
3736         (regcache::transfer_regset): Use gdb_byte*.
3737
3738 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3739
3740         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3741
3742 2018-06-21  Pedro Alves  <palves@redhat.com>
3743
3744         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3745         instead of a ptid_t.  All callers adjusted.
3746         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3747         adjusted.
3748         (print_ada_task_info, display_current_task_id, task_command_1):
3749         Adjust.
3750         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3751         inferior_thread.
3752         (breakpoint_kind): Adjust.
3753         (remove_breakpoints_pid): Rename to ...
3754         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3755         pointer.  All callers adjusted.
3756         (bpstat_clear_actions): Use inferior_thread.
3757         (get_bpstat_thread): New.
3758         (bpstat_do_actions): Use it.
3759         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3760         to take a thread_info pointer.  All callers adjusted.
3761         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3762         (breakpoint_re_set_thread): Use inferior_thread.
3763         * breakpoint.h (struct inferior): Forward declare.
3764         (bpstat_stop_status): Update.
3765         (remove_breakpoints_pid): Delete.
3766         (remove_breakpoints_inf): New.
3767         * bsd-uthread.c (bsd_uthread_target::wait)
3768         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3769         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3770         (maint_btrace_packet_history_cmd)
3771         (maint_btrace_clear_packet_history_cmd): Adjust.
3772         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3773         inferior_thread.
3774         * cli/cli-interp.c: Include "inferior.h".
3775         * common/refcounted-object.h (struct
3776         refcounted_object_ref_policy): New.
3777         * compile/compile-object-load.c: Include gdbthread.h.
3778         (store_regs): Use inferior_thread.
3779         * corelow.c (core_target::close): Use current_inferior.
3780         (core_target_open): Adjust to use first_thread_of_inferior and use
3781         the current inferior.
3782         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3783         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3784         <thread>: ... this new field.  All references adjusted.
3785         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3786         Take a thread_info pointer instead of a ptid_t.
3787         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3788         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3789         thread_info pointer instead of a ptid_t.
3790         * elfread.c: Include "inferior.h".
3791         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3792         Use inferior_thread.
3793         * eval.c (evaluate_subexp): Likewise.
3794         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3795         inferior_thread.
3796         * gdb_proc_service.h (struct thread_info): Forward declare.
3797         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3798         <thread>: ... this new field.  All references adjusted.
3799         * gdbarch.h, gdbarch.c: Regenerate.
3800         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3801         'thread' parameter.  All implementations and callers adjusted.
3802         * gdbthread.h (thread_info) <set_running>: New method.
3803         (delete_thread, delete_thread_silent): Take a thread_info pointer
3804         instead of a ptid.
3805         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3806         (first_thread_of_process): Delete, replaced by ...
3807         (first_thread_of_inferior): ... this new function.  All callers
3808         adjusted.
3809         (any_live_thread_of_process): Delete, replaced by ...
3810         (any_live_thread_of_inferior): ... this new function.  All callers
3811         adjusted.
3812         (switch_to_thread, switch_to_no_thread): Declare.
3813         (is_executing): Delete.
3814         (enable_thread_stack_temporaries): Update comment.
3815         <enable_thread_stack_temporaries>: Take a thread_info pointer
3816         instead of a ptid_t.  Incref the thread.
3817         <~enable_thread_stack_temporaries>: Decref the thread.
3818         <m_ptid>: Delete
3819         <m_thr>: New.
3820         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3821         (get_last_thread_stack_temporary)
3822         (value_in_thread_stack_temporaries, can_access_registers_thread):
3823         Take a thread_info pointer instead of a ptid_t.  All callers
3824         adjusted.
3825         * infcall.c (get_call_return_value): Use inferior_thread.
3826         (run_inferior_call): Work with thread pointers instead of ptid_t.
3827         (call_function_by_hand_dummy): Work with thread pointers instead
3828         of ptid_t.  Use thread_info_ref.
3829         * infcmd.c (proceed_thread_callback): Access thread's state
3830         directly.
3831         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3832         access thread's state directly.
3833         (continue_command): Use inferior_thread.
3834         (info_program_command): Use find_thread_ptid and access thread
3835         state directly.
3836         (proceed_after_attach_callback): Use thread state directly.
3837         (notice_new_inferior): Take a thread_info pointer instead of a
3838         ptid_t.  All callers adjusted.
3839         (exit_inferior): Take an inferior pointer instead of a pid.  All
3840         callers adjusted.
3841         (exit_inferior_silent): New.
3842         (detach_inferior): Delete.
3843         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3844         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3845         (detach_inferior_command, kill_inferior_command): Use
3846         find_inferior_id instead of valid_gdb_inferior_id and
3847         gdb_inferior_id_to_pid.
3848         (inferior_command): Use inferior and thread pointers.
3849         * inferior.h (struct thread_info): Forward declare.
3850         (notice_new_inferior): Take a thread_info pointer instead of a
3851         ptid_t.  All callers adjusted.
3852         (detach_inferior): Delete declaration.
3853         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3854         instead of a pid.  All callers adjusted.
3855         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3856         (valid_gdb_inferior_id): Delete.
3857         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3858         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3859         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3860         ...
3861         <inf>: ... this new field.
3862         <step_ptid>: Delete, replaced by ...
3863         <step_thread>: ... this new field.
3864         (get_displaced_stepping_state): Take an inferior pointer instead
3865         of a pid.  All callers adjusted.
3866         (displaced_step_in_progress_any_inferior): Adjust.
3867         (displaced_step_in_progress_thread): Take a thread pointer instead
3868         of a ptid_t.  All callers adjusted.
3869         (displaced_step_in_progress, add_displaced_stepping_state): Take
3870         an inferior pointer instead of a pid.  All callers adjusted.
3871         (get_displaced_step_closure_by_addr): Adjust.
3872         (remove_displaced_stepping_state): Take an inferior pointer
3873         instead of a pid.  All callers adjusted.
3874         (displaced_step_prepare_throw, displaced_step_prepare)
3875         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3876         All callers adjusted.
3877         (start_step_over): Adjust.
3878         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3879         displaced step queue.
3880         (do_target_resume): Adjust.
3881         (fetch_inferior_event): Use inferior_thread.
3882         (context_switch, get_inferior_stop_soon): Take an
3883         execution_control_state pointer instead of a ptid_t.  All callers
3884         adjusted.
3885         (switch_to_thread_cleanup): Delete.
3886         (stop_all_threads): Use scoped_restore_current_thread.
3887         * inline-frame.c: Include "gdbthread.h".
3888         (inline_state) <inline_state>: Take a thread pointer instead of a
3889         ptid_t.  All callers adjusted.
3890         <ptid>: Delete, replaced by ...
3891         <thread>: ... this new field.
3892         (find_inline_frame_state): Take a thread pointer instead of a
3893         ptid_t.  All callers adjusted.
3894         (skip_inline_frames, step_into_inline_frame)
3895         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3896         pointer instead of a ptid_t.  All callers adjusted.
3897         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3898         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3899         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3900         pointers directly.
3901         * linux-nat.c (get_detach_signal): Likewise.
3902         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3903         (thread_db_notice_clone): Adjust.
3904         (thread_db_find_new_threads_silently)
3905         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3906         a thread pointer instead of a ptid_t.  All callers adjusted.
3907         * mi/mi-cmd-var.c: Include "inferior.h".
3908         (mi_cmd_var_update_iter): Update to use thread pointers.
3909         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3910         inferior directly.
3911         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3912         out to ...
3913         (mi_output_running): ... this new function.
3914         (mi_on_resume_1): Adjust to use it.
3915         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3916         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3917         directly.
3918         (interrupt_thread_callback): : Adjust to use thread and inferior
3919         pointers.
3920         * proc-service.c: Include "gdbthread.h".
3921         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3922         * progspace-and-thread.c: Include "inferior.h".
3923         * progspace.c: Include "inferior.h".
3924         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3925         hold a reference to an inferior_object.
3926         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3927         inferior_thread.
3928         * python/py-inferior.c (struct inferior_object): Give the type a
3929         tag name instead of a typedef.
3930         (python_on_normal_stop): No need to check if the current thread is
3931         listed.
3932         (inferior_to_inferior_object): Change return type to
3933         inferior_object.  All callers adjusted.
3934         (find_thread_object): Delete, bits factored out to ...
3935         (thread_to_thread_object): ... this new function.
3936         * python/py-infthread.c (create_thread_object): Use
3937         inferior_to_inferior_object.
3938         (thpy_is_stopped): Use thread pointer directly.
3939         (gdbpy_selected_thread): Use inferior_thread.
3940         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3941         field, replaced with ...
3942         <thread>: ... this new field.  All users adjusted.
3943         (btpy_insn_or_gap_new): Drop const.
3944         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3945         callers adjusted.
3946         * python/py-record.c: Include "gdbthread.h".
3947         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3948         a ptid_t.  All callers adjusted.
3949         (gdbpy_current_recording): Use inferior_thread.
3950         * python/py-record.h (recpy_record_object) <ptid>: Delete
3951         field, replaced with ...
3952         <thread>: ... this new field.  All users adjusted.
3953         (recpy_element_object) <ptid>: Delete
3954         field, replaced with ...
3955         <thread>: ... this new field.  All users adjusted.
3956         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3957         a ptid_t.  All callers adjusted.
3958         * python/py-threadevent.c: Include "gdbthread.h".
3959         (get_event_thread): Use thread_to_thread_object.
3960         * python/python-internal.h (struct inferior_object): Forward
3961         declare.
3962         (find_thread_object, find_inferior_object): Delete declarations.
3963         (thread_to_thread_object, inferior_to_inferior_object): New
3964         declarations.
3965         * record-btrace.c: Include "inferior.h".
3966         (require_btrace_thread): Use inferior_thread.
3967         (record_btrace_frame_sniffer)
3968         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3969         (get_thread_current_frame): Use scoped_restore_current_thread and
3970         switch_to_thread.
3971         (get_thread_current_frame): Use thread pointer directly.
3972         (record_btrace_replay_at_breakpoint): Use thread's inferior
3973         pointer directly.
3974         * record-full.c: Include "inferior.h".
3975         * regcache.c: Include "gdbthread.h".
3976         (get_thread_arch_regcache): Use the inferior's address space
3977         directly.
3978         (get_thread_regcache, registers_changed_thread): New.
3979         * regcache.h (get_thread_regcache(thread_info *thread)): New
3980         overload.
3981         (registers_changed_thread): New.
3982         (remote_target) <remote_detach_1>: Swap order of parameters.
3983         (remote_add_thread): <remote_add_thread>: Return the new thread.
3984         (get_remote_thread_info(ptid_t)): New overload.
3985         (remote_target::remote_notice_new_inferior): Use thread pointers
3986         directly.
3987         (remote_target::process_initial_stop_replies): Use
3988         thread_info::set_running.
3989         (remote_target::remote_detach_1, remote_target::detach)
3990         (extended_remote_target::detach): Adjust.
3991         * stack.c (frame_show_address): Use inferior_thread.
3992         * target-debug.h (target_debug_print_thread_info_pp): New.
3993         * target-delegates.c: Regenerate.
3994         * target.c (default_thread_address_space): Delete.
3995         (memory_xfer_partial_1): Use current_inferior.
3996         (target_detach): Use current_inferior.
3997         (target_thread_address_space): Delete.
3998         (generic_mourn_inferior): Use current_inferior.
3999         * target.h (struct target_ops) <thread_address_space>: Delete.
4000         (target_thread_address_space): Delete.
4001         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4002         pointers directly.
4003         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4004         thread pointer instead of a ptid_t.  Adjust all callers.
4005         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4006         (first_thread_of_process): Delete, replaced by ...
4007         (first_thread_of_inferior): ... this new function.  All callers
4008         adjusted.
4009         (any_thread_of_process): Rename to ...
4010         (any_thread_of_inferior): ... this, and take an inferior pointer.
4011         (any_live_thread_of_process): Rename to ...
4012         (any_live_thread_of_inferior): ... this, and take an inferior
4013         pointer.
4014         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4015         (value_in_thread_stack_temporaries)
4016         (get_last_thread_stack_temporary): Take a thread pointer instead
4017         of a ptid_t.  Adjust all callers.
4018         (thread_info::set_running): New.
4019         (validate_registers_access): Use inferior_thread.
4020         (can_access_registers_ptid): Rename to ...
4021         (can_access_registers_thread): ... this, and take a thread
4022         pointer.
4023         (print_thread_info_1): Adjust to compare thread pointers instead
4024         of ptids.
4025         (switch_to_no_thread, switch_to_thread): Make extern.
4026         (scoped_restore_current_thread::~scoped_restore_current_thread):
4027         Use m_thread pointer directly.
4028         (scoped_restore_current_thread::scoped_restore_current_thread):
4029         Use inferior_thread.
4030         (thread_command): Use thread pointer directly.
4031         (thread_num_make_value_helper): Use inferior_thread.
4032         * top.c (execute_command): Use inferior_thread.
4033         * tui/tui-interp.c: Include "inferior.h".
4034         * varobj.c (varobj_create): Use inferior_thread.
4035         (value_of_root_1): Use find_thread_global_id instead of
4036         global_thread_id_to_ptid.
4037
4038 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4039
4040         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4041         possible.
4042         (regcache::write_part): Likewise.
4043         (readable_regcache::cooked_read_part): Update comment.
4044         (readable_regcache::cooked_write_part): Likewise.
4045         * regcache.h: (readable_regcache::read_part): Likewise.
4046         (regcache::write_part): Likewise.
4047
4048 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4049             Dirk Schubert  <dirk.schubert@arm.com>
4050
4051         * aarch64-linux-nat.c (post_attach): New.
4052         (aarch64_linux_nat_target::post_attach): Override post_attach to
4053         record the number of hardware debug registers.
4054
4055 2018-06-20  Tom Tromey  <tom@tromey.com>
4056
4057         * python/py-param.c (add_setshow_generic): Make parameters const.
4058         (parmpy_init): Update.
4059
4060 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4061
4062         * regcache.h (regcache_cooked_read_ftype): Rename to...
4063         (register_read_ftype): ...this, change type to function_view.
4064         (class reg_buffer) <save>: Remove src parameter.
4065         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4066         parameter non-const in first overload.  Remove src parameter in
4067         second overload.
4068         * regcache.c (do_cooked_read): Remove.
4069         (readonly_detached_regcache::readonly_detached_regcache): Make
4070         parameter non-const, adjust call to other constructor.
4071         (reg_buffer::save): Remove src parameter.
4072         * frame.c (do_frame_register_read): Remove.
4073         (frame_save_as_regcache): Use lambda function.
4074         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4075         parameter to ppu2spu_data *.
4076         (ppu2spu_sniffer): Use lambda function.
4077
4078 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4079
4080         * record-full.c (record_full_target::insert_breakpoint): Remove
4081         "struct" keyword, add const.
4082
4083 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4084
4085         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4086         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4087         * configure.ac: Remove AC_PREREQ, add missing quoting.
4088         * gnulib/configure.ac: Modernize usage of
4089         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4090         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4091         (AUTOMAKE_VERSION): Bump to 1.15.1.
4092         * configure: Re-generate.
4093         * config.in: Re-generate.
4094         * aclocal.m4: Re-generate.
4095         * gnulib/aclocal.m4: Re-generate.
4096         * gnulib/config.in: Re-generate.
4097         * gnulib/configure: Re-generate.
4098         * gnulib/import/Makefile.in: Re-generate.
4099
4100 2018-06-19  Pedro Alves  <palves@redhat.com>
4101
4102         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4103         (lookup_minimal_symbol_by_pc_section): ... here with
4104         gdb_assert_not_reached added.
4105
4106 2018-06-19  Pedro Alves  <palves@redhat.com>
4107
4108         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4109         parameter with a block parameter.  Compare location's block symbol
4110         with the frame's block instead of addresses.
4111         (skip_inline_frames): Pass the current block instead of the
4112         frame's address.  Break out as soon as we determine the frame
4113         should not be skipped.
4114
4115 2018-06-18  Tom Tromey  <tom@tromey.com>
4116
4117         * solib-aix.c (solib_aix_get_section_offsets): Return
4118         unique_xmalloc_ptr.
4119         (solib_aix_solib_create_inferior_hook): Update.
4120
4121 2018-06-18  Tom Tromey  <tom@tromey.com>
4122
4123         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4124
4125 2018-06-18  Tom Tromey  <tom@tromey.com>
4126
4127         * solib-frv.c (frv_relocate_main_executable): Use
4128         unique_xmalloc_ptr.
4129         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4130         unique_xmalloc_ptr.
4131
4132 2018-06-18  Tom Tromey  <tom@tromey.com>
4133
4134         * objfiles.h (inhibit_section_map_updates): Update.
4135         (resume_section_map_updates, resume_section_map_updates_cleanup):
4136         Remove.
4137         * solib-svr4.c (svr4_handle_solib_event): Update.
4138         * objfiles.c (inhibit_section_map_updates): Return
4139         scoped_restore_tmpl<int>.
4140         (resume_section_map_updates, resume_section_map_updates_cleanup):
4141         Remove.
4142
4143 2018-06-18  Tom Tromey  <tom@tromey.com>
4144
4145         * valprint.h (read_string): Update.
4146         * valprint.c (read_string): Change type of "buffer".
4147         (val_print_string): Update.
4148         * python/py-value.c (valpy_string): Update.
4149         * language.h (struct language_defn) <la_get_string>: Change
4150         type of "buffer".
4151         (default_get_string, c_get_string): Update.
4152         * language.c (default_get_string): Change type of "buffer".
4153         * guile/scm-value.c (gdbscm_value_to_string): Update.
4154         * c-lang.c (c_get_string): Change type of "buffer".
4155
4156 2018-06-18  Tom Tromey  <tom@tromey.com>
4157
4158         * ser-mingw.c (struct pipe_state_destroyer): New.
4159         (pipe_state_up): New typedef.
4160         (cleanup_pipe_state): Remove.
4161         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4162
4163 2018-06-18  Tom Tromey  <tom@tromey.com>
4164
4165         * rust-lang.h (rust_yyerror): Don't declare.
4166         * rust-lang.c (rust_language_defn): Update.
4167         * rust-exp.y (yyerror): Now static.
4168         * parse.c (parse_exp_in_context_1): Update.
4169         * p-lang.h (p_yyerror): Don't declare.
4170         * p-lang.c (p_language_defn): Update.
4171         * p-exp.y (yyerror): Now static.
4172         * opencl-lang.c (opencl_language_defn): Update.
4173         * objc-lang.c (objc_language_defn): Update.
4174         * m2-lang.h (m2_yyerror): Don't declare.
4175         * m2-lang.c (m2_language_defn): Update.
4176         * m2-exp.y (yyerror): Now static.
4177         * language.h (struct language_defn) <la_error>: Remove.
4178         * language.c (unk_lang_error): Remove.
4179         (unknown_language_defn, auto_language_defn): Remove.
4180         * go-lang.h (go_yyerror): Don't declare.
4181         * go-lang.c (go_language_defn): Update.
4182         * go-exp.y (yyerror): Now static.
4183         * f-lang.h (f_yyerror): Don't declare.
4184         * f-lang.c (f_language_defn): Update.
4185         * f-exp.y (yyerror): Now static.
4186         * d-lang.h (d_yyerror): Don't declare.
4187         * d-lang.c (d_language_defn): Update.
4188         * d-exp.y (yyerror): Now static.
4189         * c-lang.h (c_yyerror): Don't declare.
4190         * c-lang.c (c_language_defn, cplus_language_defn)
4191         (asm_language_defn, minimal_language_defn): Update.
4192         * c-exp.y (yyerror): Now static.
4193         * ada-lang.h (ada_yyerror): Don't declare.
4194         * ada-lang.c (ada_language_defn): Update.
4195         * ada-exp.y (yyerror): Now static.
4196
4197 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4198
4199         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4200         (store_sveregs_to_thread): Likewise.
4201         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4202         (aarch64_linux_store_inferior_registers): Likewise.
4203         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4204         function.
4205         (aarch64_sve_regs_copy_to_regcache): Likewise.
4206         (aarch64_sve_regs_copy_from_regcache): Likewise.
4207         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4208         declaration.
4209         (aarch64_sve_regs_copy_to_regcache): Likewise.
4210         (aarch64_sve_regs_copy_from_regcache): Likewise.
4211         (sve_context): Structure from Linux headers.
4212         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4213         (SVE_SIG_ZREG_SIZE): Likewise.
4214         (SVE_SIG_PREG_SIZE): Likewise.
4215         (SVE_SIG_FFR_SIZE): Likewise.
4216         (SVE_SIG_REGS_OFFSET): Likewise.
4217         (SVE_SIG_ZREGS_OFFSET): Likewise.
4218         (SVE_SIG_ZREG_OFFSET): Likewise.
4219         (SVE_SIG_ZREGS_SIZE): Likewise.
4220         (SVE_SIG_PREGS_OFFSET): Likewise.
4221         (SVE_SIG_PREG_OFFSET): Likewise.
4222         (SVE_SIG_PREGS_SIZE): Likewise.
4223         (SVE_SIG_FFR_OFFSET): Likewise.
4224         (SVE_SIG_REGS_SIZE): Likewise.
4225         (SVE_SIG_CONTEXT_SIZE): Likewise.
4226         (SVE_PT_REGS_MASK): Likewise.
4227         (SVE_PT_REGS_FPSIMD): Likewise.
4228         (SVE_PT_REGS_SVE): Likewise.
4229         (SVE_PT_VL_INHERIT): Likewise.
4230         (SVE_PT_VL_ONEXEC): Likewise.
4231         (SVE_PT_REGS_OFFSET): Likewise.
4232         (SVE_PT_FPSIMD_OFFSET): Likewise.
4233         (SVE_PT_FPSIMD_SIZE): Likewise.
4234         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4235         (SVE_PT_SVE_PREG_SIZE): Likewise.
4236         (SVE_PT_SVE_FFR_SIZE): Likewise.
4237         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4238         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4239         (__SVE_SIG_TO_PT): Likewise.
4240         (SVE_PT_SVE_OFFSET): Likewise.
4241         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4242         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4243         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4244         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4245         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4246         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4247         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4248         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4249         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4250         (SVE_PT_SVE_SIZE): Likewise.
4251         (SVE_PT_SIZE): Likewise.
4252         (HAS_SVE_STATE): New define.
4253
4254 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4255
4256         * nat/aarch64-sve-linux-sigcontext.h: New file.
4257         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4258         new files.
4259         (SVE_VQ_MIN): Likewise.
4260         (SVE_VQ_MAX): Likewise.
4261         (SVE_VL_MIN): Likewise.
4262         (SVE_VL_MAX): Likewise.
4263         (SVE_NUM_ZREGS): Likewise.
4264         (SVE_NUM_PREGS): Likewise.
4265         (sve_vl_valid): Likewise.
4266         (struct user_sve_header): Likewise.
4267
4268 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4269             Richard Bunt <Richard.Bunt@arm.com>
4270
4271         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4272         was requested by GDB.
4273
4274 2018-06-15  Tom de Vries  <tdevries@suse.de>
4275
4276         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4277
4278 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4279
4280         * gnulib/update-gnulib.sh: Print expected versions of
4281         autoconf/aclocal.
4282
4283 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4284
4285         * arch-utils.c (default_type_align): Use type_length_units.
4286         * gdbtypes.c (type_align): Use type_length_units.
4287
4288 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4289
4290         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4291         of 'define' command.
4292
4293 2018-06-14  Tom de Vries  <tdevries@suse.de>
4294
4295         PR cli/22573
4296         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4297         get_no_prettyformat_print_options.
4298
4299 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4300
4301         * sparc-nat.h: Include target.h.
4302         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4303         <fetch_registers>: Remove this argument in function call.
4304         <store_registers>: Remove this argument in function call, remove
4305         extra semicolon.
4306         <low_forget_process>: Call sparc64_forget_process instead of
4307         sparc_forget_process.
4308
4309 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4310
4311         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4312         (procfs_target::make_corefile_notes): Adjust to new
4313         target_read_alloc return type.
4314
4315 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4316             Stephen Roberts  <stephen.roberts@arm.com>
4317
4318         PR gdb/22882
4319         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4320         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4321         Move should_notify_stop local into more inner scope.
4322
4323 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4324             Stephen Roberts  <stephen.roberts@arm.com>
4325
4326         PR gdb/22882
4327         * infrun.c (resume_1): Add call to mark_async_event_handler.
4328
4329 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4330
4331         * infrun.c (do_target_wait): Change old version of $pc printed.
4332
4333 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4334
4335         * dwarf2read.c (read_index_from_section): Rename to...
4336         (read_gdb_index_from_section): ... this, update all callers.
4337         (dwarf2_read_index): Rename to...
4338         (dwarf2_read_gdb_index): ... this, update all callers.
4339
4340 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4341
4342         * gdb/hppa-linux-nat.c
4343         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4344         hppa_linux_nat_target::fetch_registers.
4345
4346 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4347
4348         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4349         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4350         (AARCH64_DWARF_SVE_FFR): Likewise.
4351         (AARCH64_DWARF_SVE_P0): Likewise.
4352         (AARCH64_DWARF_SVE_Z0): Likewise.
4353
4354 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4355
4356         * common/common-regcache.h (raw_compare): New function.
4357         * regcache.c (regcache::raw_compare): Likewise.
4358         * regcache.h (regcache::raw_compare): New declaration.
4359
4360 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4361
4362         * common/common-regcache.h (reg_buffer_common): New structure.
4363         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4364         (reg_buffer::raw_supply): Likewise.
4365         (reg_buffer::raw_supply_integer): Likewise.
4366         (reg_buffer::raw_supply_zeroed): Likewise.
4367         (reg_buffer::raw_collect): Likewise.
4368         (reg_buffer::raw_collect_integer): Likewise.
4369         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4370         (reg_buffer::raw_supply): Likewise.
4371         (reg_buffer::raw_supply_integer): Likewise.
4372         (reg_buffer::raw_supply_zeroed): Likewise.
4373         (reg_buffer::raw_collect): Likewise.
4374         (reg_buffer::raw_collect_integer): Likewise.
4375
4376 2018-06-10  Tom Tromey  <tom@tromey.com>
4377
4378         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4379         (class remote_state) <stop_reply_queue>: Now std::vector.
4380         (remote_state::~remote_state)
4381         (remote_target::stop_reply_queue_length): Update.
4382         (struct queue_iter_param, remove_child_of_pending_fork)
4383         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4384         (check_pending_event_prevents_wildcard_vcont_callback)
4385         (remove_stop_reply_for_inferior)
4386         (remove_stop_reply_of_remote_state)
4387         (remote_notif_remove_once_on_match)
4388         (stop_reply_match_ptid_and_ws)
4389         (remote_kill_child_of_pending_fork): Remove.
4390         (remote_target::remove_new_fork_children)
4391         (remote_target::check_pending_events_prevent_wildcard_vcont)
4392         (remote_target::discard_pending_stop_replies)
4393         (remote_target::discard_pending_stop_replies_in_queue)
4394         (remote_target::remote_notif_remove_queued_reply)
4395         (remote_target::queued_stop_reply)
4396         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4397         (remote_target::wait, remote_target::kill_new_fork_children)
4398         (remote_target::async): Update.
4399
4400 2018-06-10  Tom Tromey  <tom@tromey.com>
4401
4402         * record-full.c (record_full_arch_list_cleanups): Remove.
4403         (record_full_message): Use try/catch.
4404         (record_full_wait_cleanups): Remove.
4405         (record_full_wait_1): Use try/catch.
4406         (record_full_restore): Likewise.
4407
4408 2018-06-10  Tom Tromey  <tom@tromey.com>
4409
4410         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4411         declare VEC.  Add constructor.
4412         <in_target_beneath>: Now bool.
4413         (record_full_breakpoints): Now a std::vector, static.
4414         (record_full_sync_record_breakpoints)
4415         (record_full_init_record_breakpoints)
4416         (record_full_target::insert_breakpoint)
4417         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4418
4419 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4420
4421         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4422         * serial.c (serial_interface_lookup): Remove struct keyword.
4423
4424 2018-06-10  Tom Tromey  <tom@tromey.com>
4425
4426         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4427         method.
4428         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4429         a method.
4430         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4431         method.
4432         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4433         "beneath" as a method.
4434         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4435         Use "beneath" as a method.
4436
4437 2018-06-10  Tom Tromey  <tom@tromey.com>
4438
4439         * tracefile.c (struct trace_file_writer_deleter): New.
4440         <operator()>: Rename from trace_file_writer_xfree.
4441         (trace_file_writer_up): New typedef.
4442         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4443
4444 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4445
4446         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4447         <m_registers, m_register_status>: Change type to
4448         std::unique_ptr.
4449         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4450         XCNEWVEC.
4451
4452 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4453
4454         * common/common-regcache.h (enum register_status): Add
4455         underlying type "signed char".
4456         * regcache.h (reg_buffer) <m_register_status>: Change type to
4457         register_status *.
4458         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4459         register_status instead of signed char.
4460         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4461         (reg_buffer::get_register_status): Remove cast.
4462         (readable_regcache::raw_read): Remove cast.
4463         (readable_regcache::cooked_read): Remove cast.
4464
4465 2018-06-09  Tom Tromey  <tom@tromey.com>
4466
4467         * source.c (reverse_search_command, forward_search_command): Use
4468         scoped_fd.
4469
4470 2018-06-09  Tom Tromey  <tom@tromey.com>
4471
4472         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4473         (serial_ops_list): Now static, std::vector.
4474         (serial_interface_lookup, serial_add_interface): Update.
4475
4476 2018-06-09  Tom Tromey  <tom@tromey.com>
4477
4478         * dwarf2read.c (process_cu_includes): Update.
4479         (process_full_comp_unit): Update.
4480         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4481         std::vector.
4482
4483 2018-06-08  Paul Koning  <paul_koning@dell.com>
4484
4485         PR gdb/23252
4486
4487         * python/python.c (do_start_initialization):
4488         Avoid call to internal Python API.
4489         (init__gdb_module): New function.
4490
4491 2018-06-08  Gary Benson <gbenson@redhat.com>
4492
4493         * linux-thread-db.c (valprint.h): New include.
4494         (struct check_thread_db_info): New structure.
4495         (check_thread_db_on_load, tdb_testinfo): New static globals.
4496         (check_thread_db, check_thread_db_callback): New functions.
4497         (try_thread_db_load_1): Run integrity checks if requested.
4498         (maintenance_check_libthread_db): New function.
4499         (_initialize_thread_db): Register "maint check libthread-db"
4500         and "maint set/show check-libthread-db".
4501         * NEWS: Mention the above new commands.
4502
4503 2018-06-08  Tom Tromey  <tom@tromey.com>
4504
4505         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4506         now a method.
4507
4508 2018-06-08  Tom Tromey  <tom@tromey.com>
4509
4510         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4511
4512 2018-06-08  Tom Tromey  <tom@tromey.com>
4513
4514         * common/btrace-common.h (struct btrace_data): Add constructor,
4515         destructor, move assignment operator.
4516         <empty, clear, fini>: New methods.
4517         <format>: Initialize.
4518         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4519         (btrace_data_empty): Don't declare.
4520         * common/btrace-common.c (btrace_data_init): Remove.
4521         (btrace_data::fini): Rename from btrace_data_fini.
4522         (btrace_data::empty): Rename from btrace_data_empty.
4523         (btrace_data::clear): Rename from btrace_data_clear.  Return
4524         bool.
4525         * btrace.h (make_cleanup_btrace_data): Don't declare.
4526         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4527         (parse_xml_btrace): Update.
4528         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4529         (maint_btrace_clear_packet_history_cmd): Update.
4530
4531 2018-06-07  Pedro Alves  <palves@redhat.com>
4532
4533         * target.h (target_ops) <beneath>: Now a method.  All references
4534         updated.
4535         (class target_stack): New.
4536         * target.c (g_target_stack): New.
4537         (g_current_top_target): Delete.
4538         (current_top_target): Get the top target out of g_target_stack.
4539         (target_stack::push, target_stack::unpush): New.
4540         (push_target, unpush_target): Reimplement.
4541         (target_is_pushed): Reimplement in terms of g_target_stack.
4542         (target_ops::beneath, target_stack::find_beneath): New.
4543
4544 2018-06-07  Pedro Alves  <palves@redhat.com>
4545
4546         * target.h (find_target_beneath): Delete declaration.
4547         * target.c (find_target_beneath): Delete definition.
4548         * aix-thread.c: All callers of find_target_beneath adjusted to
4549         call target_ops::beneath instead.
4550         * bsd-uthread.c: Likewise.
4551         * linux-thread-db.c: Likewise.
4552         * ravenscar-thread.c: Likewise.
4553         * sol-thread.c: Likewise.
4554         * spu-multiarch.c: Likewise.
4555
4556 2018-06-07  Pedro Alves  <palves@redhat.com>
4557
4558         * target.h (target_ops) <beneath>: Now a method.  All references
4559         updated.
4560         (target_ops) <m_beneath>: New.
4561         * target.c (target_ops::beneath): New.
4562         * corelow.c: Adjust all references to target_ops::beneath.
4563         * linux-thread-db.c: Likewise.
4564         * make-target-delegates: Likewise.
4565         * record-btrace.c: Likewise.
4566         * record-full.c: Likewise.
4567         * remote.c: Likewise.
4568         * target.c: Likewise.
4569         * target-delegates.c: Regenerate.
4570
4571 2018-06-07  Pedro Alves  <palves@redhat.com>
4572
4573         * target.h (target_stack): Delete.
4574         (current_top_target): Declare function.
4575         * target.c (target_stack): Delete.
4576         (g_current_top_target): New.
4577         (current_top_target): New function.
4578         * auxv.c: Use current_top_target instead of target_stack
4579         throughout.
4580         * avr-tdep.c: Likewise.
4581         * breakpoint.c: Likewise.
4582         * corefile.c: Likewise.
4583         * elfread.c: Likewise.
4584         * eval.c: Likewise.
4585         * exceptions.c: Likewise.
4586         * frame.c: Likewise.
4587         * gdbarch-selftests.c: Likewise.
4588         * gnu-v3-abi.c: Likewise.
4589         * ia64-tdep.c: Likewise.
4590         * ia64-vms-tdep.c: Likewise.
4591         * infcall.c: Likewise.
4592         * infcmd.c: Likewise.
4593         * infrun.c: Likewise.
4594         * linespec.c: Likewise.
4595         * linux-tdep.c: Likewise.
4596         * minsyms.c: Likewise.
4597         * ppc-linux-nat.c: Likewise.
4598         * ppc-linux-tdep.c: Likewise.
4599         * procfs.c: Likewise.
4600         * regcache.c: Likewise.
4601         * remote.c: Likewise.
4602         * rs6000-tdep.c: Likewise.
4603         * s390-linux-nat.c: Likewise.
4604         * s390-tdep.c: Likewise.
4605         * solib-aix.c: Likewise.
4606         * solib-darwin.c: Likewise.
4607         * solib-dsbt.c: Likewise.
4608         * solib-spu.c: Likewise.
4609         * solib-svr4.c: Likewise.
4610         * solib-target.c: Likewise.
4611         * sparc-tdep.c: Likewise.
4612         * sparc64-tdep.c: Likewise.
4613         * spu-tdep.c: Likewise.
4614         * symfile.c: Likewise.
4615         * symtab.c: Likewise.
4616         * target-descriptions.c: Likewise.
4617         * target-memory.c: Likewise.
4618         * target.c: Likewise.
4619         * target.h: Likewise.
4620         * tracefile-tfile.c: Likewise.
4621         * tracepoint.c: Likewise.
4622         * valops.c: Likewise.
4623         * valprint.c: Likewise.
4624         * value.c: Likewise.
4625         * windows-tdep.c: Likewise.
4626         * mi/mi-main.c: Likewise.
4627
4628 2018-06-07  Tom Tromey  <tom@tromey.com>
4629
4630         * valprint.h (build_address_symbolic): Declare.
4631         * printcmd.c (print_address_symbolic): Update.
4632         (build_address_symbolic): Change "name" and "filename" to
4633         std::string.
4634         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4635         Update.
4636         * defs.h (build_address_symbolic): Remove declaration.
4637
4638 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4639
4640         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4641         (aarch64_vnv_type): Add function.
4642         (aarch64_pseudo_register_name): Add V regs for SVE.
4643         (aarch64_pseudo_register_type): Likewise.
4644         (aarch64_pseudo_register_reggroup_p): Likewise.
4645         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4646         (aarch64_pseudo_read_value): Add V regs for SVE.
4647         (aarch64_pseudo_write_2): Use V0 offset for SVE
4648         (aarch64_pseudo_write): Add V regs for SVE.
4649         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4650
4651 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4652
4653         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4654         (sve_vl_from_vq): Likewise.
4655
4656 2018-06-05  Tom Tromey  <tom@tromey.com>
4657
4658         * cli/cli-cmds.c (show_version): Update.
4659         * top.c (print_gdb_version): Add "interactive" parameter.
4660         Update.
4661         * main.c (captured_main_1): Update.
4662         * top.h (print_gdb_version): Add "interactive" parameter and a
4663         comment.
4664
4665 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4666
4667         * common/enum-flags.h: Add trailing semicolon to example in
4668         comment.
4669
4670 2018-06-05  Tom Tromey  <tom@tromey.com>
4671
4672         PR cli/12326:
4673         * NEWS: Add entry about pager.
4674         * utils.c (pagination_disabled_for_command): New global.
4675         (prompt_for_continue): Allow "c" response to prompt.
4676         (reinitialize_more_filter): Clear
4677         pagination_disabled_for_command.
4678         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4679
4680 2018-06-04  Tom Tromey  <tom@tromey.com>
4681
4682         * ada-lang.h (ada_lookup_symbol_list): Update.
4683         * ada-lang.c (resolve_subexp): Update.
4684         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4685         parameter.
4686         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4687         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4688         results parameter to std::vector.
4689         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4690         Update.
4691         * ada-exp.y (block_lookup): Update.
4692         (select_possible_type_sym): Change type of syms.  Remove nsyms
4693         parameter.
4694         (write_var_or_type, write_name_assoc): Update.
4695
4696 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4697
4698         * windows-nat.c (windows_nat_target::xfer_partial): Return
4699         TARGET_XFER_E_IO if we need to delegate to the target beneath
4700         but BENEATH is NULL.
4701
4702 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4703
4704         * Makefile.in (config.status): Add configure.nat as a
4705         dependency.
4706
4707 2018-06-04  Tom Tromey  <tom@tromey.com>
4708
4709         * cp-name-parser.y (cpname_state): Add method declarations.
4710         (HANDLE_QUAL): Update.
4711         (cpname_state::d_grab, cpname_state::fill_comp)
4712         (cpname_state::make_operator, cpname_state::make_dtor)
4713         (cpname_state::make_builtin_type, cpname_state::make_name)
4714         (cpname_state::d_qualify, cpname_state::d_int_type)
4715         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4716         (%union): Move earlier.
4717
4718 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4719
4720         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4721
4722 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4723
4724         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4725         (aarch64_pseudo_write_1): Likewise.
4726         (aarch64_pseudo_read_value): Use helper.
4727         (aarch64_pseudo_write): Likewise.
4728
4729 2018-06-04  Pedro Alves  <palves@redhat.com>
4730
4731         * darwin-nat.c (darwin_ops): Delete.
4732         (darwin_attach_pid): Use get_native_target.
4733
4734 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4735
4736         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4737         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4738
4739 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4740
4741         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4742         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4743         (aarch64_gdbarch_init): Check for SVE.
4744         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4745
4746 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4747
4748         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4749         * aarch64-tdep.h (aarch64_read_description): Likewise.
4750         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4751         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4752         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4753         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4754         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4755
4756 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4757
4758         * value.c (value_fetch_lazy_bitfield): New.
4759         (value_fetch_lazy_memory): New.
4760         (value_fetch_lazy_register): New.
4761         (value_fetch_lazy): Factor out to smaller functions.
4762
4763 2018-06-01  Tom Tromey  <tom@tromey.com>
4764
4765         * cp-name-parser.y (backslashable, represented): Now const.
4766
4767 2018-06-01  Tom Tromey  <tom@tromey.com>
4768
4769         * cp-name-parser.y: Include parser-defs.h.
4770         (parser_fprintf): Remove declaration.
4771
4772 2018-06-01  Tom Tromey  <tom@tromey.com>
4773
4774         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4775         %parse-param.
4776         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4777         (global_result): Remove globals.
4778         (struct cpname_state): New.
4779         (yyparse): Don't declare.
4780         (yylex, yyerror): Move declarations after %union.
4781         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4782         (make_name): Add state parameter.
4783         Update all callers.
4784         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4785         parameter.
4786         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4787         Update.
4788         (yylex): Add lvalp, state parameters.
4789         (yyerror): Add state parameter.
4790         (cp_demangled_name_to_comp): Update.
4791
4792 2018-06-01  Tom Tromey  <tom@tromey.com>
4793
4794         * cp-name-parser.y (parser_fprintf): Declare.
4795         (GDB_YY_REMAP_PREFIX): Define.
4796         Include yy-remap.h.  Don't redefine yy* identifiers.
4797
4798 2018-06-01  Tom Tromey  <tom@tromey.com>
4799
4800         * python/py-type.c (typy_legacy_template_argument): Update.
4801         * cp-support.h (cp_demangled_name_to_comp): Update.
4802         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4803         parameter to be a "std::string *".
4804         (main): Update.
4805
4806 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4807
4808         * ada-lex.l: Include "diagnostics.h" instead of
4809         "common/diagnostics.h".
4810         * unittests/environ-selftests.c: Likewise.
4811         * common/diagnostics.h: Moved to ../include.
4812
4813 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4814
4815         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4816         to language_mode_manual while calling breakpoint_re_set_one.
4817
4818 2018-06-01  Tom Tromey  <tom@tromey.com>
4819
4820         * valops.c (value_cast_structs, destructor_name_p): Update.
4821         * symtab.c (gdb_mangle_name): Update.
4822         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4823         Update.
4824         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4825         (pascal_object_print_value_fields, pascal_object_print_value):
4826         Update.
4827         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4828         * linespec.c (find_methods): Update.
4829         * gdbtypes.h (type_name_no_tag): Remove.
4830         (type_name_or_error): Rename from type_name_no_tag_or_error.
4831         * gdbtypes.c (type_name_no_tag): Remove.
4832         (type_name_or_error): Rename from type_name_no_tag_or_error.
4833         (lookup_struct_elt_type, check_typedef): Update.
4834         * expprint.c (print_subexp_standard): Update.
4835         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4836         * d-namespace.c (d_lookup_nested_symbol): Update.
4837         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4838         (cp_print_class_member): Update.
4839         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4840         * completer.c (add_struct_fields): Update.
4841         * c-typeprint.c (cp_type_print_derivation_info)
4842         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4843         Update.
4844         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4845         (ada_prefer_type, ada_is_exception_sym): Update.
4846
4847 2018-06-01  Tom Tromey  <tom@tromey.com>
4848
4849         * valops.c (enum_constant_from_type, value_namespace_elt)
4850         (value_maybe_namespace_elt): Update.
4851         * valarith.c (find_size_for_pointer_math): Update.
4852         * target-descriptions.c (make_gdb_type): Update.
4853         * symmisc.c (print_symbol): Update.
4854         * stabsread.c (define_symbol, read_type)
4855         (complain_about_struct_wipeout, add_undefined_type)
4856         (cleanup_undefined_types_1): Update.
4857         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4858         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4859         (rust_internal_print_type, rust_composite_type)
4860         (rust_evaluate_funcall, rust_evaluate_subexp)
4861         (rust_inclusive_range_type_p): Update.
4862         * python/py-type.c (typy_get_tag): Update.
4863         * p-typeprint.c (pascal_type_print_base): Update.
4864         * mdebugread.c (parse_symbol, parse_type): Update.
4865         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4866         Update.
4867         * guile/scm-type.c (gdbscm_type_tag): Update.
4868         * go-lang.c (sixg_string_p): Update.
4869         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4870         Update.
4871         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4872         (TYPE_TAG_NAME): Remove.
4873         * gdbtypes.c (type_name_no_tag): Simplify.
4874         (check_typedef, check_types_equal, recursive_dump_type)
4875         (copy_type_recursive, arch_composite_type): Update.
4876         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4877         in summary mode when needed.
4878         * eval.c (evaluate_funcall): Update.
4879         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4880         (process_structure_scope, read_enumeration_type)
4881         (read_namespace_type, read_module_type, determine_prefix): Update.
4882         * cp-support.c (inspect_type): Update.
4883         * coffread.c (process_coff_symbol, decode_base_type): Update.
4884         * c-varobj.c (c_is_path_expr_parent): Update.
4885         * c-typeprint.c (c_type_print_base_struct_union): Update.
4886         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4887         summary when using C language.
4888         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4889         (gen_maybe_namespace_elt): Update.
4890         * ada-lang.c (ada_type_name): Simplify.
4891         (empty_record, ada_template_to_fixed_record_type_1)
4892         (template_to_static_fixed_type)
4893         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4894
4895 2018-06-01  Tom Tromey  <tom@tromey.com>
4896
4897         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4898         c_print_type.
4899         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4900         (c_print_type): Update.
4901         (c_print_type): New overload.
4902         (c_type_print_varspec_prefix, c_type_print_args)
4903         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4904         (c_type_print_base_struct_union, c_type_print_base_1)
4905         (cp_type_print_method_args): Add "language" parameter.
4906         (c_type_print_base): Update.
4907         * c-lang.h (c_print_type): Add new overload.
4908
4909 2018-06-01  Tom Tromey  <tom@tromey.com>
4910
4911         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4912         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4913
4914 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4915
4916         * aarch64-tdep.c (aarch64_sve_register_names): New const
4917         var.
4918         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4919         (AARCH64_SVE_Z_REGS_NUM): New define.
4920         (AARCH64_SVE_P_REGS_NUM): Likewise.
4921         (AARCH64_SVE_NUM_REGS): Likewise.
4922
4923 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4924
4925         * nat/linux-ptrace.h [__alpha__]
4926         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4927         definitions.
4928
4929 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4930
4931         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4932         the endianness selected.
4933         * NEWS: Document `set endian auto' mode operation update.
4934
4935 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4936
4937         * Makefile.in: Add new header.
4938         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4939         (sve_vl_from_vg): Likewise.
4940         (sve_vq_from_vl): Likewise.
4941         (sve_vl_from_vq): Likewise.
4942         (sve_vq_from_vg): Likewise.
4943         (sve_vg_from_vq): Likewise.
4944         * configure.nat: Add new c file.
4945         * nat/aarch64-sve-linux-ptrace.c: New file.
4946         * nat/aarch64-sve-linux-ptrace.h: New file.
4947
4948 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4949
4950         * aarch64-linux-nat.c (aarch64_linux_read_description):
4951         Add parmeter zero.
4952         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4953         Likewise.
4954         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4955         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4956         (aarch64_gdbarch_init): Add parmeter zero.
4957         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4958         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4959         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4960         parmeter.
4961         * doc/gdb.texinfo: Describe SVE feature
4962         * features/aarch64-sve.c: New file.
4963
4964 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4965
4966         PR gdb/23210
4967         * gdbarch.sh (significant_addr_bit): Default to zero when
4968         not set by target architecture.
4969         * gdbarch.c: Re-generated.
4970         * utils.c (address_significant): Update.
4971
4972 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4973
4974         * stack.c (func_command): Remove trailing newline in call to error.
4975
4976 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4977
4978         * regcache.h (regcache_raw_collect): Remove, update callers to
4979         use regcache::raw_collect.
4980         * regcache.c (regcache_raw_collect): Remove.
4981
4982 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4983
4984         * regcache.h (regcache_raw_supply): Remove, update callers to
4985         use detached_regcache::raw_supply.
4986         * regcache.c (regcache_raw_supply): Remove.
4987
4988 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4989
4990         * regcache.h (regcache_cooked_write_part): Remove, update
4991         callers to use regcache::cooked_write_part.
4992         * regcache.c (regcache_cooked_write_part): Remove.
4993
4994 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4995
4996         * regcache.h (regcache_cooked_read_part): Remove, update callers
4997         to use readable_regcache::cooked_read_part.
4998         * regcache.c (regcache_cooked_read_part): Remove.
4999
5000 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5001
5002         * regcache.h (regcache_cooked_read_value): Remove, update
5003         callers to use readable_regcache::cooked_read_value.
5004         * regcache.c (regcache_cooked_read_value): Remove.
5005
5006 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5007
5008         * regcache.h (regcache_cooked_write): Remove, update callers to
5009         use regcache::cooked_write.
5010         * regcache.c (regcache_cooked_write): Remove.
5011
5012 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5013
5014         * regcache.h (regcache_invalidate): Remove, update callers to
5015         use detached_regcache::invalidate instead.
5016         * regcache.c (regcache_invalidate): Remove.
5017
5018 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5019
5020         * regcache.h (regcache_raw_write_part): Remove, update callers
5021         to use regcache::raw_write_part instead.
5022         * regcache.c (regcache_raw_write_part): Remove.
5023
5024 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5025
5026         * regcache.h (regcache_raw_read_part): Remove, update callers to
5027         use readable_regcache::raw_read_part instead.
5028         * regcache.c (regcache_raw_read_part): Remove.
5029
5030 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5031
5032         * regcache.h (regcache_cooked_read): Remove, update callers to
5033         use readable_regcache::cooked_read instead.
5034         * regcache.c (regcache_cooked_read): Remove.
5035
5036 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5037
5038         * regcache.h (regcache_raw_write): Remove, update callers to use
5039         regcache::raw_write instead.
5040         * regcache.c (regcache_raw_write): Remove.
5041
5042 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5043
5044         * regcache.h (regcache_raw_read): Remove, update callers to use
5045         readable_regcache::raw_read instead.
5046         * regcache.c (regcache_raw_read): Remove.
5047
5048 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5049
5050         * regcache.h (regcache_raw_update): Remove, update callers to
5051         use readable_regcache::raw_update instead.
5052         * regcache.c (regcache_raw_update): Remove.
5053
5054 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5055
5056         * regcache.h (regcache_register_status): Remove, update callers
5057         to use reg_buffer::get_register_status directly instead.
5058         * regcache.c (regcache_register_status): Remove.
5059
5060 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5061
5062         * regcache.h (regcache_get_ptid): Remove, update all callers to
5063         call regcache::ptid instead.
5064         * regcache.c (regcache_get_ptid): Remove.
5065
5066 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5067
5068         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5069
5070 2018-05-30  Pedro Alves  <palves@redhat.com>
5071
5072         * common/common-exceptions.h (exception_rethrow): Use
5073         ATTRIBUTE_NORETURN.
5074
5075 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5076
5077         * breakpoint.c (print_solib_event, check_status_catch_solib):
5078         Remove struct keyword in range-based for loops.
5079         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5080         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5081         Likewise.
5082         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5083         Likewise.
5084         * symfile.c (addr_info_make_relative): Likewise.
5085         * thread.c (value_in_thread_stack_temporaries): Likewise.
5086
5087 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5088
5089         PR gdb/16841
5090         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5091         aggregate type to get its real type before accessing it.
5092
5093 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5094
5095         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5096         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5097         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5098         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5099         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5100         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5101         * printcmd.c (info_address_command): Likewise.
5102
5103 2018-05-29  Tom Tromey  <tom@tromey.com>
5104
5105         * windows-nat.c (handle_exception): Update fall-through comment.
5106
5107 2018-05-29  Tom Tromey  <tom@tromey.com>
5108
5109         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5110         (struct program_space) <added_solibs>: Now a std::vector.
5111         * breakpoint.c (print_solib_event): Update.
5112         (check_status_catch_solib): Update.
5113         * progspace.c (clear_program_space_solib_cache): Update.
5114         * solib.c (update_solib_list): Update.
5115
5116 2018-05-29  Tom Tromey  <tom@tromey.com>
5117
5118         * python/py-type.c (typy_richcompare): Update.
5119         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5120         * gdbtypes.h (types_deeply_equal): Return bool.
5121         (types_equal): Likewise.
5122         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5123         declare VEC.
5124         (check_types_equal): Change worklist to std::vector.  Return
5125         bool.
5126         (struct type_equality_entry): Add constructor.
5127         (compare_maybe_null_strings): Return bool.
5128         (check_types_worklist): Return bool.  Change worklist to
5129         std::vector.
5130         (types_deeply_equal): Use std::vector.
5131         (types_equal): Return bool.
5132         (compare_maybe_null_strings): Simplify.
5133
5134 2018-05-29  Tom Tromey  <tom@tromey.com>
5135
5136         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5137
5138 2018-05-29  Tom Tromey  <tom@tromey.com>
5139
5140         * objc-lang.h: Don't include cp-support.h.
5141         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5142         declare VEC.
5143
5144 2018-05-27  Tom Tromey  <tom@tromey.com>
5145
5146         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5147
5148 2018-05-25  Tom Tromey  <tom@tromey.com>
5149
5150         * value.c (value::location): Initialize.
5151
5152 2018-05-25  Tom Tromey  <tom@tromey.com>
5153
5154         * dbxread.c (init_bincl_list): Remove.
5155         (bincl_list): Now a std::vector.
5156         (bincls_allocated, next_bincl): Remove.
5157         (free_bincl_list, do_free_bincl_list_cleanup)
5158         (make_cleanup_free_bincl_list): Remove.
5159         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5160         unique_xmalloc_ptr.
5161         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5162         (struct header_file_location): Add constructor.
5163         (add_bincl_to_list): Remove.
5164
5165 2018-05-25  Tom Tromey  <tom@tromey.com>
5166
5167         * tui/tui.c (tui_enable): Update.
5168         * mi/mi-interp.c (mi_interp::init): Update.
5169         * interps.h (class interp) <name>: New method.
5170         <m_name>: Rename from name.
5171         (~scoped_restore_interp): Update.
5172         * interps.c (interp::interp): Update.
5173         (interp_add, interp_set, interp_lookup_existing)
5174         (current_interp_named_p): Update.
5175
5176 2018-05-25  Tom Tromey  <tom@tromey.com>
5177
5178         * interps.c (interp_name): Remove.
5179         * mi/mi-interp.c (mi_interp::init): Update.
5180         * interps.h (interp_name): Remove.
5181         (~scoped_restore_interp): Update.
5182         * tui/tui.c (tui_enable): Update.
5183
5184 2018-05-25  Tom Tromey  <tom@tromey.com>
5185
5186         * utils.c (fputs_maybe_filtered): Update.
5187         * linespec.c (decode_line_full): Update.
5188         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5189         (mi_print_breakpoint_for_event, mi_solib_loaded)
5190         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5191         (mi_user_selected_context_changed): Update.
5192         * mi/mi-main.c (mi_execute_command): Update.
5193         * cli/cli-script.c (execute_control_command): Update.
5194         * python/python.c (execute_gdb_command): Update.
5195         * solib.c (info_sharedlibrary_command): Update.
5196         * interps.c (interp_ui_out): Remove.
5197         * interps.h (interp_ui_out): Remove.
5198
5199 2018-05-25  Tom Tromey  <tom@tromey.com>
5200
5201         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5202         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5203         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5204
5205 2018-05-25  Tom Tromey  <tom@tromey.com>
5206
5207         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5208         * interps.c (interp_exec): Use scoped_restore.
5209
5210 2018-05-25  Tom Tromey  <tom@tromey.com>
5211
5212         * remote.c (remote_target::remote_file_get): Use
5213         gdb::byte_vector.
5214         (remote_target::remote_file_put): Likewise.
5215
5216 2018-05-25  Tom Tromey  <tom@tromey.com>
5217
5218         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5219         a std::string.
5220         (get_pe_section_index, add_pe_exported_sym): Update.
5221         (read_pe_exported_syms): Use gdb::def_vector.
5222
5223 2018-05-25  Tom Tromey  <tom@tromey.com>
5224
5225         * frame.c (remove_prev_frame): Remove.
5226         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5227
5228 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5229
5230         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5231         Remove prototypes.
5232         * mips-linux-nat.c (supply_fpregset): Always call
5233         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5234         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5235         `mips_fill_fpregset'.
5236         * mips-linux-tdep.c (mips_supply_fpregset)
5237         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5238         (mips_fill_fpregset_wrapper): Remove functions.
5239         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5240         (mips_linux_fpregset): Remove variable.
5241         (mips_linux_iterate_over_regset_sections): Use
5242         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5243         (mips_linux_o32_sigframe_init): Remove comment.
5244
5245 2018-05-25  Pedro Alves  <palves@redhat.com>
5246
5247         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5248         (struct readahead_cache, struct packet_reg, struct
5249         remote_arch_state, class remote_state): Move higher up in the
5250         file.
5251         (remote_target::m_remote_state): Now an object instead of a pointer.
5252         (remote_target::get_remote_state): Adjust.
5253
5254 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5255
5256         * stack.c (select_and_print_frame): Delete.
5257         (struct function_bounds): Move struct within function.
5258         (func_command): Most content moved into new function
5259         find_frame_for_function, use new function, print result, add
5260         function comment.
5261         (find_frame_for_function): New function, now returns a result.
5262
5263 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5264
5265         * stack.c (iterate_over_block_arg_vars): Fix comment.
5266         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5267
5268 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5269
5270         PR gdb/23203
5271         * frame.c
5272         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5273         Define.
5274         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5275         Define.
5276         * frame.h (class scoped_restore_selected_frame): New class.
5277         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5278         of any exception, use scoped_restore_selected_frame to restore the
5279         frame instead.
5280
5281 2018-05-24  Pedro Alves  <palves@redhat.com>
5282
5283         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5284         override.
5285
5286 2018-05-23  Tom Tromey  <tom@tromey.com>
5287
5288         * complaints.c (struct complaints): Remove.
5289         (symfile_complaint_book): Remove.
5290         (series): New global.
5291         (complaint_internal): Update.
5292         (clear_complaints): Update.
5293
5294 2018-05-23  Tom Tromey  <tom@tromey.com>
5295
5296         * complaints.c (counters): New global.
5297         (struct complain): Remove.
5298         (struct complaints) <root>: Remove.
5299         (complaint_sentinel): Remove.
5300         (symfile_complaint_book): Update.
5301         (find_complaint) Remove.
5302         (complaint_internal, clear_complaints): Update.
5303
5304 2018-05-23  Tom Tromey  <tom@tromey.com>
5305
5306         * complaints.c (struct complain) <file, line>: Remove.
5307         (find_complaint): Remove file, line parameters.
5308         (complaint_internal): Update.
5309
5310 2018-05-23  Tom Tromey  <tom@tromey.com>
5311
5312         * complaints.c (vcomplaint): Remove.
5313         (complaint_internal) Merge in contents of vcomplaint.
5314
5315 2018-05-23  Tom Tromey  <tom@tromey.com>
5316
5317         * complaints.c (struct complaints) <explanation>: Remove.
5318         (symfile_explanations): Remove.
5319         (symfile_complaint_book): Update.
5320         (vcomplaint): Update.
5321         (struct explanation): Remove.
5322
5323 2018-05-23  Tom Tromey  <tom@tromey.com>
5324
5325         * complaints.c (symfile_complaints): Remove.
5326         (complaint_internal): Remove "complaints" parameter.
5327         (clear_complaints, vcomplaint): Remove "c" parameter.
5328         (get_complaints): Remove.
5329         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5330         (dwarf2_debug_line_missing_file_complaint)
5331         (dwarf2_debug_line_missing_end_sequence_complaint)
5332         (dwarf2_complex_location_expr_complaint)
5333         (dwarf2_const_value_length_mismatch_complaint)
5334         (dwarf2_section_buffer_overflow_complaint)
5335         (dwarf2_macro_malformed_definition_complaint)
5336         (dwarf2_invalid_attrib_class_complaint)
5337         (create_addrmap_from_index, dw2_symtab_iter_next)
5338         (dw2_expand_marked_cus)
5339         (dw2_debug_names_iterator::find_vec_in_debug_names)
5340         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5341         (create_debug_type_hash_table, init_cutu_and_read_dies)
5342         (partial_die_parent_scope, add_partial_enumeration)
5343         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5344         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5345         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5346         (create_cus_hash_table, create_dwp_hash_table)
5347         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5348         (dwarf2_rnglists_process, dwarf2_ranges_process)
5349         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5350         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5351         (handle_struct_member_die, process_structure_scope)
5352         (read_array_type, read_common_block, read_module_type)
5353         (read_tag_pointer_type, read_typedef, read_base_type)
5354         (read_subrange_type, load_partial_dies, partial_die_info::read)
5355         (partial_die_info::read, partial_die_info::read)
5356         (partial_die_info::read, read_checked_initial_length_and_offset)
5357         (dwarf2_string_attr, read_formatted_entries)
5358         (dwarf_decode_line_header)
5359         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5360         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5361         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5362         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5363         (get_signatured_type, get_DW_AT_signature_type)
5364         (decode_locdesc, file_file_name, consume_improper_spaces)
5365         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5366         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5367         (dwarf2_symbol_mark_computed, set_die_type)
5368         (read_attribute_value): Update.
5369         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5370         Update.
5371         * dbxread.c (unknown_symtype_complaint)
5372         (lbrac_mismatch_complaint, repeated_header_complaint)
5373         (set_namestring, function_outside_compilation_unit_complaint)
5374         (read_dbx_symtab, process_one_symbol): Update.
5375         * gdbtypes.c (stub_noname_complaint): Update.
5376         * windows-nat.c (handle_unload_dll): Update.
5377         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5378         (decode_base_type): Update.
5379         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5380         (eb_complaint, record_include_begin, record_include_end)
5381         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5382         (process_xcoff_symbol, read_symbol)
5383         (function_outside_compilation_unit_complaint)
5384         (scan_xcoff_symtab): Update.
5385         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5386         * buildsym.c (finish_block_internal, make_blockvector)
5387         (end_symtab_get_static_block, augment_type_symtab): Update.
5388         * dtrace-probe.c (dtrace_process_dof)
5389         (dtrace_static_probe_ops::get_probes): Update.
5390         * complaints.h (struct complaint): Don't declare.
5391         (symfile_complaints): Remove.
5392         (complaint_internal): Remove "complaints" parameter.
5393         (complaint): Likewise.
5394         (clear_complaints): Likewise.
5395         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5396         (reread_symbols): Update.
5397         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5398         (dwarf2_frame_cache, decode_frame_entry): Update.
5399         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5400         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5401         (info_selectors_command): Update.
5402         * macrotab.c (macro_include, check_for_redefinition)
5403         (macro_undef): Update.
5404         * objfiles.c (filter_overlapping_sections): Update.
5405         * stabsread.c (invalid_cpp_abbrev_complaint)
5406         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5407         (define_symbol, error_type, read_type, rs6000_builtin_type)
5408         (stabs_method_name_from_physname, read_member_functions)
5409         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5410         (attach_fields_to_type, complain_about_struct_wipeout)
5411         (read_range_type, read_args, common_block_start)
5412         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5413         Update.
5414         * mdebugread.c (index_complaint, unknown_ext_complaint)
5415         (basic_type_complaint, bad_tag_guess_complaint)
5416         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5417         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5418         (parse_procedure, parse_lines)
5419         (function_outside_compilation_unit_complaint)
5420         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5421         (bad_tag_guess_complaint, reg_value_complaint): Update.
5422         * cp-support.c (demangled_name_complaint): Update.
5423         * macroscope.c (sal_macro_scope): Update.
5424         * dwarf-index-write.c (class debug_names): Update.
5425
5426 2018-05-23  Tom Tromey  <tom@tromey.com>
5427
5428         * complaints.c (clear_complaints): Remove "noisy" parameter.
5429         * complaints.h (clear_complaints): Update.
5430         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5431         (reread_symbols): Update.
5432
5433 2018-05-23  Tom Tromey  <tom@tromey.com>
5434
5435         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5436         SUBSEQUENT_MESSAGE.
5437         (vcomplaint, clear_complaints): Update.
5438         (symfile_explanations): Remove some messages.
5439
5440 2018-05-23  Tom Tromey  <tom@tromey.com>
5441
5442         * complaints.c (internal_complaint): Remove.
5443         * complaints.h (internal_complaint): Remove.
5444
5445 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5446
5447         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5448
5449 2018-05-22  Pedro Alves  <palves@redhat.com>
5450
5451         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5452         (remote_fileio_badfd, remote_fileio_return_errno)
5453         (remote_fileio_return_success, remote_fileio_func_open)
5454         (remote_fileio_func_open, remote_fileio_func_close)
5455         (remote_fileio_func_read, remote_fileio_func_write)
5456         (remote_fileio_func_lseek, remote_fileio_func_rename)
5457         (remote_fileio_func_unlink, remote_fileio_func_stat)
5458         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5459         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5460         remote_target parameter.
5461         (remote_fio_func_map) <func>: Add remote_target parameter.
5462         (do_remote_fileio_request, remote_fileio_request):
5463         * remote-fileio.h (remote_fileio_request):
5464         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5465         remote_target parameter.
5466         (remote_notif_process, handle_notification): Adjust to pass down
5467         the remote.
5468         (remote_notif_state_allocate): Add remote_target parameter.  Save
5469         it.
5470         * remote-notif.h (struct remote_target): Forward declare.
5471         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5472         remote_target parameter.
5473         (struct remote_notif_state) <remote>: New field.
5474         (remote_notif_ack, remote_notif_parse): Add remote_target
5475         parameter.
5476         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5477         remote_target parameter.
5478         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5479         (threads_listing_context, rmt_thread_action, protocol_feature)
5480         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5481         (packet_result, struct threads_listing_context, remote_state):
5482         Move definitions and declarations higher up.
5483         (remote_target) <~remote_target>: Declare.
5484         (remote_download_command_source, remote_file_put, remote_file_get)
5485         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5486         (remote_hostio_pread_vFile, remote_hostio_send_command)
5487         (remote_hostio_set_filesystem, remote_hostio_open)
5488         (remote_hostio_close, remote_hostio_unlink, remote_state)
5489         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5490         (get_memory_write_packet_size, get_memory_read_packet_size)
5491         (append_pending_thread_resumptions, remote_detach_1)
5492         (append_resumption, remote_resume_with_vcont)
5493         (add_current_inferior_and_thread, wait_ns, wait_as)
5494         (process_stop_reply, remote_notice_new_inferior)
5495         (process_initial_stop_replies, remote_add_thread)
5496         (btrace_sync_conf, remote_btrace_maybe_reopen)
5497         (remove_new_fork_children, kill_new_fork_children)
5498         (discard_pending_stop_replies, stop_reply_queue_length)
5499         (check_pending_events_prevent_wildcard_vcont)
5500         (discard_pending_stop_replies_in_queue, stop_reply)
5501         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5502         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5503         (remote_interrupt_as, remote_interrupt_ns)
5504         (remote_get_noisy_reply, remote_query_attached)
5505         (remote_add_inferior, remote_current_thread, get_current_thread)
5506         (set_thread, set_general_thread, set_continue_thread)
5507         (set_general_process, write_ptid)
5508         (remote_unpack_thread_info_response, remote_get_threadinfo)
5509         (parse_threadlist_response, remote_get_threadlist)
5510         (remote_threadlist_iterator, remote_get_threads_with_ql)
5511         (remote_get_threads_with_qxfer)
5512         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5513         (get_offsets, remote_check_symbols, remote_supported_packet)
5514         (remote_query_supported, remote_packet_size)
5515         (remote_serial_quit_handler, remote_detach_pid)
5516         (remote_vcont_probe, remote_resume_with_hc)
5517         (send_interrupt_sequence, interrupt_query)
5518         (remote_notif_get_pending_events, fetch_register_using_p)
5519         (send_g_packet, process_g_packet, fetch_registers_using_g)
5520         (store_register_using_P, store_registers_using_G)
5521         (set_remote_traceframe, check_binary_download)
5522         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5523         (remote_xfer_live_readonly_partial, remote_read_bytes)
5524         (remote_send_printf, remote_flash_write, readchar)
5525         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5526         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5527         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5528         (extended_remote_disable_randomization, extended_remote_run)
5529         (send_environment_packet, extended_remote_environment_support)
5530         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5531         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5532         (packet_command): Now methods of ...
5533         (remote_target): ... this class.
5534         (m_remote_state) <remote_target>: New field.
5535         (struct remote_state) <stop_reply_queue,
5536         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5537         fields.
5538         (remote_state::remote_state): Allocate stop_reply_queue.
5539         (remote_state): Delete global.
5540         (get_remote_state_raw): Delete.
5541         (remote_target::get_remote_state): Allocate m_remote_state on
5542         demand.
5543         (get_current_remote_target): New.
5544         (remote_ops, extended_remote_ops): Delete.
5545         (wait_forever_enabled_p, remote_async_inferior_event_token):
5546         Delete, moved to struct remote_state.
5547         (remote_target::close): Delete self.  Destruction bits split to
5548         ...
5549         (remote_target::~remote_target): ... this.
5550         (show_memory_packet_size): Adjust to use
5551         get_current_remote_target.
5552         (struct protocol_feature) <func>: Add remote_target parameter.
5553         All callers adjusted.
5554         (curr_quit_handler_target): New.
5555         (remote_serial_quit_handler): Reimplement.
5556         (remote_target::open_1): Adjust to use get_current_remote_target.
5557         Heap-allocate remote_target/extended_remote_target instances.
5558         (vcont_builder::vcont_builder): Add remote_target parameter, and
5559         save it in m_remote.  All callers adjusted.
5560         (vcont_builder::m_remote): New field.
5561         (vcont_builder::restart, vcont_builder::flush)
5562         (vcont_builder::push_action): Use it.
5563         (remote_target::commit_resume): Use it.
5564         (struct queue_iter_param) <remote>: New field.
5565         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5566         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5567         (check_pending_event_prevents_wildcard_vcont_callback)
5568         (remote_target::check_pending_events_prevent_wildcard_vcont)
5569         (remote_target::discard_pending_stop_replies)
5570         (remote_target::discard_pending_stop_replies_in_queue)
5571         (remote_target::remote_notif_remove_queued_reply): Fill in
5572         'remote' field.
5573         (remote_notif_get_pending_events): New.
5574         (remote_target::readchar, remote_target::remote_serial_write):
5575         Save/restore curr_quit_handler_target.
5576         (putpkt): New.
5577         (kill_new_fork_children): Fill in 'remote' field.
5578         (packet_command): Use get_current_remote_target, defer to
5579         remote_target method of same name.
5580         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5581         parameter, and save it in m_remote.  All callers adjusted.
5582         (scoped_remote_fd::release): Use m_remote.
5583         (scoped_remote_fd::m_remote): New field.
5584         (remote_file_put, remote_file_get, remote_file_delete): Use
5585         get_current_remote_target, defer to remote_target method of same
5586         name.
5587         (remote_btrace_reset): Add remote_state paremeter.  Update all
5588         callers.
5589         (remote_async_inferior_event_handler). Pass down 'data'.
5590         (remote_new_objfile): Use get_current_remote_target.
5591         (remote_target::vcont_r_supported): New.
5592         (set_range_stepping): Use get_current_remote_target and
5593         remote_target::vcont_r_supported.
5594         (_initialize_remote): Don't allocate 'remote_state' and
5595         'stop_reply_queue' globals.
5596         * remote.h (struct remote_target): Forward declare.
5597         (getpkt, putpkt, remote_notif_get_pending_events): Add
5598         'remote_target' parameter.
5599
5600 2018-05-22  Pedro Alves  <palves@redhat.com>
5601
5602         * remote.c (vcont_builder): Now a class.  Make all data members
5603         private.
5604         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5605         Declare methods.
5606         (vcont_builder_restart): Rename to ...
5607         (vcont_builder::restart): ... this.
5608         (vcont_builder_flush): Rename to ...
5609         (vcont_builder::flush): ... this.
5610         (vcont_builder_push_action): Rename to ...
5611         (vcont_builder::push_action): ... this.
5612         (remote_target::commit_resume): Adjust.
5613
5614 2018-05-22  Pedro Alves  <palves@redhat.com>
5615
5616         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5617         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5618         (get_fixed_memory_packet_size): New.
5619         (get_memory_packet_size): Use it.
5620         (set_memory_packet_size): Don't override the config size with
5621         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5622         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5623         Don't refer to get_memory_packet_size if not connected to a remote
5624         target.  Show "(default)" if configured size is 0.
5625
5626 2018-05-22  Pedro Alves  <palves@redhat.com>
5627
5628         * remote.c (remote_target::mourn_inferior): Move
5629         discard_pending_stop_replies call here from ...
5630         (_initialize_remote): ... here.
5631
5632 2018-05-22  Pedro Alves  <palves@redhat.com>
5633
5634         * remote.c (compare_section_command): Remove set_general_process
5635         call.
5636
5637 2018-05-22  Pedro Alves  <palves@redhat.com>
5638
5639         * remote.c (struct packet_reg, struct remote_arch_state):
5640         Move higher up in the file.
5641         (remote_state) <m_arch_states>: Store remote_arch_state values
5642         instead of remote_arch_state pointers.
5643         (remote_state::get_remote_arch_state): Adjust.
5644
5645 2018-05-22  Pedro Alves  <palves@redhat.com>
5646
5647         * remote.c: Include <unordered_map>.
5648         (remote_state): Now a class.
5649         (remote_state) <get_remote_arch_state>: Declare method.
5650         <get_remote_arch_state>: New field.
5651         (remote_arch_state) <remote_arch_state>: Declare ctor.
5652         <regs>: Now a unique_ptr.
5653         (remote_gdbarch_data_handle): Delete.
5654         (get_remote_arch_state): Delete.
5655         (remote_state::get_remote_arch_state): New.
5656         (get_remote_state): Adjust to call remote_state's
5657         get_remote_arch_state method.
5658         (init_remote_state): Delete, bits factored out to ...
5659         (remote_arch_state::remote_arch_state): ... this new method.
5660         (get_remote_packet_size, get_memory_packet_size)
5661         (process_g_packet, remote_target::fetch_registers)
5662         (remote_target::prepare_to_store, store_registers_using_G)
5663         (remote_target::store_registers, remote_target::get_trace_status):
5664         Adjust to call remote_state's method.
5665         (_initialize_remote): Remove reference to
5666         remote_gdbarch_data_handle.
5667
5668 2018-05-22  Pedro Alves  <palves@redhat.com>
5669
5670         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5671         pread>: New method declarations.
5672         (remote_target::open_1): Adjust.
5673         (readahead_cache_invalidate): Rename to ...
5674         (readahead_cache::invalidate): ... this, and adjust to be a class
5675         method.
5676         (readahead_cache_invalidate_fd): Rename to ...
5677         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5678         class method.
5679         (remote_hostio_pwrite): Adjust.
5680         (remote_hostio_pread_from_cache): Rename to ...
5681         (readahead_cache::pread): ... this, and adjust to be a class
5682         method.
5683         (remote_hostio_close): Adjust.
5684
5685 2018-05-22  Pedro Alves  <palves@redhat.com>
5686
5687         * remote.c (remote_hostio_close_cleanup): Delete.
5688         (class scoped_remote_fd): New.
5689         (remote_file_put, remote_file_get): Use it.
5690
5691 2018-05-22  Pedro Alves  <palves@redhat.com>
5692
5693         (struct vCont_action_support): Use bool and initialize all fields.
5694         (struct readahead_cache): Initialize all fields.
5695         (remote_state): Use bool and initialize all fields.
5696         (remote_state::remote_state, remote_state::~remote_state): New.
5697         (new_remote_state): Delete.
5698         (_initialize_remote): Use new to allocate remote_state.
5699
5700 2018-05-22  Pedro Alves  <palves@redhat.com>
5701             張俊芝  <zjz@zjz.name>
5702
5703         PR gdb/22973
5704         * c-exp.y: Include "c-support.h".
5705         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5706         of tolower.  Use c_ident_is_alpha to scan names.
5707         * c-lang.c: Include "c-support.h".
5708         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5709         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5710         * c-support.h: New file, with bits factored out from ...
5711         * cp-name-parser.y: ... this file.
5712         Include "c-support.h".
5713         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5714         c-support.h and renamed.
5715         (symbol_end, yylex): Adjust.
5716
5717 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5718
5719         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5720         parameter type to CORE_ADDR.
5721         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5722         parameter type in declaration to CORE_ADDR.
5723         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5724         target_auxv_search to get AT_HWCAP and use the result to get the
5725         target description.
5726         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5727         to CORE_ADDR. Remove the cast of the return value to unsigned
5728         long. Fix error predicate of target_auxv_search.
5729         (ppc_linux_nat_target::read_description): Change the type of the
5730         hwcap variable to CORE_ADDR.
5731
5732 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5733
5734         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5735         if the size of fpscr is larger than 32 bits.
5736
5737 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5738
5739         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5740         (ppc32_linux_vsxregmap): New global.
5741         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5742         regcache_supply_regset, and regcache_collect_regset.
5743         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5744         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5745         (fetch_vsx_register, store_vsx_register): Remove.
5746         (fetch_vsx_registers): Add regno parameter. Get regset using
5747         ppc_linux_vsxregset. Use regset to supply registers.
5748         (store_vsx_registers): Add regno parameter. Get regset using
5749         ppc_linux_vsxregset. Use regset to collect registers.
5750         (fetch_register): Call fetch_vsx_registers instead of
5751         fetch_vsx_register.
5752         (store_register): Call store_vsx_registers instead of
5753         store_vsx_register.
5754         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5755         new regno parameter.
5756         (store_ppc_registers): Call store_vsx_registers with -1 for the
5757         new regno parameter.
5758         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5759         (ppc_collect_vsxregset): Remove.
5760
5761 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5762
5763         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5764         offset fields.
5765         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5766         for vector register offset fields.
5767         (ppc64_fbsd_reg_offsets): Likewise.
5768         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5769         to vector register offset fields.
5770         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5771         to vector register offset fields.
5772         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5773         vector register offset fields.
5774         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5775         initializers for vector register offset fields.
5776         (rs6000_aix64_reg_offsets): Likewise.
5777         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5778         (ppc_supply_vrregset): Remove.
5779         (ppc_collect_vrregset): Remove.
5780         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5781         (ppc_linux_vrregset) : New function.
5782         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5783         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5784         (ppc32_linux_vrregset): Remove.
5785         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5786         and use result instead of ppc32_linux_vrregset.
5787         (ppc32_linux_reg_offsets): Remove initializers for vector register
5788         offset fields.
5789         (ppc64_linux_reg_offsets): Likewise.
5790         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5791         * ppc-linux-nat.c: Include regset.h.
5792         (gdb_vrregset_t): Adjust comment to account for little-endian
5793         mode.
5794         (supply_vrregset, fill_vrregset): Remove.
5795         (fetch_altivec_register, store_altivec_register): Remove.
5796         (fetch_altivec_registers): Add regno parameter. Get regset using
5797         ppc_linux_vrregset. Use regset to supply registers.
5798         (store_altivec_registers): Add regno parameter. Get regset using
5799         ppc_linux_vrregset. Use regset to collect registers.
5800         (fetch_register): Call fetch_altivec_registers instead of
5801         fetch_altivec_register.
5802         (store_register): Call store_altivec_registers instead of
5803         store_altivec_register.
5804         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5805         the new regno parameter.
5806         (store_ppc_registers): Call store_altivec_registers with -1 for
5807         the new regno parameter.
5808
5809 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5810
5811         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5812         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5813         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5814         (gdb_vrregset_t): Change array type size to
5815         PPC_LINUX_SIZEOF_VRREGSET.
5816         (gdb_vsxregset_t): Change array type size to
5817         PPC_LINUX_SIZEOF_VSXREGSET.
5818         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5819         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5820         PPC_LINUX_SIZEOF_VSXREGSET.
5821
5822 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5823
5824         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5825         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5826         nat/ppc-linux.c.
5827         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5828         ppc_linux_target_wordsize with tid.
5829         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5830         wordsize with tid.
5831         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5832         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5833         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5834         tid parameter. Remove static specifier.
5835         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5836         (ppc_linux_target_wordsize): New declaration.
5837
5838 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5839
5840         * arch/ppc-linux-common.c: New file.
5841         * arch/ppc-linux-common.h: New file.
5842         * arch/ppc-linux-tdesc.h: New file.
5843         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5844         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5845         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5846         arch/ppc-linux-tdesc.h.
5847         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5848         arch/ppc-linux-tdesc.h.
5849         (ppc_linux_nat_target::read_description): Remove target
5850         description matching code. Fill a ppc_linux_features struct and
5851         call ppc_linux_match_description with it. Move comment about ISA
5852         2.05 to ppc-linux-common.c.
5853         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5854         arch/ppc-linux-tdesc.h.
5855         (ppc_linux_core_read_description): Remove target description
5856         matching code. Fill a ppc_linux_features struct and call
5857         ppc_linux_match_description with it.
5858         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5859         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5860         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5861         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5862         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5863         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5864         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5865         (tdesc_powerpc_e500l): Remove.
5866
5867 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5868
5869         * ada-lang.c (catch_assert_command): Pass empty string instead
5870         of NULL for excep_string argument.
5871
5872 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5873
5874         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5875         the width of the requested register exceeds the width of the
5876         `ptrace' data type.
5877
5878 2018-05-21  Tom Tromey  <tom@tromey.com>
5879
5880         * printcmd.c (output_command): Remove.
5881         (output_command_const): Rename to output_command.
5882         * valprint.h (output_command): Rename from output_command_const.
5883         * tracepoint.c (trace_dump_actions): Call output_command.
5884
5885 2018-05-21  Tom Tromey  <tom@tromey.com>
5886
5887         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5888         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5889         * ada-lang.h (create_ada_exception_catchpoint): Update.
5890         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5891         std::string.
5892         (create_excep_cond_exprs, ~ada_catchpoint)
5893         (should_stop_exception, print_one_exception)
5894         (print_mention_exception, print_recreate_exception): Update.
5895         (ada_get_next_arg): Remove.
5896         (catch_ada_exception_command_split): Use std::string.  Change type
5897         of "excep_string", "cond_string".
5898         (catch_ada_exception_command): Update.
5899         (create_ada_exception_catchpoint): Change type of excep_string.
5900         (ada_exception_sal): Remove excep_string parameter.
5901         (~ada_catchpoint): Remove.
5902
5903 2018-05-21  Tom Tromey  <tom@tromey.com>
5904
5905         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5906         cleanup.
5907
5908 2018-05-21  Tom Tromey  <tom@tromey.com>
5909
5910         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5911         Return unique_xmalloc_ptr.
5912         (print_it_exception): Update.
5913
5914 2018-05-21  Tom Tromey  <tom@tromey.com>
5915
5916         * tracepoint.c (trace_dump_actions): Use std::string.
5917
5918 2018-05-21  Tom Tromey  <tom@tromey.com>
5919
5920         * symfile.c (reread_symbols): Use std::string for original_name.
5921
5922 2018-05-21  Tom Tromey  <tom@tromey.com>
5923
5924         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5925         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5926         constructor.
5927
5928 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5929
5930         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5931         instance to...
5932         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5933         * objfiles.c (get_objfile_bfd_data): Allocate
5934         objfile_per_bfd_storage with obstack_new when allocating on
5935         obstack.
5936
5937 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5938
5939         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5940         OBSTACK_ZALLOC.
5941         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5942         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5943         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5944         (add_pending): Likewise.
5945         (parse_symbol): Likewise.
5946         (parse_partial_symbols): Likewise.
5947         (psymtab_to_symtab_1): Likewise.
5948         (new_psymtab): Likewise.
5949         (elfmdebug_build_psymtabs): Likewise.
5950         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5951         * objfiles.c (get_objfile_bfd_data): Likewise.
5952         (objfile_register_static_link): Likewise.
5953         * psymtab.c (allocate_psymtab): Likewise.
5954         * stabsread.c (read_member_functions): Likewise.
5955         * xcoffread.c (xcoff_end_psymtab): Likewise.
5956
5957 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5958
5959         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5960         compiler supports std::is_trivially_constructible.
5961         * common/poison.h: Include obstack.h.
5962         (IsMallocable): Define to is_trivially_constructible if the
5963         compiler supports it, define to true_type otherwise.
5964         (xobnew): New.
5965         (XOBNEW): Redefine.
5966         (xobnewvec): New.
5967         (XOBNEWVEC): Redefine.
5968         * gdb_obstack.h (obstack_zalloc): New.
5969         (OBSTACK_ZALLOC): Redefine.
5970         (obstack_calloc): New.
5971         (OBSTACK_CALLOC): Redefine.
5972         (obstack_new): New.
5973         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5974         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5975         gdbarch.c.
5976         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5977         obstack_calloc/obstack_zalloc.
5978         (gdbarch_obstack_zalloc): Remove.
5979         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5980
5981 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5982
5983         * stack.c (backtrace_command_1): Remove useless variable int i.
5984
5985 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5986
5987         * stack.c (print_frame_info): Fix comment.
5988
5989 2018-05-18  Tom Tromey  <tom@tromey.com>
5990
5991         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5992         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5993         (~dwarf2_per_objfile): Update
5994         (dwarf2_get_dwz_file): Use new.
5995         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5996         unique_ptr.
5997
5998 2018-05-18  Tom Tromey  <tom@tromey.com>
5999
6000         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6001         unique_ptr.
6002         * dwarf2read.c (struct dwp_file): Add constructor and
6003         initializers.
6004         (open_and_init_dwp_file): Return a unique_ptr.
6005         (dwarf2_per_objfile, create_dwp_hash_table)
6006         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6007         (lookup_dwo_unit_in_dwp): Update.
6008         (open_and_init_dwp_file, get_dwp_file): Update.
6009
6010 2018-05-18  Tom Tromey  <tom@tromey.com>
6011
6012         * dwarf2read.c (dwarf2_per_objfile): Update.
6013         (struct mapped_index): Add initializers.
6014         (dwarf2_read_index): Use new.
6015         (dw2_symtab_iter_init): Update.
6016         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6017         unique_ptr.
6018
6019 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6020
6021         * dwarf2read.c (mapped_index) <total_size>: Remove.
6022
6023 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6024
6025         * unittests/format_pieces-selftests.c (test_format_specifier):
6026         Add ARI comments.
6027
6028 2018-05-18  Tom Tromey  <tom@tromey.com>
6029
6030         * c-typeprint.c (maybe_print_hole): New function.
6031         (c_print_type_struct_field_offset): Update.
6032         (c_type_print_base_struct_union): Call maybe_print_hole.
6033
6034 2018-05-17  Keith Seitz  <keiths@redhat.com>
6035
6036         * breakpoint.c (build_bpstat_chain): New function, moved from
6037         bpstat_stop_status.
6038         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6039         If no stop chain is passed, call build_bpstat_chain to build it.
6040         * breakpoint.h (build_bpstat_chain): Declare.
6041         (bpstat_stop_status): Move documentation here from breakpoint.c.
6042         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6043         build the stop chain and pass it to skip_inline_frames.
6044         Pass this stop chain to bpstat_stop_status.
6045         * inline-frame.c: Include breakpoint.h.
6046         (stopped_by_user_bp_inline_frame): New function.
6047         (skip_inline_frames): Add parameter `stop_chain'.
6048         Move documention to inline-frame.h.
6049         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6050         whether the frame should be elided.
6051         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6052         Add moved documentation and update for new parameter.
6053
6054 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6055
6056         PR cli/14975
6057         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6058         unittests/format_pieces-selftests.c.
6059         * common/format.h (format_piece) <operator==>: New.
6060         (format_pieces) <operator[]>: Remove.
6061         * common/format.c (format_pieces::format_pieces): Handle \e.
6062         * unittests/format_pieces-selftests.c: New.
6063
6064 2018-05-17  Tom Tromey  <tom@tromey.com>
6065
6066         PR symtab/23010:
6067         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6068         (dw2_instantiate_symtab): Add skip_partial parameter.
6069         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6070         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6071         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6072         (dw2_expand_symtabs_matching_one)
6073         (dw2_find_pc_sect_compunit_symtab)
6074         (dw2_debug_names_lookup_symbol)
6075         (dw2_debug_names_expand_symtabs_for_function): Update.
6076         (init_cutu_and_read_dies): Add skip_partial parameter.
6077         (process_psymtab_comp_unit, build_type_psymtabs_1)
6078         (process_skeletonless_type_unit, load_partial_comp_unit)
6079         (psymtab_to_symtab_1): Update.
6080         (load_full_comp_unit): Add skip_partial parameter.
6081         (process_imported_unit_die, dwarf2_read_addr_index)
6082         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6083         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6084         (read_signatured_type): Update.
6085
6086 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6087
6088         * value.c (release_value): Remove unused variable.
6089         (record_latest_value): Likewise.
6090         (access_value_history): Likewise.
6091         (preserve_values): Likewise.
6092
6093 2018-05-17  Tom Tromey  <tom@tromey.com>
6094
6095         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6096         Initialize.
6097
6098 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6099
6100         PR gdb/22286
6101         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6102         Also handle registers whose width is not a multiple of
6103         PTRACE_TYPE_RET.
6104         (linux_nat_trad_target::store_register): Likewise.
6105
6106 2018-05-16  Tom Tromey  <tom@tromey.com>
6107
6108         * gdbcore.h (core_bfd): Redefine.
6109         * corelow.c (core_target::close): Update.
6110         (core_target_open): Update.
6111         * progspace.h (struct program_space) <cbfd>: Now a
6112         gdb_bfd_ref_ptr.
6113
6114 2018-05-16  Tom Tromey  <tom@tromey.com>
6115
6116         PR cli/19551:
6117         * symfile-add-flags.h (enum symfile_add_flags)
6118         <SYMFILE_NOT_FILENAME>: New constant.
6119         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6120         objfile name from BFD.
6121         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6122         * minidebug.c (find_separate_debug_file_in_section): Put
6123         ".gnu_debugdata" into BFD's file name.
6124
6125 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6126
6127         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6128         Remove.
6129
6130 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6131
6132         PR binutils/21446
6133         * aarch64-tdep.c (aarch64_analyze_prologue,
6134         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6135         Indicate not interested in errors.
6136
6137 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6138
6139         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6140         Supply the MIPS_ZERO_REGNUM register.
6141
6142 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6143
6144         * mips-tdep.c (mask_address_var): Make variable static.
6145
6146 2018-05-14  Tom Tromey  <tom@tromey.com>
6147
6148         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6149
6150 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6151
6152         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6153         FXSAVE_ADDR for the mxcsr register.
6154
6155 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6156
6157         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6158
6159 2018-05-11  Pedro Alves  <palves@redhat.com>
6160
6161         * corelow.c (core_target) <core_target>: No longer inline.
6162         Initialize m_core_gdbarch, m_core_vec and build the section table
6163         here.
6164         <~core_target>: New.
6165         <core_gdbarch, get_core_register_section>: New methods.
6166         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6167         factored out from ...
6168         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6169         (core_ops): Delete.
6170         (sniff_core_bfd): Add gdbarch parameter.
6171         (core_close): Delete, merged into ...
6172         (core_target::close): ... here.  Delete self.
6173         (core_close_cleanup): Delete.
6174         (core_target_open): Allocate a core_target on the heap.  Use a
6175         unique_ptr instead of a cleanup.  Bits moved into the core_target
6176         ctor.  Adjust to use core_target methods instead of globals.
6177         (get_core_register_section): Rename to ...
6178         (core_target::get_core_register_section): ... this and adjust.
6179         (struct get_core_registers_cb_data): New.
6180         (get_core_registers_cb): Use it.  Use bool.
6181         (core_target::fetch_registers, core_target::files_info)
6182         (core_target::xfer_partial, core_target::read_description)
6183         (core_target::pid_to, core_target::thread_name): Adjust to
6184         reference class fields instead of globals.
6185         * target.h (struct target_ops_deleter, target_ops_up): New.
6186
6187 2018-05-11  Pedro Alves  <palves@redhat.com>
6188
6189         * corefile.c (core_file_command): Move to corelow.c.
6190         * corelow.c (the_core_target): Delete.
6191         (core_file_command): Moved from corefile.c.  Check exec_bfd
6192         instead of the_core_target.  Use target_detach instead of calling
6193         into the_core_target directly.
6194         (maybe_say_no_core_file_now): New.
6195         (core_target::detach): Use it.
6196         (_initialize_corelow): Remove references to the_core_target.
6197         * gdbcore.h (the_core_target): Delete.
6198
6199 2018-05-11  Tom Tromey  <tromey@redhat.com>
6200             Pedro Alves  <palves@redhat.com>
6201
6202         * corefile.c (core_bfd): Remove.
6203         * gdbcore.h (core_bfd): Now a macro.
6204         * progspace.h (struct program_space) <cbfd>: New field.
6205
6206 2018-05-11  Tom Tromey  <tom@tromey.com>
6207
6208         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6209         gdb::def_vector.
6210
6211 2018-05-10  Tom Tromey  <tom@tromey.com>
6212
6213         * configure: Rebuild.
6214         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6215
6216 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6217
6218         PR server/23158:
6219         * regformats/regdat.sh: Adjust script, following the addition
6220         of the new expedite_regs parameter to init_target_desc.
6221
6222 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6223     
6224         PR gdb/23127
6225         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6226         set_gdbarch_significant_addr_bit.
6227         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6228         set_gdbarch_significant_addr_bit.
6229         * utils.c (address_significant): Update to sign extend addr.
6230
6231 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6232
6233         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6234         (xtensa_linux_init_abi): Limit tdep->num_regs by
6235         tdep->num_nopriv_regs.
6236         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6237         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6238         not initialized.
6239
6240 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6241
6242         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6243
6244 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6245
6246         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6247         (I387_MXCSR_INIT_VAL): New constant.
6248         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6249         buffer if it was supplied by the inferior.
6250         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6251         (i387_xsave_get_clear_bv): New function.
6252         (i387_supply_xsave): Only read x87 control registers from the
6253         xsave buffer if the feature is enabled, and the state will have
6254         been written, otherwise, provide a suitable default.
6255         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6256         including x87 control registers.  Update control registers if they
6257         have changed from the default value, and mark features as enabled
6258         as required.
6259         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6260
6261 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6262
6263         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6264
6265 2018-05-07  Tom Tromey  <tom@tromey.com>
6266
6267         * configure: Rebuild.
6268         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6269
6270 2018-05-07  Tom Tromey  <tom@tromey.com>
6271
6272         PR tdep/20362:
6273         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6274         bit.  Use correct value for VDIV.
6275
6276 2018-05-04  Tom Tromey  <tom@tromey.com>
6277
6278         * configure: Rebuild.
6279         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6280
6281 2018-05-04  Tom Tromey  <tom@tromey.com>
6282
6283         * linux-record.c (record_linux_system_call) <case
6284         RECORD_SYS_RECVFROM>: Add "break".
6285
6286 2018-05-04  Tom Tromey  <tom@tromey.com>
6287
6288         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6289         Add missing "break".
6290         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6291         Add missing "break".
6292
6293 2018-05-04  Tom Tromey  <tom@tromey.com>
6294
6295         * rs6000-tdep.c (ppc_process_record_op4)
6296         (ppc_process_record_op63): Add fall-through comment.
6297
6298 2018-05-04  Tom Tromey  <tom@tromey.com>
6299
6300         * i386-tdep.c (i386_process_record): Add fall-through comment.
6301
6302 2018-05-04  Tom Tromey  <tom@tromey.com>
6303
6304         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6305         comment.
6306
6307 2018-05-04  Tom Tromey  <tom@tromey.com>
6308
6309         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6310         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6311         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6312         comment.
6313         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6314         comment.
6315         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6316         comment.
6317
6318 2018-05-04  Tom Tromey  <tom@tromey.com>
6319
6320         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6321
6322 2018-05-04  Tom Tromey  <tom@tromey.com>
6323
6324         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6325         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6326         * symfile.c (section_is_mapped): Fix fall-through comment.
6327         * stabsread.c (define_symbol, read_member_functions): Fix
6328         fall-through comment.
6329         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6330         comment.
6331         * remote.c (remote_wait_as): Fix fall-through comment.
6332         * p-exp.y (yylex): Fix fall-through comment.
6333         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6334         comment.
6335         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6336         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6337         * jv-exp.y (yylex): Fix fall-through comment.
6338         * go-exp.y (lex_one_token): Fix fall-through comment.
6339         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6340         fall-through comment.
6341         * f-exp.y (yylex): Fix fall-through comment.
6342         * dwarf2read.c (process_die): Fix fall-through comments.
6343         * dbxread.c (process_one_symbol): Fix fall-through comment.
6344         * d-exp.y (lex_one_token): Fix fall-through comment.
6345         * cp-name-parser.y (yylex): Fix fall-through comment.
6346         * coffread.c (coff_symtab_read): Fix fall-through comment.
6347         * c-exp.y (lex_one_token): Fix fall-through comment.
6348         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6349         comment.
6350         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6351         comment.
6352
6353 2018-05-04  Tom Tromey  <tom@tromey.com>
6354
6355         PR python/22730:
6356         * NEWS: Mention gdb.execute change.
6357         * gdbcmd.h (execute_control_command): Don't declare.
6358         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6359         execute_control_commands, execute_control_commands_to_string.
6360         * cli/cli-script.h (execute_control_commands)
6361         (execute_control_commands_to_string): Declare.
6362         (execute_control_command): Add from_tty parameter.
6363         * cli/cli-script.c (execute_control_commands)
6364         (execute_control_commands_to_string): New functions.
6365         (execute_user_command): Use execute_control_commands.
6366         (execute_control_command_1): Add "from_tty" parameter.  Update.
6367         (execute_control_command): Likewise.
6368
6369 2018-05-04  Tom Tromey  <tom@tromey.com>
6370
6371         PR python/22731:
6372         * NEWS: Mention that breakpoint commands are writable.
6373         * python/py-breakpoint.c (bppy_set_commands): New function.
6374         (breakpoint_object_getset) <"commands">: Use it.
6375
6376 2018-05-04  Tom Tromey  <tom@tromey.com>
6377
6378         * tracepoint.c (actions_command): Update.
6379         * mi/mi-cmd-break.c (mi_command_line_array)
6380         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6381         (mi_read_next_line): Remove.
6382         (mi_cmd_break_commands): Update.
6383         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6384         function_view.
6385         * cli/cli-script.c (get_command_line): Update.
6386         (process_next_line): Use function_view.  Constify.
6387         (recurse_read_control_structure, read_command_lines)
6388         (read_command_lines_1): Change argument types to function_view.
6389         (do_define_command, document_command): Update.
6390         * breakpoint.h (check_tracepoint_command): Don't declare.
6391         * breakpoint.c (check_tracepoint_command): Remove.
6392         (commands_command_1, create_tracepoint_from_upload): Update.
6393
6394 2018-05-04  Tom Tromey  <tom@tromey.com>
6395
6396         PR gdb/11750:
6397         * cli/cli-script.h (enum command_control_type) <define_control>:
6398         New constant.
6399         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6400         (build_command_line, execute_control_command_1)
6401         (process_next_line): Likewise.
6402         (do_define_command): New function, extracted from define_command.
6403         (define_command): Use it.
6404
6405 2018-05-04  Tom Tromey  <tom@tromey.com>
6406
6407         * tracepoint.c (actions_command): Update.
6408         * cli/cli-script.h (read_command_lines): Update.
6409         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6410         (MAX_TMPBUF): Remove define.
6411         (define_command): Use string_printf.
6412         (document_command): Likewise.
6413         * breakpoint.c (commands_command_1): Update.
6414
6415 2018-05-04  Tom Tromey  <tom@tromey.com>
6416
6417         * top.c (execute_command): Update.
6418         * cli/cli-script.h (print_command_lines): Now varargs.
6419         * cli/cli-script.c (print_command_lines): Now varargs.
6420         (execute_control_command_1) <case while_control, case if_control>:
6421         Update.
6422
6423 2018-05-04  Tom Tromey  <tom@tromey.com>
6424
6425         * tracepoint.c (all_tracepoint_actions): Rename from
6426         all_tracepoint_actions_and_cleanup.  Change return type.
6427         (actions_command, encode_actions_1, encode_actions)
6428         (trace_dump_actions, tdump_command): Update.
6429         * remote.c (remote_download_command_source): Update.
6430         * python/python.c (gdbpy_eval_from_control_command)
6431         (python_command, python_interactive_command): Update.
6432         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6433         * guile/guile.c (guile_command)
6434         (gdbscm_eval_from_control_command, guile_command): Update.
6435         * compile/compile.c (compile_code_command)
6436         (compile_print_command, compile_to_object): Update.
6437         * cli/cli-script.h (struct command_lines_deleter): New.
6438         (counted_command_line): New typedef.
6439         (struct command_line): Add constructor, destructor.
6440         <body_list>: Remove.
6441         <body_list_0, body_list_1>: New members.
6442         (command_line_up): Remove typedef.
6443         (read_command_lines, read_command_lines_1, get_command_line):
6444         Update.
6445         (copy_command_lines): Don't declare.
6446         * cli/cli-script.c (build_command_line): Use "new".
6447         (get_command_line): Return counted_command_line.
6448         (print_command_lines, execute_user_command)
6449         (execute_control_command_1, while_command, if_command): Update.
6450         (realloc_body_list): Remove.
6451         (process_next_line, recurse_read_control_structure): Update.
6452         (read_command_lines, read_command_lines_1): Return counted_command_line.
6453         (free_command_lines): Use "delete".
6454         (copy_command_lines): Remove.
6455         (define_command, document_command, show_user_1): Update.
6456         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6457         a counted_command_line.
6458         * breakpoint.h (counted_command_line): Remove typedef.
6459         (breakpoint_set_commands): Update.
6460         * breakpoint.c (check_no_tracepoint_commands)
6461         (validate_commands_for_breakpoint): Update.
6462         (breakpoint_set_commands): Change commands to be a
6463         counted_command_line.
6464         (commands_command_1, update_dprintf_command_list)
6465         (create_tracepoint_from_upload): Update.
6466
6467 2018-05-04  Tom Tromey  <tom@tromey.com>
6468
6469         * cli/cli-decode.h (cmd_list_element): New constructor.
6470         (~cmd_list_element): New destructor.
6471         (struct cmd_list_element): Add initializers.
6472         * cli/cli-decode.c (do_add_cmd): Use "new".
6473         (delete_cmd): Use "delete".
6474
6475 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6476             Pedro Alves <palves@redhat.com>
6477
6478         PR breakpoints/19806 and support for PR external/20207.
6479         * NEWS: Mention Aarch64 watchpoint improvements.
6480         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6481         watchpoints and PR external/20207 watchpoints.
6482         * nat/aarch64-linux-hw-point.c
6483         (kernel_supports_any_contiguous_range): New.
6484         (aarch64_watchpoint_offset): New.
6485         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6486         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6487         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6488         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6489         next_addr_orig_p.  Support PR external/20207 watchpoints.
6490         (aarch64_downgrade_regs): New.
6491         (aarch64_dr_state_insert_one_point): New parameters offset and
6492         addr_orig.
6493         (aarch64_dr_state_remove_one_point): Likewise.
6494         (aarch64_handle_breakpoint): Update caller.
6495         (aarch64_handle_aligned_watchpoint): Likewise.
6496         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6497         aligned_offset.
6498         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6499         aarch64_downgrade_regs.
6500         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6501         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6502         (DR_CONTROL_MASK): ... this.
6503         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6504         (unsigned int aarch64_watchpoint_offset): New prototype.
6505         (aarch64_linux_set_debug_regs): Remove const from state.
6506         * utils.c (align_up, align_down): Move to ...
6507         * common/common-utils.c (align_up, align_down): ... here.
6508         * utils.h (align_up, align_down): Move to ...
6509         * common/common-utils.h (align_up, align_down): ... here.
6510
6511 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6512
6513         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6514         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6515         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6516         Re-implement to match the ABI as summarized in GCC's
6517         gcc/config/sparc/sparc.c.  All callers updated.
6518         (sparc32_store_arguments): Remove assertion.
6519
6520 2018-05-04  Tom Tromey  <tom@tromey.com>
6521
6522         * printcmd.c: Don't include tui.h.
6523         (decode_format): Use skip_spaces.
6524
6525 2018-05-04  Tom Tromey  <tom@tromey.com>
6526
6527         PR gdb/22619:
6528         * printcmd.c (last_count): New global.
6529         (x_command): Use saved count when repeating.
6530
6531 2018-05-04  Tom Tromey  <tom@tromey.com>
6532
6533         * nto-procfs.c (do_closedir_cleanup): Remove.
6534         (procfs_pidlist): Use gdb_dir_up.
6535         * procfs.c (do_closedir_cleanup): Remove.
6536         (proc_update_threads): Use gdb_dir_up.
6537         * common/filestuff.h (struct gdb_dir_deleter): New.
6538         (gdb_dir_up): New typedef.
6539
6540 2018-05-04  Tom Tromey  <tom@tromey.com>
6541
6542         * ada-lang.c (print_mention_exception): Use std::string.
6543
6544 2018-05-04  Tom Tromey  <tom@tromey.com>
6545
6546         * ada-lang.c (create_excep_cond_exprs): Update.
6547         (ada_exception_catchpoint_cond_string): Use std::string.
6548
6549 2018-05-04  Tom Tromey  <tom@tromey.com>
6550
6551         * ada-lang.c (xget_renaming_scope): Return std::string.
6552         (old_renaming_is_invisible): Update.
6553
6554 2018-05-04  Tom Tromey  <tom@tromey.com>
6555
6556         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6557         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6558
6559 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6560
6561         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6562
6563 2018-05-04  Tom Tromey  <tom@tromey.com>
6564
6565         * remote.c (remote_query_supported_append): Change type.
6566         (remote_check_symbols): Update.
6567
6568 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6569
6570         PR gdb/11420
6571         * configure.ac: Prepend libpython.
6572         * python/python-config.py: Likewise.
6573         * configure: Regenerate.
6574
6575 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6576
6577         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6578
6579 2018-05-03  Pedro Alves  <palves@redhat.com>
6580
6581         * s390-linux-nat.c
6582         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6583         override.  Write 'true' instead of '1'.
6584         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6585         declaration.
6586
6587 2018-05-02  Pedro Alves  <palves@redhat.com>
6588
6589         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6590         add_inf_child_target.
6591         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6592         add_inf_child_target.
6593         * aix-thread.c (aix_thread_target_info): New.
6594         (aix_thread_target) <shortname, longname, doc>: Delete.
6595         <info>: New.
6596         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6597         add_inf_child_target.
6598         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6599         add_inf_child_target.
6600         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6601         add_inf_child_target.
6602         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6603         add_inf_child_target.
6604         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6605         add_inf_child_target.
6606         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6607         add_inf_child_target.
6608         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6609         add_inf_child_target.
6610         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6611         add_inf_child_target.
6612         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6613         add_inf_child_target.
6614         * bfd-target.c (target_bfd_target_info): New.
6615         (target_bfd) <shortname, longname, doc>: Delete.
6616         <info>: New.
6617         * bsd-kvm.c (bsd_kvm_target_info): New.
6618         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6619         <info>: New.
6620         (bsd_kvm_target::open): Rename to ...
6621         (bsd_kvm_target_open): ... this.  Adjust.
6622         * bsd-uthread.c (bsd_uthread_target_info): New.
6623         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6624         <info>: New.
6625         * corefile.c (core_file_command): Adjust.
6626         * corelow.c (core_target_info): New.
6627         (core_target) <shortname, longname, doc>: Delete.
6628         <info>: New.
6629         (core_target::open): Rename to ...
6630         (core_target_open): ... this.  Adjust.
6631         * ctf.c (ctf_target_info): New.
6632         (ctf_target) <shortname, longname, doc>: Delete.
6633         <info>: New.
6634         (ctf_target::open): Rename to ...
6635         (ctf_target_open): ... this.
6636         (_initialize_ctf): Adjust.
6637         * exec.c (exec_target_info): New.
6638         (exec_target) <shortname, longname, doc>: Delete.
6639         <info>: New.
6640         (exec_target::open): Rename to ...
6641         (exec_target_open): ... this.
6642         * gdbcore.h (core_target_open): Declare.
6643         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6644         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6645         add_inf_child_target.
6646         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6647         add_inf_child_target.
6648         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6649         add_inf_child_target.
6650         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6651         add_inf_child_target.
6652         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6653         add_inf_child_target.
6654         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6655         add_inf_child_target.
6656         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6657         add_inf_child_target.
6658         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6659         add_inf_child_target.
6660         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6661         add_inf_child_target.
6662         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6663         add_inf_child_target.
6664         * inf-child.c (inf_child_target_info): New.
6665         (inf_child_target::info): New.
6666         (inf_child_open_target): Remove 'target' parameter.  Use
6667         get_native_target instead.
6668         (inf_child_target::open): Delete.
6669         (add_inf_child_target): New.
6670         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6671         Delete.
6672         <info>: New.
6673         (add_inf_child_target): Declare.
6674         (inf_child_open_target): Declare.
6675         * linux-thread-db.c (thread_db_target_info): New.
6676         (thread_db_target) <shortname, longname, doc>: Delete.
6677         <info>: New.
6678         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6679         add_inf_child_target.
6680         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6681         add_inf_child_target.
6682         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6683         add_inf_child_target.
6684         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6685         add_inf_child_target.
6686         * make-target-delegates (print_class): Adjust.
6687         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6688         add_inf_child_target.
6689         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6690         add_inf_child_target.
6691         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6692         add_inf_child_target.
6693         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6694         add_inf_child_target.
6695         * nto-procfs.c (nto_native_target_info): New.
6696         (nto_procfs_target_native) <shortname, longname, doc>:
6697         Delete.
6698         <info>: New.
6699         (nto_procfs_target_info): New.
6700         (nto_procfs_target_procfs) <shortname, longname, doc>:
6701         Delete.
6702         <info>: New.
6703         (init_procfs_targets): Adjust.
6704         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6705         add_inf_child_target.
6706         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6707         add_inf_child_target.
6708         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6709         add_inf_child_target.
6710         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6711         add_inf_child_target.
6712         * ravenscar-thread.c (ravenscar_target_info): New.
6713         (ravenscar_thread_target) <shortname, longname, doc>:
6714         Delete.
6715         <info>: New.
6716         * record-btrace.c (record_btrace_target_info):
6717         (record_btrace_target) <shortname, longname, doc>: Delete.
6718         <info>: New.
6719         (record_btrace_target::open): Rename to ...
6720         (record_btrace_target_open): ... this.  Adjust.
6721         * record-full.c (record_longname, record_doc): New.
6722         (record_full_base_target) <shortname, longname, doc>: Delete.
6723         <info>: New.
6724         (record_full_target_info): New.
6725         (record_full_target): <shortname>: Delete.
6726         <info>: New.
6727         (record_full_core_open_1, record_full_open_1): Update comments.
6728         (record_full_base_target::open): Rename to ...
6729         (record_full_open): ... this.
6730         (cmd_record_full_restore): Update.
6731         (_initialize_record_full): Update.
6732         * remote-sim.c (remote_sim_target_info): New.
6733         (gdbsim_target) <shortname, longname, doc>: Delete.
6734         <info>: New.
6735         (gdbsim_target::open): Rename to ...
6736         (gdbsim_target_open): ... this.
6737         (_initialize_remote_sim): Adjust.
6738         * remote.c (remote_doc): New.
6739         (remote_target_info): New.
6740         (remote_target) <shortname, longname, doc>: Delete.
6741         <info>: New.
6742         (extended_remote_target_info): New.
6743         (extended_remote_target) <shortname, longname, doc>: Delete.
6744         <info>: New.
6745         (remote_target::open_1): Make static.  Adjust.
6746         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6747         * s390-linux-nat.c (_initialize_s390_nat): Use
6748         add_inf_child_target.
6749         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6750         add_inf_child_target.
6751         * sol-thread.c (thread_db_target_info): New.
6752         (sol_thread_target) <shortname, longname, doc>: Delete.
6753         <info>: New.
6754         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6755         add_inf_child_target.
6756         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6757         add_inf_child_target.
6758         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6759         add_inf_child_target.
6760         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6761         add_inf_child_target.
6762         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6763         add_inf_child_target.
6764         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6765         add_inf_child_target.
6766         * spu-linux-nat.c (_initialize_spu_nat): Use
6767         add_inf_child_target.
6768         * spu-multiarch.c (spu_multiarch_target_info): New.
6769         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6770         <info>: New.
6771         * target-delegates.c: Regenerate.
6772         * target.c: Include <unordered_map>.
6773         (target_ops_p): Delete.
6774         (DEF_VEC_P(target_ops_p)): Delete.
6775         (target_factories): New.
6776         (test_target_info): New.
6777         (test_target_ops::info): New.
6778         (open_target): Adjust to use target_factories.
6779         (add_target_with_completer): Rename to ...
6780         (add_target): ... this.  Change prototype.  Register target_info
6781         and open callback in target_factories.  Register target_info in
6782         command context instead of target_ops.
6783         (add_target): Delete old implementation.
6784         (add_deprecated_target_alias): Change prototype.  Adjust.
6785         (the_native_target): New.
6786         (set_native_target, get_native_target): New.
6787         (find_default_run_target): Use the_native_target.
6788         (find_attach_target, find_run_target): Simplify.
6789         (target_ops::open): Delete.
6790         (dummy_target_info): New.
6791         (dummy_target::shortname, dummy_target::longname)
6792         (dummy_target::doc): Delete.
6793         (dummy_target::info): New.
6794         (debug_target::shortname, debug_target::longname)
6795         (debug_target::doc): Delete.
6796         (debug_target::info): New.
6797         * target.h (struct target_info): New.
6798         (target_ops::~target_ops): Add comment.
6799         (target_ops::info): New.
6800         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6801         longer virtual.  Implement in terms of target_info.
6802         (set_native_target, get_native_target): Declare.
6803         (target_open_ftype): New.
6804         (add_target, add_target_with_completer)
6805         (add_deprecated_target_alias): Change prototype.
6806         (test_target) <shortname, longname, doc>: Delete.
6807         <info>: New.
6808         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6809         add_inf_child_target.
6810         * tracefile-tfile.c (tfile_target_info): New.
6811         (tfile_target) <shortname, longname, doc>: Delete.
6812         <info>: New.
6813         (tfile_target::open): Rename to ...
6814         (tfile_target_open): ... this.
6815         (_initialize_tracefile_tfile): Adjust.
6816         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6817         add_inf_child_target.
6818         * windows-nat.c (_initialize_windows_nat): Use
6819         add_inf_child_target.
6820         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6821         add_inf_child_target.
6822
6823 2018-05-02  Pedro Alves  <palves@redhat.com>
6824
6825         * linux-nat.h (linux_nat_target) <low_new_thread,
6826         low_delete_thread, low_new_fork, low_forget_process,
6827         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6828         New virtual methods.
6829         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6830         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6831         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6832         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6833         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6834         Delete.
6835         * linux-fork.c (delete_fork): Adjust to call low method.
6836         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6837         (linux_nat_new_fork, linux_nat_forget_process_hook)
6838         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6839         (linux_nat_status_is_event):
6840         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6841         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6842         to call low method.
6843         (sigtrap_is_event): Rename to ...
6844         (linux_nat_target::low_status_is_event): ... this.
6845         (linux_nat_set_status_is_event): Delete.
6846         (save_stop_reason, linux_nat_wait_1)
6847         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6848         low methods.
6849         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6850         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6851         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6852         (linux_nat_set_prepare_to_resume): Delete.
6853         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6854         low virtual methods.
6855         * amd64-linux-nat.c: Likewise.
6856         * arm-linux-nat.c: Likewise.
6857         * i386-linux-nat.c: Likewise.
6858         * ia64-linux-nat.c: Likewise.
6859         * mips-linux-nat.c: Likewise.
6860         * ppc-linux-nat.c: Likewise.
6861         * s390-linux-nat.c: Likewise.
6862         * sparc64-linux-nat.c: Likewise.
6863         * x86-linux-nat.c: Likewise.
6864         * x86-linux-nat.h: Include "nat/x86-linux.h".
6865         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6866         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6867         Override methods.
6868
6869 2018-05-02  Pedro Alves  <palves@redhat.com>
6870
6871         * target.h (target_ops)
6872         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6873         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6874         stopped_by_watchpoint, have_continuable_watchpoint,
6875         stopped_data_address, watchpoint_addr_within_range,
6876         can_accel_watchpoint_condition, can_run, thread_alive,
6877         has_all_memory, has_memory, has_stack, has_registers,
6878         has_execution, can_async_p, is_async_p, supports_non_stop,
6879         always_non_stop_p, can_execute_reverse, supports_multi_process,
6880         supports_enable_disable_tracepoint,
6881         supports_disable_randomization, supports_string_tracing,
6882         supports_evaluation_of_breakpoint_conditions,
6883         can_run_breakpoint_commands, filesystem_is_local,
6884         can_download_tracepoint, get_trace_state_variable_value,
6885         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6886         record_is_replaying, record_will_replay,
6887         augmented_libraries_svr4_read>: Adjust to return bool.
6888         * aarch64-linux-nat.c: All implementations adjusted.
6889         * aix-thread.c: All implementations adjusted.
6890         * arm-linux-nat.c: All implementations adjusted.
6891         * breakpoint.c: All implementations adjusted.
6892         * bsd-kvm.c: All implementations adjusted.
6893         * bsd-uthread.c: All implementations adjusted.
6894         * corelow.c: All implementations adjusted.
6895         * ctf.c: All implementations adjusted.
6896         * darwin-nat.c: All implementations adjusted.
6897         * darwin-nat.h: All implementations adjusted.
6898         * exec.c: All implementations adjusted.
6899         * fbsd-nat.c: All implementations adjusted.
6900         * fbsd-nat.h: All implementations adjusted.
6901         * gnu-nat.c: All implementations adjusted.
6902         * gnu-nat.h: All implementations adjusted.
6903         * go32-nat.c: All implementations adjusted.
6904         * ia64-linux-nat.c: All implementations adjusted.
6905         * inf-child.c: All implementations adjusted.
6906         * inf-child.h: All implementations adjusted.
6907         * inf-ptrace.c: All implementations adjusted.
6908         * inf-ptrace.h: All implementations adjusted.
6909         * linux-nat.c: All implementations adjusted.
6910         * linux-nat.h: All implementations adjusted.
6911         * mips-linux-nat.c: All implementations adjusted.
6912         * nto-procfs.c: All implementations adjusted.
6913         * ppc-linux-nat.c: All implementations adjusted.
6914         * procfs.c: All implementations adjusted.
6915         * ravenscar-thread.c: All implementations adjusted.
6916         * record-btrace.c: All implementations adjusted.
6917         * record-full.c: All implementations adjusted.
6918         * remote-sim.c: All implementations adjusted.
6919         * remote.c: All implementations adjusted.
6920         * s390-linux-nat.c: All implementations adjusted.
6921         * sol-thread.c: All implementations adjusted.
6922         * spu-multiarch.c: All implementations adjusted.
6923         * target-delegates.c: All implementations adjusted.
6924         * target.c: All implementations adjusted.
6925         * target.h: All implementations adjusted.
6926         * tracefile-tfile.c: All implementations adjusted.
6927         * tracefile.c: All implementations adjusted.
6928         * tracefile.h: All implementations adjusted.
6929         * windows-nat.c: All implementations adjusted.
6930         * x86-linux-nat.h: All implementations adjusted.
6931         * x86-nat.h: All implementations adjusted.
6932
6933 2018-05-02  Pedro Alves  <palves@redhat.com>
6934
6935         * make-target-delegates (scan_target_h): Don't trim lines here.
6936         Replace sequences of tabs and/or whitespace with a single
6937         whitespace.
6938         (top level, parsing methods): Trim each line before processing it
6939         here.
6940
6941 2018-05-02  Pedro Alves  <palves@redhat.com>
6942             John Baldwin  <jhb@freebsd.org>
6943
6944         * target.h (enum strata) <debug_stratum>: New.
6945         (struct target_ops) <all delegation methods>: Replace by C++
6946         virtual methods, and drop "to_" prefix.  All references updated
6947         throughout.
6948         <to_shortname, to_longname, to_doc, to_data,
6949         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6950         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6951         virtual methods.  All references updated throughout.
6952         <can_attach, supports_terminal_ours, can_create_inferior,
6953         get_thread_control_capabilities, attach_no_wait>: New
6954         virtual methods.
6955         <insert_breakpoint, remove_breakpoint>: Now
6956         TARGET_DEFAULT_NORETURN methods.
6957         <info_proc>: Now returns bool.
6958         <to_magic>: Delete.
6959         (OPS_MAGIC): Delete.
6960         (current_target): Delete.  All references replaced by references
6961         to ...
6962         (target_stack): ... this.  New.
6963         (target_shortname, target_longname): Adjust.
6964         (target_can_run): Now a function declaration.
6965         (default_child_has_all_memory, default_child_has_memory)
6966         (default_child_has_stack, default_child_has_registers)
6967         (default_child_has_execution): Remove target_ops parameter.
6968         (complete_target_initialization): Delete.
6969         (memory_breakpoint_target): New template class.
6970         (test_target_ops): Refactor as a C++ class with virtual methods.
6971         * make-target-delegates (NAME_PART): Tighten.
6972         (POINTER_PART, CP_SYMBOL): New.
6973         (SIMPLE_RETURN_PART): Reimplement.
6974         (VEC_RETURN_PART): Expect less.
6975         (RETURN_PART, VIRTUAL_PART): New.
6976         (METHOD): Adjust to C++ virtual methods.
6977         (scan_target_h): Remove reference to C99.
6978         (dname): Output "target_ops::" prefix.
6979         (write_function_header): Adjust to output a C++ class method.
6980         (write_declaration): New.
6981         (write_delegator): Adjust to output a C++ class method.
6982         (tdname): Output "dummy_target::" prefix.
6983         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6984         method.
6985         (tdefault_names, debug_names): Delete.
6986         (return_types, tdefaults, styles, argtypes_array): New.
6987         (top level): All methods are delegators.
6988         (print_class): New.
6989         (top level): Print dummy_target and debug_target classes.
6990         * target-delegates.c: Regenerate.
6991         * target-debug.h (target_debug_print_enum_info_proc_what)
6992         (target_debug_print_thread_control_capabilities)
6993         (target_debug_print_thread_info_p): New.
6994         * target.c (dummy_target): Delete.
6995         (the_dummy_target, the_debug_target): New.
6996         (target_stack): Now extern.
6997         (set_targetdebug): Push/unpush debug target.
6998         (default_child_has_all_memory, default_child_has_memory)
6999         (default_child_has_stack, default_child_has_registers)
7000         (default_child_has_execution): Remove target_ops parameter.
7001         (complete_target_initialization): Delete.
7002         (add_target_with_completer): No longer call
7003         complete_target_initialization.
7004         (target_supports_terminal_ours): Use regular delegation.
7005         (update_current_target): Delete.
7006         (push_target): No longer check magic number.  Don't call
7007         update_current_target.
7008         (unpush_target): Don't call update_current_target.
7009         (target_is_pushed): No longer check magic number.
7010         (target_require_runnable): Skip for all stratums over
7011         process_stratum.
7012         (target_ops::info_proc): New.
7013         (target_info_proc): Use find_target_at and
7014         find_default_run_target.
7015         (target_supports_disable_randomization): Use regular delegation.
7016         (target_get_osdata): Use find_target_at.
7017         (target_ops::open, target_ops::close, target_ops::can_attach)
7018         (target_ops::attach, target_ops::can_create_inferior)
7019         (target_ops::create_inferior, target_ops::can_run)
7020         (target_can_run): New.
7021         (default_fileio_target): Use regular delegation.
7022         (target_ops::fileio_open, target_ops::fileio_pwrite)
7023         (target_ops::fileio_pread, target_ops::fileio_fstat)
7024         (target_ops::fileio_close, target_ops::fileio_unlink)
7025         (target_ops::fileio_readlink): New.
7026         (target_fileio_open_1, target_fileio_unlink)
7027         (target_fileio_readlink): Always call the target method.  Handle
7028         FILEIO_ENOSYS.
7029         (return_zero, return_zero_has_execution): Delete.
7030         (init_dummy_target): Delete.
7031         (dummy_target::dummy_target, dummy_target::shortname)
7032         (dummy_target::longname, dummy_target::doc)
7033         (debug_target::debug_target, debug_target::shortname)
7034         (debug_target::longname, debug_target::doc): New.
7035         (target_supports_delete_record): Use regular delegation.
7036         (setup_target_debug): Delete.
7037         (maintenance_print_target_stack): Skip debug_stratum.
7038         (initialize_targets): Instantiate the_dummy_target and
7039         the_debug_target.
7040         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7041         use target_stack.
7042         (target_auxv_search, fprint_target_auxv): Adjust.
7043         (info_auxv_command): Adjust to use target_stack.
7044         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7045         * exceptions.c (print_flush): Handle a NULL target_stack.
7046         * regcache.c (target_ops_no_register): Refactor as class with
7047         virtual methods.
7048
7049         * exec.c (exec_target): New class.
7050         (exec_ops): Now an exec_target.
7051         (exec_open, exec_close_1, exec_get_section_table)
7052         (exec_xfer_partial, exec_files_info, exec_has_memory)
7053         (exec_make_note_section): Refactor as exec_target methods.
7054         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7055         Delete.
7056         (exec_target::find_memory_regions): New.
7057         (_initialize_exec): Don't call init_exec_ops.
7058         * gdbcore.h (exec_file_clear): Delete.
7059
7060         * corefile.c (core_target): Delete.
7061         (core_file_command): Adjust.
7062         * corelow.c (core_target): New class.
7063         (the_core_target): New.
7064         (core_close): Remove target_ops parameter.
7065         (core_close_cleanup): Adjust.
7066         (core_target::close): New.
7067         (core_open, core_detach, get_core_registers, core_files_info)
7068         (core_xfer_partial, core_thread_alive, core_read_description)
7069         (core_pid_to_str, core_thread_name, core_has_memory)
7070         (core_has_stack, core_has_registers, core_info_proc): Rework as
7071         core_target methods.
7072         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7073         (_initialize_corelow): Initialize the_core_target.
7074         * gdbcore.h (core_target): Delete.
7075         (the_core_target): New.
7076
7077         * ctf.c: (ctf_target): New class.
7078         (ctf_ops): Now a ctf_target.
7079         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7080         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7081         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7082         methods.
7083         (init_ctf_ops): Delete.
7084         (_initialize_ctf): Don't call it.
7085         * tracefile-tfile.c (tfile_target): New class.
7086         (tfile_ops): Now a tfile_target.
7087         (tfile_open, tfile_close, tfile_files_info)
7088         (tfile_get_tracepoint_status, tfile_trace_find)
7089         (tfile_fetch_registers, tfile_xfer_partial)
7090         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7091         Refactor as tfile_target methods.
7092         (tfile_xfer_partial_features): Remove target_ops parameter.
7093         (init_tfile_ops): Delete.
7094         (_initialize_tracefile_tfile): Don't call it.
7095         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7096         (tracefile_has_stack, tracefile_has_registers)
7097         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7098         tracefile_target methods.
7099         (init_tracefile_ops): Delete.
7100         (tracefile_target::tracefile_target): New.
7101         * tracefile.h: Include "target.h".
7102         (tracefile_target): New class.
7103         (init_tracefile_ops): Delete.
7104
7105         * spu-multiarch.c (spu_multiarch_target): New class.
7106         (spu_ops): Now a spu_multiarch_target.
7107         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7108         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7109         (spu_search_memory, spu_mourn_inferior): Refactor as
7110         spu_multiarch_target methods.
7111         (init_spu_ops): Delete.
7112         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7113         complete_target_initialization.
7114
7115         * ravenscar-thread.c (ravenscar_thread_target): New class.
7116         (ravenscar_ops): Now a ravenscar_thread_target.
7117         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7118         (ravenscar_thread_alive, ravenscar_pid_to_str)
7119         (ravenscar_fetch_registers, ravenscar_store_registers)
7120         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7121         (ravenscar_stopped_by_hw_breakpoint)
7122         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7123         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7124         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7125         methods.
7126         (init_ravenscar_thread_ops): Delete.
7127         (_initialize_ravenscar): Remove references to
7128         init_ravenscar_thread_ops and complete_target_initialization.
7129
7130         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7131         (bsd_uthread_target): New class.
7132         (bsd_uthread_ops): Now a bsd_uthread_target.
7133         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7134         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7135         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7136         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7137         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7138         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7139         (bsd_uthread_target): Delete function.
7140         (_initialize_bsd_uthread): Remove reference to
7141         complete_target_initialization.
7142
7143         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7144         (target_bfd): ... this new class.
7145         (target_bfd_xfer_partial, target_bfd_get_section_table)
7146         (target_bfd_close): Refactor as target_bfd methods.
7147         (target_bfd::~target_bfd): New.
7148         (target_bfd_reopen): Adjust.
7149         (target_bfd::close): New.
7150
7151         * record-btrace.c (record_btrace_target): New class.
7152         (record_btrace_ops): Now a record_btrace_target.
7153         (record_btrace_open, record_btrace_stop_recording)
7154         (record_btrace_disconnect, record_btrace_close)
7155         (record_btrace_async, record_btrace_info)
7156         (record_btrace_insn_history, record_btrace_insn_history_range)
7157         (record_btrace_insn_history_from, record_btrace_call_history)
7158         (record_btrace_call_history_range)
7159         (record_btrace_call_history_from, record_btrace_record_method)
7160         (record_btrace_is_replaying, record_btrace_will_replay)
7161         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7162         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7163         (record_btrace_store_registers, record_btrace_prepare_to_store)
7164         (record_btrace_to_get_unwinder)
7165         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7166         (record_btrace_commit_resume, record_btrace_wait)
7167         (record_btrace_stop, record_btrace_can_execute_reverse)
7168         (record_btrace_stopped_by_sw_breakpoint)
7169         (record_btrace_supports_stopped_by_sw_breakpoint)
7170         (record_btrace_stopped_by_hw_breakpoint)
7171         (record_btrace_supports_stopped_by_hw_breakpoint)
7172         (record_btrace_update_thread_list, record_btrace_thread_alive)
7173         (record_btrace_goto_begin, record_btrace_goto_end)
7174         (record_btrace_goto, record_btrace_stop_replaying_all)
7175         (record_btrace_execution_direction)
7176         (record_btrace_prepare_to_generate_core)
7177         (record_btrace_done_generating_core): Refactor as
7178         record_btrace_target methods.
7179         (init_record_btrace_ops): Delete.
7180         (_initialize_record_btrace): Remove reference to
7181         init_record_btrace_ops.
7182         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7183         the execution_direction global.
7184         (record_full_base_target, record_full_target)
7185         (record_full_core_target): New classes.
7186         (record_full_ops): Now a record_full_target.
7187         (record_full_core_ops): Now a record_full_core_target.
7188         (record_full_target::detach, record_full_target::disconnect)
7189         (record_full_core_target::disconnect)
7190         (record_full_target::mourn_inferior, record_full_target::kill):
7191         New.
7192         (record_full_open, record_full_close, record_full_async): Refactor
7193         as methods of the record_full_base_target class.
7194         (record_full_resume, record_full_commit_resume): Refactor
7195         as methods of the record_full_target class.
7196         (record_full_wait, record_full_stopped_by_watchpoint)
7197         (record_full_stopped_data_address)
7198         (record_full_stopped_by_sw_breakpoint)
7199         (record_full_supports_stopped_by_sw_breakpoint)
7200         (record_full_stopped_by_hw_breakpoint)
7201         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7202         methods of the record_full_base_target class.
7203         (record_full_store_registers, record_full_xfer_partial)
7204         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7205         Refactor as methods of the record_full_target class.
7206         (record_full_can_execute_reverse, record_full_get_bookmark)
7207         (record_full_goto_bookmark, record_full_execution_direction)
7208         (record_full_record_method, record_full_info, record_full_delete)
7209         (record_full_is_replaying, record_full_will_replay)
7210         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7211         (record_full_stop_replaying): Refactor as methods of the
7212         record_full_base_target class.
7213         (record_full_core_resume, record_full_core_kill)
7214         (record_full_core_fetch_registers)
7215         (record_full_core_prepare_to_store)
7216         (record_full_core_store_registers, record_full_core_xfer_partial)
7217         (record_full_core_insert_breakpoint)
7218         (record_full_core_remove_breakpoint)
7219         (record_full_core_has_execution): Refactor
7220         as methods of the record_full_core_target class.
7221         (record_full_base_target::supports_delete_record): New.
7222         (init_record_full_ops): Delete.
7223         (init_record_full_core_ops): Delete.
7224         (record_full_save): Refactor as method of the
7225         record_full_base_target class.
7226         (_initialize_record_full): Remove references to
7227         init_record_full_ops and init_record_full_core_ops.
7228
7229         * remote.c (remote_target, extended_remote_target): New classes.
7230         (remote_ops): Now a remote_target.
7231         (extended_remote_ops): Now an extended_remote_target.
7232         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7233         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7234         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7235         (remote_pass_signals, remote_set_syscall_catchpoint)
7236         (remote_program_signals, )
7237         (remote_thread_always_alive): Remove target_ops parameter.
7238         (remote_thread_alive, remote_thread_name)
7239         (remote_update_thread_list, remote_threads_extra_info)
7240         (remote_static_tracepoint_marker_at)
7241         (remote_static_tracepoint_markers_by_strid)
7242         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7243         (remote_open): Refactor as methods of remote_target.
7244         (extended_remote_open, extended_remote_detach)
7245         (extended_remote_attach, extended_remote_post_attach):
7246         (extended_remote_supports_disable_randomization)
7247         (extended_remote_create_inferior): : Refactor as method of
7248         extended_remote_target.
7249         (remote_set_permissions, remote_open_1, remote_detach)
7250         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7251         (remote_resume, remote_commit_resume, remote_stop)
7252         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7253         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7254         (remote_prepare_to_store, remote_store_registers)
7255         (remote_flash_erase, remote_flash_done, remote_files_info)
7256         (remote_kill, remote_mourn, remote_insert_breakpoint)
7257         (remote_remove_breakpoint, remote_insert_watchpoint)
7258         (remote_watchpoint_addr_within_range)
7259         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7260         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7261         (remote_supports_stopped_by_sw_breakpoint)
7262         (remote_stopped_by_hw_breakpoint)
7263         (remote_supports_stopped_by_hw_breakpoint)
7264         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7265         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7266         (remote_verify_memory): Refactor as methods of remote_target.
7267         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7268         parameter.
7269         (remote_xfer_partial, remote_get_memory_xfer_limit)
7270         (remote_search_memory, remote_rcmd, remote_memory_map)
7271         (remote_pid_to_str, remote_get_thread_local_address)
7272         (remote_get_tib_address, remote_read_description): Refactor as
7273         methods of remote_target.
7274         (remote_target::fileio_open, remote_target::fileio_pwrite)
7275         (remote_target::fileio_pread, remote_target::fileio_close): New.
7276         (remote_hostio_readlink, remote_hostio_fstat)
7277         (remote_filesystem_is_local, remote_can_execute_reverse)
7278         (remote_supports_non_stop, remote_supports_disable_randomization)
7279         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7280         (remote_supports_enable_disable_tracepoint)
7281         (remote_supports_string_tracing)
7282         (remote_can_run_breakpoint_commands, remote_trace_init)
7283         (remote_download_tracepoint, remote_can_download_tracepoint)
7284         (remote_download_trace_state_variable, remote_enable_tracepoint)
7285         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7286         (remote_trace_start, remote_get_trace_status)
7287         (remote_get_tracepoint_status, remote_trace_stop)
7288         (remote_trace_find, remote_get_trace_state_variable_value)
7289         (remote_save_trace_data, remote_get_raw_trace_data)
7290         (remote_set_disconnected_tracing, remote_core_of_thread)
7291         (remote_set_circular_trace_buffer, remote_traceframe_info)
7292         (remote_get_min_fast_tracepoint_insn_len)
7293         (remote_set_trace_buffer_size, remote_set_trace_notes)
7294         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7295         (remote_disable_btrace, remote_teardown_btrace)
7296         (remote_read_btrace, remote_btrace_conf)
7297         (remote_augmented_libraries_svr4_read, remote_load)
7298         (remote_pid_to_exec_file, remote_can_do_single_step)
7299         (remote_execution_direction, remote_thread_handle_to_thread_info):
7300         Refactor as methods of remote_target.
7301         (init_remote_ops, init_extended_remote_ops): Delete.
7302         (remote_can_async_p, remote_is_async_p, remote_async)
7303         (remote_thread_events, remote_upload_tracepoints)
7304         (remote_upload_trace_state_variables): Refactor as methods of
7305         remote_target.
7306         (_initialize_remote): Remove references to init_remote_ops and
7307         init_extended_remote_ops.
7308
7309         * remote-sim.c (gdbsim_target): New class.
7310         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7311         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7312         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7313         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7314         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7315         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7316         Refactor as methods of gdbsim_target.
7317         (gdbsim_ops): Now a gdbsim_target.
7318         (init_gdbsim_ops): Delete.
7319         (gdbsim_cntrl_c): Adjust.
7320         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7321
7322         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7323         (the_amd64_linux_nat_target): New.
7324         (amd64_linux_fetch_inferior_registers)
7325         (amd64_linux_store_inferior_registers): Refactor as methods of
7326         amd64_linux_nat_target.
7327         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7328         * i386-linux-nat.c: Don't include "linux-nat.h".
7329         (i386_linux_nat_target): New class.
7330         (the_i386_linux_nat_target): New.
7331         (i386_linux_fetch_inferior_registers)
7332         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7333         as methods of i386_linux_nat_target.
7334         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7335         * inf-child.c (inf_child_ops): Delete.
7336         (inf_child_fetch_inferior_registers)
7337         (inf_child_store_inferior_registers): Delete.
7338         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7339         methods of inf_child_target.
7340         (inf_child_target::supports_terminal_ours)
7341         (inf_child_target::terminal_init)
7342         (inf_child_target::terminal_inferior)
7343         (inf_child_target::terminal_ours_for_output)
7344         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7345         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7346         New.
7347         (inf_child_open, inf_child_disconnect, inf_child_close)
7348         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7349         (inf_child_post_startup_inferior, inf_child_can_run)
7350         (inf_child_pid_to_exec_file): Refactor as methods of
7351         inf_child_target.
7352         (inf_child_follow_fork): Delete.
7353         (inf_child_target::can_create_inferior)
7354         (inf_child_target::can_attach): New.
7355         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7356         (inf_child_target::has_stack, inf_child_target::has_registers)
7357         (inf_child_target::has_execution): New.
7358         (inf_child_fileio_open, inf_child_fileio_pwrite)
7359         (inf_child_fileio_pread, inf_child_fileio_fstat)
7360         (inf_child_fileio_close, inf_child_fileio_unlink)
7361         (inf_child_fileio_readlink, inf_child_use_agent)
7362         (inf_child_can_use_agent): Refactor as methods of
7363         inf_child_target.
7364         (return_zero, inf_child_target): Delete.
7365         (inf_child_target::inf_child_target): New.
7366         * inf-child.h: Include "target.h".
7367         (inf_child_target): Delete function prototype.
7368         (inf_child_target): New class.
7369         (inf_child_open_target, inf_child_mourn_inferior)
7370         (inf_child_maybe_unpush_target): Delete.
7371         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7372         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7373         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7374         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7375         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7376         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7377         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7378         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7379         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7380         methods of inf_ptrace_target.
7381         (inf_ptrace_target): Delete function.
7382         * inf-ptrace.h: Include "inf-child.h".
7383         (inf_ptrace_target): Delete function declaration.
7384         (inf_ptrace_target): New class.
7385         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7386         * linux-nat.c (linux_target): New.
7387         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7388         (linux_nat_target::~linux_nat_target): New.
7389         (linux_child_post_attach, linux_child_post_startup_inferior)
7390         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7391         (linux_child_remove_fork_catchpoint)
7392         (linux_child_insert_vfork_catchpoint)
7393         (linux_child_remove_vfork_catchpoint)
7394         (linux_child_insert_exec_catchpoint)
7395         (linux_child_remove_exec_catchpoint)
7396         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7397         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7398         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7399         (linux_nat_stopped_data_address)
7400         (linux_nat_stopped_by_sw_breakpoint)
7401         (linux_nat_supports_stopped_by_sw_breakpoint)
7402         (linux_nat_stopped_by_hw_breakpoint)
7403         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7404         (linux_nat_kill, linux_nat_mourn_inferior)
7405         (linux_nat_xfer_partial, linux_nat_thread_alive)
7406         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7407         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7408         (linux_child_static_tracepoint_markers_by_strid)
7409         (linux_nat_is_async_p, linux_nat_can_async_p)
7410         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7411         (linux_nat_supports_multi_process)
7412         (linux_nat_supports_disable_randomization, linux_nat_async)
7413         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7414         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7415         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7416         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7417         methods of linux_nat_target.
7418         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7419         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7420         parameter.
7421         (check_stopped_by_watchpoint): Adjust.
7422         (linux_xfer_partial): Delete.
7423         (linux_target_install_ops, linux_target, linux_nat_add_target):
7424         Delete.
7425         (linux_nat_target::linux_nat_target): New.
7426         * linux-nat.h: Include "inf-ptrace.h".
7427         (linux_nat_target): New.
7428         (linux_target, linux_target_install_ops, linux_nat_add_target):
7429         Delete function declarations.
7430         (linux_target): Declare global.
7431         * linux-thread-db.c (thread_db_target): New.
7432         (thread_db_target::thread_db_target): New.
7433         (thread_db_ops): Delete.
7434         (the_thread_db_target): New.
7435         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7436         (thread_db_update_thread_list, thread_db_pid_to_str)
7437         (thread_db_extra_thread_info)
7438         (thread_db_thread_handle_to_thread_info)
7439         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7440         (thread_db_resume): Refactor as methods of thread_db_target.
7441         (init_thread_db_ops): Delete.
7442         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7443         * x86-linux-nat.c: Don't include "linux-nat.h".
7444         (super_post_startup_inferior): Delete.
7445         (x86_linux_nat_target::~x86_linux_nat_target): New.
7446         (x86_linux_child_post_startup_inferior)
7447         (x86_linux_read_description, x86_linux_enable_btrace)
7448         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7449         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7450         methods of x86_linux_nat_target.
7451         (x86_linux_create_target): Delete.  Bits folded ...
7452         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7453         pointer.
7454         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7455         (x86_linux_nat_target): New class.
7456         (x86_linux_create_target): Delete.
7457         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7458         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7459         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7460         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7461         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7462         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7463         make extern.
7464         (x86_use_watchpoints): Delete.
7465         * x86-nat.h: Include "breakpoint.h" and "target.h".
7466         (x86_use_watchpoints): Delete.
7467         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7468         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7469         (x86_insert_watchpoint, x86_remove_watchpoint)
7470         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7471         (x86_stopped_by_hw_breakpoint): New declarations.
7472         (x86_nat_target): New template class.
7473
7474         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7475         (the_ppc_linux_nat_target): New.
7476         (ppc_linux_fetch_inferior_registers)
7477         (ppc_linux_can_use_hw_breakpoint)
7478         (ppc_linux_region_ok_for_hw_watchpoint)
7479         (ppc_linux_ranged_break_num_registers)
7480         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7481         (ppc_linux_insert_mask_watchpoint)
7482         (ppc_linux_remove_mask_watchpoint)
7483         (ppc_linux_can_accel_watchpoint_condition)
7484         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7485         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7486         (ppc_linux_watchpoint_addr_within_range)
7487         (ppc_linux_masked_watch_num_registers)
7488         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7489         (ppc_linux_read_description): Refactor as methods of
7490         ppc_linux_nat_target.
7491         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7492
7493         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7494         (procfs_target): New class.
7495         (the_procfs_target): New.
7496         (procfs_target): Delete function.
7497         (procfs_auxv_parse, procfs_attach, procfs_detach)
7498         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7499         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7500         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7501         (procfs_create_inferior, procfs_update_thread_list)
7502         (procfs_thread_alive, procfs_pid_to_str)
7503         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7504         (procfs_stopped_data_address, procfs_insert_watchpoint)
7505         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7506         (proc_find_memory_regions, procfs_info_proc)
7507         (procfs_make_note_section): Refactor as methods of procfs_target.
7508         (_initialize_procfs): Adjust.
7509         * sol-thread.c (sol_thread_target): New class.
7510         (sol_thread_ops): Now a sol_thread_target.
7511         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7512         (sol_thread_fetch_registers, sol_thread_store_registers)
7513         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7514         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7515         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7516         (init_sol_thread_ops): Delete.
7517         (_initialize_sol_thread): Adjust.  Remove references to
7518         init_sol_thread_ops and complete_target_initialization.
7519
7520         * windows-nat.c (windows_nat_target): New class.
7521         (windows_fetch_inferior_registers)
7522         (windows_store_inferior_registers, windows_resume, windows_wait)
7523         (windows_attach, windows_detach, windows_pid_to_exec_file)
7524         (windows_files_info, windows_create_inferior)
7525         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7526         (windows_close, windows_pid_to_str, windows_xfer_partial)
7527         (windows_get_tib_address, windows_get_ada_task_ptid)
7528         (windows_thread_name, windows_thread_alive): Refactor as
7529         windows_nat_target methods.
7530         (do_initial_windows_stuff): Adjust.
7531         (windows_target): Delete function.
7532         (_initialize_windows_nat): Adjust.
7533
7534         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7535         (darwin_mourn_inferior, darwin_kill_inferior)
7536         (darwin_create_inferior, darwin_attach, darwin_detach)
7537         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7538         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7539         (darwin_supports_multi_process): Refactor as darwin_nat_target
7540         methods.
7541         (darwin_resume_to, darwin_files_info): Delete.
7542         (_initialize_darwin_inferior): Rename to ...
7543         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7544         * darwin-nat.h: Include "inf-child.h".
7545         (darwin_nat_target): New class.
7546         (darwin_complete_target): Delete.
7547         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7548         (darwin_target): New.
7549         (i386_darwin_fetch_inferior_registers)
7550         (i386_darwin_store_inferior_registers): Refactor as methods of
7551         darwin_nat_target.
7552         (darwin_complete_target): Delete, with ...
7553         (_initialize_i386_darwin_nat): ... bits factored out here.
7554
7555         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7556         (the_alpha_linux_nat_target): New.
7557         (alpha_linux_register_u_offset): Refactor as
7558         alpha_linux_nat_target method.
7559         (_initialize_alpha_linux_nat): Adjust.
7560         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7561         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7562         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7563         methods of linux_nat_trad_target.
7564         (linux_trad_target): Delete.
7565         * linux-nat-trad.h (linux_trad_target): Delete function.
7566         (linux_nat_trad_target): New class.
7567         * mips-linux-nat.c (mips_linux_nat_target): New class.
7568         (super_fetch_registers, super_store_registers, super_close):
7569         Delete.
7570         (the_mips_linux_nat_target): New.
7571         (mips64_linux_regsets_fetch_registers)
7572         (mips64_linux_regsets_store_registers)
7573         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7574         (mips_linux_register_u_offset, mips_linux_read_description)
7575         (mips_linux_can_use_hw_breakpoint)
7576         (mips_linux_stopped_by_watchpoint)
7577         (mips_linux_stopped_data_address)
7578         (mips_linux_region_ok_for_hw_watchpoint)
7579         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7580         (mips_linux_close): Refactor as methods of mips_linux_nat.
7581         (_initialize_mips_linux_nat): Adjust to C++ification.
7582
7583         * aix-thread.c (aix_thread_target): New class.
7584         (aix_thread_ops): Now an aix_thread_target.
7585         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7586         (aix_thread_fetch_registers, aix_thread_store_registers)
7587         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7588         (aix_thread_thread_alive, aix_thread_pid_to_str)
7589         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7590         Refactor as methods of aix_thread_target.
7591         (init_aix_thread_ops): Delete.
7592         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7593         and complete_target_initialization.
7594         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7595         (rs6000_nat_target): New class.
7596         (the_rs6000_nat_target): New.
7597         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7598         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7599         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7600         (super_create_inferior): Delete.
7601         (_initialize_rs6000_nat): Adjust to C++ification.
7602
7603         * arm-linux-nat.c (arm_linux_nat_target): New class.
7604         (the_arm_linux_nat_target): New.
7605         (arm_linux_fetch_inferior_registers)
7606         (arm_linux_store_inferior_registers, arm_linux_read_description)
7607         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7608         (arm_linux_remove_hw_breakpoint)
7609         (arm_linux_region_ok_for_hw_watchpoint)
7610         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7611         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7612         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7613         arm_linux_nat_target.
7614         (_initialize_arm_linux_nat): Adjust to C++ification.
7615
7616         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7617         (the_aarch64_linux_nat_target): New.
7618         (aarch64_linux_fetch_inferior_registers)
7619         (aarch64_linux_store_inferior_registers)
7620         (aarch64_linux_child_post_startup_inferior)
7621         (aarch64_linux_read_description)
7622         (aarch64_linux_can_use_hw_breakpoint)
7623         (aarch64_linux_insert_hw_breakpoint)
7624         (aarch64_linux_remove_hw_breakpoint)
7625         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7626         (aarch64_linux_region_ok_for_hw_watchpoint)
7627         (aarch64_linux_stopped_data_address)
7628         (aarch64_linux_stopped_by_watchpoint)
7629         (aarch64_linux_watchpoint_addr_within_range)
7630         (aarch64_linux_can_do_single_step): Refactor as methods of
7631         aarch64_linux_nat_target.
7632         (super_post_startup_inferior): Delete.
7633         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7634
7635         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7636         (the_hppa_linux_nat_target): New.
7637         (hppa_linux_fetch_inferior_registers)
7638         (hppa_linux_store_inferior_registers): Refactor as methods of
7639         hppa_linux_nat_target.
7640         (_initialize_hppa_linux_nat): Adjust to C++ification.
7641
7642         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7643         (the_ia64_linux_nat_target): New.
7644         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7645         (ia64_linux_stopped_data_address)
7646         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7647         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7648         ia64_linux_nat_target methods.
7649         (super_xfer_partial): Delete.
7650         (_initialize_ia64_linux_nat): Adjust to C++ification.
7651
7652         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7653         (the_m32r_linux_nat_target): New.
7654         (m32r_linux_fetch_inferior_registers)
7655         (m32r_linux_store_inferior_registers): Refactor as
7656         m32r_linux_nat_target methods.
7657         (_initialize_m32r_linux_nat): Adjust to C++ification.
7658
7659         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7660         (the_m68k_linux_nat_target): New.
7661         (m68k_linux_fetch_inferior_registers)
7662         (m68k_linux_store_inferior_registers): Refactor as
7663         m68k_linux_nat_target methods.
7664         (_initialize_m68k_linux_nat): Adjust to C++ification.
7665
7666         * s390-linux-nat.c (s390_linux_nat_target): New class.
7667         (the_s390_linux_nat_target): New.
7668         (s390_linux_fetch_inferior_registers)
7669         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7670         (s390_insert_watchpoint, s390_remove_watchpoint)
7671         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7672         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7673         (s390_auxv_parse, s390_read_description): Refactor as methods of
7674         s390_linux_nat_target.
7675         (_initialize_s390_nat): Adjust to C++ification.
7676
7677         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7678         (the_sparc_linux_nat_target): New.
7679         (_initialize_sparc_linux_nat): Adjust to C++ification.
7680         * sparc-nat.c (sparc_fetch_inferior_registers)
7681         (sparc_store_inferior_registers): Remove target_ops parameter.
7682         * sparc-nat.h (sparc_fetch_inferior_registers)
7683         (sparc_store_inferior_registers): Remove target_ops parameter.
7684         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7685         (the_sparc64_linux_nat_target): New.
7686         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7687
7688         * spu-linux-nat.c (spu_linux_nat_target): New class.
7689         (the_spu_linux_nat_target): New.
7690         (spu_child_post_startup_inferior, spu_child_post_attach)
7691         (spu_child_wait, spu_fetch_inferior_registers)
7692         (spu_store_inferior_registers, spu_xfer_partial)
7693         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7694         methods.
7695         (_initialize_spu_nat): Adjust to C++ification.
7696
7697         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7698         (the_tilegx_linux_nat_target): New.
7699         (fetch_inferior_registers, store_inferior_registers):
7700         Refactor as methods.
7701         (_initialize_tile_linux_nat): Adjust to C++ification.
7702
7703         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7704         (the_xtensa_linux_nat_target): New.
7705         (xtensa_linux_fetch_inferior_registers)
7706         (xtensa_linux_store_inferior_registers): Refactor as
7707         xtensa_linux_nat_target methods.
7708         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7709
7710         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7711         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7712         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7713         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7714         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7715         (fbsd_stopped_by_sw_breakpoint)
7716         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7717         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7718         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7719         (fbsd_post_startup_inferior, fbsd_post_attach)
7720         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7721         (fbsd_set_syscall_catchpoint)
7722         (super_xfer_partial, super_resume, super_wait)
7723         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7724         (fbsd_handle_debug_trap): Remove target_ops parameter.
7725         (fbsd_nat_add_target): Delete.
7726         * fbsd-nat.h: Include "inf-ptrace.h".
7727         (fbsd_nat_add_target): Delete.
7728         (USE_SIGTRAP_SIGINFO): Define.
7729         (fbsd_nat_target): New class.
7730
7731         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7732         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7733         (amd64bsd_target): Delete.
7734         * amd64-bsd-nat.h: New file.
7735         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7736         "x86-bsd-nat.h".
7737         (amd64_fbsd_nat_target): New class.
7738         (the_amd64_fbsd_nat_target): New.
7739         (amd64fbsd_read_description): Refactor as method of
7740         amd64_fbsd_nat_target.
7741         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7742         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7743         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7744         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7745         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7746         (i386bsd_target): Delete.
7747         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7748         (i386bsd_fetch_inferior_registers)
7749         (i386bsd_store_inferior_registers): Declare.
7750         (i386_bsd_nat_target): New class.
7751         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7752         (the_i386_fbsd_nat_target): New.
7753         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7754         i386_fbsd_nat_target methods.
7755         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7756         (_initialize_i386fbsd_nat): Adjust to C++ification.
7757         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7758         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7759         (_initialize_x86_bsd_nat): Adjust to C++ification.
7760         * x86-bsd-nat.h: Include "x86-nat.h".
7761         (x86bsd_target): Delete declaration.
7762         (x86bsd_nat_target): New class.
7763
7764         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7765         (the_aarch64_fbsd_nat_target): New.
7766         (aarch64_fbsd_fetch_inferior_registers)
7767         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7768         aarch64_fbsd_nat_target.
7769         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7770         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7771         (the_alpha_bsd_nat_target): New.
7772         (alphabsd_fetch_inferior_registers)
7773         (alphabsd_store_inferior_registers): Refactor as
7774         alpha_bsd_nat_target methods.
7775         (_initialize_alphabsd_nat): Refactor as methods of
7776         alpha_bsd_nat_target.
7777         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7778         (the_amd64_nbsd_nat_target): New.
7779         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7780         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7781         (the_amd64_obsd_nat_target): New.
7782         (_initialize_amd64obsd_nat): Adjust to C++ification.
7783         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7784         (the_arm_fbsd_nat_target): New.
7785         (arm_fbsd_fetch_inferior_registers)
7786         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7787         (_initialize_arm_fbsd_nat): Refactor as methods of
7788         arm_fbsd_nat_target.
7789         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7790         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7791         (the_arm_netbsd_nat_target): New.
7792         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7793         arm_netbsd_nat_target.
7794         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7795         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7796         (the_hppa_nbsd_nat_target): New.
7797         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7798         hppa_nbsd_nat_target methods.
7799         (_initialize_hppanbsd_nat): Adjust to C++ification.
7800         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7801         (the_hppa_obsd_nat_target): New.
7802         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7803         methods of hppa_obsd_nat_target.
7804         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7805         add_target.
7806         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7807         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7808         add_target.
7809         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7810         (_initialize_i386obsd_nat): Use add_target.
7811         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7812         (the_m68k_bsd_nat_target): New.
7813         (m68kbsd_fetch_inferior_registers)
7814         (m68kbsd_store_inferior_registers): Refactor as methods of
7815         m68k_bsd_nat_target.
7816         (_initialize_m68kbsd_nat): Adjust to C++ification.
7817         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7818         (the_mips_fbsd_nat_target): New.
7819         (mips_fbsd_fetch_inferior_registers)
7820         (mips_fbsd_store_inferior_registers): Refactor as methods of
7821         mips_fbsd_nat_target.
7822         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7823         add_target.
7824         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7825         (the_mips_nbsd_nat_target): New.
7826         (mipsnbsd_fetch_inferior_registers)
7827         (mipsnbsd_store_inferior_registers): Refactor as methods of
7828         mips_nbsd_nat_target.
7829         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7830         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7831         (the_mips64_obsd_nat_target): New.
7832         (mips64obsd_fetch_inferior_registers)
7833         (mips64obsd_store_inferior_registers): Refactor as methods of
7834         mips64_obsd_nat_target.
7835         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7836         add_target.
7837         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7838         nbsd_nat_target.
7839         * nbsd-nat.h: Include "inf-ptrace.h".
7840         (nbsd_nat_target): New class.
7841         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7842         (obsd_wait): Refactor as methods of obsd_nat_target.
7843         (obsd_add_target): Delete.
7844         * obsd-nat.h: Include "inf-ptrace.h".
7845         (obsd_nat_target): New class.
7846         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7847         (the_ppc_fbsd_nat_target): New.
7848         (ppcfbsd_fetch_inferior_registers)
7849         (ppcfbsd_store_inferior_registers): Refactor as methods of
7850         ppc_fbsd_nat_target.
7851         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7852         add_target.
7853         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7854         (the_ppc_nbsd_nat_target): New.
7855         (ppcnbsd_fetch_inferior_registers)
7856         (ppcnbsd_store_inferior_registers): Refactor as methods of
7857         ppc_nbsd_nat_target.
7858         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7859         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7860         (the_ppc_obsd_nat_target): New.
7861         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7862         methods of ppc_obsd_nat_target.
7863         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7864         add_target.
7865         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7866         (the_sh_nbsd_nat_target): New.
7867         (shnbsd_fetch_inferior_registers)
7868         (shnbsd_store_inferior_registers): Refactor as methods of
7869         sh_nbsd_nat_target.
7870         (_initialize_shnbsd_nat): Adjust to C++ification.
7871         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7872         (inf_ptrace_xfer_partial): Delete.
7873         (sparc_xfer_partial, sparc_target): Delete.
7874         * sparc-nat.h (sparc_fetch_inferior_registers)
7875         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7876         (sparc_target): Delete function declaration.
7877         (sparc_target): New template class.
7878         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7879         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7880         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7881         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7882         add_target.
7883         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7884         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7885         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7886         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7887         add_target.
7888         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7889         (the_vax_bsd_nat_target): New.
7890         (vaxbsd_fetch_inferior_registers)
7891         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7892         methods.
7893         (_initialize_vaxbsd_nat): Adjust to C++ification.
7894
7895         * bsd-kvm.c (bsd_kvm_target): New class.
7896         (bsd_kvm_ops): Now a bsd_kvm_target.
7897         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7898         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7899         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7900         bsd_kvm_target.
7901         (bsd_kvm_return_one): Delete.
7902         (bsd_kvm_add_target): Adjust to C++ification.
7903
7904         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7905         (nto_procfs_target_procfs): New classes.
7906         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7907         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7908         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7909         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7910         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7911         (procfs_remove_hw_breakpoint, procfs_resume)
7912         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7913         (procfs_kill_inferior, procfs_store_registers)
7914         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7915         as methods of nto_procfs_target.
7916         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7917         (nto_native_ops): Delete.
7918         (procfs_open, procfs_native_open): Delete.
7919         (nto_native_ops): Now an nto_procfs_target_native.
7920         (init_procfs_targets): Adjust to C++ification.
7921         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7922         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7923         Refactor as methods of nto_procfs_target.
7924
7925         * go32-nat.c (go32_nat_target): New class.
7926         (the_go32_nat_target): New.
7927         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7928         (go32_store_registers, go32_xfer_partial, go32_files_info)
7929         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7930         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7931         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7932         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7933         (go32_target): Delete.
7934         (_initialize_go32_nat): Adjust to C++ification.
7935
7936         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7937         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7938         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7939         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7940         gnu_nat_target.
7941         (gnu_target): Delete.
7942         * gnu-nat.h (gnu_target): Delete.
7943         (gnu_nat_target): New class.
7944         * i386-gnu-nat.c (gnu_base_target): New.
7945         (i386_gnu_nat_target): New class.
7946         (the_i386_gnu_nat_target): New.
7947         (_initialize_i386gnu_nat): Adjust to C++ification.
7948
7949 2018-05-02  Pedro Alves  <palves@redhat.com>
7950
7951         * bfd-target.c (target_bfd_xclose): Rename to ...
7952         (target_bfd_close): ... this.
7953         (target_bfd_reopen): Adjust.
7954         * target.c (target_close): Remove references to to_xclose.
7955         * target.h (target_ops::to_xclose): Delete.
7956         (target_ops::to_close): Update comments.
7957
7958 2018-05-02  Pedro Alves  <palves@redhat.com>
7959
7960         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7961         "linux-nat.h".
7962         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7963         * inf-ptrace.c (inf_ptrace_register_u_offset)
7964         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7965         (inf_ptrace_store_register, inf_ptrace_store_registers)
7966         (inf_ptrace_trad_target): Move to ...
7967         * linux-nat-trad.c: ... this new file.
7968         * linux-nat-trad.h: New file.
7969         * linux-nat.c (linux_target_install_ops): Make extern.
7970         (linux_trad_target): Delete.
7971         * linux-nat.h (linux_trad_target): Delete declaration.
7972         (linux_target_install_ops): Declare.
7973         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7974         "linux-nat.h".
7975
7976 2018-05-02  Pedro Alves  <palves@redhat.com>
7977
7978         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7979         procfs_target/add_target here.
7980         * procfs.c (procfs_target): Make static.
7981         (_initialize_procfs): Call add_target here.
7982         * procfs.h (struct target_ops): Remove forward declaration.
7983         (procfs_target): Remove declaration.
7984         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7985
7986 2018-05-02  Pedro Alves  <palves@redhat.com>
7987
7988         * procfs.c (procfs_stopped_by_watchpoint)
7989         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7990         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7991         Forward declare.
7992         (procfs_use_watchpoints): Delete, move contents...
7993         (procfs_target): ... here.
7994         * procfs.h (procfs_use_watchpoints): Delete declaration.
7995         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7996         procfs_use_watchpoints.
7997         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7998         procfs_use_watchpoints.
7999
8000 2018-05-02  Tom Tromey  <tom@tromey.com>
8001
8002         PR python/20084:
8003         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8004         and var_zuinteger_unlimited.
8005         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8006         and PARAM_ZUINTEGER_UNLIMITED.
8007         (set_parameter_value): Handle var_zuinteger and
8008         var_zuinteger_unlimited.
8009         (add_setshow_generic): Likewise.
8010         (parmpy_init): Likewise.
8011
8012 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8013
8014         PR rust/23124
8015         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8016         pointer is not null before dereferencing it.
8017
8018 2018-04-30  Tom Tromey  <tom@tromey.com>
8019
8020         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8021         is_mi_like_p.
8022
8023 2018-04-30  Tom Tromey  <tom@tromey.com>
8024
8025         * breakpoint.c (mention): Remove use of is_mi_like_p.
8026         (print_mention_ranged_breakpoint): Likewise.
8027         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8028         of is_mi_like_p.
8029
8030 2018-04-30  Tom Tromey  <tom@tromey.com>
8031
8032         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8033
8034 2018-04-30  Tom Tromey  <tom@tromey.com>
8035
8036         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8037         (info_spu_event_command): Remove some uses of is_mi_like_p.
8038
8039 2018-04-30  Tom Tromey  <tom@tromey.com>
8040
8041         * python/py-framefilter.c (py_print_single_arg)
8042         (enumerate_locals, py_print_args, py_print_frame): Remove some
8043         uses of is_mi_like_p.
8044
8045 2018-04-30  Tom Tromey  <tom@tromey.com>
8046
8047         * ui-out.c: Update.
8048         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8049         * ui-out.h (ui_out::is_mi_like_p): Now const.
8050         (ui_out::do_is_mi_like_p): Now const.
8051         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8052
8053 2018-04-30  Tom Tromey  <tom@tromey.com>
8054
8055         * varobj.c (varobj_set_visualizer): Use new_reference.
8056         * python/python.c (gdbpy_decode_line): Use new_reference.
8057         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8058         new_reference.
8059
8060 2018-04-30  Tom Tromey  <tom@tromey.com>
8061
8062         * varobj.c (install_new_value): Use new_reference.
8063         * value.h (value_incref): Return void.  Swap intro comment with
8064         value_decref.
8065         * value.c (set_value_parent): Use new_reference.
8066         (value_incref): Return void.  Update intro comment.
8067         (release_value): Use new_reference.
8068         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8069
8070 2018-04-30  Tom Tromey  <tom@tromey.com>
8071
8072         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8073         * gdb_bfd.h (new_bfd_ref): Remove.
8074         (gdb_bfd_open): Update comment.
8075         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8076         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8077         (gdb_bfd_fdopenr): Use new_reference.
8078         * exec.c (exec_file_attach): Use new_reference.
8079
8080 2018-04-30  Tom Tromey  <tom@tromey.com>
8081
8082         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8083         method.
8084
8085 2018-04-30  Tom Tromey  <tom@tromey.com>
8086
8087         * jit.c (jit_read_code_entry): Use type_align.
8088         * i386-tdep.c (i386_gdbarch_init): Don't call
8089         set_gdbarch_long_long_align_bit.
8090         * gdbarch.sh: Remove long_long_align_bit.
8091         * gdbarch.c, gdbarch.h: Rebuild.
8092         * arc-tdep.c (arc_type_align): New function.
8093         (arc_gdbarch_init): Use arc_type_align.  Don't call
8094         set_gdbarch_long_long_align_bit.
8095
8096 2018-04-30  Tom Tromey  <tom@tromey.com>
8097
8098         * rust-lang.c (rust_type_alignment): Remove.
8099         (rust_composite_type): Use type_align.
8100
8101 2018-04-30  Tom Tromey  <tom@tromey.com>
8102
8103         * NEWS: Mention Type.align.
8104         * python/py-type.c (typy_get_alignof): New function.
8105         (type_object_getset): Add "alignof".
8106
8107 2018-04-30  Tom Tromey  <tom@tromey.com>
8108
8109         PR exp/17095:
8110         * NEWS: Update.
8111         * std-operator.def (UNOP_ALIGNOF): New operator.
8112         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8113         New.
8114         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8115         * c-lang.c (c_op_print_tab): Add alignof.
8116         * c-exp.y (ALIGNOF): New token.
8117         (exp): Add "ALIGNOF" production.
8118         (ident_tokens): Add _Alignof and alignof.
8119
8120 2018-04-30  Tom Tromey  <tom@tromey.com>
8121
8122         * i386-tdep.c (i386_type_align): New function.
8123         (i386_gdbarch_init): Update.
8124         * gdbarch.sh (type_align): New method.
8125         * gdbarch.c, gdbarch.h: Rebuild.
8126         * arch-utils.h (default_type_align): Declare.
8127         * arch-utils.c (default_type_align): New function.
8128         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8129         (struct type) <align_log2>: New field.
8130         <instance_flags>: Now a bitfield.
8131         (TYPE_RAW_ALIGN): New macro.
8132         (type_align, type_raw_align, set_type_align): Declare.
8133         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8134         functions.
8135         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8136         (get_alignment, maybe_set_alignment): New functions.
8137         (read_structure_type, read_enumeration_type, read_array_type)
8138         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8139         (read_subrange_type, read_base_type): Set type alignment.
8140
8141 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8142
8143         * dwarf2read.c (read_index_from_section): Use bool.
8144
8145 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8146
8147         PR gdb/22950
8148         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8149         with #ifdef.
8150
8151 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8152
8153         PR build/22873
8154         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8155         last step, and do it atomically.
8156
8157 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8158
8159         * compile/compile-c-types.c (convert_int, convert_float):
8160         Update for C FE v1.
8161
8162 2018-04-27  Tom Tromey  <tom@tromey.com>
8163
8164         PR rust/22545:
8165         * rust-lang.c (rust_inclusive_range_type_p): New function.
8166         (rust_range): Handle inclusive ranges.
8167         (rust_compute_range): Likewise.
8168         * rust-exp.y (struct rust_op) <inclusive>: New field.
8169         (DOTDOTEQ): New constant.
8170         (range_expr): Add "..=" productions.
8171         (operator_tokens): Add "..=" token.
8172         (ast_range): Add "inclusive" parameter.
8173         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8174         ranges.
8175         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8176         bounds values.
8177         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8178         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8179         Update comments.
8180         * expprint.c (print_subexp_standard): Handle new bounds values.
8181         (dump_subexp_body_standard): Likewise.
8182
8183 2018-04-27  Tom Tromey  <tom@tromey.com>
8184
8185         * configure: Rebuild.
8186         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8187         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8188         "OVERRIDE".
8189         (class symbol_needs_eval_context): Likewise.
8190         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8191         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8192         "virtual".
8193         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8194         "override".
8195         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8196         * aarch64-tdep.c (instruction_reader::read): Use "override".
8197         (instruction_reader_test::read): Likewise.
8198         * arm-tdep.c (instruction_reader::read): Use "override".
8199         (instruction_reader_thumb::read): Likewise.
8200
8201 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8202
8203         PR remote/9665
8204         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8205         instead of remote_send.
8206         (remote_send): Remove.
8207
8208 2018-04-26  Pedro Alves  <palves@redhat.com>
8209
8210         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8211         find_function_start_sal instead of find_pc_line.
8212
8213 2018-04-26  Pedro Alves  <palves@redhat.com>
8214
8215         * breakpoint.c (set_breakpoint_location_function): Handle
8216         mst_data_gnu_ifunc.
8217         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8218         * elfread.c (elf_symtab_read): Give data symbols with
8219         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8220         (elf_rel_plt_read): Update comment.
8221         * linespec.c (convert_linespec_to_sals): Handle
8222         mst_data_gnu_ifunc.
8223         (minsym_found): Handle mst_data_gnu_ifunc.
8224         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8225         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8226         * parse.c (find_minsym_type_and_address): Handle
8227         mst_data_gnu_ifunc.
8228         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8229         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8230         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8231         comment.
8232         <mst_data_gnu_ifunc>: New enumerator.
8233
8234 2018-04-26  Pedro Alves  <palves@redhat.com>
8235
8236         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8237         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8238         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8239         Handle it.
8240         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8241         (lookup_minimal_symbol_by_pc): Adjust.
8242         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8243         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8244         * minsyms.h (lookup_msym_prefer): New enum.
8245         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8246         parameter by a lookup_msym_prefer parameter.
8247
8248 2018-04-26  Pedro Alves  <palves@redhat.com>
8249
8250         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8251         ends in "@plt" instead of looking at the symbol's section.
8252
8253 2018-04-26  Pedro Alves  <palves@redhat.com>
8254
8255         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8256         all references.
8257         (find_pc_partial_function_gnu_ifunc): Rename to ...
8258         (find_pc_partial_function): ... this, and remove references to
8259         'is_gnu_ifunc_p'.
8260         (find_pc_partial_function): Delete old implementation.
8261         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8262
8263 2018-04-26  Pedro Alves  <palves@redhat.com>
8264
8265         * linespec.c (struct bound_minimal_symbol_search_key): New.
8266         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8267         skip first line if we found a GNU ifunc minimal symbol by name.
8268         (compare_msymbols): Change parameters to work with a destructured
8269         lhs minsym.
8270         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8271         functions.
8272
8273 2018-04-26  Pedro Alves  <palves@redhat.com>
8274
8275         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8276         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8277         address/name.
8278         (add_location_to_breakpoint): Store the minsym and the objfile in
8279         the breakpoint location.
8280         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8281         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8282         Record the minsym in the sal.
8283         * symtab.h (symtab_and_line) <msymbol>: New field.
8284
8285 2018-04-26  Pedro Alves  <palves@redhat.com>
8286
8287         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8288         unless we actually resolved the ifunc.
8289
8290 2018-04-26  Pedro Alves  <palves@redhat.com>
8291
8292         * c-exp.y (variable production): Prefer ifunc minsyms over
8293         regular function symbols.
8294         * symtab.c (find_gnu_ifunc): New function.
8295         * minsyms.h (lookup_msym_prefer): New enum.
8296         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8297         parameter by a lookup_msym_prefer parameter.
8298         * symtab.h (find_gnu_ifunc): New declaration.
8299
8300 2018-04-26  Pedro Alves  <palves@redhat.com>
8301
8302         * blockframe.c (find_gnu_ifunc_target_type): New function.
8303         (find_function_type): New.
8304         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8305         return a value with a memory address.
8306         (eval_call): For calls to GNU ifunc functions, try to find the
8307         type of the target function from the type that the resolver
8308         returns.
8309         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8310         symbols.
8311         * infcall.c (find_function_return_type): Delete.
8312         (find_function_addr): Add 'function_type' parameter.  For calls to
8313         GNU ifunc functions, try to find the type of the target function
8314         from the type that the resolver returns, and return it via
8315         FUNCTION_TYPE.
8316         (call_function_by_hand_dummy): Adjust to use the function type
8317         returned by find_function_addr.
8318         (find_function_addr): Add 'function_type' parameter and move
8319         description here.
8320         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8321         declarations.
8322
8323 2018-04-26  Pedro Alves  <palves@redhat.com>
8324
8325         * c-exp.y (variable production): Skip finding an alias for ifunc
8326         symbols.
8327
8328 2018-04-26  Pedro Alves  <palves@redhat.com>
8329
8330         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8331
8332 2018-04-25  Pedro Alves  <palves@redhat.com>
8333
8334         * infcmd.c (kill_command): Print the pid as string, not the whole
8335         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8336         message.
8337         * remote.c (remote_detach_1): Print the pid as string, not the
8338         whole thread's ptid.
8339
8340 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8341             Sergio Durigan Junior  <sergiodj@redhat.com>
8342             Pedro Alves  <palves@redhat.com>
8343
8344         * infcmd.c (kill_command): Print message when inferior has
8345         been killed.
8346         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8347         '1'.
8348         (add_inferior): Improve message printed when
8349         'print_inferior_events' is on.
8350         (exit_inferior): Remove message printed when
8351         'print_inferior_events' is on.
8352         (detach_inferior): Improve message printed when
8353         'print_inferior_events' is on.
8354         (initialize_inferiors): Use 'add_inferior_silent' to set
8355         'current_inferior_'.
8356         * inferior.h (print_inferior_events): Declare here as
8357         'extern'.
8358         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8359         '[Detaching...]' messages when 'print_inferior_events' is on.
8360         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8361         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8362         'Detaching after fork from child...', replace it by '... from
8363         parent...'.
8364         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8365         prefix/suffix when printing 'Detaching...' messages.  Print
8366         them when 'print_inferior_events' is on.
8367         * remote.c (remote_detach_1): Print message when detaching
8368         from inferior and '!is_fork_parent'.
8369
8370 2018-04-24  Tom Tromey  <tom@tromey.com>
8371
8372         * cli-out.h: Reindent.
8373
8374 2018-04-24  Tom Tromey  <tom@tromey.com>
8375
8376         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8377         (cli_ui_out::do_field_string): Use fputs_filtered.
8378         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8379
8380 2018-04-23  Tom Tromey  <tom@tromey.com>
8381
8382         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8383         gdb::unique_xmalloc_ptr.
8384
8385 2018-04-23  Tom Tromey  <tom@tromey.com>
8386
8387         * configure: Rebuild.
8388
8389 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8390
8391         PR gdb/23095
8392         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8393         prepare_for_testing.  Set normal_bp to r_debug_state if target
8394         is bsd.
8395
8396 2018-04-21  Pedro Alves  <palves@redhat.com>
8397             Rajendra SY  <rajendra.sy@gmail.com>
8398
8399         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8400         * remote.c (extended_remote_attach): In all-stop mode, mark the
8401         thread as executing.
8402
8403 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8404
8405         * thread.c (thread_apply_all_command): Fix comment.
8406         (thread_command): Fix comment.
8407
8408 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8409
8410         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8411         parameter.
8412         * features/aarch64-core.c (create_feature_aarch64_core):
8413         Regenerate.
8414         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8415         Likewise.
8416         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8417         Likewise.
8418         * features/i386/32bit-avx512.c
8419         (create_feature_i386_32bit_avx512): Likewise.
8420         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8421         Likewise.
8422         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8423         Likewise.
8424         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8425         Likewise.
8426         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8427         Likewise.
8428         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8429         Likewise.
8430         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8431         Likewise.
8432         * features/i386/64bit-avx512.c
8433         (create_feature_i386_64bit_avx512): Likewise.
8434         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8435         Likewise.
8436         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8437         Likewise.
8438         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8439         Likewise.
8440         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8441         Likewise.
8442         * features/i386/64bit-segments.c
8443         (create_feature_i386_64bit_segments): Likewise.
8444         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8445         Likewise.
8446         * features/i386/x32-core.c
8447         (create_feature_i386_x32_core): Likewise.
8448         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8449         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8450         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8451         * target-descriptions.c: In generated code, don't pass xml
8452         filename.
8453
8454 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8455
8456         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8457         (print_xml_feature::visit_post): Likewise.
8458         (print_xml_feature::visit): Likewise.
8459         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8460         (print_xml_feature): Add new class.
8461         * regformats/regdat.sh: Null xmltarget on feature targets.
8462         * target-descriptions.c (struct target_desc): Add xmltarget.
8463         (maintenance_check_tdesc_xml_convert): Add unittest function.
8464         (tdesc_get_features_xml): Add function to get xml.
8465         (maintenance_check_xml_descriptions): Test xml generation.
8466         * xml-tdesc.c (string_read_description_xml): Add function.
8467         * xml-tdesc.h (string_read_description_xml): Add declaration.
8468
8469 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8470
8471         * features/Makefile: Add feature marker to targets with new style
8472         target descriptions.
8473         * regformats/aarch64.dat: Regenerate.
8474         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8475         * regformats/i386/amd64-avx-linux.dat: Likewise.
8476         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8477         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8478         * regformats/i386/amd64-linux.dat: Likewise.
8479         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8480         * regformats/i386/amd64.dat: Likewise.
8481         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8482         * regformats/i386/i386-avx-linux.dat: Likewise.
8483         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8484         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8485         * regformats/i386/i386-linux.dat: Likewise.
8486         * regformats/i386/i386-mmx-linux.dat: Likewise.
8487         * regformats/i386/i386-mpx-linux.dat: Likewise.
8488         * regformats/i386/i386.dat: Likewise.
8489         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8490         * regformats/i386/x32-avx-linux.dat: Likewise.
8491         * regformats/i386/x32-linux.dat: Likewise.
8492         * regformats/tic6x-c62x-linux.dat: Likewise.
8493         * regformats/tic6x-c64x-linux.dat: Likewise.
8494         * regformats/tic6x-c64xp-linux.dat: Likewise.
8495         * regformats/regdat.sh: Parse feature marker.
8496
8497 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8498
8499         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8500         (tdesc_osabi_name): Likewise.
8501         * target-descriptions.c (tdesc_architecture_name): Add new
8502         function.
8503         (tdesc_osabi_name): Likewise.
8504
8505 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8506
8507         * common/tdesc.c (tdesc_predefined_type): Move to here.
8508         (tdesc_named_type): Likewise.
8509         (tdesc_create_vector): Likewise.
8510         (tdesc_create_struct): Likewise.
8511         (tdesc_set_struct_size): Likewise.
8512         (tdesc_create_union): Likewise.
8513         (tdesc_create_flags): Likewise.
8514         (tdesc_create_enum): Likewise.
8515         (tdesc_add_field): Likewise.
8516         (tdesc_add_typed_bitfield): Likewise.
8517         (tdesc_add_bitfield): Likewise.
8518         (tdesc_add_flag): Likewise.
8519         (tdesc_add_enum_value): Likewise.
8520         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8521         (struct tdesc_type_vector): Likewise.
8522         (struct tdesc_type_field): Likewise.
8523         (struct tdesc_type_with_fields): Likewise.
8524         (tdesc_create_enum): Add declaration.
8525         (tdesc_add_typed_bitfield): Likewise.
8526         (tdesc_add_enum_value): Likewise.
8527         * target-descriptions.c (tdesc_type_field): Move from here.
8528         (tdesc_type_builtin): Likewise.
8529         (tdesc_type_vector): Likewise.
8530         (tdesc_type_with_fields): Likewise.
8531         (tdesc_predefined_types): Likewise.
8532         (tdesc_named_type): Likewise.
8533         (tdesc_create_vector): Likewise.
8534         (tdesc_create_struct): Likewise.
8535         (tdesc_set_struct_size): Likewise.
8536         (tdesc_create_union): Likewise.
8537         (tdesc_create_flags): Likewise.
8538         (tdesc_create_enum): Likewise.
8539         (tdesc_add_field): Likewise.
8540         (tdesc_add_typed_bitfield): Likewise.
8541         (tdesc_add_bitfield): Likewise.
8542         (tdesc_add_flag): Likewise.
8543         (tdesc_add_enum_value): Likewise.
8544         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8545         (tdesc_add_typed_bitfield): Likewise.
8546         (tdesc_add_enum_value): Likewise.
8547
8548 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8549
8550         * common/tdesc.c (tdesc_feature::accept): Move to here.
8551         (tdesc_feature::operator==): Likewise.
8552         (tdesc_create_reg): Likewise.
8553         * common/tdesc.h (tdesc_type_kind): Likewise.
8554         (struct tdesc_type): Likewise.
8555         (struct tdesc_feature): Likewise.
8556         * regformats/regdat.sh: Create a feature.
8557         * target-descriptions.c (tdesc_type_kind): Move from here.
8558         (tdesc_type): Likewise.
8559         (tdesc_type_up): Likewise.
8560         (tdesc_feature): Likewise.
8561         (tdesc_create_reg): Likewise.
8562
8563 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8564
8565         * Makefile.in: Add arch/tdesc.c
8566         * common/tdesc.c: New file.
8567         * common/tdesc.h (tdesc_element_visitor): Move to here.
8568         (tdesc_element): Likewise.
8569         (tdesc_reg): Likewise.
8570         (tdesc_reg_up): Likewise.
8571         * regformats/regdef.h (reg): Add offset to constructors.
8572         * target-descriptions.c (tdesc_element_visitor): Move from here.
8573         (tdesc_element): Likewise.
8574         (tdesc_reg): Likewise.
8575         (tdesc_reg_up): Likewise.
8576
8577 2018-04-17  Tom Tromey  <tom@tromey.com>
8578
8579         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8580         discriminant field.
8581
8582 2018-04-17  Tom Tromey  <tom@tromey.com>
8583
8584         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8585
8586 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8587
8588         * symtab.c (print_symbol_info): Skip printing filename and line
8589         number when `last' is NULL.
8590         (symtab_symbol_info): Use empty string instead of NULL for first
8591         invocation of print_symbol_info.
8592         (rbreak_command): Pass NULL to `last' parameter of
8593         print_symbol_info.
8594
8595 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8596
8597         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8598         instead of nullptr.
8599
8600 2018-04-16  Pedro Alves  <palves@redhat.com>
8601
8602         * MAINTAINERS (sh): Remove.
8603         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8604         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8605         (ALLDEPFILES): Remove sh64-tdep.c.
8606         * NEWS: Mentions that support for SH-5/SH64 is removed.
8607         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8608         (sh*-*-openbsd*): Ditto.
8609         (sh64-*-elf*): Remove.
8610         (sh*): Remove.
8611         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8612         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8613         * sh-tdep.c: No longer include "sh64-tdep.h".
8614         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8615         * sh64-tdep.c, sh64-tdep.h: Remove files.
8616
8617 2018-04-16  Pedro Alves  <palves@redhat.com>
8618
8619         * MAINTAINERS: Remove m88k.
8620         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8621         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8622         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8623         * NEWS: Mention that support for m88k was removed.
8624         * configure.host (m88*-*-*): Remove support.
8625         * configure.nat (m88k-*-*): Remove support.
8626         * configure.tgt (m88*-*-openbsd*): Remove.
8627         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8628
8629 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8630
8631         * configure.tgt (x86_tobjs): New variable.
8632         (amd64_tobjs, i386_tobjs): Use it.
8633
8634 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8635
8636         * symtab.c (print_symbol_info): Precede the symbol definition by
8637         the line number when available.
8638         * NEWS: Advertise this enhancement.
8639
8640 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8641
8642         * NEWS (New options): announce set/show record btrace cpu.
8643         * btrace.c: Include record-btrace.h.
8644         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8645         the vendor is unknown.
8646         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8647         Maybe overwrite the btrace configuration's cpu.
8648         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8649         (btrace_fetch): Add cpu parameter.  Update callers.
8650         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8651         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8652         errata workarounds if the vendor is unknown.
8653         * python/py-record-btrace.c: Include record-btrace.h.
8654         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8655         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8656         * record-btrace.c (record_btrace_cpu_state_kind): New.
8657         (record_btrace_cpu): New.
8658         (set_record_btrace_cpu_cmdlist): New.
8659         (record_btrace_get_cpu): New.
8660         (require_btrace_thread, record_btrace_info)
8661         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8662         (cmd_set_record_btrace_cpu_none): New.
8663         (cmd_set_record_btrace_cpu_auto): New.
8664         (cmd_set_record_btrace_cpu): New.
8665         (cmd_show_record_btrace_cpu): New.
8666         (_initialize_record_btrace): Initialize set/show record btrace cpu
8667         commands.
8668         * record-btrace.h (record_btrace_get_cpu): New.
8669
8670 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8671
8672         * record.c (set_record_command): Fix typo in message.
8673
8674 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8675
8676         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8677
8678 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8679
8680         * infrun.c (process_event_stop_test): Call
8681         gdbarch_in_indirect_branch_thunk.
8682         * gdbarch.sh (in_indirect_branch_thunk): New.
8683         * gdbarch.c: Regenerated.
8684         * gdbarch.h: Regenerated.
8685         * x86-tdep.h: New.
8686         * x86-tdep.c: New.
8687         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8688         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8689         (ALLDEPFILES): Add x86-tdep.c.
8690         * arch-utils.h (default_in_indirect_branch_thunk): New.
8691         * arch-utils.c (default_in_indirect_branch_thunk): New.
8692         * i386-tdep: Include x86-tdep.h.
8693         (i386_in_indirect_branch_thunk): New.
8694         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8695         function.
8696         * amd64-tdep: Include x86-tdep.h.
8697         (amd64_in_indirect_branch_thunk): New.
8698         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8699
8700 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8701
8702         PR gdb/23053
8703         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8704         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8705         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8706         regression.
8707
8708 2018-04-12  Tom Tromey  <tom@tromey.com>
8709
8710         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8711         (rust_evaluate_subexp): Likewise.
8712
8713 2018-04-12  Pedro Alves  <palves@redhat.com>
8714
8715         * procfs.c (procfs_detach): Make forward declaration's prototype
8716         match definition's protototype.
8717         (proc_get_LDT_entry): Remove stale do_cleanups call.
8718
8719 2018-04-12  Pedro Alves  <palves@redhat.com>
8720
8721         * target.h (target_ops::to_has_exited): Delete.
8722         (target_has_exited): Delete.
8723         * target-delegates.c: Regenerate.
8724
8725 2018-04-11  Pedro Alves  <palves@redhat.com>
8726
8727         * target.c (fileio_fh_t::t): Add comment.
8728         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8729         (target_fileio_close): Handle a NULL target.
8730         (invalidate_fileio_fh): New.
8731         (target_close): Call it.
8732         * remote.c (remote_hostio_send_command): No longer check whether
8733         remote_desc is open.
8734
8735 2018-04-11  Pedro Alves  <palves@redhat.com>
8736
8737         * target.c (fileio_fh_t): Make it a named struct instead of a
8738         typedef.
8739         (fileio_fh_t::is_closed): New method.
8740         (DEF_VEC_O (fileio_fh_t)): Remove.
8741         (fileio_fhandles): Now a std::vector.
8742         (is_closed_fileio_fh): Delete.
8743         (acquire_fileio_fd): Adjust.  Rename parameters.
8744         (release_fileio_fd): Adjust.
8745         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8746         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8747         (target_fileio_close): Adjust.
8748
8749 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8750
8751         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8752         index.
8753
8754 2018-04-10  Pedro Alves  <palves@redhat.com>
8755
8756         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8757         (scoped_finish_thread_state): New class.
8758         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8759         cleanup.
8760         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8761         (fetch_inferior_event, normal_stop): Likewise.
8762         * thread.c (finish_thread_state_cleanup): Delete.
8763
8764 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8765             Pedro Alves  <palves@redhat.com>
8766
8767         * value.c: Include "selftest.h" and "common/array-view.h".
8768         (struct range) <operator ==>: New.
8769         (test_ranges_contain): New.
8770         (check_ranges_vector): New.
8771         (test_insert_into_bit_range_vector): New.
8772         (_initialize_values): Register selftests.
8773         * common/array-view.h (operator==, operator!=): New.
8774
8775 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8776
8777         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8778         an iterator.
8779         * inline-frame.c: Include <algorithm>.
8780         (struct inline_state): Add constructor.
8781         (inline_state_s): Remove.
8782         (DEF_VEC_O(inline_state_s)): Remove.
8783         (inline_states): Change type to std::vector.
8784         (find_inline_frame_state): Adjust to std::vector.
8785         (allocate_inline_frame_state): Remove.
8786         (clear_inline_frame_state): Adjust to std::vector.
8787         (skip_inline_frames): Adjust to std::vector.
8788
8789 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8790
8791         * tracepoint.h (struct trace_state_variable): Add constructor.
8792         <name>: Change type to std::string.
8793         * tracepoint.c (tsv_s): Remove.
8794         (DEF_VEC_O(tsv_s)): Remove.
8795         (tvariables): Change to std::vector.
8796         (create_trace_state_variable): Adjust to std::vector.
8797         (find_trace_state_variable): Likewise.
8798         (find_trace_state_variable_by_number): Likewise.
8799         (delete_trace_state_variable): Likewise.
8800         (trace_variable_command): Adjust to std::string.
8801         (delete_trace_variable_command): Likewise.
8802         (tvariables_info_1): Adjust to std::vector.
8803         (save_trace_state_variables): Likewise.
8804         (start_tracing): Likewise.
8805         (merge_uploaded_trace_state_variables): Adjust to std::vector
8806         and std::string.
8807         * target.h (struct target_ops)
8808         <to_download_trace_state_variable>: Pass reference to
8809         trace_state_variable.
8810         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8811         * target-delegates.c: Re-generate.
8812         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8813         (mi_tsv_deleted): Likewise.
8814         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8815         * remote.c (remote_download_trace_state_variable): Change
8816         pointer to reference and adjust.
8817         * make-target-delegates (parse_argtypes): Handle references.
8818         (write_function_header): Likewise.
8819         (munge_type): Likewise.
8820
8821 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8822
8823         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8824         string_view-selftests.c.
8825         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8826         testsuite.
8827         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8828         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8829         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8830         * unittests/basic_string_view/element_access/char/1.cc:
8831         Likewise.
8832         * unittests/basic_string_view/element_access/char/empty.cc:
8833         Likewise.
8834         * unittests/basic_string_view/element_access/char/front_back.cc:
8835         Likewise.
8836         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8837         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8838         Likewise.
8839         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8840         Likewise.
8841         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8842         Likewise.
8843         * unittests/basic_string_view/operations/compare/char/1.cc:
8844         Likewise.
8845         * unittests/basic_string_view/operations/compare/char/13650.cc:
8846         Likewise.
8847         * unittests/basic_string_view/operations/copy/char/1.cc:
8848         Likewise.
8849         * unittests/basic_string_view/operations/data/char/1.cc:
8850         Likewise.
8851         * unittests/basic_string_view/operations/find/char/1.cc:
8852         Likewise.
8853         * unittests/basic_string_view/operations/find/char/2.cc:
8854         Likewise.
8855         * unittests/basic_string_view/operations/find/char/3.cc:
8856         Likewise.
8857         * unittests/basic_string_view/operations/find/char/4.cc:
8858         Likewise.
8859         * unittests/basic_string_view/operations/rfind/char/1.cc:
8860         Likewise.
8861         * unittests/basic_string_view/operations/rfind/char/2.cc:
8862         Likewise.
8863         * unittests/basic_string_view/operations/rfind/char/3.cc:
8864         Likewise.
8865         * unittests/basic_string_view/operations/substr/char/1.cc:
8866         Likewise.
8867         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8868         * unittests/string_view-selftests.c: New file.
8869
8870 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8871
8872         * unittests/basic_string_view/capacity/1.cc: New file.
8873         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8874         * unittests/basic_string_view/cons/char/1.cc: New file.
8875         * unittests/basic_string_view/cons/char/2.cc: New file.
8876         * unittests/basic_string_view/cons/char/3.cc: New file.
8877         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8878         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8879         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8880         * unittests/basic_string_view/element_access/char/1.cc: New file.
8881         * unittests/basic_string_view/element_access/char/2.cc: New file.
8882         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8883         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8884         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8885         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8886         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8887         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8888         * unittests/basic_string_view/include.cc: New file.
8889         * unittests/basic_string_view/inserters/char/1.cc: New file.
8890         * unittests/basic_string_view/inserters/char/2.cc: New file.
8891         * unittests/basic_string_view/inserters/char/3.cc: New file.
8892         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8893         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8894         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8895         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8896         * unittests/basic_string_view/literals/types.cc: New file.
8897         * unittests/basic_string_view/literals/values.cc: New file.
8898         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8899         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8900         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8901         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8902         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8903         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8904         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8905         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8906         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8907         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8908         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8909         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8910         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8911         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8912         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8913         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8914         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8915         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8916         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8917         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8918         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8919         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8920         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8921         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8922         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8923         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8924         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8925         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8926         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8927         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8928         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8929         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8930         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8931         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8932         * unittests/basic_string_view/operators/char/2.cc: New file.
8933         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8934         * unittests/basic_string_view/range_access/char/1.cc: New file.
8935         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8936         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8937         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8938         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8939         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8940         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8941         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8942         * unittests/basic_string_view/typedefs.cc: New file.
8943         * unittests/basic_string_view/types/1.cc: New file.
8944
8945 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8946
8947         * common/gdb_string_view.h: Remove libstdc++ implementation
8948         details, adjust to gdb reality.
8949         * common/gdb_string_view.tcc: Likewise.
8950         * cli/cli-script.c (struct string_view): Remove.
8951         (user_args) <m_args>: Change element type to gdb::string_view.
8952         (user_args::insert_args): Adjust.
8953
8954 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8955
8956         * common/gdb_string_view.h: New file.
8957         * common/gdb_string_view.tcc: New file.
8958
8959 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8960
8961         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8962         * configure: Re-generate.
8963
8964 2018-04-09  Pedro Alves  <palves@redhat.com>
8965
8966         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8967         (set_target_gdbarch): Call
8968         gdb::observers::architecture_changed.notify instead of
8969         observer_notify_architecture_changed.
8970
8971 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8972
8973         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8974         (do_restore_current_traceframe_cleanup): Remove.
8975         (restore_current_traceframe_cleanup_dtor): Remove.
8976         (make_cleanup_restore_current_traceframe): Remove.
8977         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8978         New.
8979         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8980         * infrun.c (fetch_inferior_event): Use
8981         scoped_restore_current_traceframe.
8982
8983 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8984
8985         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8986         Remove.
8987         <n_allocated_type_units>: Remove.
8988         <all_type_units>: Change to std::vector.
8989         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8990         to std::vector change.
8991         (dwarf2_per_objfile::get_cutu): Likewise.
8992         (dwarf2_per_objfile::get_tu): Likewise.
8993         (create_signatured_type_table_from_index): Likewise.
8994         (create_signatured_type_table_from_debug_names): Likewise.
8995         (dw2_symtab_iter_next): Likewise.
8996         (dw2_print_stats): Likewise.
8997         (dw2_expand_all_symtabs): Likewise.
8998         (dw2_expand_marked_cus): Likewise.
8999         (dw2_debug_names_iterator::next): Likewise.
9000         (dwarf2_initialize_objfile): Likewise.
9001         (add_signatured_type_cu_to_table): Likewise.
9002         (create_all_type_units): Likewise.
9003         (add_type_unit): Likewise.
9004         (struct tu_abbrev_offset): Add constructor.
9005         (build_type_psymtabs_1): Adjust to std::vector change.
9006         (print_tu_stats): Likewise.
9007         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9008         (write_debug_names): Likewise.
9009
9010 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9011
9012         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9013         Make an std::vector.
9014         <n_comp_units>: Remove.
9015         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9016         to std::vector change.
9017         (dwarf2_per_objfile::get_cutu): Likewise.
9018         (dwarf2_per_objfile::get_cu): Likewise.
9019         (create_cus_from_index): Likewise.
9020         (create_addrmap_from_index): Likewise.
9021         (create_addrmap_from_aranges): Likewise.
9022         (dwarf2_read_index): Likewise.
9023         (dw2_find_last_source_symtab): Likewise.
9024         (dw2_map_symtabs_matching_filename): Likewise.
9025         (dw2_symtab_iter_next): Likewise.
9026         (dw2_print_stats): Likewise.
9027         (dw2_expand_all_symtabs): Likewise.
9028         (dw2_expand_symtabs_with_fullname): Likewise.
9029         (dw2_expand_marked_cus): Likewise.
9030         (dw2_map_symbol_filenames): Likewise.
9031         (create_cus_from_debug_names): Likewise.
9032         (dwarf2_read_debug_names): Likewise.
9033         (dw2_debug_names_iterator::next): Likewise.
9034         (dwarf2_initialize_objfile): Likewise.
9035         (set_partial_user): Likewise.
9036         (dwarf2_build_psymtabs_hard): Likewise.
9037         (read_comp_units_from_section): Remove arguments, adjust to
9038         std::vector change.
9039         (create_all_comp_units): Adjust to std::vector and
9040         read_comp_units_from_section changes.
9041         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9042         change.
9043         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9044         (psyms_seen_size): Likewise.
9045         (write_gdbindex): Likewise.
9046         (write_debug_names): Likewise.
9047
9048 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9049
9050         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9051         with dwarf2_per_objfile.
9052         (create_cus_from_index): Likewise.
9053         (create_signatured_type_table_from_index): Likewise.
9054         (dwarf2_read_index): Likewise.
9055         (dwarf2_initialize_objfile): Likewise.
9056         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9057         per_cu rather than get_dwarf2_per_objfile.
9058
9059 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9060
9061         * dwarf2read.h (struct signatured_type): Forward declare.
9062         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9063         New methods.
9064         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9065         (dw2_get_cutu): ...this.
9066         (dwarf2_per_objfile::get_cu): Rename from...
9067         (dw2_get_cu): ...this.
9068         (dwarf2_per_objfile::get_tu): New.
9069         (create_addrmap_from_index): Adjust.
9070         (create_addrmap_from_aranges): Adjust.
9071         (dw2_find_last_source_symtab): Adjust.
9072         (dw2_map_symtabs_matching_filename): Adjust.
9073         (dw2_symtab_iter_next): Adjust.
9074         (dw2_print_stats): Adjust.
9075         (dw2_expand_all_symtabs): Adjust.
9076         (dw2_expand_symtabs_with_fullname): Adjust.
9077         (dw2_expand_marked_cus): Adjust.
9078         (dw_expand_symtabs_matching_file_matcher): Adjust.
9079         (dw2_map_symbol_filenames): Adjust.
9080         (dw2_debug_names_iterator::next): Adjust.
9081         (dwarf2_initialize_objfile): Adjust.
9082         (set_partial_user): Adjust.
9083         (dwarf2_build_psymtabs_hard): Adjust.
9084
9085 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9086
9087         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9088         Remove unused variables.
9089         (dw2_map_symtabs_matching_filename): Likewise.
9090         (dwarf2_record_block_ranges): Likewise.
9091         (dwarf2_read_addr_index): Likewise.
9092         (follow_die_offset): Likewise.
9093
9094 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9095
9096         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9097         to symbol_file_add_main.
9098
9099 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9100
9101         PR mi/22299
9102         * mi/mi-console.c (do_fputc_async_safe): New.
9103         (mi_console_file::write_async_safe): New.
9104         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9105         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9106         New.
9107         * ui-file.c (ui_file::putstrn): Adjust call to
9108         fputstrn_unfiltered.
9109         * utils.c (printchar): Replace do_fputs and do_fprintf
9110         parameters by do_fputc.
9111         (fputstr_filtered): Adjust call to printchar.
9112         (fputstr_unfiltered): Likewise.
9113         (fputstrn_filtered): Likewise.
9114         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9115         printchar.
9116         * utils.h (do_fputc_ftype): New typedef.
9117         (fputstrn_unfiltered): Add do_fputc parameter.
9118
9119 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9120
9121         * regformats/i386/i386-avx.dat: Remove.
9122
9123 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9124
9125         PR gdb/22979
9126         * amd64-tdep.c (amd64_none_init_abi): New function.
9127         (amd64_x32_none_init_abi): New function.
9128         (_initialize_amd64_tdep): Register handlers for x86-64 and
9129         x64_32 with GDB_OSABI_NONE.
9130         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9131         GDB_OSABI_NONE osabi.
9132
9133 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9134
9135         PR gdb/22980
9136         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9137         GDB_OSABI_NONE.
9138         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9139         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9140
9141 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9142
9143         * common/byte-vector.h (char_vector): New type.
9144         * target.h (target_read_alloc): Return
9145         gdb::optional<byte_vector>.
9146         (target_read_stralloc): Return gdb::optional<char_vector>.
9147         (target_get_osdata): Return gdb::optional<char_vector>.
9148         * target.c (target_read_alloc_1): Templatize.  Replacement
9149         manual memory management with vector.
9150         (target_read_alloc): Change return type, adjust.
9151         (target_read_stralloc): Change return type, adjust.
9152         (target_get_osdata): Change return type, adjust.
9153         * auxv.c (struct auxv_info) <length>: Remove.
9154         <data>: Change type to gdb::optional<byte_vector>.
9155         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9156         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9157         (target_auxv_search): Adjust.
9158         (fprint_target_auxv): Adjust.
9159         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9160         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9161         (linux_make_corefile_notes): Adjust.
9162         * osdata.c (get_osdata): Adjust.
9163         * remote.c (remote_get_threads_with_qxfer): Adjust.
9164         (remote_memory_map): Adjust.
9165         (remote_traceframe_info): Adjust.
9166         (btrace_read_config): Adjust.
9167         (remote_read_btrace): Adjust.
9168         (remote_pid_to_exec_file): Adjust.
9169         * solib-aix.c (solib_aix_get_library_list): Adjust.
9170         * solib-dsbt.c (decode_loadmap): Don't free buf.
9171         (dsbt_get_initial_loadmaps): Adjust.
9172         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9173         * solib-target.c (solib_target_current_sos): Adjust.
9174         * tracepoint.c (sdata_make_value): Adjust.
9175         * xml-support.c (xinclude_start_include): Adjust.
9176         (xml_fetch_content_from_file): Adjust.
9177         * xml-support.h (xml_fetch_another): Change return type.
9178         (xml_fetch_content_from_file): Change return type.
9179         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9180         * xml-tdesc.c (file_read_description_xml): Adjust.
9181         (fetch_available_features_from_target): Change return type.
9182         (target_fetch_description_xml): Adjust.
9183         (target_read_description_xml): Adjust.
9184
9185 2018-04-06  Tom Tromey  <tom@tromey.com>
9186
9187         * value.c (~value): Update.
9188         (struct value) <contents>: Now unique_xmalloc_ptr.
9189         (value_contents_bits_eq, allocate_value_contents)
9190         (value_contents_raw, value_contents_all_raw)
9191         (value_contents_for_printing, value_contents_for_printing_const)
9192         (set_value_enclosing_type): Update.
9193
9194 2018-04-06  Tom Tromey  <tom@tromey.com>
9195
9196         * value.c (range_s): Remove typedef, VEC.
9197         (struct range): Add operator<.
9198         (range_lessthan): Remove.
9199         (ranges_contain): Change type.
9200         (~value): Update.
9201         (struct value) <unavailable, optimized_out>: Now std::vector.
9202         (value_entirely_available)
9203         (value_entirely_covered_by_range_vector)
9204         (value_entirely_unavailable, value_entirely_optimized_out):
9205         Update.
9206         (insert_into_bit_range_vector): Change argument type.
9207         (find_first_range_overlap): Likewise.
9208         (struct ranges_and_idx, value_contents_bits_eq)
9209         (require_not_optimized_out, require_available): Update.
9210         (ranges_copy_adjusted): Change argument types.
9211         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9212
9213 2018-04-06  Tom Tromey  <tom@tromey.com>
9214
9215         * value.c (~value): Update.
9216         (struct value) <parent>: Now a value_ref_ptr.
9217         (value_parent, set_value_parent, value_address, value_copy):
9218         Update.
9219
9220 2018-04-06  Tom Tromey  <tom@tromey.com>
9221
9222         * value.c (struct value): Add constructor, destructor, and member
9223         initializers.
9224         (allocate_value_lazy, value_decref): Update.
9225
9226 2018-04-06  Tom Tromey  <tom@tromey.com>
9227
9228         * value.c (struct value) <released, next>: Remove.
9229         (all_values): Now a std::vector.
9230         (allocate_value_lazy): Update.
9231         (value_next): Remove.
9232         (value_mark, value_free_to_mark, release_value)
9233         (value_release_to_mark): Update.
9234
9235 2018-04-06  Tom Tromey  <tom@tromey.com>
9236
9237         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9238         (free_value_chain): Remove.
9239         * value.c (free_value_chain): Remove.
9240         (value_release_to_mark): Return a std::vector.
9241         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9242         std::vector.
9243         (check_condition): Update.
9244         * eval.c (fetch_subexp_value): Change "val_chain" to a
9245         std::vector.
9246         * breakpoint.c (update_watchpoint): Update.
9247         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9248
9249 2018-04-06  Tom Tromey  <tom@tromey.com>
9250
9251         * value.h (free_all_values): Remove.
9252         * value.c (free_all_values): Remove.
9253
9254 2018-04-06  Tom Tromey  <tom@tromey.com>
9255
9256         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9257         (value_history_chain, value_history_count): Remove.
9258         (value_history): New global.
9259         (record_latest_value, access_value_history, show_values)
9260         (preserve_values): Update.
9261
9262 2018-04-06  Tom Tromey  <tom@tromey.com>
9263
9264         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9265         * varobj.c (varobj_set_display_format, varobj_set_value)
9266         (install_default_visualizer, construct_visualizer)
9267         (install_new_value, ~varobj, varobj_get_value_type)
9268         (my_value_of_variable, varobj_editable_p): Update.
9269         * c-varobj.c (c_describe_child, c_value_of_variable)
9270         (cplus_number_of_children, cplus_describe_child): Update.
9271         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9272         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9273         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9274
9275 2018-04-06  Tom Tromey  <tom@tromey.com>
9276
9277         * printcmd.c (last_examine_address): Change type to
9278         value_ref_ptr.
9279         (do_examine, x_command): Update.
9280
9281 2018-04-06  Tom Tromey  <tom@tromey.com>
9282
9283         * value.c (release_value): Update.
9284         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9285         (struct bpstats) <val>: Now a value_ref_ptr.
9286         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9287         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9288         (~watchpoint, print_it_watchpoint, watch_command_1)
9289         (invalidate_bp_value_on_memory_change): Update.
9290
9291 2018-04-06  Tom Tromey  <tom@tromey.com>
9292
9293         * varobj.c (varobj_clear_saved_item)
9294         (update_dynamic_varobj_children, install_new_value, ~varobj):
9295         Update.
9296         * value.h (value_incref): Move declaration earlier.
9297         (value_decref): Rename from value_free.
9298         (struct value_ref_policy): New.
9299         (value_ref_ptr): New typedef.
9300         (struct value_deleter): Remove.
9301         (gdb_value_up): Remove typedef.
9302         (release_value): Change return type.
9303         (release_value_or_incref): Remove.
9304         * value.c (set_value_parent): Update.
9305         (value_incref): Change return type.
9306         (value_decref): Rename from value_free.
9307         (value_free_to_mark, free_all_values, free_value_chain): Update.
9308         (release_value): Return value_ref_ptr.
9309         (release_value_or_incref): Remove.
9310         (record_latest_value, set_internalvar, clear_internalvar):
9311         Update.
9312         * stack.c (info_frame_command): Don't call value_free.
9313         * python/py-value.c (valpy_dealloc, valpy_new)
9314         (value_to_value_object): Update.
9315         * printcmd.c (do_examine): Update.
9316         * opencl-lang.c (lval_func_free_closure): Update.
9317         * mi/mi-main.c (register_changed_p): Don't call value_free.
9318         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9319         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9320         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9321         value_free.
9322         * guile/scm-value.c (vlscm_free_value_smob)
9323         (vlscm_scm_from_value): Update.
9324         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9325         (frame_unwind_register_unsigned, get_frame_register_bytes)
9326         (put_frame_register_bytes): Don't call value_free.
9327         * findvar.c (address_from_register): Don't call value_free.
9328         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9329         * dwarf2loc.c (entry_data_value_free_closure)
9330         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9331         (dwarf2_evaluate_loc_desc_full): Update.
9332         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9333         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9334         (~watchpoint, watch_command_1)
9335         (invalidate_bp_value_on_memory_change): Update.
9336         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9337
9338 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9339
9340         PR gdb/23022
9341         * warning.m4: Add -Wno-error=deprecated-register.
9342         * configure: Re-generate.
9343
9344 2018-04-05  Tom Tromey  <tom@tromey.com>
9345
9346         * linespec.h: Remove include of "vec.h".
9347
9348 2018-04-05  Tom Tromey  <tom@tromey.com>
9349
9350         * linespec.c (typep): Remove typedef.
9351         (find_methods, find_superclass_methods): Take a std::vector.
9352         (find_method): Use std::vector.
9353
9354 2018-04-05  Tom Tromey  <tom@tromey.com>
9355
9356         * utils.c (compare_strings): Remove.
9357         * utils.h (compare_strings): Remove.
9358         * objc-lang.h (find_imps): Update.
9359         * objc-lang.c (find_methods): Take a std::vector.
9360         (uniquify_strings, find_imps): Likewise.
9361         * linespec.c (find_methods): Take a std::vector.
9362         (decode_objc): Use std::vector.
9363         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9364         a std::vector.
9365         (find_method, find_function_symbols): Use std::vector.
9366
9367 2018-04-05  Tom Tromey  <tom@tromey.com>
9368
9369         * completer.c (completion_tracker::completion_tracker): Remove
9370         cast.
9371         (completion_tracker::discard_completions): Likewise.
9372         * breakpoint.c (ambiguous_names_p): Remove cast.
9373         * ada-lang.c (_initialize_ada_language): Remove cast.
9374         * utils.h (streq): Update.
9375         (streq_hash): Add new declaration.
9376         * utils.c (streq): Return bool.
9377         (streq_hash): New function.
9378
9379 2018-04-05  Tom Tromey  <tom@tromey.com>
9380
9381         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9382         Remove a string copy.
9383
9384 2018-04-05  Tom Tromey  <tom@tromey.com>
9385
9386         * linespec.c (filter_results): Use std::vector.
9387         (decode_line_2, decode_line_full): Update.
9388
9389 2018-04-05  Tom Tromey  <tom@tromey.com>
9390
9391         * linespec.c (canonical_to_fullform): Return std::string.
9392         (filter_results): Update.
9393         (struct decode_line_2_item): Add constructor.
9394         <fullform, displayform>: Now std::string.
9395         (decode_line_2_compare_items): Now a std::sort comparator.
9396         (decode_line_2): Update.
9397
9398 2018-04-05  Tom Tromey  <tom@tromey.com>
9399
9400         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9401         (unexpected_linespec_error): Update.
9402         (linespec_parse_basic, parse_linespec): Update.
9403
9404 2018-04-05  Tom Tromey  <tom@tromey.com>
9405
9406         * linespec.c (linespec_parse_basic): Reindent.
9407
9408 2018-04-05  Tom Tromey  <tom@tromey.com>
9409
9410         * minsyms.h (iterate_over_minimal_symbols): Update.
9411         * minsyms.c (iterate_over_minimal_symbols): Take a
9412         gdb::function_view.
9413         * linespec.c (struct collect_minsyms): Remove.
9414         (compare_msyms): Now a std::sort comparator.
9415         (add_minsym): Add parameters.
9416         (search_minsyms_for_name): Update.  Use std::vector.
9417
9418 2018-04-03  Tom Tromey  <tom@tromey.com>
9419
9420         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9421         gdb::byte_vector.
9422
9423 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9424
9425         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9426
9427 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9428
9429         PR gdb/16959
9430         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9431         printing static type.
9432
9433 2018-04-01  Tom Tromey  <tom@tromey.com>
9434
9435         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9436         (rs6000_xfer_shared_libraries): Update.
9437
9438 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9439
9440         * common/gdb_vecs.h (char_ptr): Remove.
9441         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9442
9443 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9444
9445         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9446         with std::vector.
9447         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9448
9449 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9450
9451         * tracepoint.h (struct uploaded_tp): Initialize fields.
9452         <actions, step_actions, cmd_strings>: Change type to
9453         std::vector<char *>.
9454         * tracepoint.c (get_uploaded_tp): Allocate with new.
9455         (free_uploaded_tps): Free with delete.
9456         (parse_tracepoint_definition): Adjust to std::vector change.
9457         * breakpoint.c (read_uploaded_action): Likewise.
9458         (create_tracepoint_from_upload): Likewise.
9459         * ctf.c (ctf_write_uploaded_tp): Likewise.
9460         (SET_ARRAY_FIELD): Likewise.
9461         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9462
9463 2018-03-30  Tom Tromey  <tom@tromey.com>
9464
9465         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9466         std::unique_ptr.
9467         (svr4_keep_data_in_core): Update.
9468         (svr4_read_so_list): Update.
9469
9470 2018-03-30  Tom Tromey  <tom@tromey.com>
9471
9472         * windows-nat.c (handle_output_debug_string, handle_exception):
9473         Update.
9474         * target.h (target_read_string): Update.
9475         * target.c (target_read_string): Change "string" to
9476         unique_xmalloc_ptr.
9477         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9478         Update.
9479         * solib-frv.c (frv_current_sos): Update.
9480         * solib-dsbt.c (dsbt_current_sos): Update.
9481         * solib-darwin.c (darwin_current_sos): Update.
9482         * linux-thread-db.c (inferior_has_bug): Update.
9483         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9484         Update.  Remove alloca.
9485         * ada-lang.c (ada_main_name): Update.
9486
9487 2018-03-30  Tom Tromey  <tom@tromey.com>
9488
9489         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9490         (struct dwo_file_deleter): New.
9491         (dwo_file_up): New typedef.
9492         (open_and_init_dwo_file): Use dwo_file_up.
9493         (free_dwo_file_cleanup): Remove.
9494
9495 2018-03-30  Tom Tromey  <tom@tromey.com>
9496
9497         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9498         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9499
9500 2018-03-30  Tom Tromey  <tom@tromey.com>
9501
9502         * dwarf2read.c (class free_cached_comp_units): New class.
9503         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9504         (free_cached_comp_units): Remove function.
9505
9506 2018-03-30  Tom Tromey  <tom@tromey.com>
9507
9508         * utils.h (make_cleanup_unpush_target): Remove.
9509         * inf-ptrace.c (struct target_unpusher): New.
9510         (target_unpush_up) New typedef.
9511         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9512         target_unpush_up.
9513         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9514
9515 2018-03-27  Tom Tromey  <tom@tromey.com>
9516
9517         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9518
9519 2018-03-27  Pedro Alves  <palves@redhat.com>
9520             Tom Tromey  <tom@tromey.com>
9521
9522         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9523         destructor.  Now a class.
9524         (gdb_readline_wrapper_cleanup): Remove function.
9525         (gdb_readline_wrapper): Remove cleanups.
9526
9527 2018-03-27  Tom Tromey  <tom@tromey.com>
9528
9529         * typeprint.h (struct type_print_options) <local_typedefs,
9530         global_typedefs>: Remove "struct" keyword.
9531         (class typedef_hash_table): New class.
9532         (recursively_update_typedef_hash, add_template_parameters)
9533         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9534         (find_typedef_in_hash): Don't declare.
9535         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9536         (typedef_hash_table::recursively_update): Rename from
9537         recursively_update_typedef_hash.  Now a member.
9538         (typedef_hash_table::add_template_parameters): Rename from
9539         add_template_parameters.  Now a member.
9540         (typedef_hash_table::typedef_hash_table): Now a constructor;
9541         rename from create_typedef_hash.
9542         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9543         rename from free_typedef_hash.
9544         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9545         (do_free_global_table): Remove.
9546         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9547         from copy_type_recursive.
9548         (create_global_typedef_table): Remove.
9549         (typedef_hash_table::find_global_typedef): Now a member of
9550         typedef_hash_table.
9551         (typedef_hash_table::find_typedef): Rename from
9552         find_typedef_in_hash; now a member.
9553         (whatis_exp): Update.
9554         * extension.h (struct ext_lang_type_printers): Add constructor and
9555         destructor.
9556         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9557         declare.
9558         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9559         Now a constructor; rename from start_ext_lang_type_printers.
9560         (ext_lang_type_printers): Now a destructor; rename from
9561         free_ext_lang_type_printers.
9562         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9563         Update.
9564         (c_type_print_base_struct_union): Update.  Remove cleanups.
9565
9566 2018-03-27  Tom Tromey  <tom@tromey.com>
9567
9568         * dwarf-index-write.c: Include <cmath>.
9569
9570 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9571
9572         * NEWS: Add entry describing new "set|show varsize-limit" command.
9573         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9574         command.
9575         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9576         "set variable".
9577
9578 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9579
9580         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9581         dwarf-index-write.c
9582         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9583         * dwarf-index-common.c: New file.
9584         * dwarf-index-common.h: New file.
9585         * dwarf-index-write.c: New file.
9586         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9587         (struct dwarf2_section_info): Move from here.
9588         (dwarf2_section_info_def): Likewise.
9589         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9590         (offset_type): Likewise.
9591         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9592         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9593         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9594         (byte_swap): Likewise.
9595         (MAYBE_SWAP): Likewise.
9596         (dwarf2_per_cu_ptr): Likewise.
9597         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9598         (struct tu_stats): Likewise.
9599         (struct dwarf2_per_objfile): Likewise.
9600         (struct dwarf2_per_cu_data): Likewise.
9601         (struct signatured_type): Likewise.
9602         (sig_type_ptr): Likewise.
9603         (DEF_VEC_P (sig_type_ptr)): Likewise.
9604         (INDEX4_SUFFIX): Likewise.
9605         (INDEX5_SUFFIX): Likewise.
9606         (DEBUG_STR_SUFFIX): Likewise.
9607         (dwarf2_read_section): Make non-static.
9608         (mapped_index_string_hash): Move from here.
9609         (dwarf5_djb_hash): Likewise.
9610         (file_write): Likewise.
9611         (class data_buf): Likewise.
9612         (struct symtab_index_entry): Likewise.
9613         (struct mapped_symtab): Likewise.
9614         (find_slot): Likewise.
9615         (hash_expand): Likewise.
9616         (add_index_entry): Likewise.
9617         (uniquify_cu_indices): Likewise.
9618         (class c_str_view): Likewise.
9619         (class c_str_view_hasher): Likewise.
9620         (class vector_hasher): Likewise.
9621         (write_hash_table): Likewise.
9622         (psym_index_map): Likewise.
9623         (struct addrmap_index_data): Likewise.
9624         (add_address_entry): Likewise.
9625         (add_address_entry_worker): Likewise.
9626         (write_address_map): Likewise.
9627         (symbol_kind): Likewise.
9628         (write_psymbols): Likewise.
9629         (struct signatured_type_index_data): Likewise.
9630         (write_one_signatured_type): Likewise.
9631         (recursively_count_psymbols): Likewise.
9632         (recursively_write_psymbols): Likewise.
9633         (class debug_names): Likewise.
9634         (check_dwarf64_offsets): Likewise.
9635         (psyms_seen_size): Likewise.
9636         (write_gdbindex): Likewise.
9637         (write_debug_names): Likewise.
9638         (assert_file_size): Likewise.
9639         (write_psymtabs_to_index): Likewise.
9640         (save_gdb_index_command): Likewise.
9641         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9642         command.
9643         * dwarf2read.h: New file.
9644
9645 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9646
9647         PR gdb/22670
9648         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9649         symbol name if the CU's language stores symbol names in linkage
9650         format.
9651         * language.h (struct language_defn)
9652         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9653         all instances of this struct.
9654
9655 2018-03-26  Tom Tromey  <tom@tromey.com>
9656
9657         * stack.c (backtrace_command_1): Remove verbose code.
9658
9659 2018-03-26  Tom Tromey  <tom@tromey.com>
9660
9661         * python/py-framefilter.c (py_print_type): Don't catch
9662         exceptions.  Return void.
9663         (py_print_value): Likewise.
9664         (py_print_single_arg): Likewise.
9665         (enumerate_args): Don't catch exceptions.
9666         (py_print_args): Likewise.
9667         (py_print_frame): Likewise.
9668         (gdbpy_apply_frame_filter): Catch exceptions here.
9669
9670 2018-03-26  Tom Tromey  <tom@tromey.com>
9671
9672         * stack.c (_initialize_stack): Remove trailing newlines from help
9673         text.  Add "Usage" line to "backtrace" help.
9674
9675 2018-03-26  Tom Tromey  <tom@tromey.com>
9676
9677         PR python/16486:
9678         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9679
9680 2018-03-26  Tom Tromey  <tom@tromey.com>
9681
9682         * python/py-framefilter.c (py_print_single_arg): Return
9683         EXT_LANG_BT_ERROR from catch.
9684
9685 2018-03-26  Tom Tromey  <tom@tromey.com>
9686
9687         PR backtrace/15584:
9688         * stack.c (backtrace_command_1): Move some code into no-filters
9689         "if".
9690
9691 2018-03-26  Tom Tromey  <tom@tromey.com>
9692
9693         * python/py-framefilter.c (throw_quit_or_print_exception): New
9694         function.
9695         (gdbpy_apply_frame_filter): Use it.
9696
9697 2018-03-26  Tom Tromey  <tom@tromey.com>
9698
9699         PR cli/17716:
9700         * python/py-framefilter.c (py_print_type, py_print_value)
9701         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9702         RETURN_MASK_ERROR.
9703
9704 2018-03-26  Tom Tromey  <tom@tromey.com>
9705
9706         * python/py-framefilter.c (enumerate_args): Use
9707         gdb::unique_xmalloc_ptr.
9708
9709 2018-03-26  Tom Tromey  <tom@tromey.com>
9710
9711         * python/py-framefilter.c (py_print_frame): Return
9712         EXT_LANG_BT_OK.
9713         (gdbpy_apply_frame_filter): Update comment.
9714         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9715         Remove.
9716         <EXT_LANG_BT_NO_FILTERS>: Change value.
9717
9718 2018-03-26  Tom Tromey  <tom@tromey.com>
9719
9720         PR backtrace/15582:
9721         * stack.c (backtrace_command): Parse "hide" argument.
9722         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9723         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9724         constant.
9725
9726 2018-03-26  Tom Tromey  <tom@tromey.com>
9727
9728         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9729         add "flags".
9730         (backtrace_command): Remove "fulltrace", add "flags".
9731
9732 2018-03-26  Tom Tromey  <tom@tromey.com>
9733
9734         * stack.c (backtrace_command): Rewrite command line parsing.
9735
9736 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9737
9738         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9739
9740 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9741
9742         * filename-seen-cache.h: Add include guard.
9743
9744 2018-03-26  Keith Seitz  <keiths@redhat.com>
9745
9746         * symfile.c (place_section): Remove "struct" from section_addr_info
9747         in comment.
9748         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9749         "struct" keyword from section_addr_info.
9750
9751 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9752
9753         * regformats/regdef.h (reg): Add constructors.
9754
9755 2018-03-25  Pedro Alves  <palves@redhat.com>
9756
9757         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9758         if then/else bodies in var_func_name extraction.
9759
9760 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9761
9762         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9763         lookup_minimal_symbol() to find symbol entry.
9764         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9765
9766 2018-03-23  Keith Seitz  <keiths@redhat.com>
9767
9768         PR c++/22968
9769         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9770         nested type definitions for C++, too.
9771
9772 2018-03-23  Tom Tromey  <tom@tromey.com>
9773
9774         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9775         a typedef.
9776         (macho_register_oso): Remove.
9777         (macho_symtab_read): Take a std::vector.
9778         (oso_el_compare_name): Now a std::sort comparator.
9779         (macho_symfile_read_all_oso): Take a std::vector.
9780         (macho_symfile_read): Use std::vector.  Remove cleanups.
9781
9782 2018-03-22  Tom Tromey  <tom@tromey.com>
9783
9784         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9785         (record_full_goto_bookmark): Use std::string.
9786
9787 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9788
9789         PR tdep/18295
9790         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9791         a single mask.
9792
9793 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9794
9795         * rs6000-tdep.c (store_insn_p): New function.
9796         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9797         and cr_reg to their unshifted values. Use store_insn_p to
9798         match LR saves using either R1 or fdata->alloca_reg. Use
9799         store_insn_p to match CR saves. Set alloca_reg_offset
9800         when alloca_reg and framep are set. Remove lr_reg shift
9801         when assigning to fdata->lr_register.
9802
9803 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9804
9805         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9806         command line args instead of emitting a warning.
9807
9808 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9809
9810         * tracepoint.h (struct static_tracepoint_marker): Initialize
9811         fields, define default constructor, move constructor and move
9812         assignment, disable the rest.
9813         <str_id, extra>: Make std::string.
9814         (release_static_tracepoint_marker): Remove.
9815         (free_current_marker): Remove.
9816         * tracepoint.c (free_current_marker): Remove.
9817         (parse_static_tracepoint_marker_definition): Adjust to
9818         std::string, use new hex2str overload.
9819         (release_static_tracepoint_marker): Remove.
9820         (print_one_static_tracepoint_marker): Get marker by reference
9821         and adjust to std::string.
9822         (info_static_tracepoint_markers_command): Adjust to std::vector
9823         changes
9824         * target.h (static_tracepoint_marker_p): Remove typedef.
9825         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9826         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9827         bool.
9828         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9829         * target-debug.h
9830         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9831         (target_debug_print_std_vector_static_tracepoint_marker): New.
9832         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9833         to...
9834         (target_debug_print_static_tracepoint_marker_p): ... this.
9835         * target-delegates.c: Re-generate.
9836         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9837         Make std::string.
9838         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9839         (decode_static_tracepoint_spec): Adjust to std::vector.
9840         (tracepoint_print_one_detail): Adjust to std::string.
9841         (strace_marker_decode_location): Adjust to std::string.
9842         (update_static_tracepoint): Adjust to std::string, remove call
9843         to release_static_tracepoint_marker.
9844         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9845         Adjust to std::vector.
9846         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9847         (remote_static_tracepoint_markers_by_strid): Adjust to
9848         std::vector.
9849         * common/rsp-low.h (hex2str): New overload with explicit count
9850         of bytes.
9851         * common/rsp-low.c (hex2str): New overload with explicit count
9852         of bytes.
9853         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9854         (_initialize_rsp_low_selftests): Add test_hex2str test.
9855         * unittests/tracepoint-selftests.c
9856         (test_parse_static_tracepoint_marker_definition): Adjust to
9857         std::string.
9858
9859 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9860
9861         * tracepoint.c (parse_static_tracepoint_marker_definition):
9862         Consider case where the definition is followed by more
9863         definitions.
9864         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9865         tracepoint-selftests.c.
9866         * unittests/tracepoint-selftests.c: New.
9867
9868 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9869
9870         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9871         Carvalho.
9872
9873 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9874
9875         * symtab.c (find_pc_sect_line): fixed indentation.
9876
9877 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9878
9879         * symtab.c (find_pc_sect_line): now uses binary search.
9880
9881 2018-03-19  Tom Tromey  <tom@tromey.com>
9882
9883         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9884         "IDENT" production.
9885
9886 2018-03-19  Pedro Alves  <palves@redhat.com>
9887             Tom Tromey  <tom@tromey.com>
9888
9889         * unittests/observable-selftests.c: New file.
9890         * common/observable.h: New file.
9891         * observable.h: New file.
9892         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9893         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9894         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9895         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9896         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9897         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9898         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9899         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9900         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9901         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9902         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9903         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9904         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9905         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9906         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9907         tui/tui-interp.c, valops.c: Update all users.
9908         * tui/tui-hooks.c (tui_bp_created_observer)
9909         (tui_bp_deleted_observer, tui_bp_modified_observer)
9910         (tui_inferior_exit_observer, tui_before_prompt_observer)
9911         (tui_normal_stop_observer, tui_register_changed_observer):
9912         Remove.
9913         (tui_observers_token): New global.
9914         (attach_or_detach, tui_attach_detach_observers): New functions.
9915         (tui_install_hooks, tui_remove_hooks): Use
9916         tui_attach_detach_observers.
9917         * record-btrace.c (record_btrace_thread_observer): Remove.
9918         (record_btrace_thread_observer_token): New global.
9919         * observer.sh: Remove.
9920         * observer.c: Rename to observable.c.
9921         * observable.c (namespace gdb_observers): Define new objects.
9922         (observer_debug): Move into gdb_observers namespace.
9923         (struct observer, struct observer_list, xalloc_observer_list_node)
9924         (xfree_observer_list_node, generic_observer_attach)
9925         (generic_observer_detach, generic_observer_notify): Remove.
9926         (_initialize_observer): Update.
9927         Don't include observer.inc.
9928         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9929         (clean mostlyclean): Likewise.
9930         (observer.h, observer.inc): Remove targets.
9931         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9932         (COMMON_SFILES): Use observable.c, not observer.c.
9933         * .gitignore: Remove observer.h.
9934
9935 2018-03-18  Tom Tromey  <tom@tromey.com>
9936
9937         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9938         gdb::def_vector.
9939         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9940
9941 2018-03-17  Tom Tromey  <tom@tromey.com>
9942
9943         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9944
9945 2018-03-17  Tom Tromey  <tom@tromey.com>
9946
9947         * target.c (class scoped_target_fd): New.
9948         (target_fileio_close_cleanup): Remove.
9949         (target_fileio_read_alloc_1): Use scoped_target_fd.
9950
9951 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9952
9953         * silent-rules.mk: New.
9954         * Makefile.in: Include silent-rules.mk
9955         (srcdir, VPATH, top_srcdir): Move up.
9956         (COMPILE): Add ECHO_CXX.
9957         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9958         (init.c): Add ECHO_INIT_C.
9959         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9960         (version.c): Add ECHO_GEN.
9961         (printcmd.o): Add ECHO_CXX.
9962         (target-float.o): Add ECHO_CXX.
9963         (ada-exp.o): Add ECHO_CXX.
9964         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9965         (insight$(EXEEXT)): Add ECHO_CXXLD.
9966         * gnulib/configure.ac: Add AM_SILENT_RULES.
9967         * gnulib/aclocal.m4: Re-generate.
9968         * gnulib/configure: Re-generate.
9969         * gnulib/import/Makefile.in: Re-generate.
9970
9971 2018-03-16  Tom Tromey  <tom@tromey.com>
9972
9973         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9974         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9975         * utils.c (do_free_section_addr_info)
9976         (make_cleanup_free_section_addr_info): Remove.
9977         * symfile.h (struct other_sections): Add constructor.
9978         (struct section_addr_info): Remove.
9979         (section_addr_info): New typedef.
9980         (struct sym_fns) <sym_offsets>: Change type of parameter.
9981         (build_section_addr_info_from_objfile)
9982         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9983         (default_symfile_offsets, symbol_file_add)
9984         (symbol_file_add_from_bfd)
9985         (build_section_addr_info_from_section_table): Update.
9986         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9987         * symfile.c (alloc_section_addr_info): Remove.
9988         (build_section_addr_info_from_section_table): Change return type.
9989         Update.
9990         (build_section_addr_info_from_bfd)
9991         (build_section_addr_info_from_objfile): Likewise.
9992         (free_section_addr_info): Remove.
9993         (relative_addr_info_to_section_offsets): Change type of "addrs".
9994         (addrs_section_compar): Now a std::sort comparator.
9995         (addrs_section_sort): Change return type.
9996         (addr_info_make_relative): Change type of "addrs".  Update.
9997         (default_symfile_offsets, syms_from_objfile_1)
9998         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9999         (symbol_file_add_separate): Update.
10000         (symbol_file_add): Change type of "addrs".  Update.
10001         (add_symbol_file_command): Update.  Remove cleanups.
10002         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10003         cleanups.
10004         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10005         * solib.c (solib_read_symbols): Update.
10006         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10007         * machoread.c (macho_symfile_offsets): Update.
10008         * jit.c (jit_bfd_try_read_symtab): Update.
10009
10010 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10011
10012         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10013         unittests/utils-selftests.c.
10014         * unittests/utils-selftests.c: New file.
10015
10016 2018-03-14  Tom Tromey  <tom@tromey.com>
10017
10018         PR cli/14977:
10019         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10020         for NULL.
10021
10022 2018-03-14  Tom Tromey  <tom@tromey.com>
10023
10024         PR cli/19918:
10025         * printcmd.c (printf_pointer): Allow "-" in format.
10026
10027 2018-03-14  Tom Tromey  <tom@tromey.com>
10028
10029         * printcmd.c (_initialize_printcmd): Add usage to printf.
10030
10031 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10032
10033         * MAINTAINERS: Update my email address.
10034
10035 2018-03-13  Tom Tromey  <tom@tromey.com>
10036
10037         * machoread.c (macho_check_dsym): Change filenamep to a
10038         std::string*.
10039         (macho_symfile_read): Update.
10040         * symfile.c (load_command): Use std::string.
10041
10042 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10043
10044         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10045         to error message string.
10046         (riscv_register_name): Use xsnprintf instead of sprintf.
10047         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10048         internal_error.
10049         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10050         error.
10051         (riscv_push_dummy_call): Likewise.
10052
10053 2018-03-12  Tom Tromey  <tom@tromey.com>
10054
10055         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10056         Use gdb::byte_vector.
10057         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10058
10059 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10060
10061         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10062         parameter type to readable_regcache.
10063         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10064         the declaration.
10065
10066 2018-03-11  Tom Tromey  <tom@tromey.com>
10067
10068         * dwarf2read.c (struct nextfield): Add initializers.
10069         (struct nextfnfield): Remove.
10070         (struct fnfieldlist): Add initializers.  Remove "length" and
10071         "head", use std::vector.
10072         (struct decl_field_list): Remove.
10073         (struct field_info): Add initializers.
10074         <fields, baseclasses>: Now std::vector.
10075         <nbaseclasses, nfnfields, typedef_field_list_count,
10076         nested_types_list_count>: Remove.
10077         (dwarf2_add_field, dwarf2_add_type_defn)
10078         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10079         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10080         (process_structure_scope): Update.
10081
10082 2018-03-11  Tom Tromey  <tom@tromey.com>
10083
10084         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10085         for use by std::sort.
10086         (build_type_psymtabs_1): Use std::vector.
10087
10088 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10089
10090         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10091         and LIBMPFR in the printed configuration.
10092
10093 2018-03-08  Tom Tromey  <tom@tromey.com>
10094
10095         * source.c (get_filename_and_charpos): Use scoped_fd.
10096         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10097         (procfs_pidlist): Likewise.
10098         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10099         (iterate_over_mappings): Likewise.
10100
10101 2018-03-08  Tom Tromey  <tom@tromey.com>
10102
10103         * infcall.c (struct call_return_meta_info)
10104         <stack_temporaries_enabled>: Remove.
10105         (get_call_return_value, call_function_by_hand_dummy): Update.
10106         * thread.c (disable_thread_stack_temporaries): Remove.
10107         (enable_thread_stack_temporaries): Remove.
10108         (thread_stack_temporaries_enabled_p): Return bool.
10109         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10110         (get_last_thread_stack_temporary): Update.
10111         * eval.c (evaluate_subexp): Update.
10112         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10113         class, not a function.
10114         (value_ptr, value_vec): Remove typedefs.
10115         (class thread_info) <stack_temporaries_enabled>: Now bool.
10116         <stack_temporaries>: Now a std::vector.
10117         (thread_stack_temporaries_enabled_p)
10118         (value_in_thread_stack_temporaries): Return bool.
10119
10120 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10121
10122         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10123         (getpkt_or_notif_sane_1): Likewise.
10124
10125 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10126
10127         * build-id.c (build_id_to_debug_bfd): Use std::string.
10128
10129 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10130
10131         * build-id.c (find_separate_debug_file_by_buildid): Return
10132         std::string.
10133         * build-id.h (find_separate_debug_file_by_buildid): Return
10134         std::string.
10135         * coffread.c (coff_symfile_read): Adjust to std::string.
10136         * elfread.c (elf_symfile_read): Adjust to std::string.
10137         * symfile.c (separate_debug_file_exists): Change parameter to
10138         std::string.
10139         (find_separate_debug_file): Return std::string.
10140         (find_separate_debug_file_by_debuglink): Return std::string.
10141         * symfile.h (find_separate_debug_file_by_debuglink): Return
10142         std::string.
10143
10144 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10145
10146         * common/xml-utils.c (xml_escape_text): Move code to...
10147         (xml_escape_text_append): ... this new function.
10148         * common/xml-utils.h (xml_escape_text_append): New declaration.
10149         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10150         New function.
10151         (_initialize_xml_utils): register test_xml_escape_text_append as
10152         a selftest.
10153
10154 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10155
10156         * defs.h: Remove MAX_REGISTER_SIZE.
10157         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10158         asserts.
10159         * python/py-unwind.c (pyuw_sniffer): Likewise.
10160
10161 2018-03-07  Tom Tromey  <tom@tromey.com>
10162
10163         * linux-tdep.c (linux_info_proc): Update.
10164         * target.h (struct target_ops) <to_fileio_readlink>: Return
10165         optional<string>.
10166         (target_fileio_readlink): Return optional<string>.
10167         * remote.c (remote_hostio_readlink): Return optional<string>.
10168         * inf-child.c (inf_child_fileio_readlink): Return
10169         optional<string>.
10170         * target.c (target_fileio_readlink): Return optional<string>.
10171
10172 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10173
10174         * regcache.c (cooked_read_test): Add riscv to the list of
10175         architectures that have a save_reggroup.
10176
10177 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10178
10179         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10180         value is not a dynamic class object.
10181
10182 2018-03-06  Tom Tromey  <tom@tromey.com>
10183
10184         * rust-exp.y: Formatting fixes.
10185
10186 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10187
10188         * riscv-tdep.c (riscv_register_name): Remove target description
10189         support.
10190         (riscv_gdbarch_init): Remove target description check.
10191
10192 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10193
10194         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10195         comment.
10196         * riscv-tdep.h: Likewise.
10197
10198 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10199
10200         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10201         (riscv_pseudo_register_write): Delete.
10202         (riscv_gdbarch_init): Remove all use of pseudo registers.
10203
10204 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10205
10206         * record-btrace.c (btrace_print_lines): Replace cleanup
10207         parameter with RAII equivalents.
10208         (btrace_insn_history): Replace cleanup with RAII equivalents.
10209         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10210         make_cleanup_ui_out_tuple_begin_end): Remove.
10211         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10212         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10213         make_cleanup_ui_out_list_begin_end): Remove.
10214
10215 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10216
10217         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10218         parameter types to std::vector.  Use bool.
10219         (record_btrace_wait): Replace VEC(tp_t) with
10220         std::vector<thread_info *>.
10221         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10222
10223 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10224
10225         * record-btrace.c (record_btrace_disable_callback): Remove.
10226         (struct scoped_btrace_disable): New.
10227         (record_btrace_open): Use scoped_btrace_disable.
10228
10229 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10230
10231         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10232         reading values from registers.
10233
10234 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10235
10236         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10237         where appropriate.
10238
10239 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10240
10241         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10242         change parameter type.  Use GDB's print functions, and use
10243         core_addr_to_string where appropriate.
10244         (riscv_push_dummy_call): Use core_addr_to_string where
10245         appropriate, update call to riscv_print_arg_location, and reindent
10246         a few lines.
10247         (riscv_return_value): Update call to riscv_print_arg_location.
10248
10249 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10250             Tim Newsome <tim@sifive.com>
10251             Albert Ou <a0u@eecs.berkeley.edu>
10252             Darius Rad <darius@bluespec.com>
10253
10254         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10255         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10256         (ALLDEPFILES): Add riscv-tdep.c
10257         * configure.tgt: Add riscv support.
10258         * riscv-tdep.c: New file.
10259         * riscv-tdep.h: New file.
10260         * NEWS: Mention new target.
10261         * MAINTAINERS: Add entry for riscv.
10262
10263 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10264
10265         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10266         fields within aggregates.
10267
10268 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10269
10270         * record-btrace.c (btrace_print_lines): Change type of flags to
10271         gdb_disassembly_flags.
10272
10273 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10274
10275         * fbsd-nat.c: Include "inf-ptrace.h".
10276         (USE_SIGTRAP_SIGINFO): Conditionally define.
10277         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10278         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10279         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10280         function.
10281         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10282         Likewise.
10283         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10284         Likewise.
10285         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10286         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10287         "supports_stopped_by_hw_breakpoint" target methods.
10288
10289 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10290
10291         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10292         * fbsd-nat.c (debug_fbsd_nat): New variable.
10293         (show_fbsd_nat_debug): New function.
10294         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10295         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10296
10297 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10298
10299         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10300         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10301         prototype.
10302         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10303         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10304         method.
10305
10306 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10307
10308         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10309         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10310
10311 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10312
10313         * charset.c (struct charset_vector): New.
10314         (charsets): Change type to charset_vector.
10315         (find_charset_names): Adjust.
10316         (add_one): Adjust.
10317         (_initialize_charset): Adjust.
10318
10319 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10320
10321         * progspace.h (struct program_space) <deleted_solibs>: Change
10322         type to std::vector<std::string>.
10323         * progspace.c (clear_program_space_solib_cache): Adjust.
10324         * breakpoint.c (print_solib_event): Adjust.
10325         (check_status_catch_solib): Adjust.
10326         * solib.c (update_solib_list): Adjust.
10327         * ui-out.h (class ui_out) <field_string>: New overload.
10328         * ui-out.c (ui_out::field_string): New overload.
10329
10330 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10331
10332         * progspace.h (struct program_space): Add constructor and
10333         destructor, initialize fields.
10334         (add_program_space): Remove.
10335         * progspace.c (add_program_space): Rename to...
10336         (program_space::program_space): ... this.
10337         (release_program_space): Rename to...
10338         (program_space::~program_space): ... this.
10339         (delete_program_space): Use delete to delete program_space.
10340         (initialize_progspace): Use new to allocate program_space.
10341         * inferior.c (add_inferior_with_spaces): Likewise.
10342         (clone_inferior_command): Likewise.
10343         * infrun.c (follow_fork_inferior): Likewise.
10344         (handle_vfork_child_exec_or_exit): Likewise.
10345
10346 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10347
10348         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10349         (delim_string_to_char_ptr_vec): Return std::vector of
10350         gdb::unique_xmalloc_ptr.
10351         (dirnames_to_char_ptr_vec_append): Take std::vector of
10352         gdb::unique_xmalloc_ptr.
10353         (dirnames_to_char_ptr_vec): Return std::vector of
10354         gdb::unique_xmalloc_ptr.
10355         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10356         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10357         (delim_string_to_char_ptr_vec): Return an std::vector of
10358         gdb::unique_xmalloc_ptr, adjust the code.
10359         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10360         gdb::unique_xmalloc_ptr, adjust the code.
10361         (dirnames_to_char_ptr_vec): Return an std::vector of
10362         gdb::unique_xmalloc_ptr, adjust the code.
10363         * auto-load.c (auto_load_safe_path_vec): Change type to
10364         std::vector of gdb::unique_xmalloc_ptr.
10365         (auto_load_expand_dir_vars): Return an std::vector of
10366         gdb::unique_xmalloc_ptr, adjust the code.
10367         (auto_load_safe_path_vec_update): Adjust.
10368         (filename_is_in_auto_load_safe_path_vec): Adjust.
10369         (auto_load_objfile_script_1): Adjust.
10370         * build-id.c (build_id_to_debug_bfd): Adjust.
10371         * linux-thread-db.c (thread_db_load_search): Adjust.
10372         * source.c (add_path): Adjust.
10373         (openp): Adjust.
10374         * symfile.c (find_separate_debug_file): Adjust.
10375         * utils.c (do_free_char_ptr_vec): Remove.
10376         (make_cleanup_free_char_ptr_vec): Remove.
10377
10378 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10379
10380         PR gdb/22907
10381         * common/pathstuff.c: Conditionally include "<windows.h>".
10382
10383 2018-03-01  Georg Sauthoff  <mail@georg.so>
10384
10385         PR gdb/22888
10386         * gcore.in: Quote variables and switch interpreter to bash.
10387
10388 2018-03-01  Tom Tromey  <tom@tromey.com>
10389
10390         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10391         assertion.  Add assertion for discriminant_index.
10392         (quirk_rust_enum): Use correct base type name in univariant case.
10393
10394 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10395
10396         * record.c (get_call_history_modifiers): Return a
10397         record_print_flags.
10398         (cmd_record_call_history): Adjust.
10399         * record-btrace.c (record_btrace_call_history): Adjust.
10400         (record_btrace_call_history_range): Adjust.
10401         (record_btrace_call_history_from): Adjust.
10402         * target-debug.h (target_debug_print_record_print_flags): New.
10403         * target-delegates.c: Re-generate.
10404         * target.c (target_call_history): Change flags type.
10405         (target_call_history_from): Likewise.
10406         (target_call_history_range): Likewise.
10407         * target.h (struct target_ops) <target_call_history>: Likewise.
10408         (target_call_history_from): Likewise.
10409         (target_call_history_range): Likewise.
10410
10411 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10412             Simon Marchi  <simon.marchi@polymtl.ca>
10413
10414         * common/common-utils.c: Include "sys/stat.h".
10415         (is_regular_file): Move here from "source.c"; change return
10416         type to "bool".
10417         * common/common-utils.h (is_regular_file): New prototype.
10418         * common/pathstuff.c (contains_dir_separator): New function.
10419         * common/pathstuff.h (contains_dir_separator): New prototype.
10420         * source.c: Don't include "sys/stat.h".
10421         (is_regular_file): Move to "common/common-utils.c".
10422
10423 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10424
10425         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10426         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10427         * auto-load.c: Include "common/pathstuff.h".
10428         * common/common-def.h (current_directory): Move here.
10429         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10430         function.
10431         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10432         prototype.
10433         * common/pathstuff.c: New file.
10434         * common/pathstuff.h: New file.
10435         * compile/compile.c: Include "common/pathstuff.h".
10436         * defs.h (current_directory): Move to "common/common-defs.h".
10437         * dwarf2read.c: Include "common/pathstuff.h".
10438         * exec.c: Likewise.
10439         * guile/scm-safe-call.c: Likewise.
10440         * linux-thread-db.c: Likewise.
10441         * main.c: Likewise.
10442         * nto-tdep.c: Likewise.
10443         * objfiles.c: Likewise.
10444         * source.c: Likewise.
10445         * symtab.c: Likewise.
10446         * utils.c: Include "common/pathstuff.h".
10447         (gdb_realpath): Move to "common/pathstuff.c".
10448         (gdb_realpath_keepfile): Likewise.
10449         (gdb_abspath): Likewise.
10450         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10451         (gdb_realpath_keepfile): Likewise.
10452         (gdb_abspath): Likewise.
10453
10454 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10455
10456         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10457         wildcard process pid for super_resume for kernels with a
10458         specific bug.
10459
10460 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10461
10462         * compile/compile.c (get_args): Add additional comments
10463         explaining function.
10464
10465 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10466             Tom Tromey  <tom@tromey.com>
10467
10468         * target.h (memory_write_request_s): Remove typedef.  Don't define
10469         VEC.
10470         (target_write_memory_blocks): Change argument to std::vector.
10471         (struct memory_write_request): Add constructor.
10472         * target-memory.c (compare_block_starting_address): Return bool.
10473         Change argument types.
10474         (claim_memory): Change arguments to use std::vector.
10475         (split_regular_and_flash_blocks, blocks_to_erase)
10476         (compute_garbled_blocks): Likewise.
10477         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10478         (target_write_memory_blocks): Change argument to std::vector.
10479         * symfile.c (struct load_section_data): Add constructor and
10480         destructor.  Use std::vector for "requests".
10481         (struct load_progress_data): Add initializers.
10482         (load_section_callback): Update.  Use "new".
10483         (clear_memory_write_data): Remove.
10484         (generic_load): Update.
10485
10486 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10487
10488         * arch/aarch64.h: Use common/tdesc.h.
10489
10490 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10491
10492         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10493         architecture with a 64-bit ABI.
10494
10495 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10496
10497         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10498         ahead of target description loading.
10499
10500 2018-02-26  Tom Tromey  <tom@tromey.com>
10501
10502         * stack.c (backtrace_command_1): Update.
10503         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10504         of "flags".
10505         * python/py-framefilter.c (py_print_frame)
10506         (gdbpy_apply_frame_filter): Change type of "flags".
10507         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10508         of "flags".
10509         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10510         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10511         * extension.h (enum frame_filter_flag): Rename from
10512         frame_filter_flags.
10513         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10514         (apply_ext_lang_frame_filter): Change type of "flags".
10515         * extension.c (apply_ext_lang_frame_filter): Change type of
10516         "flags".
10517         * extension-priv.h (struct extension_language_ops)
10518         <apply_frame_filter>: Change type of "flags".
10519
10520 2018-02-26  Tom Tromey  <tom@tromey.com>
10521
10522         PR python/16497:
10523         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10524         off-by-one in py_end computation.
10525         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10526         PRINT_MORE_FRAMES.
10527         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10528         constant.
10529
10530 2018-02-26  Tom Tromey  <tom@tromey.com>
10531
10532         * dwarf2read.c (struct variant_field): New.
10533         (struct nextfield) <variant>: New field.
10534         (dwarf2_add_field): Handle DW_TAG_variant_part.
10535         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10536         discriminated union.
10537         (read_structure_type): Handle DW_TAG_variant_part.
10538         (handle_struct_member_die): New function, extracted from
10539         process_structure_scope.  Handle DW_TAG_variant.
10540         (process_structure_scope): Handle discriminated unions.  Call
10541         handle_struct_member_die.
10542
10543 2018-02-26  Tom Tromey  <tom@tromey.com>
10544
10545         * rust-lang.h (rust_last_path_segment): Declare.
10546         * rust-lang.c (rust_last_path_segment): Now public.  Change
10547         contract.
10548         (struct disr_info): Remove.
10549         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10550         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10551         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10552         (rust_enum_p, rust_enum_variant): New function.
10553         (rust_underscore_fields): Remove "offset" parameter.
10554         (rust_print_enum): New function.
10555         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10556         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10557         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10558         enums.
10559         (rust_internal_print_type): New function, from rust_print_type.
10560         Remove enum code.
10561         (rust_print_type): Call rust_internal_print_type.
10562         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10563         Update enum handling.
10564         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10565         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10566         (rust_union_quirks): New functions.
10567         (process_full_comp_unit, process_full_type_unit): Call
10568         rust_union_quirks.
10569         (process_structure_scope): Update rust_unions if necessary.
10570
10571 2018-02-26  Tom Tromey  <tom@tromey.com>
10572
10573         * value.h (value_union_variant): Declare.
10574         * valops.c (value_union_variant): New function.
10575         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10576         (struct discriminant_info): New.
10577         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10578         enumerator.
10579         (struct main_type) <flag_discriminated_union>: New field.
10580
10581 2018-02-26  Tom Tromey  <tom@tromey.com>
10582
10583         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10584         unittests/unpack-selftests.c.
10585         * unittests/unpack-selftests.c: New file.
10586         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10587
10588 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10589
10590         * dwarf2read.c (struct partial_die_info) <read>: New method.
10591         (read_partial_die): Remove the declaration.
10592         (load_partial_dies): Update.
10593         (partial_die_info::partial_die_info):
10594         (read_partial_die): Change it to partial_die_info::read.
10595
10596 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10597
10598         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10599         (fixup_partial_die): Remove declaration.
10600         (scan_partial_symbols): Update.
10601         (partial_die_parent_scope): Likewise.
10602         (partial_die_full_name): Likewise.
10603         (fixup_partial_die): Change it to partial_die_info::fixup.
10604
10605 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10606
10607         * dwarf2read.c (read_partial_die): Update the declaration.
10608         (load_partial_dies): Caller update.
10609         (read_partial_die): Remove one argument abbrev_len.
10610
10611 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10612
10613         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10614         assignment operator.
10615         (load_partial_dies): Use ctor and copy ctor.
10616         (read_partial_die): Update.
10617         (dwarf2_cu::find_partial_die): Use ctor.
10618
10619 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10620
10621         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10622         (find_partial_die_in_comp_unit): Change it to
10623         dwarf2_cu::find_partial_die.
10624         (find_partial_die): Update.
10625
10626 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10627
10628         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10629         is NULL.
10630
10631 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10632
10633         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10634
10635 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10636
10637         * arch/amd64.h: Use common/tdesc.h.
10638         * arch/i386.c: Likewise.
10639         * arch/i386.h: Likewise.
10640         * arch/tic6x.c: Likewise.
10641         * arch/tdesc.h: Move file from here...
10642         * common/tdesc.h: ...to here.
10643         * features/aarch64-core.c: Regenerate.
10644         * features/aarch64-fpu.c: Regenerate.
10645         * features/i386/32bit-avx.c: Regenerate.
10646         * features/i386/32bit-avx512.c: Regenerate.
10647         * features/i386/32bit-core.c: Regenerate.
10648         * features/i386/32bit-linux.c: Regenerate.
10649         * features/i386/32bit-mpx.c: Regenerate.
10650         * features/i386/32bit-pkeys.c: Regenerate.
10651         * features/i386/32bit-sse.c: Regenerate.
10652         * features/i386/64bit-avx.c: Regenerate.
10653         * features/i386/64bit-avx512.c: Regenerate.
10654         * features/i386/64bit-core.c: Regenerate.
10655         * features/i386/64bit-linux.c: Regenerate.
10656         * features/i386/64bit-mpx.c: Regenerate.
10657         * features/i386/64bit-pkeys.c: Regenerate.
10658         * features/i386/64bit-segments.c: Regenerate.
10659         * features/i386/64bit-sse.c: Regenerate.
10660         * features/i386/x32-core.c: Regenerate.
10661         * features/tic6x-c6xp.c: Regenerate.
10662         * features/tic6x-core.c: Regenerate.
10663         * features/tic6x-gp.c: Regenerate.
10664         * target-descriptions.c: Use common/tdesc.h.
10665         * target-descriptions.h: Likewise.
10666
10667 2018-02-24  Tom Tromey  <tom@tromey.com>
10668
10669         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10670         (try_thread_db_load_from_dir, thread_db_load_search): Use
10671         std::string.
10672         (info_auto_load_libthread_db_compare): Return bool.  Change
10673         argument types.
10674         (info_auto_load_libthread_db): Use std::vector, std::string.
10675         Remove cleanups.
10676
10677 2018-02-24  Tom Tromey  <tom@tromey.com>
10678
10679         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10680         std::string.
10681         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10682         std::string*.
10683         * gdbarch.c: Rebuild.
10684         * gdbarch.h: Rebuild.
10685         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10686         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10687         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10688         std::string*.
10689
10690 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10691
10692         * gdbtypes.h (sect_offset): Change type to uint64_t.
10693         (sect_offset_str): New function.
10694         * dwarf2read.c (create_addrmap_from_aranges): Use
10695         sect_offset_str.
10696         (error_check_comp_unit_head): Likewise.
10697         (create_debug_type_hash_table): Likewise.
10698         (read_cutu_die_from_dwo): Likewise.
10699         (init_cutu_and_read_dies): Likewise.
10700         (init_cutu_and_read_dies_no_follow): Likewise.
10701         (process_psymtab_comp_unit_reader): Likewise.
10702         (partial_die_parent_scope): Likewise.
10703         (peek_die_abbrev): Likewise.
10704         (process_queue): Likewise.
10705         (dwarf2_physname): Likewise.
10706         (read_namespace_alias): Likewise.
10707         (read_import_statement): Likewise.
10708         (create_dwo_cu_reader): Likewise.
10709         (create_cus_hash_table): Likewise.
10710         (lookup_dwo_cutu): Likewise.
10711         (inherit_abstract_dies): Likewise.
10712         (read_func_scope): Likewise.
10713         (read_call_site_scope): Likewise.
10714         (dwarf2_add_member_fn): Likewise.
10715         (read_common_block): Likewise.
10716         (read_module_type): Likewise.
10717         (read_typedef): Likewise.
10718         (read_subrange_type): Likewise.
10719         (load_partial_dies): Likewise.
10720         (read_partial_die): Likewise.
10721         (find_partial_die): Likewise.
10722         (read_str_index): Likewise.
10723         (dwarf2_string_attr): Likewise.
10724         (build_error_marker_type): Likewise.
10725         (lookup_die_type): Likewise.
10726         (dump_die_shallow): Likewise.
10727         (follow_die_ref): Likewise.
10728         (dwarf2_fetch_die_loc_sect_off): Likewise.
10729         (dwarf2_fetch_constant_bytes): Likewise.
10730         (follow_die_sig): Likewise.
10731         (get_signatured_type): Likewise.
10732         (get_DW_AT_signature_type): Likewise.
10733         (dwarf2_find_containing_comp_unit): Likewise.
10734         (set_die_type): Likewise.
10735
10736 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10737
10738         * arch/aarch64.c: Include "common-defs.h".
10739         * arch/amd64.c: Likewise.
10740         * arch/i386.c: Likewise.
10741
10742 2018-02-21  Tom Tromey  <tom@tromey.com>
10743
10744         * value.h: (extract_field_op): Update.
10745         * eval.c (extract_field_op): Return a const char *.
10746         * expression.h (parse_expression_for_completion): Update.
10747         * completer.c (complete_expression): Update.
10748         (add_struct_fields): Make fieldname const.
10749         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10750         (mark_completion_tag, parse_exp_in_context_1): Update.
10751         (parse_expression_for_completion): Change "name" to
10752         unique_xmalloc_ptr*.
10753
10754 2018-02-21  Tom Tromey  <tom@tromey.com>
10755
10756         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10757
10758 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10759
10760         * avr-tdep.c (avr_read_pc): Change parameter type to
10761         readable_regcache.
10762         * gdbarch.sh (read_pc): Likewise.
10763         * gdbarch.c: Re-generated.
10764         * gdbarch.h: Re-generated.
10765         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10766         readable_regcache.
10767         * ia64-tdep.c (ia64_read_pc): Likewise.
10768         * mips-tdep.c (mips_read_pc): Likewise.
10769         * spu-tdep.c (spu_read_pc): Likewise.
10770
10771 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10772
10773         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10774         * regcache-dump.c: New file.
10775         * regcache.c: Move register_dump to regcache-dump.c.
10776         (maintenance_print_registers): Likewise.
10777         (maintenance_print_raw_registers): Likewise.
10778         (maintenance_print_cooked_registers): Likewise.
10779         (maintenance_print_register_groups): Likewise.
10780         (maintenance_print_remote_registers): Likewise.
10781         (_initialize_regcache): Likewise.
10782         * regcache.h (register_dump): Moved from regcache.c.
10783
10784 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10785
10786         * regcache.c (regcache::regcache): Update.
10787         (regcache::invalidate): Move it to detached_regcache::invalidate.
10788         (get_thread_arch_aspace_regcache): Update.
10789         (regcache::raw_update): Update.
10790         (regcache::cooked_read): Remove some code.
10791         (regcache::cooked_read_value): Likewise.
10792         (regcache::raw_write): Remove assert on m_readonly_p.
10793         (regcache::raw_supply_integer): Move it to
10794         detached_regcache::raw_supply_integer.
10795         (regcache::raw_supply_zeroed): Likewise.
10796         * regcache.h (detached_regcache) <raw_supply_integer>: New
10797         declaration.
10798         <raw_supply_zeroed, invalidate>: Likewise.
10799         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10800         <invalidate>: Likewise.
10801         <m_readonly_p>: Removed.
10802
10803 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10804
10805         * infcmd.c (get_return_value): Let stop_regs point to
10806         get_current_regcache.
10807         * regcache.c (regcache::regcache): Remove.
10808         (register_dump_reg_buffer): New class.
10809         (regcache_print): Adjust.
10810         * regcache.h (regcache): Remove constructors.
10811
10812 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10813
10814         * regcache.c (class register_dump): New class.
10815         (register_dump_regcache, register_dump_none): New class.
10816         (register_dump_remote, register_dump_groups): New class.
10817         (regcache_print): Update.
10818         * regcache.h (regcache_dump_what): Move it to regcache.c.
10819         (regcache) <dump>: Remove.
10820
10821 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10822
10823         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10824          reg_buffer_rw *.
10825         (jit_unwind_reg_set_impl): Call raw_supply.
10826         (jit_frame_sniffer): Use reg_buffer_rw.
10827         * record-full.c (record_full_core_regbuf): Change its type.
10828         (record_full_core_open_1): Use reg_buffer_rw.
10829         (record_full_close): Likewise.
10830         (record_full_core_fetch_registers): Use regcache->raw_supply.
10831         (record_full_core_store_registers): Likewise.
10832         * regcache.c (regcache::get_register_status): Move it to
10833         reg_buffer.
10834         (regcache_raw_set_cached_value): Remove.
10835         (regcache::raw_set_cached_value): Remove.
10836         (regcache::raw_write): Call raw_supply.
10837         (regcache::raw_supply): Move it to reg_buffer_rw.
10838         * regcache.h (regcache_raw_set_cached_value): Remove.
10839         (reg_buffer_rw): New class.
10840
10841 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10842
10843         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10844         readonly_detached_regcache.
10845         (dummy_frame_prev_register): Use regcache->cooked_read.
10846         * frame.c (frame_save_as_regcache): Change return type.
10847         (frame_pop): Update.
10848         * frame.h (frame_save_as_regcache): Update declaration.
10849         * inferior.h (get_infcall_suspend_state_regcache): Update
10850         declaration.
10851         * infrun.c (infcall_suspend_state) <registers>: use
10852         readonly_detached_regcache.
10853         (save_infcall_suspend_state): Don't use regcache_dup.
10854         (get_infcall_suspend_state_regcache): Change return type.
10855         * linux-fork.c (struct fork_info) <savedregs>: Change to
10856         readonly_detached_regcache.
10857         <pc>: New field.
10858         (fork_save_infrun_state): Don't use regcache_dup.
10859         (info_checkpoints_command): Adjust.
10860         * mi/mi-main.c (register_changed_p): Update declaration.
10861         (mi_cmd_data_list_changed_registers): Use
10862         readonly_detached_regcache.
10863         (register_changed_p): Change parameter type to
10864         readonly_detached_regcache.
10865         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10866         readonly_detached_regcache.
10867         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10868         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10869         New.
10870         (regcache::save): Move it to reg_buffer.
10871         (regcache::restore): Change parameter type.
10872         (regcache_dup): Remove.
10873         * regcache.h (reg_buffer) <save>: New method.
10874         (readonly_detached_regcache): New class.
10875         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10876         readonly_detached_regcache.
10877         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10878
10879 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10880
10881         * frame.c (frame_save_as_regcache): Use regcache method save.
10882         (frame_pop): Use regcache method restore.
10883         * infrun.c (restore_infcall_suspend_state): Likewise.
10884         * linux-fork.c (fork_load_infrun_state): Likewise.
10885         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10886         save.
10887         * regcache.c (regcache_save): Remove.
10888         (regcache::restore): More asserts.
10889         (regcache_cpy): Remove.
10890         * regcache.h (regcache_save): Remove the declaration.
10891         (regcache::restore): Move from private to public.
10892         Remove the friend declaration of regcache_cpy.
10893         (regcache_cpy): Remove declaration.
10894
10895 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10896
10897         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10898         parameter type to 'readable_regcache *'.
10899         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10900         * arm-tdep.c (arm_neon_quad_read): Likewise.
10901         (arm_pseudo_read): Likewise.
10902         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10903         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10904         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10905         * gdbarch.c: Re-generated.
10906         * gdbarch.h: Re-generated.
10907         * gdbarch.sh (pseudo_register_read): Change parameter type to
10908         'readable_regcache *'.
10909         (pseudo_register_read_value): Likewise.
10910         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10911         (h8300_pseudo_register_read): Likewise.
10912         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10913         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10914         (i386_pseudo_register_read_into_value): Likewise.
10915         (i386_pseudo_register_read_value): Likewise.
10916         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10917         declaration.
10918         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10919         * m32c-tdep.c (m32c_raw_read): Likewise.
10920         (m32c_read_flg): Likewise.
10921         (m32c_banked_register): Likewise.
10922         (m32c_banked_read): Likewise.
10923         (m32c_sb_read): Likewise.
10924         (m32c_part_read): Likewise.
10925         (m32c_cat_read): Likewise.
10926         (m32c_r3r2r1r0_read): Likewise.
10927         (m32c_pseudo_register_read): Likewise.
10928         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10929         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10930         (mep_pseudo_cr64_read): Likewise.
10931         (mep_pseudo_register_read): Likewise.
10932         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10933         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10934         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10935         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10936         (regcache::cooked_read): Likewise.
10937         (regcache::cooked_read_value): Likewise.
10938         (regcache_cooked_read_signed):
10939         (regcache::cooked_read): Likewise.
10940         * regcache.h (readable_regcache): New class.
10941         (regcache): Inherit readable_regcache.  Move some methods to
10942         readable_regcache.
10943         * rl78-tdep.c (rl78_pseudo_register_read): Change
10944         parameter type to 'readable_regcache *'.
10945         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10946         (e500_pseudo_register_read): Change parameter type to
10947         'readable_regcache *'.
10948         (dfp_pseudo_register_read): Likewise.
10949         (vsx_pseudo_register_read): Likewise.
10950         (efpr_pseudo_register_read): Likewise.
10951         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10952         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10953         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10954         (sh64_pseudo_register_read): Likewise.
10955         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10956         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10957         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10958         (spu_pseudo_register_read): Likewise.
10959         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10960         (xtensa_pseudo_register_read): Likewise.
10961
10962 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10963
10964         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10965         (regcache::arch): Move it to reg_buffer::arch.
10966         (regcache::register_buffer): Likewise.
10967         (regcache::assert_regnum): Likewise.
10968         (regcache::num_raw_registers): Likewise.
10969         * regcache.h (reg_buffer): New class.
10970         (regcache): Inherit reg_buffer.
10971
10972 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10973
10974         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10975         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10976
10977 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
10978
10979         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10980
10981 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
10982
10983         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10984         (SFILES): Remove common/*.c files.
10985         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10986         * common/common.host: Add common reference.
10987         * configure.ac: Likewise.
10988         * configure: Regenerate.
10989
10990 2018-02-16  Yao Qi  <yao.qi@linaro.org>
10991
10992         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10993         (block_initialize_namespace): Use new.
10994         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10995         (dwarf2_free_objfile): Use delete.
10996         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10997         (copy_type_recursive): Use new.
10998         * gdb_obstack.h (allocate_on_obstack): New.
10999
11000 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11001
11002         PR gdb/22849
11003         * inferior.c (exit_inferior_1): Reset inf->control.
11004
11005 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11006
11007         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11008         declaration.
11009
11010 2018-02-14  Pedro Alves  <palves@redhat.com>
11011
11012         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11013         frame_cleanup_after_sniffer on exception.
11014
11015 2018-02-14  Tom Tromey  <tom@tromey.com>
11016
11017         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11018         const.
11019         (solib_bfd_open): Make pathname const.
11020         * solib.c (solib_bfd_open): Make pathname const.
11021         * solib-spu.c (spu_bfd_fopen): Make name const.
11022         (spu_bfd_open): Make pathname const.
11023         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11024         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11025
11026 2018-02-14  Tom Tromey  <tom@tromey.com>
11027
11028         * symfile.c (symfile_bfd_open): Update.
11029         * source.h (openp, source_full_path_of, find_and_open_source):
11030         Change argument type to unique_xmalloc_ptr.
11031         * source.c (openp): Take a unique_xmalloc_ptr.
11032         (source_full_path_of, find_and_open_source): Likewise.
11033         (open_source_file, symtab_to_fullname): Update.
11034         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11035         unique_xmalloc_ptr.
11036         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11037         (exec_file_find): Update.
11038         * psymtab.c (psymtab_to_fullname): Update.
11039         * nto-tdep.h (nto_find_and_open_solib): Update.
11040         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11041         unique_xmalloc_ptr.
11042         * exec.c (exec_file_attach): Update.
11043         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11044         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11045
11046 2018-02-14  Tom Tromey  <tom@tromey.com>
11047
11048         * solib.c: Include source.h.
11049         * nto-tdep.c: Include source.h.
11050         * mi/mi-cmd-env.c: Include source.h.
11051         * infcmd.c: Include source.h.
11052         * exec.c: Include source.h.
11053         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11054         (add_path, directory_switch, source_path, init_source_path): Move
11055         declarations...
11056         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11057         (add_path, directory_switch, source_path, init_source_path):
11058         ...here.
11059
11060 2018-02-14  Tom Tromey  <tom@tromey.com>
11061
11062         * solist.h (exec_file_find, solib_find): Return
11063         unique_xmalloc_ptr.
11064         (solib_bfd_fopen): Take a const char *.
11065         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11066         (exec_file_find, solib_find): Likewise.
11067         (solib_bfd_fopen): Do not take ownership of "pathname".
11068         (solib_bfd_open): Use unique_xmalloc_ptr.
11069         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11070         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11071         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11072         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11073
11074 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11075
11076         * ada-lang.c (name_match_type_from_name): Remove reference to
11077         ada_name_for_lookup in function's documentation.
11078         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11079
11080 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11081
11082         * defs.h (enum openp_flags): New enum.
11083         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11084         Move to enum openp_flags.
11085         (openp_flags): New enum flags.
11086         (openp): Change parameter type to openp_flags.
11087         * source.c (openp): Change parameter type to openp_flags.
11088         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11089         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11090
11091 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11092
11093         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11094         per-command.
11095
11096 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11097
11098         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11099         into...
11100         (class dwarf2_queue_guard): ...the destructor of this new class.
11101         (dw2_do_instantiate_symtab): Create instance of the new class
11102         dwarf2_queue_guard, remove cleanup.
11103
11104 2018-02-09  Tom Tromey  <tom@tromey.com>
11105
11106         * source.c (find_source_lines): Don't reference past the end of
11107         the vector.
11108
11109 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11110
11111         * remote.c (remote_btrace_maybe_reopen): Change error message.
11112         * btrace.c (btrace_enable): Likewise.
11113         (parse_xml_btrace): Likewise.
11114         (parse_xml_btrace_conf): Likewise.
11115
11116 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11117
11118         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11119         (linux_enable_pt, linux_enable_bts): Call
11120         diagnose_perf_event_open_fail.
11121
11122 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11123
11124         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11125         Remove parameter and change return type.  Update callers.  Move it.
11126         (linux_enable_bts, linux_enable_pt): Improve error message.
11127         (linux_enable_pt): Remove zero buffer size check.
11128         (linux_enable_btrace): Improve error messages.  Remove NULL return
11129         check.
11130
11131 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11132
11133         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11134         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11135         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11136         (linux_supports_pt, linux_supports_btrace): Remove.
11137         (linux_enable_bts): Call cpu_supports_bts.
11138         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11139         * remote.c (remote_supports_btrace): Remove.
11140         (init_remote_ops): Remove remote_supports_btrace.
11141         * target-delegates.c: Regenerated.
11142         * target.c (target_supports_btrace): Remove.
11143         * target.h (target_ops) <to_supports_btrace>: Remove
11144         (target_supports_btrace): Remove.
11145         * x86-linux-nat.c (x86_linux_create_target): Remove
11146         linux_supports_btrace.
11147
11148 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11149
11150         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11151         btrace failed.
11152         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11153         exception and use message in own exception.
11154
11155 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11156
11157         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11158         (perf_event_pt_event_type): Use gdb_file_up.
11159         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11160         scoped_fd, and scoped_mmap.
11161
11162 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11163
11164         * common/scoped_mmap.h: New.
11165         * unittests/scoped_mmap-selftest.c: New.
11166         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11167         unittests/scoped_mmap-selftest.c.
11168
11169 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11170
11171         * common/scoped_fd.h: New.
11172         * unittests/scoped_fd-selftest.c: New.
11173         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11174         unittests/scoped_fd-selftest.c.
11175
11176 2018-02-09  Tom Tromey  <tom@tromey.com>
11177
11178         * auto-load.c (auto_load_section_scripts): Use
11179         gdb::unique_xmalloc_ptr.
11180
11181 2018-02-09  Tom Tromey  <tom@tromey.com>
11182
11183         * auto-load.c (execute_script_contents): Use std::string.
11184
11185 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11186
11187         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11188         Python function, rather than a new command.
11189
11190 2018-02-08  Tom Tromey  <tom@tromey.com>
11191
11192         * solib.c (solib_find_1): Use std::string.
11193         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11194
11195 2018-02-08  Tom Tromey  <tom@tromey.com>
11196
11197         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11198
11199 2018-02-08  Tom Tromey  <tom@tromey.com>
11200
11201         * source.c (find_source_lines): Use gdb::def_vector.
11202
11203 2018-02-08  Tom Tromey  <tom@tromey.com>
11204
11205         * macrocmd.c (struct temporary_macro_definition): New.
11206         (macro_define_command): Use temporary_macro_definition.  Remove
11207         cleanups.
11208         (free_macro_definition_ptr): Remove.
11209
11210 2018-02-08  Tom Tromey  <tom@tromey.com>
11211
11212         * macroexp.c (maybe_expand): Use std::string.
11213
11214 2018-02-08  Tom Tromey  <tom@tromey.com>
11215
11216         * macroexp.c (struct macro_buffer): Add initializers for some
11217         members.
11218         (init_buffer, init_shared_buffer, free_buffer)
11219         (free_buffer_return_text): Remove.
11220         (macro_buffer): New constructors.
11221         (~macro_buffer): New destructor.
11222         (macro_buffer::set_shared): New method.
11223         (macro_buffer::resize_buffer, macro_buffer::appendc)
11224         (macro_buffer::appendmem): Now methods, not free functions.
11225         (set_token, append_tokens_without_splicing, stringify)
11226         (macro_stringify): Update.
11227         (gather_arguments): Change return type.  Remove argc_p argument,
11228         add args_ptr argument.  Use std::vector.
11229         (substitute_args): Remove argc argument.  Accept std::vector.
11230         (expand): Update.  Use std::vector.
11231         (scan, macro_expand, macro_expand_next): Update.
11232
11233 2018-02-08  Tom Tromey  <tom@tromey.com>
11234
11235         * symtab.c (default_collect_symbol_completion_matches_break_on):
11236         Use unique_xmalloc_ptr.
11237         * macroscope.h: (sal_macro_scope, user_macro_scope)
11238         (default_macro_scope): Return unique_xmalloc_ptr.
11239         * macroscope.c (sal_macro_scope, user_macro_scope)
11240         (default_macro_scope): Return unique_xmalloc_ptr.
11241         * macroexp.h (macro_expand, macro_expand_once): Return
11242         unique_xmalloc_ptr.
11243         * macroexp.c (macro_expand, macro_expand_once): Return
11244         unique_xmalloc_ptr.
11245         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11246         (info_macro_command, info_macros_command): Use
11247         unique_xmalloc_ptr.
11248         * compile/compile-c-support.c (write_macro_definitions): Use
11249         unique_xmalloc_ptr.
11250         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11251
11252 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11253
11254         * value.c (value_static_field): Assign field type instead of
11255         containing type when returning an optimized out value.
11256
11257 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11258
11259         * ft32-tdep.c (ft32_read_pc): Remove.
11260         (ft32_write_pc): Remove.
11261         (ft32_gdbarch_init): Update.
11262         * m32r-tdep.c (m32r_read_pc): Remove.
11263         (m32r_gdbarch_init): Update.
11264         * mep-tdep.c (mep_read_pc): Remove.
11265         (mep_gdbarch_init): Update.
11266         * microblaze-tdep.c (microblaze_write_pc): Remove.
11267         (microblaze_gdbarch_init): Update.
11268         * mn10300-tdep.c (mn10300_read_pc): Remove.
11269         (mn10300_write_pc): Remove.
11270         (mn10300_gdbarch_init): Update.
11271         * moxie-tdep.c (moxie_read_pc): Remove.
11272         (moxie_write_pc): Remove.
11273         (moxie_gdbarch_init): Update.
11274
11275 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11276
11277         * expprint.c (print_subexp_standard): Handle
11278         OP_F77_UNDETERMINED_ARGLIST.
11279         (dump_subexp_body_standard): Likewise.
11280
11281 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11282
11283         * target-descriptions.c (tdesc_element_visitor) Add empty
11284         implementations.
11285         (tdesc_type): Move make_gdb_type from here.
11286         (tdesc_type_builtin): Likewise.
11287         (tdesc_type_vector): Likewise.
11288         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11289         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11290         (make_gdb_type_union): Likewise.
11291         (make_gdb_type_flags): Likewise.
11292         (make_gdb_type_enum): Likewise.
11293         (make_gdb_type): New function.
11294         (tdesc_register_type): Use static make_gdb_type.
11295
11296 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11297
11298         * infcmd.c (default_print_one_register_info): Align natural-format
11299         column values consistently one under another.
11300         (pad_to_column): New function.
11301
11302 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11303
11304         * dwarf2read.c (dwarf2_physname): Move commment.
11305
11306 2018-02-01  Leszek Swirski  <leszeks@google.com>
11307
11308         * varobj.c (varobj_formatted_print_options): Allow recursive
11309         pretty printing if pretty printing is enabled.
11310
11311 2018-02-01  Leszek Swirski  <leszeks@google.com>
11312
11313         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11314         names after a structop as a filename.
11315
11316 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11317
11318         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11319         (arm_record_coproc_data_proc): Likewise.
11320
11321 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11322
11323         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11324
11325 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11326
11327         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11328         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11329
11330 2018-01-31  Pedro Alves  <palves@redhat.com>
11331
11332         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11333         * inflow.c (child_terminal_save_inferior): Wrap reference to
11334         tcgetpgrp in HAVE_TERMIOS_H.
11335         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11336         _WIN32.
11337         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11338         always iterate over all inferiors.
11339         (gdbsim_cntrl_c): Adjust.
11340         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11341
11342 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11343
11344         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11345         index type is objfile-owned if the element type is as well.
11346
11347 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11348
11349         GDB 8.1 released.
11350
11351 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11352
11353         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11354         "features/s390x-linux64.c".
11355         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11356         s390_linux32 and s390x_linux64.
11357         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11358         default tdesc.
11359         * s390-tdep.c: Include "features/s390-linux32.c" and
11360         "features/s390x-linux64.c".
11361         (s390_tdesc_valid): Add check for tdesc_has_registers.
11362         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11363         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11364         tdesc_s390x_linux64.
11365         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11366         tdesc_s390x_linux64 to...
11367         * s390-tdep.h: ...here.
11368
11369 2018-01-30  Pedro Alves  <palves@redhat.com>
11370
11371         PR gdb/13211
11372         * config.in, configure: Regenerate.
11373         * configure.ac: Check for getpgid.
11374         * go32-nat.c (go32_pass_ctrlc): New.
11375         (go32_target): Install it.
11376         * inf-child.c (inf_child_target): Install
11377         child_terminal_save_inferior, child_pass_ctrlc and
11378         child_interrupt.
11379         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11380         (inf_ptrace_target): No longer install it.
11381         * infcmd.c (interrupt_target_1): Adjust.
11382         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11383         (child_interrupt): Declare.
11384         (inferior::terminal_state): New.
11385         * inflow.c (struct terminal_info): Update comments.
11386         (inferior_process_group): Delete.
11387         (terminal_is_ours): Delete.
11388         (gdb_tty_state): New.
11389         (child_terminal_init): Adjust.
11390         (is_gdb_terminal, sharing_input_terminal_1)
11391         (sharing_input_terminal): New functions.
11392         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11393         Set the process's actual process group in the foreground if
11394         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11395         mark terminal as the inferior's if not sharing GDB's terminal.
11396         Don't check attach_flag.
11397         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11398         pass down a target_terminal_state.
11399         (child_terminal_save_inferior): New, factored out from ...
11400         (child_terminal_ours_1): ... this.  Handle
11401         target_terminal_state::is_ours_for_output.
11402         (child_interrupt, child_pass_ctrlc): New.
11403         (inflow_inferior_exit): Clear the inferior's terminal_state.
11404         (copy_terminal_info): Copy the inferior's terminal state.
11405         (_initialize_inflow): Remove reference to terminal_is_ours.
11406         * inflow.h (inferior_process_group): Delete.
11407         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11408         * procfs.c (procfs_target): Don't install procfs_interrupt.
11409         (procfs_interrupt): Delete.
11410         * remote.c (remote_serial_quit_handler): Adjust.
11411         (remote_interrupt): Remove ptid parameter.  Adjust.
11412         * target-delegates.c: Regenerate.
11413         * target.c: Include "terminal.h".
11414         (target_terminal::terminal_state): Rename to ...
11415         (target_terminal::m_terminal_state): ... this.
11416         (target_terminal::init): Adjust.
11417         (target_terminal::inferior): Adjust to per-inferior
11418         terminal_state.
11419         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11420         (target_terminal::ours, target_terminal::ours_for_output): Use
11421         target_terminal_is_ours_kind.
11422         (target_interrupt): Remove ptid parameter.  Adjust.
11423         (default_target_pass_ctrlc): Adjust.
11424         * target.h (target_ops::to_terminal_save_inferior): New field.
11425         (target_ops::to_interrupt): Remove ptid_t parameter.
11426         (target_interrupt): Remove ptid_t parameter.  Update comment.
11427         (target_pass_ctrlc): Update comment.
11428         * target/target.h (target_terminal_state): New scoped enum,
11429         factored out of ...
11430         (target_terminal::terminal_state): ... here.
11431         (target_terminal::inferior): Update comments.
11432         (target_terminal::restore_inferior): New.
11433         (target_terminal::is_inferior, target_terminal::is_ours)
11434         (target_terminal::is_ours_for_output): Adjust.
11435         (target_terminal::scoped_restore_terminal_state): Adjust to
11436         rename, and call restore_inferior() instead of inferior().
11437         (target_terminal::scoped_restore_terminal_state::m_state): Change
11438         type.
11439         (target_terminal::terminal_state): Rename to ...
11440         (target_terminal::m_terminal_state): ... this and change type.
11441
11442 2018-01-30  Pedro Alves  <palves@redhat.com>
11443
11444         * linux-nat.c (wait_for_signal): New function.
11445         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11446         directly.
11447         (async_terminal_is_ours)
11448         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11449         (linux_nat_add_target): Don't override
11450         to_terminal_inferior/to_terminal_ours.
11451
11452 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11453
11454         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11455
11456 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11457
11458         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11459         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11460         dwarf2_per_objfile_free here.
11461         (dwarf2_per_objfile_free): Remove.
11462         (_initialize_dwarf2_read): Don't register
11463         dwarf2_per_objfile_free as a registry cleanup.
11464
11465 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11466
11467         Avoid compilation errors in MinGW native builds
11468
11469         The error is triggered by including python-internal.h, and the
11470         error message is:
11471
11472              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11473                       from build-gnulib/import/math.h:27,
11474                       from d:/usr/Python26/include/pyport.h:235,
11475                       from d:/usr/Python26/include/Python.h:58,
11476                       from python/python-internal.h:94,
11477                       from python/py-arch.c:24:
11478              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11479         using ::hypot;
11480                 ^~~~~
11481
11482         This happens because Python headers define 'hypot' to expand t
11483         '_hypot' in the Windows builds.
11484         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11485         'hypoth'.  This avoids a compilation error.
11486
11487 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11488
11489         * MAINTAINERS (Write After Approval): Fix ordering.
11490
11491 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11492
11493         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11494
11495 2018-01-26  Alan Modra  <amodra@gmail.com>
11496
11497         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11498         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11499         Remove nop.  Make const.  Comment.
11500         (powerpc32_plt_stub_so_2): New.
11501         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11502         Correct count.  Update uses.
11503         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11504         Move common code reading PLT entry word.  Correct
11505         powerpc32_plt_stub PLT address calculation.
11506         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11507         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11508         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11509         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11510         (ppc64_standard_linkage8): Likewise.
11511         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11512         Correct insns description.
11513         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11514
11515 2018-01-24  Pedro Alves  <palves@redhat.com>
11516
11517         GCC PR libstdc++/83906
11518         * gdbtypes.c (operator==(const dynamic_prop &,
11519         const dynamic_prop &)): New.
11520         (operator==(const range_bounds &, const range_bounds &)): New.
11521         (check_types_equal): Use them instead of memcmp.
11522         * gdbtypes.h (operator==(const dynamic_prop &,
11523         const dynamic_prop &)): Declare.
11524         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11525         (operator==(const range_bounds &, const range_bounds &)): Declare.
11526         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11527
11528 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11529
11530         * s390-linux-tdep.c (s390_record_address_mask)
11531         (s390_record_calc_disp_common, s390_record_calc_disp)
11532         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11533         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11534         (s390_process_record): Move to s390-tdep.c.
11535         (s390_linux_init_abi_any): Adjust.
11536         * s390-tdep.c (s390_record_address_mask)
11537         (s390_record_calc_disp_common, s390_record_calc_disp)
11538         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11539         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11540         (s390_process_record): Moved from s390-linux-tdep.c
11541         (s390_gdbarch_init): Adjust.
11542
11543 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11544
11545         * s390-linux-nat.c (s390-tdep.h): New include.
11546         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11547         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11548         (ALLDEPFILES): Add s390-tdep.c.
11549         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11550         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11551         * s390-tdep.h: ...this.  New file.
11552         * s390-linux-tdep.c (s390-tdep.h): New include.
11553         (_initialize_s390_tdep): Rename to...
11554         (_initialize_s390_linux_tdep): ...this and adjust.
11555         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11556         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11557         s390-tdep.h.
11558         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11559         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11560         (s390_is_partial_instruction, s390_software_single_step)
11561         (is_non_branch_ril, s390_displaced_step_copy_insn)
11562         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11563         (s390_prologue_data, s390_addr, s390_store, s390_load)
11564         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11565         (s390_register_call_saved, s390_guess_tracepoint_registers)
11566         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11567         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11568         (s390_pseudo_register_name, s390_pseudo_register_type)
11569         (s390_pseudo_register_read, s390_pseudo_register_write)
11570         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11571         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11572         (s390_addr_bits_remove, s390_address_class_type_flags)
11573         (s390_address_class_type_flags_to_name)
11574         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11575         (s390_function_arg_float, s390_function_arg_vector)
11576         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11577         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11578         (s390_frame_align, s390_register_return_value, s390_return_value)
11579         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11580         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11581         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11582         (s390_trad_frame_prev_register, s390_unwind_cache)
11583         (s390_prologue_frame_unwind_cache)
11584         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11585         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11586         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11587         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11588         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11589         (s390_frame_base_address, s390_local_base_address)
11590         (s390_frame_base, s390_gcc_target_options)
11591         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11592         (s390_validate_reg_range, s390_tdesc_valid)
11593         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11594         * s390-tdep.c: ...this.  New file.
11595
11596 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11597
11598         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11599         (s390_process_record, s390_gdbarch_tdep_alloc)
11600         (s390_linux_init_abi_any): Use/set new hook.
11601
11602 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11603
11604         * s390-linux-tdep.c (osabi.h): New include.
11605         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11606         (s390_linux_init_abi_any): New functions.
11607         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11608
11609 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11610
11611         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11612         tdesc_has_registers check
11613
11614 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11615
11616         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11617         (s390_validate_reg_range): New macro.
11618         (s390_gdbarch_init): Adjust.
11619
11620 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11621
11622         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11623         (s390_gdbarch_tdep_alloc): Adjust.
11624         (s390_gdbarch_init): Adjust.
11625
11626 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11627
11628         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11629         <have_tdb>: Change type to bool.
11630         (s390_gdbarch_tdep_alloc): Adjust.
11631         (s390_gdbarch_init): Adjust.
11632
11633 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11634
11635         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11636         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11637         (s390_gdbarch_tdep_alloc): New function.
11638         (s390_gdbarch_init): Allocate tdep at start and use its fields
11639         instead of separate variables.
11640
11641 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11642
11643         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11644         when looking for cached gdbarch and add comment for remaining.
11645
11646 2018-01-22  Pedro Alves  <palves@redhat.com>
11647             Sergio Durigan Junior  <sergiodj@redhat.com>
11648
11649         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11650         case.
11651
11652 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11653
11654         * MAINTAINERS: Update my company e-mail address.
11655
11656 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11657
11658         * regcache.c (cooked_write_test): New function.
11659         (_initialize_regcache): Register the test.
11660
11661 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11662
11663         * ia64-tdep.c (ia64_pseudo_register_read): Call
11664         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11665         * m32c-tdep.c (m32c_cat_read): Likewise.
11666         (m32c_r3r2r1r0_read): Likewise.
11667         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11668         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11669
11670 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11671
11672         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11673         method raw_read instead of regcache_raw_read.
11674         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11675         * arm-tdep.c (arm_neon_quad_read): Likewise.
11676         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11677         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11678         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11679         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11680         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11681         (i386_pseudo_register_read_into_value): Likewise.
11682         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11683         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11684         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11685         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11686         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11687         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11688         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11689         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11690         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11691
11692 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11693
11694         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11695         * configure.tgt: Remove target mt.
11696         * mt-tdep.c: Remove.
11697         * regcache.c (cooked_read_test): Remove the check for mt.
11698
11699 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11700
11701         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11702         instead of gdbarch_pseudo_register_read_value.
11703
11704 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11705
11706         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11707         language is Ada.
11708
11709 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11710
11711         * linespec.c (create_sals_line_offset): Remove code that preserved
11712         the symtab_and_line's line number.
11713
11714 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11715
11716         * varobj.c (varobj_create): Don't set valid_block when creating a
11717         floating varobj.
11718
11719 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11720
11721         * varobj.c (varobj_create): Remove out of date comment.
11722
11723 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11724
11725         PR mi/20395
11726         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11727         updating innermost block.
11728         * parse.c (innermost_block_tracker::update): Take extra type
11729         parameter, and check types match before updating innermost block.
11730         (write_dollar_variable): Update innermost block for registers.
11731         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11732         (innermost_block_tracker::innermost_block_tracker): Initialise
11733         m_types member.
11734         (innermost_block_tracker::reset): Take type parameter.
11735         (innermost_block_tracker::update): Take type parameter, and pass
11736         type through as needed.
11737         (innermost_block_tracker::m_types): New member.
11738         * varobj.c (varobj_create): Pass type when reseting innermost
11739         block.
11740
11741 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11742
11743         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11744         * ada-lang.c (resolve_subexp): Likewise.
11745         * breakpoint.c (set_breakpoint_condition) Likewise.
11746         (watch_command_1) Likewise.
11747         * c-exp.y (variable): Likewise.
11748         * d-exp.y (PrimaryExpression): Likewise.
11749         * f-exp.y (variable): Likewise.
11750         * go-exp.y (variable): Likewise.
11751         * m2-exp.y (variable): Likewise.
11752         * objfiles.c (objfile::~objfile): Likewise.
11753         * p-exp.y (variable): Likewise.
11754         * parse.c (innermost_block): Change type.
11755         * parser-defs.h (class innermost_block_tracker): New.
11756         (innermost_block): Change to innermost_block_tracker.
11757         * printcmd.c (display_command): Switch to innermost_block API.
11758         (do_one_display): Likewise.
11759         * rust-exp.y (do_one_display): Likewise.
11760         * symfile.c (clear_symtab_users): Likewise.
11761         * varobj.c (varobj_create): Switch to innermost_block API, replace
11762         use of innermost_block with block stored on varobj object.
11763
11764 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11765
11766         * expression.h (innermost_block): Remove declaration.
11767         * varobj.c: Add 'parser-defs.h' include.
11768
11769 2018-01-19  Tom Tromey  <tom@tromey.com>
11770
11771         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11772         symbols in the static and global blocks.
11773
11774 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11775
11776         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11777         gdb_ptrace.h, and move including gdb_wait.h ...
11778         * nat/linux-ptrace.h: ... to here.
11779
11780 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11781
11782         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11783         inf_ptrace_detach_success.
11784         (inf_ptrace_detach_success): Add inferior parameter, use it
11785         instead of inferior_ptid, pass it to detach_inferior.
11786         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11787         parameter.
11788         * inferior.c (detach_inferior): Add overload that takes an
11789         inferior object.
11790         * inferior.h (detach_inferior): Likewise.
11791         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11792         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11793         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11794
11795 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11796
11797         * target.h (struct target_ops) <to_detach>: Add inferior
11798         parameter.
11799         (target_detach): Likewise.
11800         * target.c (dispose_inferior): Pass inferior down.
11801         (target_detach): Pass inferior down.  Assert that it is equal to
11802         the current inferior.
11803         * aix-thread.c (aix_thread_detach): Pass inferior down.
11804         * corefile.c (core_file_command): Pass current_inferior() down.
11805         * corelow.c (core_detach): Add inferior parameter.
11806         * darwin-nat.c (darwin_detach): Likewise.
11807         * gnu-nat.c (gnu_detach): Likewise.
11808         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11809         * infcmd.c (detach_command): Pass current_inferior() down to
11810         target_detach.
11811         * infrun.c (follow_fork_inferior): Pass parent_inf to
11812         target_detach.
11813         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11814         target_detach.
11815         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11816         * linux-thread-db.c (thread_db_detach): Likewise.
11817         * nto-procfs.c (procfs_detach): Likewise.
11818         * procfs.c (procfs_detach): Likewise.
11819         * record.c (record_detach): Likewise.
11820         * record.h (struct inferior): Forward-declare.
11821         (record_detach): Add inferior parameter.
11822         * remote-sim.c (gdbsim_detach): Likewise.
11823         * remote.c (remote_detach_1): Likewise.
11824         (remote_detach): Likewise.
11825         (extended_remote_detach): Likewise.
11826         * sol-thread.c (sol_thread_detach): Likewise.
11827         * target-debug.h (target_debug_print_inferior_p): New macro.
11828         * target-delegates.c: Re-generate.
11829         * top.c (kill_or_detach): Pass inferior down to target_detach.
11830         * windows-nat.c (windows_detach): Add inferior parameter.
11831
11832 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11833
11834         * target.h (struct target_ops) <to_detach>: Remove args
11835         parameter.
11836         (target_detach): Likewise.
11837         * target.c (dispose_inferior): Adjust.
11838         (target_detach): Remove args parameter, adjust.
11839         * aix-thread.c (aix_thread_detach): Adjust.
11840         * corefile.c (core_file_command): Adjust.
11841         * corelow.c (core_detach): Adjust.
11842         * darwin-nat.c (darwin_detach): Adjust.
11843         * gnu-nat.c (gnu_detach): Adjust.
11844         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11845         * infcmd.c (detach_command): Adjust
11846         * infrun.c (follow_fork_inferior): Adjust.
11847         (handle_vfork_child_exec_or_exit): Adjust.
11848         * linux-fork.c (linux_fork_detach): Remove args parameter.
11849         * linux-fork.h (linux_fork_detach): Likewise.
11850         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11851         * linux-thread-db.c (thread_db_detach): Likewise.
11852         * nto-procfs.c (procfs_detach): Likewise.
11853         * procfs.c (procfs_detach): Likewise.
11854         (do_detach): Remove signo parameter.
11855         * record.c (record_detach): Remove args parameter.
11856         * record.h (record_detach): Likewise.
11857         * remote-sim.c (gdbsim_detach): Likewise.
11858         * remote.c (remote_detach_1): Likewise.
11859         (remote_detach): Likewise.
11860         (extended_remote_detach): Likewise.
11861         * sol-thread.c (sol_thread_detach): Likewise.
11862         * target-delegates.c: Re-generate.
11863         * top.c (struct qt_args) <args>: Remove field.
11864         (kill_or_detach): Don't pass args.
11865         (quit_force): Don't set args.
11866         * windows-nat.c (windows_detach): Remove args parameter.
11867
11868 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11869
11870         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11871         (arm_linux_init_abi): Install it.
11872
11873 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11874
11875         * osabi.c (gdb_osabi_names): Extend the regexp for
11876         arm-linux-gnueabihf.
11877
11878 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11879
11880         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11881         m_abbrevs.
11882         (abbrev_table::add_abbrev): Update.
11883         (abbrev_table::lookup_abbrev): Update.
11884
11885 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11886
11887         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11888
11889 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11890
11891         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11892         to "std::string".
11893
11894 2018-01-17  Tom Tromey  <tom@tromey.com>
11895
11896         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11897
11898 2018-01-17  Tom Tromey  <tom@tromey.com>
11899
11900         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11901         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11902         (create_array_type_with_stride): Update.
11903         * dwarf2read.c (set_die_type): Update.
11904
11905 2018-01-17  Tom Tromey  <tom@tromey.com>
11906
11907         * dwarf2read.c (delayed_method_info): Remove typedef.
11908         (dwarf2_cu::method_info): Now a std::vector.
11909         (add_to_method_list): Update.
11910         (free_delayed_list): Remove.
11911         (compute_delayed_physnames): Update.
11912         (process_full_comp_unit, process_full_type_unit): Clear the method
11913         list.  Remove cleanups.
11914         (psymtab_include_file_name): Add name_holder parameter.  Use
11915         unique_xmalloc_ptr.
11916         (dwarf_decode_lines): Update.
11917
11918 2018-01-17  Tom Tromey  <tom@tromey.com>
11919             Simon Marchi  <simon.marchi@ericsson.com>
11920
11921         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11922         (dwarf2_per_objfile::free_cached_comp_units)
11923         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11924         (init_cutu_and_read_dies_no_follow): Update.
11925         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11926         (dwarf2_cu::~dwarf2_cu): New.
11927         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11928         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11929
11930 2018-01-17  Tom Tromey  <tom@tromey.com>
11931             Simon Marchi  <simon.marchi@ericsson.com>
11932
11933         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11934         (struct die_reader_specs) <abbrev_table>: New member.
11935         (struct abbrev_table): Add constructor.
11936         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11937         <abbrev_obstack>: Now an auto_obstack.
11938         (abbrev_table_up): New typedef.
11939         (init_cu_die_reader): Add abbrev_table parameter.
11940         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11941         Add result_dwo_abbrev_table.
11942         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11943         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11944         Update.
11945         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11946         parameter.
11947         (skip_children): Update.
11948         (abbrev_table::alloc_abbrev): Rename from
11949         abbrev_table_alloc_abbrev.
11950         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11951         (abbrev_table::lookup_abbrev): Rename from
11952         abbrev_table_lookup_abbrev.
11953         (abbrev_table_read_table): Return abbrev_table_up.
11954         (abbrev_table_free, abbrev_table_free_cleanup)
11955         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11956         (load_partial_dies): Update.
11957
11958 2018-01-17  Tom Tromey  <tom@tromey.com>
11959
11960         * dwarf2read.c (dwarf2_compute_name): Update comment.
11961         (read_func_scope, read_variable): Update.
11962         (new_symbol): Remove.
11963         (new_symbol_full): Rename to new_symbol.
11964
11965 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11966
11967         PR gdb/16577
11968         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11969         a warning instead of throwing an error, set section size to 0 and return
11970         NULL.
11971         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11972
11973 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11974
11975         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11976         std::string.
11977         (linux_ptrace_attach_fail_reason_string): Likewise.
11978         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11979         Likewise.
11980         (linux_ptrace_attach_fail_reason_string): Likewise.
11981         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11982
11983 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11984
11985         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11986
11987 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
11988
11989         PR gdb/21559
11990         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11991         checking for fs_base/gs_base fields in struct user_regs_struct.
11992         * configure: Regenerate.
11993
11994 2018-01-17  Yao Qi  <yao.qi@linaro.org>
11995
11996         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11997         function.
11998         (aarch64_linux_init_abi): Install it to gdbarch hook
11999         gcc_target_options.
12000
12001 2018-01-15  Pedro Alves  <palves@redhat.com>
12002
12003         * common/signals-state-save-restore.c
12004         (save_original_signals_state): Fix typos.
12005
12006 2017-01-12  Tom Tromey  <tom@tromey.com>
12007             Sergio Durigan Junior  <sergiodj@redhat.com>
12008
12009         * Makefile.in (install-only): Install gdb-add-index.
12010
12011 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12012
12013         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12014
12015 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12016
12017         * infrun.c (keep_going_pass_signal): Clear step-over info when
12018         insert_breakpoints fails.
12019
12020 2018-01-11  Pedro Alves  <palves@redhat.com>
12021
12022         PR gdb/22583
12023         * infrun.c (resume): Rename to ...
12024         (resume_1): ... this.
12025         (resume): Reimplement as wrapper around resume_1.
12026
12027 2018-01-11  Pedro Alves  <palves@redhat.com>
12028
12029         PR remote/22597
12030         * remote.c (remote_parse_stop_reply): Default to the last-set
12031         general thread instead of to 'magic_null_ptid'.
12032
12033 2018-01-10  Pedro Alves  <palves@redhat.com>
12034
12035         * language.h (language_get_symbol_name_matcher): Rename ...
12036         (get_symbol_name_matcher): ... this.
12037         * language.c (language_get_symbol_name_matcher): Ditto.
12038         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12039         callers adjusted.
12040
12041 2018-01-10  Pedro Alves  <palves@redhat.com>
12042
12043         PR gdb/22670
12044         * dwarf2read.c
12045         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12046         Adjust to use language_get_symbol_name_matcher instead of
12047         language_defn::la_get_symbol_name_matcher.
12048         * language.c (language_get_symbol_name_matcher): If in Ada mode
12049         and the lookup name is a verbatim match, return Ada's matcher.
12050         * language.h (language_get_symbol_name_matcher): Adjust comment.
12051         (ada_lookup_name_info::verbatim_p):: New method.
12052
12053 2018-01-10  Pedro Alves  <palves@redhat.com>
12054
12055         PR gdb/22670
12056         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12057         minsym's language is language_auto or language_cplus, pass down
12058         language_ada instead.
12059         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12060
12061 2018-01-10  Pedro Alves  <palves@redhat.com>
12062
12063         PR gdb/22670
12064         * minsyms.c (linkage_name_str): New function.
12065         (iterate_over_minimal_symbols): Use it.
12066
12067 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12068
12069         * NEWS: Document that 'info proc' now works on FreeBSD.
12070
12071 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12072
12073         * configure.ac: Check for kinfo_getfile in libutil.
12074         * configure: Regenerate.
12075         * config.in: Regenerate.
12076         * fbsd-nat.c: Include "fbsd-tdep.h".
12077         (fbsd_fetch_cmdline): New.
12078         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12079         rather than calling error.
12080         (fbsd_info_proc): New.
12081         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12082         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12083         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12084
12085 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12086
12087         * fbsd-nat.c (struct free_deleter): Remove.
12088         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12089
12090 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12091
12092         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12093         NULL for an empty pathname.
12094
12095 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12096
12097         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12098         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12099         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12100         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12101         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12102         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12103         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12104         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12105         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12106         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12107         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12108         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12109         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12110         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12111         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12112
12113 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12114
12115         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12116         (gnu_xfer_auxv): New function.
12117         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12118         TARGET_OBJECT_AUXV.
12119
12120 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12121             Simon Marchi  <simon.marchi@ericsson.com>
12122
12123         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12124         common/selftest.c.
12125         (COMMON_OBS): Remove selftest.o.
12126         * configure.ac: Append selftest-arch.c and common/selftest.c to
12127         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12128         * configure: Re-generated.
12129         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12130         GDB_SELF_TEST.
12131         (maintenance_info_selftests): Likewise.
12132
12133 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12134
12135         * ada-valprint.c (val_print_packed_array_elements): Use
12136         proper number of elements when printing an array indexed
12137         by an enumeration type.
12138
12139 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12140
12141         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12142         (dw2_get_file_names_reader): Adjust.
12143         (lookup_dwo_signatured_type): Adjust.
12144         (lookup_dwp_signatured_type): Adjust.
12145         (lookup_signatured_type): Adjust.
12146         (create_type_unit_group): Adjust.
12147         (get_type_unit_group): Adjust.
12148         (process_psymtab_comp_unit_reader): Adjust.
12149         (build_type_psymtabs_reader): Adjust.
12150         (scan_partial_symbols): Adjust.
12151         (add_partial_symbol): Adjust.
12152         (add_partial_subprogram): Adjust.
12153         (peek_die_abbrev): Adjust.
12154         (fixup_go_packaging): Adjust.
12155         (process_imported_unit_die): Adjust.
12156         (dwarf2_compute_name): Adjust.
12157         (dwarf2_physname): Adjust.
12158         (read_import_statement): Adjust.
12159         (handle_DW_AT_stmt_list): Adjust.
12160         (read_file_scope): Adjust.
12161         (read_func_scope): Adjust.
12162         (read_lexical_block_scope): Adjust.
12163         (read_call_site_scope): Adjust.
12164         (read_variable): Adjust.
12165         (dwarf2_rnglists_process): Adjust.
12166         (dwarf2_ranges_process): Adjust.
12167         (dwarf2_ranges_read): Adjust.
12168         (dwarf2_get_pc_bounds): Adjust.
12169         (dwarf2_record_block_ranges): Adjust.
12170         (dwarf2_add_field): Adjust.
12171         (dwarf2_add_member_fn): Adjust.
12172         (read_structure_type): Adjust.
12173         (process_structure_scope): Adjust.
12174         (read_enumeration_type): Adjust.
12175         (read_array_type): Adjust.
12176         (mark_common_block_symbol_computed): Adjust.
12177         (read_common_block): Adjust.
12178         (read_namespace_type): Adjust.
12179         (read_namespace): Adjust.
12180         (read_module_type): Adjust.
12181         (read_tag_pointer_type): Adjust.
12182         (read_tag_ptr_to_member_type): Adjust.
12183         (read_tag_string_type): Adjust.
12184         (read_subroutine_type): Adjust.
12185         (read_typedef): Adjust.
12186         (read_base_type): Adjust.
12187         (attr_to_dynamic_prop): Adjust.
12188         (read_subrange_type): Adjust.
12189         (read_unspecified_type): Adjust.
12190         (dwarf2_read_abbrevs): Adjust.
12191         (load_partial_dies): Adjust.
12192         (read_partial_die): Adjust.
12193         (find_partial_die): Adjust.
12194         (guess_partial_die_structure_name): Adjust.
12195         (fixup_partial_die): Adjust.
12196         (read_attribute_value): Adjust.
12197         (read_addr_index): Adjust.
12198         (read_addr_index_from_leb128): Adjust.
12199         (read_str_index): Adjust.
12200         (dwarf2_string_attr): Adjust.
12201         (get_debug_line_section): Adjust.
12202         (dwarf_decode_line_header): Adjust.
12203         (lnp_state_machine::check_line_address): Adjust.
12204         (dwarf_decode_lines_1): Adjust.
12205         (dwarf_decode_lines): Adjust.
12206         (dwarf2_start_symtab): Adjust.
12207         (var_decode_location): Adjust.
12208         (new_symbol_full): Adjust.
12209         (dwarf2_const_value_data): Adjust.
12210         (dwarf2_const_value_attr): Adjust.
12211         (dwarf2_const_value): Adjust.
12212         (die_type): Adjust.
12213         (die_containing_type): Adjust.
12214         (build_error_marker_type): Adjust.
12215         (lookup_die_type): Adjust.
12216         (guess_full_die_structure_name): Adjust.
12217         (anonymous_struct_prefix): Adjust.
12218         (determine_prefix): Adjust.
12219         (dwarf2_name): Adjust.
12220         (follow_die_ref_or_sig): Adjust.
12221         (follow_die_offset): Adjust.
12222         (follow_die_ref): Adjust.
12223         (follow_die_sig_1): Adjust.
12224         (follow_die_sig): Adjust.
12225         (get_signatured_type): Adjust.
12226         (get_DW_AT_signature_type): Adjust.
12227         (decode_locdesc): Adjust.
12228         (dwarf_decode_macros): Adjust.
12229         (cu_debug_loc_section): Adjust.
12230         (fill_in_loclist_baton): Adjust.
12231         (dwarf2_symbol_mark_computed): Adjust.
12232         (init_one_comp_unit): Don't assign
12233         dwarf2_cu::dwarf2_per_objfile.
12234         (set_die_type): Adjust.
12235
12236 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12237
12238         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12239         <dwarf2_per_objfile>: New field.
12240         (dwarf2_per_objfile): Remove global.
12241         (get_dwarf2_per_objfile): New function.
12242         (set_dwarf2_per_objfile): New function.
12243         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12244         dwarf2_per_objfile.
12245         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12246         (read_abbrev_offset): Likewise.
12247         (read_indirect_string): Likewise.
12248         (read_indirect_line_string): Likewise.
12249         (read_indirect_string_at_offset): Likewise.
12250         (read_indirect_string_from_dwz): Likewise.
12251         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12252         dwarf2_per_objfile.
12253         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12254         (create_all_comp_units): Change objfile parameter to
12255         dwarf2_per_objfile.
12256         (create_all_type_units): Likewise.
12257         (process_queue): Add dwarf2_per_objfile parameter.
12258         (read_and_check_comp_unit_head): Likewise.
12259         (lookup_dwo_unit_in_dwp): Likewise.
12260         (get_dwp_file): Likewise.
12261         (process_cu_includes): Likewise.
12262         (struct free_dwo_file_cleanup_data): New struct.
12263         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12264         set_dwarf2_per_objfile.
12265         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12266         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12267         context, adjust calls.
12268         (dw2_instantiate_symtab): Likewise.
12269         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12270         (dw2_get_cu): Likewise.
12271         (create_cu_from_index_list): Change objfile parameter to
12272         dwarf2_per_objfile.
12273         (create_cus_from_index_list): Get dwarf2_per_objfile from
12274         context, adjust calls.
12275         (create_cus_from_index): Likewise.
12276         (create_signatured_type_table_from_index): Change objfile
12277         parameter to dwarf2_per_objfile.
12278         (create_signatured_type_table_from_debug_names): Change objfile
12279         parameter to dwarf2_per_objfile.
12280         (create_addrmap_from_index): Likewise.
12281         (create_addrmap_from_aranges): Likewise.
12282         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12283         (dw2_setup): Remove.
12284         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12285         context.
12286         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12287         get_dwarf2_per_objfile.
12288         (dw2_forget_cached_source_info): Likewise.
12289         (dw2_map_symtabs_matching_filename): Likewise.
12290         (struct dw2_symtab_iterator) <index>: Remove.
12291         <dwarf2_per_objfile>: New field.
12292         (dw2_symtab_iter_init): Replace index parameter with
12293         dwarf2_per_objfile.
12294         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12295         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12296         (dw2_print_stats): Likewise.
12297         (dw2_dump): Likewise.
12298         (dw2_expand_symtabs_for_function): Likewise.
12299         (dw2_expand_all_symtabs): Likewise.
12300         (dw2_expand_symtabs_with_fullname): Likewise.
12301         (dw2_expand_marked_cus): Replace index and objfile parameters
12302         with dwarf2_per_objfile.
12303         (dw_expand_symtabs_matching_file_matcher): Add
12304         dwarf2_per_objfile parameter and adjust calls.
12305         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12306         adjust calls.
12307         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12308         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12309         adjust calls.
12310         (create_cus_from_debug_names_list): Replace objfile parameter
12311         with dwarf2_per_objfile and adjust calls.
12312         (create_cus_from_debug_names): Likewise.
12313         (dwarf2_read_debug_names): Likewise.
12314         (mapped_debug_names::namei_to_name): Adjust call.
12315         (dw2_debug_names_iterator::next): Likewise.
12316         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12317         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12318         (dw2_debug_names_dump): Likewise.
12319         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12320         (dw2_debug_names_expand_symtabs_matching): Likewise.
12321         (dwarf2_initialize_objfile): Likewise.
12322         (dwarf2_build_psymtabs): Likewise.
12323         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12324         this_cu.
12325         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12326         (read_and_check_comp_unit_head): Likewise.
12327         (read_abbrev_offset): Likewise.
12328         (create_debug_type_hash_table): Likewise.
12329         (create_debug_types_hash_table): Likewise.
12330         (create_all_type_units): Replace objfile parameter with
12331         dwarf2_per_objfile.
12332         (add_type_unit): Add dwarf2_per_objfile parameter.
12333         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12334         with dwarf2_per_objfile.
12335         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12336         (lookup_dwp_signatured_type): Likewise.
12337         (lookup_signatured_type): Likewise.
12338         (read_cutu_die_from_dwo): Likewise.
12339         (init_tu_and_read_dwo_dies): Likewise.
12340         (init_cutu_and_read_dies): Likewise.
12341         (init_cutu_and_read_dies_no_follow): Likewise.
12342         (allocate_type_unit_groups_table): Add objfile parameter.
12343         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12344         (get_type_unit_group): Likewise.
12345         (process_psymtab_comp_unit): Update call.
12346         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12347         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12348         (print_tu_stats): Likewise.
12349         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12350         in void* parameter.
12351         (build_type_psymtabs): Change objfile parameter to
12352         dwarf2_per_objfile.
12353         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12354         passed in void* parameter.
12355         (process_skeletonless_type_units): Change objfile parameter to
12356         dwarf2_per_objfile.
12357         (set_partial_user): Likewise.
12358         (dwarf2_build_psymtabs_hard): Likewise.
12359         (read_comp_units_from_section): Likewise.
12360         (create_all_comp_units): Likewise.
12361         (scan_partial_symbols): Update calls.
12362         (add_partial_symbol): Likewise.
12363         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12364         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12365         (process_queue): Add dwarf2_per_objfile parameter.
12366         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12367         (compute_compunit_symtab_includes): Likewise.
12368         (process_cu_includes): Add dwarf2_per_objfile parameter.
12369         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12370         (process_full_type_unit): Likewise.
12371         (process_imported_unit_die): Update call.
12372         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12373         (read_file_scope): Likewise.
12374         (allocate_dwo_file_hash_table): Add objfile parameter.
12375         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12376         (create_cus_hash_table): Likewise.
12377         (create_dwp_hash_table): Likewise.
12378         (create_dwo_unit_in_dwp_v1): Likewise.
12379         (create_dwp_v2_section): Likewise.
12380         (create_dwo_unit_in_dwp_v2): Likewise.
12381         (lookup_dwo_unit_in_dwp): Likewise.
12382         (try_open_dwop_file): Likewise.
12383         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12384         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12385         cleanup to include a reference to dwarf2_per_objfile.
12386         (open_dwp_file): Add dwarf2_per_objfile parameter.
12387         (open_and_init_dwp_file): Likewise.
12388         (get_dwp_file): Likewise.
12389         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12390         (queue_and_load_all_dwo_tus): Update call.
12391         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12392         data.
12393         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12394         (dwarf2_ranges_process): Likewise.
12395         (dwarf2_get_pc_bounds): Likewise.
12396         (mark_common_block_symbol_computed): Likewise.
12397         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12398         (dwarf2_read_abbrevs): Update call.
12399         (read_partial_die): Use dwarf2_per_objfile from cu.
12400         (find_partial_die): Likewise.
12401         (fixup_partial_die): Likewise.
12402         (read_attribute_value): Likewise.
12403         (read_indirect_string_at_offset_from): Add objfile parameter.
12404         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12405         parameter.
12406         (read_indirect_string_from_dwz): Add objfile parameter.
12407         (read_indirect_string): Add objfile parameter.
12408         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12409         (read_addr_index): Use dwarf2_per_objfile from cu.
12410         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12411         call dw2_setup.
12412         (read_str_index): Use dwarf2_per_objfile from cu.
12413         (get_debug_line_section): Likewise.
12414         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12415         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12416         (new_symbol_full): Use dwarf2_per_objfile from cu.
12417         (build_error_marker_type): Likewise.
12418         (lookup_die_type): Likewise.
12419         (determine_prefix): Likewise.
12420         (follow_die_offset): Likewise.
12421         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12422         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12423         (dwarf2_fetch_die_type_sect_off): Likewise.
12424         (dwarf2_get_die_type): Likewise.
12425         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12426         (get_signatured_type): Likewise.
12427         (get_DW_AT_signature_type): Likewise.
12428         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12429         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12430         (cu_debug_loc_section): Likewise.
12431         (fill_in_loclist_baton): Likewise.
12432         (dwarf2_symbol_mark_computed): Likewise.
12433         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12434         dwarf2_per_objfile.
12435         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12436         parameter.
12437         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12438         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12439         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12440         (set_die_type): Use dwarf2_free_objfile from cu.
12441         (get_die_type_at_offset): Likewise.
12442         (dwarf2_per_objfile_free): Don't assign global variable.
12443         (debug_names) <constructor>: Add dwarf2_per_objfile
12444         parameter, update m_debugstrlookup construction.
12445         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12446         parameter.
12447         <m_dwarf2_per_objfile>: New field.
12448         <lookup>: Use m_dwarf2_per_objfile.
12449         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12450         (psyms_seen_size): Likewise.
12451         (write_gdbindex): Replace objfile parameter with
12452         dwarf2_per_objfile.
12453         (write_debug_names): Likewise.
12454         (write_psymtabs_to_index): Likewise.
12455         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12456         calls.
12457
12458 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12459
12460         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12461         <dwarf2_per_objfile>: New field.
12462         (struct dwarf2_per_cu_data) <objfile>: Remove.
12463         <dwarf2_per_objfile>: New field.
12464         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12465         of objfile.
12466         (create_signatured_type_table_from_index): Likewise.
12467         (create_debug_type_hash_table): Likewise.
12468         (fill_in_sig_entry_from_dwo_entry): Likewise.
12469         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12470         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12471         objfile.
12472         (create_partial_symtab): Access objfile through
12473         dwarf2_per_objfile.
12474         (process_psymtab_comp_unit_reader): Likewise.
12475         (read_comp_units_from_section): Likewise.
12476         (scan_partial_symbols): Likewise.
12477         (add_partial_symbol): Likewise.
12478         (add_partial_subprogram): Likewise.
12479         (peek_die_abbrev): Likewise.
12480         (fixup_go_packaging): Likewise.
12481         (process_full_comp_unit): Likewise.
12482         (process_full_type_unit): Likewise.
12483         (process_imported_unit_die): Likewise.
12484         (dwarf2_compute_name): Likewise.
12485         (dwarf2_physname): Likewise.
12486         (read_import_statement): Likewise.
12487         (create_cus_hash_table): Assign dwarf2_physname instead of
12488         objfile.
12489         (read_func_scope): Access objfile through dwarf2_per_objfile.
12490         (read_lexical_block_scope): Likewise.
12491         (read_call_site_scope): Likewise.
12492         (read_variable): Likewise.
12493         (dwarf2_rnglists_process): Likewise.
12494         (dwarf2_ranges_process): Likewise.
12495         (dwarf2_ranges_read): Likewise.
12496         (dwarf2_record_block_ranges): Likewise.
12497         (dwarf2_add_field): Likewise.
12498         (dwarf2_add_member_fn): Likewise.
12499         (read_structure_type): Likewise.
12500         (process_structure_scope): Likewise.
12501         (read_enumeration_type): Likewise.
12502         (read_array_type): Likewise.
12503         (read_common_block): Likewise.
12504         (read_namespace_type): Likewise.
12505         (read_namespace): Likewise.
12506         (read_module_type): Likewise.
12507         (read_tag_pointer_type): Likewise.
12508         (read_tag_ptr_to_member_type): Likewise.
12509         (read_tag_string_type): Likewise.
12510         (read_subroutine_type): Likewise.
12511         (read_typedef): Likewise.
12512         (read_base_type): Likewise.
12513         (attr_to_dynamic_prop): Likewise.
12514         (read_subrange_type): Likewise.
12515         (read_unspecified_type): Likewise.
12516         (load_partial_dies): Likewise.
12517         (read_partial_die): Likewise.
12518         (find_partial_die): Likewise.
12519         (guess_partial_die_structure_name): Likewise.
12520         (fixup_partial_die): Likewise.
12521         (read_attribute_value): Likewise.
12522         (read_addr_index_from_leb128): Likewise.
12523         (dwarf2_read_addr_index): Likewise.
12524         (dwarf2_string_attr): Likewise.
12525         (lnp_state_machine::check_line_address): Likewise.
12526         (dwarf_decode_lines_1): Likewise.
12527         (dwarf_decode_lines): Likewise.
12528         (dwarf2_start_symtab): Likewise.
12529         (var_decode_location): Likewise.
12530         (new_symbol_full): Likewise.
12531         (dwarf2_const_value_data): Likewise.
12532         (dwarf2_const_value_attr): Likewise.
12533         (dwarf2_const_value): Likewise.
12534         (die_type): Likewise.
12535         (die_containing_type): Likewise.
12536         (lookup_die_type): Likewise.
12537         (guess_full_die_structure_name): Likewise.
12538         (anonymous_struct_prefix): Likewise.
12539         (dwarf2_name): Likewise.
12540         (follow_die_ref_or_sig): Likewise.
12541         (follow_die_offset): Likewise.
12542         (follow_die_ref): Likewise.
12543         (dwarf2_fetch_die_loc_sect_off): Likewise.
12544         (dwarf2_fetch_constant_bytes): Likewise.
12545         (dwarf2_fetch_die_type_sect_off): Likewise.
12546         (dwarf2_get_die_type): Likewise.
12547         (follow_die_sig): Likewise.
12548         (decode_locdesc): Likewise.
12549         (dwarf2_per_cu_objfile): Likewise.
12550         (dwarf2_per_cu_text_offset): Likewise.
12551         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12552         objfile.
12553         (set_die_type): Access objfile through
12554         dwarf2_per_objfile.
12555
12556 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12557
12558         * valprint.c (converted_character_d): Remove typedef.
12559         (DEF_VEC_O (converted_character_d)): Remove.
12560         (count_next_character): Use std::vector.
12561         (print_converted_chars_to_obstack): Likewise.
12562         (generic_printstr): Likewise.
12563
12564 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12565
12566         * xml-support.h (struct gdb_xml_value): Add constructor.
12567         <value>: Change type to unique_xmalloc_ptr.
12568         (gdb_xml_value_s): Remove typedef.
12569         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12570         (gdb_xml_element_start_handler): Change parameter type to
12571         std::vector.
12572         (xml_find_attribute): Likewise.
12573         * xml-support.c (xml_find_attribute): Change parameter type to
12574         std::vector and adjust.
12575         (gdb_xml_values_cleanup): Remove.
12576         (gdb_xml_parser::start_element): Adjust to std::vector.
12577         (xinclude_start_include): Change paraeter type to std::vector
12578         and adjust.
12579         * btrace.c (check_xml_btrace_version): Likewise.
12580         (parse_xml_btrace_block): Likewise.
12581         (parse_xml_btrace_pt_config_cpu): Likewise.
12582         (parse_xml_btrace_pt): Likewise.
12583         (parse_xml_btrace_conf_bts): Likewise.
12584         (parse_xml_btrace_conf_pt): Likewise.
12585         * memory-map.c (memory_map_start_memory): Likewise.
12586         (memory_map_start_property): Likewise.
12587         * osdata.c (osdata_start_osdata): Likewise.
12588         (osdata_start_item): Likewise.
12589         (osdata_start_column): Likewise.
12590         * remote.c (start_thread): Likewise.
12591         * solib-aix.c (library_list_start_library): Likewise.
12592         (library_list_start_list): Likewise.
12593         * solib-svr4.c (library_list_start_library): Likewise.
12594         (svr4_library_list_start_list): Likewise.
12595         * solib-target.c (library_list_start_segment): Likewise.
12596         (library_list_start_section): Likewise.
12597         (library_list_start_library): Likewise.
12598         (library_list_start_list): Likewise.
12599         * tracepoint.c (traceframe_info_start_memory): Likewise.
12600         (traceframe_info_start_tvar): Likewise.
12601         * xml-syscall.c (syscall_start_syscall): Likewise.
12602         * xml-tdesc.c (tdesc_start_target): Likewise.
12603         (tdesc_start_feature): Likewise.
12604         (tdesc_start_reg): Likewise.
12605         (tdesc_start_union): Likewise.
12606         (tdesc_start_struct): Likewise.
12607         (tdesc_start_flags): Likewise.
12608         (tdesc_start_enum): Likewise.
12609         (tdesc_start_field): Likewise.
12610         (tdesc_start_enum_value): Likewise.
12611         (tdesc_start_vector): Likewise.
12612
12613 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12614
12615         * extension.h (struct xmethod_worker) <clone>: Remove.
12616         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12617         Remove.
12618         (python_xmethod_worker::clone): Remove.
12619         * valops.c (find_overload_match): Use std::move instead of
12620         clone.
12621
12622 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12623
12624         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12625         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12626         <free_xmethod_worker_data>: Remove.
12627         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12628         <get_xmethod_arg_types>: Remove.
12629         <get_xmethod_result_type>: Remove.
12630         <invoke_xmethod>: Remove.
12631         * extension.c (new_xmethod_worker): Remove.
12632         (clone_xmethod_worker): Remove.
12633         (get_matching_xmethod_workers): Return void, pass std::vector by
12634         pointer.
12635         (get_xmethod_arg_types): Rename to...
12636         (xmethod_worker::get_arg_types): ... this, and adjust.
12637         (get_xmethod_result_type): Rename to...
12638         (xmethod_worker::get_result_type): ... this, and adjust.
12639         (invoke_xmethod): Remove.
12640         (free_xmethod_worker): Remove.
12641         (free_xmethod_worker_vec): Remove.
12642         * extension.h (enum ext_lang_rc): Move here from
12643         extension-priv.h.
12644         (struct xmethod_worker): Add constructor and destructor.
12645         <data>: Remove.
12646         <value>: Remove.
12647         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12648         virtual pure methods.
12649         <get_arg_types, get_result_type>: New methods.
12650         (xmethod_worker_ptr): Remove typedef.
12651         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12652         (xmethod_worker_vec): Remove typedef.
12653         (xmethod_worker_up): New typedef.
12654         (invoke_xmethod): Remove.
12655         (clone_xmethod_worker): Remove.
12656         (free_xmethod_worker): Remove.
12657         (free_xmethod_worker_vec): Remove.
12658         (get_xmethod_arg_types): Remove.
12659         (get_xmethod_result_type): Remove.
12660         * valops.c (find_method_list): Use std::vector, don't use
12661         intermediate vector.
12662         (value_find_oload_method_list): Use std::vector.
12663         (find_overload_match): Use std::vector.
12664         (find_oload_champ): Use std::vector.
12665         * value.c (value_free): Use operator delete.
12666         (value_of_xmethod): Rename to...
12667         (value_from_xmethod): ... this.  Don't assign
12668         xmethod_worker::value, take rvalue-reference.
12669         (result_type_of_xmethod): Adjust.
12670         (call_xmethod): Adjust.
12671         * value.h: Include extension.h.
12672         (struct xmethod_worker): Don't forward-declare.
12673         (value_of_xmethod): Rename to...
12674         (value_from_xmethod): ... this, take rvalue-reference.
12675         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12676         (struct python_xmethod_worker): ... this, add constructor and
12677         destructor.
12678         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12679         (gdbpy_free_xmethod_worker_data): Rename to...
12680         (python_xmethod_worker::~python_xmethod_worker): ... this and
12681         adjust.
12682         (gdbpy_clone_xmethod_worker_data): Rename to...
12683         (python_xmethod_worker::clone): ... this and adjust.
12684         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12685         temporary vector.
12686         (gdbpy_get_xmethod_arg_types): Rename to...
12687         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12688         (gdbpy_get_xmethod_result_type): Rename to...
12689         (python_xmethod_worker::do_get_result_type): ... this and
12690         adjust.
12691         (gdbpy_invoke_xmethod): Rename to...
12692         (python_xmethod_worker::invoke): ... this and adjust.
12693         (new_python_xmethod_worker): Rename to...
12694         (python_xmethod_worker::python_xmethod_worker): ... this and
12695         adjust.
12696         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12697         Remove.
12698         (gdbpy_free_xmethod_worker_data): Remove.
12699         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12700         (gdbpy_get_xmethod_arg_types): Remove.
12701         (gdbpy_get_xmethod_result_type): Remove.
12702         (gdbpy_invoke_xmethod): Remove.
12703         * python/python.c (python_extension_ops): Remove obsolete
12704         callbacks.
12705
12706 2018-01-05  Pedro Alves  <palves@redhat.com>
12707
12708         PR gdb/18653
12709         * common/signals-state-save-restore.c
12710         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12711         find a custom handler preinstalled, instead of internal erroring.
12712         But only warn if !quiet.
12713         * common/signals-state-save-restore.h
12714         (save_original_signals_state): New parameter 'quiet'.
12715         * main.c (captured_main_1): Move save_original_signals_state call
12716         after option handling, and pass QUIET.
12717
12718 2018-01-05  Pedro Alves  <palves@redhat.com>
12719
12720         * spu-tdep.c (spu_catch_start): Pass
12721         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12722
12723 2018-01-05  Pedro Alves  <palves@redhat.com>
12724
12725         PR gdb/22670
12726         * ada-lang.c (literal_symbol_name_matcher): New function.
12727         (ada_get_symbol_name_matcher): Use it for
12728         symbol_name_match_type::SEARCH_NAME.
12729         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12730         it down instead of assuming symbol_name_match_type::FULL.
12731         * block.h (block_lookup_symbol): New parameter 'match_type'.
12732         * c-valprint.c (print_unpacked_pointer): Use
12733         lookup_symbol_search_name instead of lookup_symbol.
12734         * compile/compile-object-load.c (get_out_value_type): Pass down
12735         symbol_name_match_type::SEARCH_NAME.
12736         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12737         symbol_name_match_type::FULL.
12738         * cp-support.c (cp_get_symbol_name_matcher): Handle
12739         symbol_name_match_type::SEARCH_NAME.
12740         * infrun.c (insert_exception_resume_breakpoint): Use
12741         lookup_symbol_search_name.
12742         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12743         * psymtab.c (maintenance_check_psymtabs): Use
12744         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12745         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12746         SYMBOL_SEARCH_NAME.
12747         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12748         if symbol_name_match_type::SEARCH_NAME.
12749         (lookup_symbol_in_language): Pass down
12750         symbol_name_match_type::FULL.
12751         (lookup_symbol_search_name): New.
12752         (lookup_language_this): Pass down
12753         symbol_name_match_type::SEARCH_NAME.
12754         (lookup_symbol_aux, lookup_local_symbol): New parameter
12755         'match_type'.  Pass it down.
12756         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12757         (lookup_symbol_search_name): New declaration.
12758         (lookup_symbol_in_block): New 'match_type' parameter.
12759
12760 2018-01-05  Pedro Alves  <palves@redhat.com>
12761
12762         PR gdb/22670
12763         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12764         ada_lookup_symbol.
12765         (ada_lookup_symbol): Reimplement in terms of
12766         ada_lookup_symbol_list, bits factored out from
12767         ada_lookup_encoded_symbol.
12768
12769 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12770
12771         * ada-exp.y (write_object_renaming): When subscripting an array
12772         using a symbol as the index, pass the block in call to
12773         ada_lookup_encoded_symbol when looking that symbol up.
12774
12775 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12776
12777         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12778         TYPE_INDEX_TYPE.
12779
12780 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12781
12782         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12783         the case where VALUE_LVAL (val0) is not lval_memory.
12784
12785 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12786
12787         * ada-valprint.c (print_optional_low_bound): Handle
12788         character-indexed array printing like boolean-indexed array
12789         printing.
12790
12791 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12792
12793         * NEWS: Create a new section for the next release branch.
12794         Rename the section of the current branch, now that it has
12795         been cut.
12796
12797 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12798
12799         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12800         * version.in: Bump version to 8.1.50.DATE-git.
12801
12802 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12803
12804         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12805         Add field.
12806         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12807         Add field.
12808         (default_exception_support_info) <catch_handlers_sym>: Add field.
12809         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12810         (ada_exception_name_addr_1): Add "catch handlers" handling.
12811         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12812         Update all callers.
12813         (create_excep_cond_exprs) <ex>: Add parameter.
12814         (re_set_exception): Update create_excep_cond_exprs call.
12815         (print_it_exception, print_one_exception, print_mention_exception)
12816         (print_recreate_exception): Add "catch handler" handling.
12817         (allocate_location_catch_handlers, re_set_catch_handlers)
12818         (check_status_catch_handlers, print_it_catch_handlers)
12819         (print_one_catch_handlers, print_mention_catch_handlers)
12820         (print_recreate_catch_handlers): New function.
12821         (catch_handlers_breakpoint_ops): New variable.
12822         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12823         Add parameter.  Add "catch handler" handling.
12824         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12825         Add "catch handler" handling.
12826         (ada_exception_catchpoint_cond_string): Add "catch handler"
12827         handling.
12828         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12829         call.
12830         (catch_ada_handlers_command): New function.
12831         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12832         operations structure.
12833         (_initialize_ada_language): Add "catch handlers" command entry.
12834         * NEWS: Document "catch handlers" feature.
12835
12836 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12837
12838         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12839         account when creating the array type of the slice.
12840         (ada_value_slice): Likewise.
12841
12842 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12843
12844         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12845         New enum value.
12846         (create_array_type_with_stride): Add byte_stride_prop parameter.
12847         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12848         New parameter.  Update all callers in this file.
12849         (array_type_has_dynamic_stride): New function.
12850         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12851         of arrays with dynamic byte strides.
12852         * dwarf2read.c (read_array_type): Add support for dynamic
12853         DW_AT_byte_stride attributes.
12854
12855 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12856
12857         * dwarf2read.c (read_unspecified_type): Treat
12858         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12859
12860 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12861
12862         Update copyright year range in all GDB files.
12863
12864 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12865
12866         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12867         and gdb/testsuite/gdb.base/step-line.c.
12868
12869 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12870
12871         * copyright.py (main): Dump the contents of
12872         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12873         even if BY_HAND is empty.
12874
12875 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12876
12877         * top.c (print_gdb_version): Update Copyright year in version
12878         message.
12879
12880 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12881
12882         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12883
12884 For older changes see ChangeLog-2017.
12885 \f
12886 Local Variables:
12887 mode: change-log
12888 left-margin: 8
12889 fill-column: 74
12890 version-control: never
12891 coding: utf-8
12892 End: