69e3182ec32ab8f177c02aa05ca4f804154b19e1
[external/binutils.git] / gdb / ChangeLog
1 2018-09-05  Tom Tromey  <tom@tromey.com>
2
3         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
4         -Wformat-nonliteral.
5         * target-float.c (host_float_ops<T>::to_string)
6         (host_float_ops<T>::from_string): Use
7         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
8         * configure: Rebuild.
9
10 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
11
12         * printcmd.c (printf_c_string): Use
13         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
14         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
15
16 2018-09-05  Tom Tromey  <tom@tromey.com>
17
18         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
19
20 2018-09-05  Tom de Vries  <tdevries@suse.de>
21
22         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
23         with resolve_abstract_p == true.
24         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
25         defaulting to false. Propagate resolve_abstract_p to
26         dwarf2_fetch_die_loc_sect_off.
27         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
28         parameter, defaulting to false.
29         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
30         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
31         parameter.
32         * dwarf2read.h (struct die_info): Forward-declare.
33         (die_info_ptr): New typedef.
34         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
35
36 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
37
38         GDB 8.2 released.
39
40 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
41             Pedro Alves  <palves@redhat.com>
42
43         * gnulib/Makefile.in (aclocal_m4_deps): Move to
44         "aclocal-m4-deps.mk".  Include file here.
45         $(srcdir)/aclocal.m4: Add "configure.ac".
46         * gnulib/aclocal-m4-deps.mk: New file.
47         * gnulib/update-gnulib.sh: Automatically update
48         "aclocal-m4-deps.mk".
49
50 2018-09-04  Tom Tromey  <tom@tromey.com>
51
52         * configure: Rebuild.
53         * configure.ac: Remove multi-ice code.
54
55 2018-09-04  Tom Tromey  <tom@tromey.com>
56
57         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
58         (ada-exp.o): Update.
59
60 2018-09-04  Tom Tromey  <tom@tromey.com>
61
62         * Makefile.in (printcmd.o, target-float.o): Remove.
63         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
64
65 2018-09-04  Tom Tromey  <tom@tromey.com>
66
67         * gnulib/Makefile.in: Remove obsolete comment.
68         * Makefile.in: Remove obsolete comment.
69
70 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
71
72         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
73         line with '+'.
74
75 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
76
77         * riscv-tdep.c: Add 'prologue-value.h' include.
78         (struct riscv_unwind_cache): New struct.
79         (riscv_debug_unwinder): New global.
80         (riscv_scan_prologue): Update arguments, capture register details
81         from prologue scan.
82         (riscv_skip_prologue): Reformat arguments line, move end of
83         prologue calculation into riscv_scan_prologue.
84         (riscv_frame_cache): Update return type, create
85         riscv_unwind_cache, scan the prologue, and fill in remaining cache
86         details.
87         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
88         (riscv_frame_prev_register): Use the trad_frame within the
89         riscv_unwind_cache.
90         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
91         flag.
92
93 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
94
95         * trad-frame.h (trad_frame_set_realreg): Declare.
96         (trad_frame_set_addr): Declare.
97         * trad-frame.c (trad_frame_set_realreg): Define new function.
98         (trad_frame_set_addr): Define new function.
99         (trad_frame_set_reg_realreg): Use new function.
100         (trad_frame_set_reg_addr): Use new function.
101
102 2018-09-01  Keith Seitz  <keiths@redhat.com>
103
104         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
105         pulongest instead of "%lld".
106         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
107         ATTRIBUTE_UNUSED.
108
109 2018-08-31  Tom Tromey  <tom@tromey.com>
110
111         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
112         variant part type.
113
114 2018-08-31  Pedro Alves  <palves@redhat.com>
115
116         * gdbarch.h: Regenerate.
117
118 2018-08-31  Pedro Alves  <palves@redhat.com>
119
120         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
121         * target.h (Hardware watchpoint interfaces): Describe
122         continuable/steppable/non-steppable watchpoints.
123         * gdbarch.h, gdbarch.c: Regenerate.
124
125 2018-08-31  Pedro Alves  <palves@redhat.com>
126
127         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
128         Delete.
129         * s390-linux-nat.c
130         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
131         * target.h (target_ops::have_continuable_watchpoint): Delete.
132         (target_have_continuable_watchpoint): Delete.
133         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
134         * target-delegates.c: Regenerate.
135
136 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
137
138         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
139         the files present in "gnulib/import/m4/".
140
141 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
142
143         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
144         c.sw, c.swsp, and c.sdsp.
145
146 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
147
148         * riscv-tdep.c (struct riscv_inferior_data): Delete.
149         (riscv_read_misa_reg): Don't cache value read into inferior data.
150         (riscv_new_inferior_data): Delete.
151         (riscv_inferior_data_cleanup): Delete.
152         (riscv_inferior_data): Delete.
153         (riscv_invalidate_inferior_data): Delete.
154         (_initialize_riscv_tdep): Remove initialisation of inferior data.
155
156 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
157
158         * compile/compile-cplus-types.c
159         (compile_cplus_instance::leave_scope): Take the address of scope
160         object.
161         (compile_cplus_instance::convert_qualified_base): Compare quals
162         to 0.
163
164 2018-08-30  Keith Seitz  <keiths@redhat.com>
165
166         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
167         Use "%s" and host_address_to_string instead of "%p" in printf.
168
169 2018-08-29  Keith Seitz  <keiths@redhat.com>
170
171         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
172         and compile-cplus-types.c.
173         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
174         * c-lang.c (cplus_language_defn): Set C++ compile functions.
175         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
176         Declare.
177         * compile/compile-c-support.c: Include compile-cplus.h.
178         (load_libcompile): Templatize.
179         (get_compile_context): "New" function.
180         (c_get_compile_context): Use get_compile_context.
181         (cplus_get_compile_context): New function.
182         (cplus_push_user_expression, cplus_pop_user_expression)
183         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
184         (cplus_compute_program): Define new structs/functions.
185         * compile/compile-cplus-symmbols.c: New file.
186         * compile/compile-cplus-types.c: New file.
187         * compile/compile-cplus.h: New file.
188         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
189         Declare.
190         * compile/compile-object-load.c (get_out_value_type): Use
191         strncmp_iw when comparing symbol names.
192         (compile_object_load): Add mst_bss and mst_data.
193         * compile/compile.c (_initialize_compile): Remove
194         -Wno-implicit-function-declaration from `compile_args'.
195         * compile/gcc-cp-plugin.h: New file.
196         * NEWS: Mention C++ compile support and new debug options.
197
198 2018-08-29  Keith Seitz  <keiths@redhat.com>
199
200         * linespec.c (collect_info::add_symbol): Make virtual.
201         (struct symbol_searcher_collect_info): New struct.
202         (symbol_searcher::find_all_symbols): New method.
203         * symtab.h (class symbol_searcher): New class.
204
205 2018-08-29  Keith Seitz  <keiths@redhat.com>
206
207         * linespec.c (struct linespec) <function_symbols, label_symbols>:
208         Change to vector of block_symbol.  Update all users.
209         (struct collect_info) <symbols>: Likewise.
210         (collect_info::add_symbol): Take block_symbol as argument.
211         Update all callers.
212         (decode_compound_collector) <m_symbols>: Change type to vector
213         of block_symbol.  Update all users.
214         (decode_compound_collector::operator ()): Change parameter type
215         to block_symbol.
216         (find_method, find_function_symbols, find_linespec_symbols)
217         (find_label_symbols_in_block, find_label_symbols): Change symbol
218         vectors to block_symbol vectors.
219         * symtab.h (symbol_found_callback_ftype): Change parameter type to
220         block_symbol.
221
222 2018-08-29  Keith Seitz  <keiths@redhat.com>
223
224         * linespec.c (symbolp): Remove typedef and VEC definitions.
225         (bound_minimal_symbol_d): Likewise.
226
227 2018-08-29  Keith Seitz  <keiths@redhat.com>
228
229         * linespec.c (decode_compound_collector::decode_compound_collector):
230         Remove initialization for `m_symtabs'.
231         (decode_compound_collector::release_symbols): Change return type
232         to std::vector.  Update all callers.
233         (class decode_compound_collector) <m_symbols>: Change type to
234         std::vector.
235         (lookup_prefix_sym): Change return type to std::vector.  Update all
236         callers.
237         (compare_symbols): Remove.
238         (std_compare_symbols): Rename to `compare_symbols'.
239         (find_method): Change `sym_classes' parameter to std::vector.
240         Update all callers.  Use std::sort to sort sym_classes.
241         (find_linespec_symbols): Remove cleanup.
242
243 2018-08-29  Keith Seitz  <keiths@redhat.com>
244
245         * linespec.c (struct linespec) <minimal_symbols>: Change type to
246         std::vector.  Update all users.
247         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
248         (struct collect_info) <minimal_symbols>: Likewise.
249         (compare_msymbols): Return bool.  Change parameters to const
250         bound_minimal_symbol references.
251         (find_method, find_function_symbols, find_linespec_symbols): Change
252         `minsyms' parameter to std::vector.  Update all callers.
253
254 2018-08-29  Keith Seitz  <keiths@redhat.com>
255
256         * linespec.c (struct linespec) <label_symbols>: Change type to
257         std::vector.  Update all users.
258         (find_label_symbols_in_block): Change `result' parameter to
259         std::vector.  Update all callers.
260         (find_label_symbols): Return std::vector.  Update all callers.
261
262 2018-08-29  Keith Seitz  <keiths@redhat.com>
263
264         * linespec.c (struct linespec) <function_symbols>: Change type to
265         std::vector.  Update all users.
266         (struct collect_info) <function_symbols>: Likewise.
267         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
268         (std_compare_symbols): New function.
269         (find_method, find_function_symbols, find_linespec_symbols)
270         (find_label_symbols_in_block): Change `symbols' parameter to
271         std::vector.  Update all callers.
272         (find_label_symbols): Likewise for `function_symbols' and
273         `label_funcs_ret'.
274
275 2018-08-29  Keith Seitz  <keiths@redhat.com>
276
277         * linespec.c (symtab_vector_up): Define.
278         (struct linespec) <file_symtabs>: Change type to std::vector *.
279         Update all uses.
280         (struct collect_info) <file_symtabs>: Likewise.
281         (collect_symtabs_from_filename): Return symtab_vector_up.
282         Update all callers.
283         (decode_objc): Remove cleanup.
284         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
285         (symtab_collector::release_symtabs): Return symtab_vector_up.
286         Update all callers.
287         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
288         Update all users.
289         (collect_symtabs_from_filename, symtabs_from_filename): Return
290         symtab_vector_up.  Update all callers.
291
292 2018-08-29  Tom Tromey  <tom@tromey.com>
293
294         * csky-tdep.c (csky_analyze_prologue): Use
295         core_addr_to_string_nz.
296
297 2018-08-29  Tom Tromey  <tom@tromey.com>
298
299         * windows-nat.c (struct xlate_exception) <them>: Change type to
300         DWORD.
301         (xlate): Fix formatting.  Remove last entry.
302         (struct xlate_exception, xlate): Comment out.
303         (windows_nat_target::resume): Use ranged for.
304
305 2018-08-29  Jim Wilson  <jimw@sifive.com>
306
307         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
308         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
309         of NT_PRFPREG.
310         (riscv_linux_nat_target::store_registers): Likewise.
311
312 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
313
314         PR gdb/23555
315         PR gdb/23558
316         * gnulib/aclocal.m4: Regenerate.
317         * gnulib/config.in: Regenerate.
318         * gnulib/configure: Regenerate.
319         * gnulib/import/Makefile.am: Update.
320         * gnulib/import/Makefile.in: Update.
321         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
322         * gnulib/import/_Noreturn.h: ... this.
323         * gnulib/import/alloca.in.h: Update.
324         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
325         * gnulib/import/arg-nonnull.h: ... this.
326         * gnulib/import/assure.h: Update.
327         * gnulib/import/at-func.c: Update.
328         * gnulib/import/basename-lgpl.c: Update.
329         * gnulib/import/extra/snippet/c++defs.h: Rename to...
330         * gnulib/import/c++defs.h: ... this.
331         * gnulib/import/canonicalize-lgpl.c: Update.
332         * gnulib/import/cdefs.h: Update.
333         * gnulib/import/chdir-long.c: Update.
334         * gnulib/import/chdir-long.h: Update.
335         * gnulib/import/cloexec.c: Update.
336         * gnulib/import/cloexec.h: Update.
337         * gnulib/import/close.c: Update.
338         * gnulib/import/closedir.c: Update.
339         * gnulib/import/config.charset: Update.
340         * gnulib/import/dirent-private.h: Update.
341         * gnulib/import/dirent.in.h: Update.
342         * gnulib/import/dirfd.c: Update.
343         * gnulib/import/dirname-lgpl.c: Update.
344         * gnulib/import/dirname.h: Update.
345         * gnulib/import/dosname.h: Update.
346         * gnulib/import/dup-safer-flag.c: Update.
347         * gnulib/import/dup-safer.c: Update.
348         * gnulib/import/dup.c: Update.
349         * gnulib/import/dup2.c: Update.
350         * gnulib/import/errno.in.h: Update.
351         * gnulib/import/error.c: Update.
352         * gnulib/import/error.h: Update.
353         * gnulib/import/exitfail.c: Update.
354         * gnulib/import/exitfail.h: Update.
355         * gnulib/import/extra/update-copyright: Update.
356         * gnulib/import/fchdir.c: Update.
357         * gnulib/import/fcntl.c: Update.
358         * gnulib/import/fcntl.in.h: Update.
359         * gnulib/import/fd-hook.c: Update.
360         * gnulib/import/fd-hook.h: Update.
361         * gnulib/import/fd-safer-flag.c: Update.
362         * gnulib/import/fd-safer.c: Update.
363         * gnulib/import/fdopendir.c: Update.
364         * gnulib/import/filename.h: Update.
365         * gnulib/import/filenamecat-lgpl.c: Update.
366         * gnulib/import/filenamecat.h: Update.
367         * gnulib/import/flexmember.h: Update.
368         * gnulib/import/float+.h: Update.
369         * gnulib/import/float.c: Update.
370         * gnulib/import/float.in.h: Update.
371         * gnulib/import/fnmatch.c: Update.
372         * gnulib/import/fnmatch.in.h: Update.
373         * gnulib/import/fnmatch_loop.c: Update.
374         * gnulib/import/fpucw.h: Update.
375         * gnulib/import/frexp.c: Update.
376         * gnulib/import/frexpl.c: Update.
377         * gnulib/import/fstat.c: Update.
378         * gnulib/import/fstatat.c: Update.
379         * gnulib/import/getcwd-lgpl.c: Update.
380         * gnulib/import/getcwd.c: Update.
381         * gnulib/import/getdtablesize.c: Update.
382         * gnulib/import/getlogin_r.c: Update.
383         * gnulib/import/getprogname.c: Update.
384         * gnulib/import/getprogname.h: Update.
385         * gnulib/import/gettext.h: Update.
386         * gnulib/import/gettimeofday.c: Update.
387         * gnulib/import/glob-libc.h: Update.
388         * gnulib/import/glob.c: Update.
389         * gnulib/import/glob.in.h: Update.
390         * gnulib/import/glob_internal.h: Update.
391         * gnulib/import/glob_pattern_p.c: Update.
392         * gnulib/import/globfree.c: Update.
393         * gnulib/import/hard-locale.c: Update.
394         * gnulib/import/hard-locale.h: Update.
395         * gnulib/import/intprops.h: Update.
396         * gnulib/import/inttypes.in.h: Update.
397         * gnulib/import/isnan.c: Update.
398         * gnulib/import/isnand-nolibm.h: Update.
399         * gnulib/import/isnand.c: Update.
400         * gnulib/import/isnanl-nolibm.h: Update.
401         * gnulib/import/isnanl.c: Update.
402         * gnulib/import/itold.c: Update.
403         * gnulib/import/libc-config.h: Update.
404         * gnulib/import/limits.in.h: Update.
405         * gnulib/import/localcharset.c: Update.
406         * gnulib/import/localcharset.h: Update.
407         * gnulib/import/localtime-buffer.c: Update.
408         * gnulib/import/localtime-buffer.h: Update.
409         * gnulib/import/lstat.c: Update.
410         * gnulib/import/m4/00gnulib.m4: Update.
411         * gnulib/import/m4/__inline.m4: Update.
412         * gnulib/import/m4/absolute-header.m4: Update.
413         * gnulib/import/m4/alloca.m4: Update.
414         * gnulib/import/m4/builtin-expect.m4: Update.
415         * gnulib/import/m4/canonicalize.m4: Update.
416         * gnulib/import/m4/chdir-long.m4: Update.
417         * gnulib/import/m4/close.m4: Update.
418         * gnulib/import/m4/closedir.m4: Update.
419         * gnulib/import/m4/configmake.m4: Update.
420         * gnulib/import/m4/d-ino.m4: Update.
421         * gnulib/import/m4/d-type.m4: Update.
422         * gnulib/import/m4/dirent_h.m4: Update.
423         * gnulib/import/m4/dirfd.m4: Update.
424         * gnulib/import/m4/dirname.m4: Update.
425         * gnulib/import/m4/double-slash-root.m4: Update.
426         * gnulib/import/m4/dup.m4: Update.
427         * gnulib/import/m4/dup2.m4: Update.
428         * gnulib/import/m4/eealloc.m4: Update.
429         * gnulib/import/m4/environ.m4: Update.
430         * gnulib/import/m4/errno_h.m4: Update.
431         * gnulib/import/m4/error.m4: Update.
432         * gnulib/import/m4/exponentd.m4: Update.
433         * gnulib/import/m4/exponentl.m4: Update.
434         * gnulib/import/m4/extensions.m4: Update.
435         * gnulib/import/m4/extern-inline.m4: Update.
436         * gnulib/import/m4/fchdir.m4: Update.
437         * gnulib/import/m4/fcntl-o.m4: Update.
438         * gnulib/import/m4/fcntl.m4: Update.
439         * gnulib/import/m4/fcntl_h.m4: Update.
440         * gnulib/import/m4/fdopendir.m4: Update.
441         * gnulib/import/m4/filenamecat.m4: Update.
442         * gnulib/import/m4/flexmember.m4: Update.
443         * gnulib/import/m4/float_h.m4: Update.
444         * gnulib/import/m4/fnmatch.m4: Update.
445         * gnulib/import/m4/fnmatch_h.m4: Update.
446         * gnulib/import/m4/fpieee.m4: Update.
447         * gnulib/import/m4/frexp.m4: Update.
448         * gnulib/import/m4/frexpl.m4: Update.
449         * gnulib/import/m4/fstat.m4: Update.
450         * gnulib/import/m4/fstatat.m4: Update.
451         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
452         * gnulib/import/m4/getcwd-path-max.m4: Update.
453         * gnulib/import/m4/getcwd.m4: Update.
454         * gnulib/import/m4/getdtablesize.m4: Update.
455         * gnulib/import/m4/getlogin.m4: Update.
456         * gnulib/import/m4/getlogin_r.m4: Update.
457         * gnulib/import/m4/getpagesize.m4: Update.
458         * gnulib/import/m4/getprogname.m4: Update.
459         * gnulib/import/m4/gettimeofday.m4: Update.
460         * gnulib/import/m4/glibc21.m4: Update.
461         * gnulib/import/m4/glob.m4: Update.
462         * gnulib/import/m4/glob_h.m4: Update.
463         * gnulib/import/m4/gnulib-cache.m4: Update.
464         * gnulib/import/m4/gnulib-common.m4: Update.
465         * gnulib/import/m4/gnulib-comp.m4: Update.
466         * gnulib/import/m4/gnulib-tool.m4: Update.
467         * gnulib/import/m4/hard-locale.m4: Update.
468         * gnulib/import/m4/include_next.m4: Update.
469         * gnulib/import/m4/inttypes-pri.m4: Update.
470         * gnulib/import/m4/inttypes.m4: Update.
471         * gnulib/import/m4/isnand.m4: Update.
472         * gnulib/import/m4/isnanl.m4: Update.
473         * gnulib/import/m4/largefile.m4: Update.
474         * gnulib/import/m4/limits-h.m4: Update.
475         * gnulib/import/m4/localcharset.m4: Update.
476         * gnulib/import/m4/locale-fr.m4: Update.
477         * gnulib/import/m4/locale-ja.m4: Update.
478         * gnulib/import/m4/locale-zh.m4: Update.
479         * gnulib/import/m4/localtime-buffer.m4: Update.
480         * gnulib/import/m4/longlong.m4: Update.
481         * gnulib/import/m4/lstat.m4: Update.
482         * gnulib/import/m4/malloc.m4: Update.
483         * gnulib/import/m4/malloca.m4: Update.
484         * gnulib/import/m4/math_h.m4: Update.
485         * gnulib/import/m4/mbrtowc.m4: Update.
486         * gnulib/import/m4/mbsinit.m4: Update.
487         * gnulib/import/m4/mbsrtowcs.m4: Update.
488         * gnulib/import/m4/mbstate_t.m4: Update.
489         * gnulib/import/m4/memchr.m4: Update.
490         * gnulib/import/m4/memmem.m4: Update.
491         * gnulib/import/m4/mempcpy.m4: Update.
492         * gnulib/import/m4/memrchr.m4: Update.
493         * gnulib/import/m4/mkdir.m4: Update.
494         * gnulib/import/m4/mkstemp.m4: Update.
495         * gnulib/import/m4/mmap-anon.m4: Update.
496         * gnulib/import/m4/mode_t.m4: Update.
497         * gnulib/import/m4/msvc-inval.m4: Update.
498         * gnulib/import/m4/msvc-nothrow.m4: Update.
499         * gnulib/import/m4/multiarch.m4: Update.
500         * gnulib/import/m4/nocrash.m4: Update.
501         * gnulib/import/m4/off_t.m4: Update.
502         * gnulib/import/m4/onceonly.m4: Update.
503         * gnulib/import/m4/open-cloexec.m4: Update.
504         * gnulib/import/m4/open.m4: Update.
505         * gnulib/import/m4/openat.m4: Update.
506         * gnulib/import/m4/opendir.m4: Update.
507         * gnulib/import/m4/pathmax.m4: Update.
508         * gnulib/import/m4/rawmemchr.m4: Update.
509         * gnulib/import/m4/readdir.m4: Update.
510         * gnulib/import/m4/readlink.m4: Update.
511         * gnulib/import/m4/realloc.m4: Update.
512         * gnulib/import/m4/rename.m4: Update.
513         * gnulib/import/m4/rewinddir.m4: Update.
514         * gnulib/import/m4/rmdir.m4: Update.
515         * gnulib/import/m4/save-cwd.m4: Update.
516         * gnulib/import/m4/secure_getenv.m4: Update.
517         * gnulib/import/m4/setenv.m4: Update.
518         * gnulib/import/m4/signal_h.m4: Update.
519         * gnulib/import/m4/ssize_t.m4: Update.
520         * gnulib/import/m4/stat-time.m4: Update.
521         * gnulib/import/m4/stat.m4: Update.
522         * gnulib/import/m4/std-gnu11.m4: Update.
523         * gnulib/import/m4/stdbool.m4: Update.
524         * gnulib/import/m4/stddef_h.m4: Update.
525         * gnulib/import/m4/stdint.m4: Update.
526         * gnulib/import/m4/stdio_h.m4: Update.
527         * gnulib/import/m4/stdlib_h.m4: Update.
528         * gnulib/import/m4/strchrnul.m4: Update.
529         * gnulib/import/m4/strdup.m4: Update.
530         * gnulib/import/m4/strerror.m4: Update.
531         * gnulib/import/m4/string_h.m4: Update.
532         * gnulib/import/m4/strstr.m4: Update.
533         * gnulib/import/m4/strtok_r.m4: Update.
534         * gnulib/import/m4/sys_socket_h.m4: Update.
535         * gnulib/import/m4/sys_stat_h.m4: Update.
536         * gnulib/import/m4/sys_time_h.m4: Update.
537         * gnulib/import/m4/sys_types_h.m4: Update.
538         * gnulib/import/m4/tempname.m4: Update.
539         * gnulib/import/m4/time_h.m4: Update.
540         * gnulib/import/m4/unistd-safer.m4: Update.
541         * gnulib/import/m4/unistd_h.m4: Update.
542         * gnulib/import/m4/warn-on-use.m4: Update.
543         * gnulib/import/m4/wchar_h.m4: Update.
544         * gnulib/import/m4/wchar_t.m4: Update.
545         * gnulib/import/m4/wctype_h.m4: Update.
546         * gnulib/import/m4/wint_t.m4: Update.
547         * gnulib/import/malloc.c: Update.
548         * gnulib/import/malloc/scratch_buffer.h: Update.
549         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
550         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
551         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
552         * gnulib/import/malloca.c: Update.
553         * gnulib/import/malloca.h: Update.
554         * gnulib/import/malloca.valgrind: Update.
555         * gnulib/import/math.in.h: Update.
556         * gnulib/import/mbrtowc.c: Update.
557         * gnulib/import/mbsinit.c: Update.
558         * gnulib/import/mbsrtowcs-impl.h: Update.
559         * gnulib/import/mbsrtowcs-state.c: Update.
560         * gnulib/import/mbsrtowcs.c: Update.
561         * gnulib/import/memchr.c: Update.
562         * gnulib/import/memmem.c: Update.
563         * gnulib/import/mempcpy.c: Update.
564         * gnulib/import/memrchr.c: Update.
565         * gnulib/import/mkdir.c: Update.
566         * gnulib/import/mkstemp.c: Update.
567         * gnulib/import/msvc-inval.c: Update.
568         * gnulib/import/msvc-inval.h: Update.
569         * gnulib/import/msvc-nothrow.c: Update.
570         * gnulib/import/msvc-nothrow.h: Update.
571         * gnulib/import/open.c: Update.
572         * gnulib/import/openat-die.c: Update.
573         * gnulib/import/openat-priv.h: Update.
574         * gnulib/import/openat-proc.c: Update.
575         * gnulib/import/openat.c: Update.
576         * gnulib/import/openat.h: Update.
577         * gnulib/import/opendir.c: Update.
578         * gnulib/import/pathmax.h: Update.
579         * gnulib/import/pipe-safer.c: Update.
580         * gnulib/import/rawmemchr.c: Update.
581         * gnulib/import/readdir.c: Update.
582         * gnulib/import/readlink.c: Update.
583         * gnulib/import/realloc.c: Update.
584         * gnulib/import/ref-add.sin: Update.
585         * gnulib/import/ref-del.sin: Update.
586         * gnulib/import/rename.c: Update.
587         * gnulib/import/rewinddir.c: Update.
588         * gnulib/import/rmdir.c: Update.
589         * gnulib/import/same-inode.h: Update.
590         * gnulib/import/save-cwd.c: Update.
591         * gnulib/import/save-cwd.h: Update.
592         * gnulib/import/scratch_buffer.h: Update.
593         * gnulib/import/secure_getenv.c: Update.
594         * gnulib/import/setenv.c: Update.
595         * gnulib/import/signal.in.h: Update.
596         * gnulib/import/stat-time.c: Update.
597         * gnulib/import/stat-time.h: Update.
598         * gnulib/import/stat-w32.c: Update.
599         * gnulib/import/stat-w32.h: Update.
600         * gnulib/import/stat.c: Update.
601         * gnulib/import/stdbool.in.h: Update.
602         * gnulib/import/stddef.in.h: Update.
603         * gnulib/import/stdint.in.h: Update.
604         * gnulib/import/stdio.in.h: Update.
605         * gnulib/import/stdlib.in.h: Update.
606         * gnulib/import/str-two-way.h: Update.
607         * gnulib/import/strchrnul.c: Update.
608         * gnulib/import/strdup.c: Update.
609         * gnulib/import/streq.h: Update.
610         * gnulib/import/strerror-override.c: Update.
611         * gnulib/import/strerror-override.h: Update.
612         * gnulib/import/strerror.c: Update.
613         * gnulib/import/string.in.h: Update.
614         * gnulib/import/stripslash.c: Update.
615         * gnulib/import/strnlen1.c: Update.
616         * gnulib/import/strnlen1.h: Update.
617         * gnulib/import/strstr.c: Update.
618         * gnulib/import/strtok_r.c: Update.
619         * gnulib/import/sys_stat.in.h: Update.
620         * gnulib/import/sys_time.in.h: Update.
621         * gnulib/import/sys_types.in.h: Update.
622         * gnulib/import/tempname.c: Update.
623         * gnulib/import/tempname.h: Update.
624         * gnulib/import/time.in.h: Update.
625         * gnulib/import/unistd--.h: Update.
626         * gnulib/import/unistd-safer.h: Update.
627         * gnulib/import/unistd.in.h: Update.
628         * gnulib/import/unsetenv.c: Update.
629         * gnulib/import/verify.h: Update.
630         * gnulib/import/extra/snippet/warn-on-use.h: Update.
631         * gnulib/import/wchar.in.h: Update.
632         * gnulib/import/wctype.in.h: Update.
633         * gnulib/import/xalloc-oversized.h: Update.
634         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
635         "53e2c179f26a890fa6685af4b6c1397ee370433b".
636
637 2018-08-16  Gary Benson <gbenson@redhat.com>
638
639         PR gdb/13000:
640         * gdb/main.c (captured_main_1): Exit with nonzero status
641         in batch mode if the last command to be executed failed.
642         * NEWS: Mention the above.
643
644 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
645
646         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
647         end of warning message.
648
649 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
650
651         PR gdb/22943:
652         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
653         (aarch64_extract_return_value): Use
654         aapcs_is_vfp_call_or_return_candidate.
655         (aarch64_return_in_memory): Likewise.
656         (aarch64_store_return_value): Likewise.
657
658 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
659
660         * aarch64-tdep.c
661         (aapcs_is_vfp_call_or_return_candidate): Make static
662         (pass_in_v_or_stack): Remove function.
663         (pass_in_v_vfp_candidate): New function.
664         (aarch64_push_dummy_call): Check for float register candidates.
665
666 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
667
668         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
669         (aapcs_is_vfp_call_or_return_candidate_1): New function.
670         (aapcs_is_vfp_call_or_return_candidate): Likewise.
671
672 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
673
674         PR build/23399
675         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
676         (struct ipa_sym_addresses): Rename to...
677         (struct ipa_sym_addresses_common): ... this.
678         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
679
680 2018-08-28  Tom Tromey  <tom@tromey.com>
681
682         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
683         (token_fifo): Now a std::vector.
684         (yylex, c_parse): Update.
685         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
686         (token_fifo): Now a std::vector.
687         (yylex, d_parse): Update.
688         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
689         (token_fifo): Now a std::vector.
690         (yylex, go_parse): Update.
691
692 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
693
694         * parser-defs.h (struct type_stack) <elements>: Change type to
695         std::vector<union type_stack_elt>.
696         <depth, size>: Remove.
697         * parse.c (parse_exp_in_context_1): Adjust.
698         (type_stack_reserve): Remove.
699         (check_type_stack_depth): Remove.
700         (insert_into_type_stack): Adjust to std::vector.
701         (insert_type): Likewise.
702         (push_type): Likewise.
703         (push_type_int): Likewise.
704         (insert_type_address_space): Likewise.
705         (pop_type): Likewise.
706         (pop_type_int): Likewise.
707         (pop_typelist): Likewise.
708         (pop_type_stack): Likewise.
709         (append_type_stack): Likewise.
710         (push_type_stack): Likewise.
711         (get_type_stack): Likewise.
712         (type_stack_cleanup): Likewise.
713         (push_typelist): Likewise.
714         (follow_types): Likewise.
715         (_initialize_parse): Likewise.
716
717 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
718
719         * NEWS: Mention csky target.
720
721 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
722             Hafiz Abid Qadeer  <abidh@codesourcery.com>
723             Don Breazeal  <donb@codesourcery.com>
724
725         * csky-linux-tdep.c: New file.
726         * csky-tdep.c: Likewise.
727         * csky-tdep.h: Likewise.
728         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
729         csky-tdep.o.
730         (HFILES_NO_SRCDIR): Add csky-tdep.h.
731         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
732         * configure.tgt: Add csky support.
733
734 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
735
736         * python/py-framefilter.c (py_print_frame): Print frame architecture
737         when printing on an MI output.
738
739 2018-08-27  Tom Tromey  <tom@tromey.com>
740
741         PR build/23087:
742         * configure: Rebuild.
743         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
744
745 2018-08-27  Tom Tromey  <tom@tromey.com>
746
747         * aarch64-linux-tdep.c
748         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
749         casts to int.
750
751 2018-08-27  Tom Tromey  <tom@tromey.com>
752
753         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
754         unsigned.
755         (ppc64_standard_linkage1, ppc64_standard_linkage2)
756         (ppc64_standard_linkage3, ppc64_standard_linkage4)
757         (ppc64_standard_linkage5, ppc64_standard_linkage6)
758         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
759         unsigned.
760
761 2018-08-27  Tom Tromey  <tom@tromey.com>
762
763         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
764         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
765
766 2018-08-27  Tom Tromey  <tom@tromey.com>
767
768         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
769         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
770         ULONGEST_MAX.
771         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
772         ULONGEST_MAX.
773         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
774         ULONGEST_MAX.
775         * sparc-linux-tdep.c (sparc32_linux_sigframe)
776         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
777         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
778         ULONGEST_MAX.
779         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
780         (ppc64_linux_sigaction_tramp_frame)
781         (ppc32_linux_sighandler_tramp_frame)
782         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
783         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
784         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
785         * mn10300-linux-tdep.c (am33_linux_sigframe)
786         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
787         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
788         * mips-linux-tdep.c (mips_linux_o32_sigframe)
789         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
790         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
791         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
792         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
793         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
794         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
795         * microblaze-linux-tdep.c
796         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
797         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
798         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
799         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
800         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
801         * common/common-types.h (ULONGEST_MAX): New define.
802         (CORE_ADDR_MAX): Fix formatting.
803         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
804         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
805         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
806         (arm_linux_rt_sigreturn_tramp_frame)
807         (arm_eabi_linux_sigreturn_tramp_frame)
808         (arm_eabi_linux_rt_sigreturn_tramp_frame)
809         (thumb2_eabi_linux_sigreturn_tramp_frame)
810         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
811         (arm_linux_restart_syscall_tramp_frame)
812         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
813         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
814         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
815         ULONGEST_MAX.
816         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
817
818 2018-08-27  Tom Tromey  <tom@tromey.com>
819
820         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
821         CORE_ADDR_MAX.
822         * mips-tdep.c (mips_deal_with_atomic_sequence)
823         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
824         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
825         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
826         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
827         CORE_ADDR_MAX.
828         * aarch64-tdep.c (aarch64_software_single_step): Use
829         CORE_ADDR_MAX.
830
831 2018-08-27  Tom Tromey  <tom@tromey.com>
832
833         * linespec.c (complete_linespec_component): Add cast to "char".
834         * completer.c (completion_tracker::build_completion_result): Add
835         cast to "char".
836
837 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
838
839         * solist.h (struct solist, struct target_so_ops): Fix
840         indentation.
841
842 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
843
844         * ada-tasks.c (ada_task_info_s): Remove typedef.
845         (DEF_VEC_O(ada_task_info_s)): Remove.
846         (struct ada_tasks_inferior_data): Initialize fields.
847         <task_list>: Make an std::vector.
848         (get_ada_tasks_inferior_data): Allocate with new.
849         (ada_get_task_number): Adjust.
850         (get_task_number_from_id): Likewise.
851         (valid_task_id): Likewise.
852         (ada_get_task_info_from_ptid): Likewise.
853         (iterate_over_live_ada_tasks): Likewise.
854         (add_ada_task): Likewise.
855         (read_known_tasks): Likewise.
856         (ada_build_task_list): Likewise.
857         (print_ada_task_info): Likewise.
858         (info_task): Likewise.
859         (task_command_1): Likewise.
860
861 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
862
863         * ada-lang.c (add_angle_brackets): Return std::string.
864
865 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
866
867         * python/py-threadevent.c (py_get_event_thread): Initialize
868         pythread.
869
870 2018-08-24  Pedro Alves  <palves@redhat.com>
871
872         * python/py-bpevent.c (create_breakpoint_event_object): Use
873         copy-initialization.
874         * python/py-continueevent.c (emit_continue_event): Use
875         copy-initialization.
876         * python/py-exitedevent.c (create_exited_event_object): Return a
877         gdbpy_ref<>.
878         (emit_exited_event): Use copy-initialization.
879         * python/py-inferior.c (python_new_inferior)
880         (python_inferior_deleted, add_thread_object): Use
881         copy-initialization.
882         * python/py-infevents.c (create_inferior_call_event_object)
883         (create_register_changed_event_object)
884         (create_memory_changed_event_object): Return a gdbpy_ref<>.
885         (emit_inferior_call_event, emit_memory_changed_event)
886         (emit_register_changed_event): Use copy-initialization.
887         * python/py-newobjfileevent.c (create_new_objfile_event_object):
888         Return a gdbpy_ref<>.
889         (emit_new_objfile_event): Use copy-initialization.
890         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
891         (emit_clear_objfiles_event): Use copy-initialization.
892         * python/py-signalevent.c (create_signal_event_object): Use
893         copy-initialization.
894         * python/py-threadevent.c (create_thread_event_object): Use
895         copy-initialization.
896
897 2018-08-24  Pedro Alves  <palves@redhat.com>
898             Simon Marchi  <simon.marchi@ericsson.com>
899
900         PR gdb/23379
901         * python/py-continueevent.c: Include "gdbthread.h".
902         (create_continue_event_object): Add intro comment.  Add 'ptid'
903         parameter.  Use it to find thread to pass to
904         create_thread_event_object.
905         (emit_continue_event): Pass PTID down to
906         create_continue_event_object.
907         * python/py-event.h (py_get_event_thread): Declare.
908         (create_thread_event_object): Remove default from 'thread'
909         parameter.
910         * python/py-stopevent.c (create_stop_event_object): Use
911         py_get_event_thread.
912         * python/py-threadevent.c (get_event_thread): Rename to ...
913         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
914         and use it to find the thread.
915         (create_thread_event_object): Assert that THREAD isn't null.
916         Don't find the event thread here.
917
918 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
919
920         * block.h (blockrange, blockranges): New struct declarations.
921         (struct block): Add new field named `ranges'.
922         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
923         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
924         macros for accessing ranges in struct block.
925         (make_blockranges): New declaration.
926         block.c (make_blockranges): New function.
927         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
928         for block.
929         * symtab.h (find_pc_partial_function): Add new parameter `block'.
930         * blockframe.c (cache_pc_function_block): New static global.
931         (clear_pc_function_cache): Clear cache_pc_function_block.
932         (find_pc_partial_function): Move comment to symtab.h.  Add
933         support for non-contiguous blocks.
934         * cli/cli-cmds.c (block.h): Include.
935         (print_disassembly): Handle printing of non-contiguous blocks.
936         (disassemble_current_function): Likewise.
937         (disassemble_command): Likewise.
938
939         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
940         BLOCK_START.
941         * blockframe.c (get_pc_function_start): Likewise.
942         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
943         (gcc_symbol_address): Likewise.
944         * compile/compile-object-run.c (compile_object_run): Likewise.
945         * compile/compile.c (get_expr_block_and_pc): Likewise.
946         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
947         (func_addr_to_tail_call_list): Likewise.
948         * findvar.c (default_read_var_value): Likewise.
949         * inline-frame.c (inline_frame_this_id): Likewise.
950         (skip-inline_frames): Likewise.
951         * infcmd.c (until_next_command): Likewise.
952         * linespec.c (convert_linespec_to_sals): Likewise.
953         * parse.c (parse_exp_in_context_1): Likewise.
954         * printcmd.c (build_address_symbolic): likewise.
955         (info_address_command): Likewise.
956         symtab.c (find_function_start_sal): Likewise.
957         (skip_prologue_sal): Likewise.
958         (find_function_alias_target): Likewise.
959         (find_gnu_ifunc): Likewise.
960         * stack.c (find_frame_funname): Likewise.
961         * symtab.c (fixup_symbol_section): Likewise.
962         (find_function_start_sal): Likewise.
963         (skip_prologue_sal): Likewsie.
964         (find_function_alias_target): Likewise.
965         (find_gnu_ifunc): Likewise.
966         * tracepoint.c (info_scope_command): Likewise.
967         * value.c (value_fn_field): Likewise.
968
969         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
970         in place of find_pc_partial_function.
971         * blockframe.c (find_function_entry_range_from_pc): New function.
972         * symtab.h (find_function_entry_range_from_pc): Declare and document.
973         * objfiles.c (objfile_relocate1): Relocate start and end addresses
974         for each range in a block.
975
976
977 2018-08-23  Xavier Roirand  <roirand@adacore.com>
978
979         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
980         incrementation.
981
982 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
983
984         * solib-svr4.c (read_program_headers_from_bfd): Return
985         gdb::optional<gdb::byte_vector>.
986         (svr4_exec_displacement): Adjust.
987
988 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
989
990         * solib-svr4.c (read_program_header): Return
991         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
992         (find_program_interpreter): Return
993         gdb::optional<gdb::byte_vector>.
994         (scan_dyntag_auxv): Adjust.
995         (enable_break): Adjust.
996         (svr4_exec_displacement): Adjust.
997
998 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
999
1000         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1001         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1002
1003 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1004
1005         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1006         string_vprintf.
1007         * guile/scm-utils.c (gdbscm_printf): Likewise.
1008         * serial.c (serial_printf): Likewise.
1009         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1010
1011 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1012
1013         * stack.c (print_frame): Print frame architecture when printing on
1014         an MI output.
1015         * NEWS: Mention new "arch" attribute in frame output.
1016
1017 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1018
1019         * arch/aarch64.h (aarch64_regnum): Update comment.
1020
1021 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1022
1023         * NEWS: Add SVE to 8.2 section.
1024
1025 2018-08-21  Pedro Alves  <palves@redhat.com>
1026
1027         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1028         out from gdbscm_parse_function_args.
1029         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1030         gdbscm_parse_function_args_1.
1031
1032 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1033
1034         PR gdb/17816
1035         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1036         operator.
1037
1038 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1039
1040         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1041
1042 2018-08-19  Michael Spang  <spang@google.com>
1043
1044         PR gdb/11786
1045         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1046         for PT_TLS segments.
1047
1048 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1049
1050         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1051         dwarf_variable_value.
1052         * dwarf2-frame.c (class dwarf_expr_executor):
1053         Add override for dwarf_variable_value.
1054         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1055         (class symbol_needs_eval_context): Likewise.
1056         (indirect_synthetic_pointer): Add forward declaration.
1057         (sect_variable_value): New function.
1058         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1059         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1060         for DW_OP_GNU_variable_value.
1061
1062 2018-08-16  Tom Tromey  <tom@tromey.com>
1063
1064         * top.c (read_command_file): Update.
1065         (command_line_input): Remove "repeat" argument.
1066         * ada-lang.c (get_selections): Update.
1067         * linespec.c (decode_line_2): Update.
1068         * defs.h (command_line_input): Remove argument.
1069         * cli/cli-script.c (read_next_line): Update.
1070         * python/py-gdb-readline.c: Update.
1071
1072 2018-08-17  Tom Tromey  <tom@tromey.com>
1073
1074         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1075         command_line_input.
1076
1077 2018-08-15  Tom Tromey  <tom@tromey.com>
1078
1079         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1080
1081 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1082
1083         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1084         If used, use find_pc_partial_function to find address range
1085         to disassemble.
1086         * mi/mi-main.c (mi_cmd_list_features): Report
1087         "data-disassemble-a-option" feature.
1088         * NEWS: Mention new -data-disassemble option -a.
1089
1090 2018-08-13  Tom Tromey  <tom@tromey.com>
1091
1092         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1093
1094 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1095
1096         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1097         (aarch64_linux_collect_sve_regset): Likewise.
1098         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1099         * regcache.h (regcache_map_entry_size): New function.
1100
1101 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1102
1103         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1104         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1105         (SVE_HEADER_VL_LENGTH): Likewise.
1106         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1107         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1108         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1109         (SVE_HEADER_SIZE_OFFSET): Likewise.
1110         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1111         (SVE_HEADER_VL_OFFSET): Likewise.
1112         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1113         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1114         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1115         (SVE_HEADER_SIZE): Likewise.
1116         (aarch64_linux_core_read_vq): Add function.
1117         (aarch64_linux_core_read_description): Check for SVE section.
1118
1119 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1120
1121         * aarch64-fbsd-tdep.c
1122         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1123         collect_size.
1124         * aarch64-linux-tdep.c
1125         (aarch64_linux_iterate_over_regset_sections): Likewise.
1126         * alpha-linux-tdep.c
1127         (alpha_linux_iterate_over_regset_sections):
1128         * alpha-nbsd-tdep.c
1129         (alphanbsd_iterate_over_regset_sections): Likewise.
1130         * amd64-fbsd-tdep.c
1131         (amd64fbsd_iterate_over_regset_sections): Likewise.
1132         * amd64-linux-tdep.c
1133         (amd64_linux_iterate_over_regset_sections): Likewise.
1134         * arm-bsd-tdep.c
1135         (armbsd_iterate_over_regset_sections): Likewise.
1136         * arm-fbsd-tdep.c
1137         (arm_fbsd_iterate_over_regset_sections): Likewise.
1138         * arm-linux-tdep.c
1139         (arm_linux_iterate_over_regset_sections): Likewise.
1140         * corelow.c (get_core_registers_cb): Likewise.
1141         (core_target::fetch_registers): Likewise.
1142         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1143         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1144         * gdbarch.h (void): Regenerate.
1145         * gdbarch.sh: Add supply_size and collect_size.
1146         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1147         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1148         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1149         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1150         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1151         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1152         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1153         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1154         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1155         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1156         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1157         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1158         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1159         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1160         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1161         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1162         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1163         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1164         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1165         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1166         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1167         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1168         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1169         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1170         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1171         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1172         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1173         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1174         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1175         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1176
1177 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1178
1179         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1180         with string_printf.
1181
1182 2018-08-10  Keith Seitz  <keiths@redhat.com>
1183
1184         * compile/compile-c-support.c (add_code_header, add_code_footer):
1185         Move into policy class.
1186         (c_push_user_expression, pop_user_expression_nop)
1187         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1188         (compile_program): New host class.
1189         (c_compile_program): New typedef.
1190         (c_compute_porgram): Use c_compile_program.
1191
1192 2018-08-10  Keith Seitz  <keiths@redhat.com>
1193
1194         * compile/compile-internal.h (compile_instance::~compile_instance):
1195         Remove calls to htab_delete.
1196         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1197         * compile.c (compile_instance::compile_instance): Initialize
1198         htab unique pointers.
1199         (compile_instance::get_cached_type, compile_instance::insert_type)
1200         (compile_instance::error_symbol_once): Update for unique_ptr.
1201
1202 2018-08-10  Keith Seitz  <keiths@redhat.com>
1203
1204         * compile/compile-c-symbols.c (struct symbol_error)
1205         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1206         (compile_instance::insert_symbol_error)
1207         (compile_instance::error_symbol_once): Move to ...
1208         * compile/compile.c: ... here.
1209
1210 2018-08-10  Keith Seitz  <keiths@redhat.com>
1211
1212         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1213         instead of `new_compile_instance'.
1214         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1215         Update description.
1216         If the symbol error map is not initialized, create it.
1217         (generate_c_for_for_one_symbol): Do not check/initialize
1218         the symbol error map.
1219         * compile/compile-c-types.c (compile_c_instance): Make a class.
1220         Update all callers.
1221         (compile_instance::compile_instance): Initialize the type cache.
1222         (get_cached_type): New function.
1223         (insert_type): Update description.
1224         (compile_c_instance::m_default_cflags): Define.
1225         (convert_type): Update description.  Use get_cached_type.
1226         (delete_instance): Moved to destructor.
1227         (new_compile_instance): Moved to constructor.
1228         * compile/compile-c.h (compile_c_instance): Make class inheriting
1229         from compile_instance.
1230         <base>: Remove field.
1231         <type_map, symbol_err_map>: Move to base class.
1232         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1233         * compile/compile-internal.h (compile_instance): Make class.
1234         <type_map_t, symbol_err_map_t>: Define.
1235         <fe>: Rename to `m_gcc_fe'.
1236         <scope, block, gcc_target_options>: Add `m_' prefix.
1237         <m_type_map, m_symbol_err_map>: New fields, moved from
1238         compile_c_instance.
1239         <destroy>: Remove.
1240         (convert_type, new_compile_instance): Remove.
1241         * compile/compile.c (cleanup_compile_instance): Remove.
1242         (compile_to_object): Use unique_ptr to eliminate cleanups.
1243         (compile_instance::set_print_callback, compile_instance::version)
1244         (compile_instance::set_verbose)
1245         (compile_instance::set_driver_filename)
1246         (compile_instance::set_triplet_regexp)
1247         (compile_instance::set_arguments)
1248         (compile_instance::set_source_file)
1249         (compile_instance::compile): Define.
1250
1251 2018-08-10  Keith Seitz  <keiths@redhat.com>
1252
1253         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1254         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1255         gcc-c-fe.def to define C plugin.
1256         (delete_instance): Delete `c_plugin'.
1257         (new_compile_instance): Initialize `c_plugin'.
1258         * compile/compile-c.h: Include gcc_c_plugin.h.
1259         (struct compile_c_instance) <c_plugin>: New member.
1260         * gcc-c-plugin.h: New file.
1261         Update all callers with API change.
1262
1263 2018-08-10  Keith Seitz  <keiths@redhat.com>
1264
1265         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1266         (HFILES_NO_SRCDIR): ... to here.
1267         Add compile-internal.h and compile-c.h.
1268         * compile/compile-c-support.c: Include compile-c.h.
1269         * compile/compile-c-symbols.c: Include compile-c.h.
1270         (generate_c_for_variable_locations): Update comment.
1271         * compile/compile-c-types.c: Include compile-c.h.
1272         * compile/compile-c.h: New file -- moved C language declarations
1273         from other files here.
1274         * compile/compile-internal.h: Do not include hashtab.h or
1275         common/enum-flags.h.
1276         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1277         (gcc_convert_symbol, gcc_symbol_address)
1278         (generate_c_for_variable_locations, c_get_mode_for_size)
1279         (c_get_range_decl_name): Definitions moved to compile-c.h.
1280         * compile/compile-loc2c.c: Include compile-c.h.
1281
1282 2018-08-10  Keith Seitz  <keiths@redhat.com>
1283
1284         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1285         (c_symbol_substitution_name): ... this.
1286         Update all callers.
1287
1288 2018-08-10  Keith Seitz  <keiths@redhat.com>
1289
1290         * compile/compile-c-support.c (c_compute_program): Use
1291         unique_xmalloc_ptr to eliminate cleanup.
1292         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1293         Return a unique_xmalloc_ptr and eliminate cleanup.
1294         * compile/compile-internal.h (generate_c_for_variable_locations):
1295         Return unique_xmalloc_ptr and update description.
1296
1297 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1298
1299         * corelow.c (core_target::get_core_register_section): Rename
1300         min_size to section_min_size.
1301
1302 2018-08-09  Jim Wilson  <jimw@sifive.com>
1303
1304         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1305         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1306         * NEWS: Mention new GNU/Linux RISC-V target.
1307         * configure.host: Add riscv*-*-linux*.
1308         * configure.nat: Add riscv*.
1309         * configure.tgt: Add riscv*-*-linux*.
1310         * riscv-linux-nat.c: New file.
1311         * riscv-linux-tdep.c: New file.
1312
1313 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1314
1315         * infrun.c (resume): Make static, add forward declaration.
1316         (proceed): Update header comment.
1317         * infrun.h (resume): Delete declaration.
1318
1319 2018-08-09  Tom Tromey  <tom@tromey.com>
1320
1321         * riscv-tdep.h: Minor formatting fixes.
1322
1323 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1324
1325         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1326         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1327         (test_mkdir_recursive): Likewise.
1328         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1329
1330 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1331
1332         * valarith.c (value_subscripted_rvalue): If an array is not in
1333         memory, and we don't know the upper bound, then we can't know that
1334         the requested element exists or not.
1335
1336 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1337
1338         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1339         (target_options_to_string): Add comment.
1340
1341 2018-08-08  Tom Tromey  <tom@tromey.com>
1342
1343         * unittests/scoped_mmap-selftests.c: Check result of "write".
1344
1345 2018-08-08  Jim Wilson  <jimw@sifive.com>
1346
1347         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1348         (decode_register_index_short): New.
1349         (decode_j_type_insn, decode_cj_type_insn): New.
1350         (decode_b_type_insn, decode_cb_type_insn): New.
1351         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1352         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1353         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1354         is_c_sw_insn instead of is_sw_insn.
1355         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1356         (riscv_software_single_step): New.
1357         * riscv-tdep.h (riscv_software_single_step): Declare.
1358
1359         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1360         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1361
1362 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1363
1364         PR gdb/18050:
1365         * target.c (dispose_inferior): Don't dispose of inferiors that are
1366         already killed.
1367
1368 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1369
1370         * remote.c (remote_target::download_tracepoint): Change char* to
1371         const char*.
1372
1373 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1374
1375         * target.h (target_options_to_string): Return an std::string.
1376         * target.c (str_comma_list_concat_elem): Return void, use
1377         std::string.
1378         (do_option): Likewise.
1379         (target_options_to_string): Return an std::string.
1380         * linux-nat.c (linux_nat_target::wait): Adjust.
1381         * target-debug.h (target_debug_print_options): Adjust.
1382
1383 2018-08-07  Tom Tromey  <tom@tromey.com>
1384
1385         * Makefile.in (CPPFLAGS): New variable.
1386         (INTERNAL_CPPFLAGS): Use it.
1387
1388 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1389
1390         * NEWS: Mention the index cache.
1391
1392 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1393
1394         * common/pathstuff.h (get_standard_cache_dir): New.
1395         * common/pathstuff.c (get_standard_cache_dir): New.
1396         * build-id.h (build_id_to_string): New.
1397         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1398         DEBUG_STR_SUFFIX): Move to here.
1399         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1400         DEBUG_STR_SUFFIX): Move from there.
1401         (write_psymtabs_to_index): Make non-static, add basename
1402         parameter.  Write to temporary files, rename when done.
1403         (save_gdb_index_command): Adjust call to
1404         write_psymtabs_to_index.
1405         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1406         field.
1407         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1408         (get_gdb_index_contents_from_cache): New.
1409         (get_gdb_index_contents_from_cache_dwz): New.
1410         (dwarf2_initialize_objfile): Read index from cache.
1411         (dwarf2_build_psymtabs): Save to index.
1412         * dwarf-index-cache.h: New file.
1413         * dwarf-index-cache.c: New file.
1414         * dwarf-index-write.h: New file.
1415
1416 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1417
1418         * gnulib/aclocal.m4: Re-generate.
1419         * gnulib/config.in: Re-generate.
1420         * gnulib/configure: Re-generate.
1421         * gnulib/import/Makefile.am: Re-generate.
1422         * gnulib/import/Makefile.in: Re-generate.
1423         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1424         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1425         * gnulib/import/m4/mkdir.m4: New file.
1426         * gnulib/import/mkdir.c: New file.
1427         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1428         module.
1429
1430 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1431
1432         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1433         * common/scoped_mmap.c: New file.
1434         * common/scoped_mmap.h (destroy): New method.
1435         (~scoped_mmap, reset): Use destroy.
1436         (scoped_mmap): New move constructor.
1437         (mmap_file): New declaration.
1438         * unittests/scoped_mmap-selftests.c (test_normal,
1439         test_invalid_filename, run_tests): New functions.
1440         (_initialize_scoped_mmap_selftests): Register selftest.
1441
1442 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1443
1444         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1445         (read_gdb_index_from_buffer): ... this.  Remove section
1446         parameter, add buffer parameter.
1447         (get_gdb_index_contents_ftype,
1448         get_gdb_index_contents_dwz_ftype): New typedefs.
1449         (dwarf2_read_gdb_index): Add callback parameters to get the
1450         index contents.
1451         (get_gdb_index_contents_from_section): New.
1452         (dwarf2_initialize_objfile): Update call to
1453         dwarf2_read_gdb_index.
1454
1455 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1456
1457         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1458         (gdb_open_cloexec): Likewise.
1459         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1460         (commandline_from_pid): Likewise.
1461         (linux_xfer_osdata_threads): Likewise.
1462         (linux_xfer_osdata_fds): Likewise.
1463         * ada-lang.c (is_package_name): Likewise.
1464         * auxv.c (procfs_xfer_auxv): Likewise.
1465         * breakpoint.c (print_one_breakpoint_location): Use
1466         uiout::field_fmt.
1467         (print_one_catch_solib): Use string_printf.
1468         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1469         (add_pe_forwarded_sym): Likewise.
1470         * dwarf2read.c (create_type_unit_group): Likewise.
1471         (build_error_marker_type): Likewise.
1472         * infcall.c (get_function_name): Likewise.
1473         * valprint.c (print_converted_chars_to_obstack): Likewise.
1474         * xtensa-tdep.c (xtensa_register_type): Likewise.
1475
1476 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1477
1478         * remote.c (remote_target::download_tracepoint): Fix format
1479         string errors.
1480
1481 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1482
1483         * tracefile.c: Include common/byte-vector.h.
1484         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1485         with trace_regblock_size if needed.  Update uses of buf.
1486
1487 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1488
1489         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1490         std::vector<unsigned char>.
1491         * tracepoint.c (collection_list::collection_list): Remove
1492         m_regs_mask initializer from initializer list.  Resize
1493         m_regs_mask using the largest remote register number.
1494         (collection_list::add_remote_register): Remove size check on
1495         m_regs_mask.  Use at to access element.
1496         (collection_list::stringify): Change type of temp_buf to
1497         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1498         stringify the register mask.  Use pack_hex_byte for the register
1499         mask.
1500
1501 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1502
1503         * tracepoint.h (class collection_list) <add_register>: Remove.
1504         <add_remote_register, add_ax_registers, add_local_register>:
1505         Declare.
1506         <add_memrange>: Add scope parameter.
1507         * tracepoint.c (encode_actions_1): Likewise.
1508         (collection_list::add_register): Rename to ...
1509         (collection_list::add_remote_register): ... this.  Update
1510         comment.
1511         (collection_list::add_ax_registers, add_local_register): New
1512         methods.
1513         (collection_list::add_memrange): Add scope parameter.  Call
1514         add_local_register instead of add_register.
1515         (finalize_tracepoint_aexpr): New function.
1516         (collection_list::collect_symbol): Update calls to add_memrange.
1517         Call add_local_register instead of add_register.  Call
1518         add_ax_registers.  Call finalize_tracepoint_aexpr.
1519         (encode_actions_1): Get remote regnos for $reg action.  Call
1520         add_remote_register, add_ax_registers, and add_local_register.
1521         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1522         (validate_actionline): Call finalize_tracepoint_aexpr.
1523
1524 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1525
1526         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1527         Replace array buf with gdb::char_vector buf, of size
1528         get_remote_packet_size ().  Replace references to buf and
1529         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1530         and xsnprintf with snprintf.  Raise errors if the buffer is too
1531         small.
1532
1533 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1534
1535         * remote.c (remote_target::download_tracepoint): Fix the has_more
1536         predicate in the QTDP action list iteration.
1537
1538 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1539
1540         * remote.c (remote_target::download_tracepoint): Fix indentation
1541         in for block.
1542
1543 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1544
1545         * proc-api.c (_initialize_proc_api): Remove c, unused.
1546         * procfs.c (procfs_init_inferior): Remove signals, unused.
1547         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1548         unused.
1549
1550 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1551             Andrew Burgess  <andrew.burgess@embecosm.com>
1552
1553         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1554         'W_STOPCODE (0)' as this could be ambiguous.
1555
1556 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1557
1558         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1559         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1560         "ai_socktype").
1561
1562 2018-08-02  Tom Tromey  <tom@tromey.com>
1563
1564         PR symtab/16842.
1565         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1566         symbols.
1567         (process_structure_scope): Likewise.
1568
1569 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1570
1571         PR gdb/22629:
1572         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1573         kill inferior.
1574
1575 2018-08-02  Tom Tromey  <tom@tromey.com>
1576
1577         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1578         (darwin_suspend_inferior, darwin_resume_inferior)
1579         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1580         (darwin_check_new_threads): Check result of get_darwin_inferior.
1581
1582 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1583
1584         GDB 8.1.1 released.
1585
1586 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1587
1588         * varobj.c (varobj_get_path_expr_parent): Report an error if
1589         parent is a dynamic varobj.
1590
1591 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1592
1593         * gnulib/aclocal.m4: Re-generate.
1594         * gnulib/config.in: Re-generate.
1595         * gnulib/configure: Re-generate.
1596         * gnulib/import/Makefile.in: Re-generate.
1597         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1598         * gnulib/import/m4/onceonly.m4: Re-generate.
1599
1600 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1601
1602         * target-descriptions.c (struct xml_test_tdesc): New.
1603         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1604         (record_xml_tdesc): Update.
1605         (maintenance_check_xml_descriptions): Update.
1606         * target-descriptions.h (record_xml_tdesc): Update comment.
1607
1608 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1609
1610         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1611         checking array bounds are defined.
1612
1613 2018-07-30  Tom Tromey  <tom@tromey.com>
1614
1615         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1616         irreflexivity violation.
1617
1618 2018-07-30  Tom Tromey  <tom@tromey.com>
1619
1620         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1621         * value.c (unpack_long): Remove lint code.
1622         * valops.c (value_ind): Remove lint code.
1623         * valarith.c (value_x_binop, value_x_unop, value_equal)
1624         (value_pos): Remove lint code.
1625
1626 2018-07-28  Tom de Vries  <tdevries@suse.de>
1627
1628         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1629         with undefined upper bound as <optimized out>.
1630
1631 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1632
1633         * gcore.in: Rename variable "name" to "prefix".  Expand
1634         "usage" text.
1635
1636 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1637
1638         * windows-nat.c (windows_nat_target::create_inferior): Update to
1639         call close() in global namespace.
1640
1641 2018-07-26  Tom Tromey  <tom@tromey.com>
1642
1643         * dwarf-index-write.c (add_address_entry): Don't add objfile
1644         offsets.
1645         * dbxread.c (find_stab_function): Rename from
1646         find_stab_function_addr.  Return a bound_minimal_symbol.
1647         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1648         Don't add objfile offsets.
1649         (end_psymtab): Use raw_text_low, raw_text_high,
1650         MSYMBOL_VALUE_RAW_ADDRESS.
1651         (read_ofile_symtab): Update.
1652         (process_one_symbol): Update.
1653         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1654         offsets.
1655         (dw2_relocate): Remove.
1656         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1657         searching addrmap.
1658         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1659         Update.
1660         (process_psymtab_comp_unit_reader, add_partial_symbol)
1661         (add_partial_subprogram, dwarf2_ranges_read): Update.
1662         (load_partial_dies): Update.
1663         (add_address_entry): Don't add objfile offsets.
1664         (dwarf2_build_include_psymtabs): Update.
1665         (create_addrmap_from_aranges): Don't add objfile offsets.
1666         (dw2_find_pc_sect_compunit_symtab): Update.
1667         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1668         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1669         Update.
1670         (parse_partial_symbols): Don't add objfile offsets.  Use
1671         raw_text_low, raw_text_high.  Update.
1672         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1673         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1674         or call 'relocate' quick function.  Clear psymbol_map.
1675         * psympriv.h (struct partial_symbol) <address>: Add section
1676         offset.
1677         <set_unrelocated_address>: Rename from set_address.
1678         <raw_text_low, raw_text_high>: New methods.
1679         <text_low, text_high>: Add objfile parameter.
1680         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1681         set_unrelocated_address.
1682         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1683         (find_pc_psymbol): Update.
1684         (fixup_psymbol_section, relocate_psymtabs): Remove.
1685         (dump_psymtab, psym_functions): Update.
1686         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1687         parameter.
1688         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1689         (start_psymtab_common): Update.
1690         * symfile-debug.c (debug_qf_relocate): Remove.
1691         (debug_sym_quick_functions): Update.
1692         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1693         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1694         Update.
1695
1696 2018-07-26  Tom Tromey  <tromey@redhat.com>
1697
1698         * dbxread.c (end_psymtab): Use text_high_valid and
1699         text_low_valid.
1700         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1701         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1702         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1703         Update comment.
1704         <text_low_valid, text_high_valid>: New fields.
1705         <set_text_low, set_text_high>: Update.
1706         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1707
1708 2018-07-26  Tom Tromey  <tom@tromey.com>
1709
1710         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1711         Update.
1712         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1713         textlow and texthigh fields.
1714         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1715         Update.
1716         * mdebugread.c (parse_lines, parse_partial_symbols)
1717         (psymtab_to_symtab_1): Update.
1718         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1719         Rename fields.  Update comment.  Now private.
1720         <text_low, text_high, set_text_low, set_text_high>: New methods.
1721         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1722         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1723         (start_psymtab_common, maintenance_info_psymtabs)
1724         (maintenance_check_psymtabs): Update.
1725         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1726         texthigh fields.
1727         (scan_xcoff_symtab): Update.
1728
1729 2018-07-26  Tom Tromey  <tromey@redhat.com>
1730
1731         * psympriv.h (struct partial_symbol) <unrelocated_address,
1732         address, set_address>: New methods.
1733         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1734         (fixup_psymbol_section, relocate_psymtabs): Update.
1735         (print_partial_symbols): Add 'objfile' parameter.  Update.
1736         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1737         Update.
1738
1739 2018-07-26  Tom Tromey  <tom@tromey.com>
1740
1741         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1742         (debug_names::write_psymbols): Update.
1743         * psympriv.h (struct partial_symbol): Derive from
1744         general_symbol_info.
1745         <obj_section>: New method.
1746         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1747         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1748         (find_pc_sect_psymbol, fixup_psymbol_section)
1749         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1750         (print_partial_symbols, recursively_search_psymtabs)
1751         (compare_psymbols, psymbol_hash, psymbol_compare)
1752         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1753         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1754
1755 2018-07-26  Tom Tromey  <tromey@redhat.com>
1756
1757         * dbxread.c (end_psymtab): Remove dead code.
1758
1759 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1760
1761         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1762         DWARF unwinders are disabled.
1763         * dwarf2-frame.c: Add dwarf2read.h include.
1764         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1765         disabled.
1766         (dwarf2_frame_unwinders_enabled_p): Define.
1767         (show_dwarf_unwinders_enabled_p): New function.
1768         (_initialize_dwarf2_frame): Register switch to control DWARF
1769         unwinder use.
1770         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1771         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1772         (show_dwarf_cmdlist): Remove static keyword.
1773         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1774         (show_dwarf_cmdlist): Declare.
1775         * NEWS: Document new feature.
1776
1777 2018-07-26  Tom de Vries  <tdevries@suse.de>
1778
1779         PR breakpoints/23366
1780         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1781
1782 2018-07-26  Tom de Vries  <tdevries@suse.de>
1783
1784         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1785         DW_AT_count can't be translated to a dynamic prop.
1786
1787 2018-07-25  Tom de Vries  <tdevries@suse.de>
1788
1789         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1790         try/catch.
1791
1792 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1793
1794         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1795
1796 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1797
1798         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1799
1800 2018-07-24  Keith Seitz  <keiths@redhat.comt
1801
1802         PR symtab/23010
1803         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1804         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1805         instead of add_symbol_to_list.
1806         (read_file_scope): Call prepare_one_comp_unit before reading
1807         any other DIEs.
1808
1809 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1810
1811         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1812
1813 2018-07-24  Tom Tromey  <tom@tromey.com>
1814
1815         * utils.c (malloc, realloc, free): Don't declare.
1816         * configure, config.in: Rebuild.
1817         * configure.ac: Don't check for declarations of free, malloc, or
1818         realloc.
1819
1820 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1821
1822         * aarch64-linux-nat.c
1823         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1824         variable.
1825         * arm-linux-nat.c (fetch_regs): Likewise.
1826         (store_regs): Likewise.
1827         (fetch_vfp_regs): Likewise.
1828         (store_vfp_regs): Likewise.
1829         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1830         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1831         (arm_linux_nat_target::insert_watchpoint): Likewise.
1832         (arm_linux_nat_target::remove_watchpoint): Likewise.
1833         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1834         Likewise.
1835         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1836         Likewise.
1837         * ppc-linux-nat.c (fetch_register): Likewise.
1838         (fetch_all_gp_regs): Likewise.
1839         (fetch_ppc_registers): Likewise.
1840         (store_all_gp_regs): Likewise.
1841         (store_ppc_registers): Likewise.
1842         (hwdebug_insert_point): Likewise.
1843         (can_use_watchpoint_cond_accel): Likewise.
1844         * remote-sim.c (gdb_os_write_stdout): Likewise.
1845
1846 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1847             Tom Tromey  <tom@tromey.com>
1848
1849         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1850         test for it.
1851         * configure: Rebuild.
1852
1853 2018-07-22  Tom Tromey  <tom@tromey.com>
1854
1855         * regformats/regdat.sh: Define xmltarget_${name} inside
1856         #ifndef IN_PROCESS_AGENT.
1857
1858 2018-07-22  Tom Tromey  <tom@tromey.com>
1859
1860         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1861
1862 2018-07-22  Tom Tromey  <tom@tromey.com>
1863
1864         * symfile.c (reread_symbols): Notify iter, not objfile.
1865
1866 2018-07-22  Tom Tromey  <tom@tromey.com>
1867
1868         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1869         Use arch_ops.
1870         (ravenscar_thread_target::prepare_to_store): Likewise.
1871
1872 2018-07-22  Tom Tromey  <tom@tromey.com>
1873
1874         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1875         unused variable.  Call value_fetch_lazy when needed.
1876         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1877         Remove unused variable.  Call value_fetch_lazy when needed.
1878
1879 2018-07-22  Tom Tromey  <tom@tromey.com>
1880
1881         * m32c-tdep.c (mark_dma): Return void.
1882         (make_regs): Remove unused declarations.
1883
1884 2018-07-22  Tom Tromey  <tom@tromey.com>
1885
1886         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1887         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1888         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1889         bkscm_get_valid_block_smob_arg_unsafe for effect.
1890
1891 2018-07-22  Tom Tromey  <tom@tromey.com>
1892
1893         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1894         value_type.
1895
1896 2018-07-22  Tom Tromey  <tom@tromey.com>
1897
1898         * windows-nat.c (saved_context): Conditionally define.
1899         * remote.c (remote_target::remote_btrace_maybe_reopen):
1900         Conditionally declare "warned".
1901         * inflow.c (sigquit_ours): Conditionally define.
1902         (new_tty): Move "tty" declaration inside #if.
1903         * guile/guile.c (guile_datadir): Conditionally define.
1904         * charset.c (set_be_le_names): Move some declarations inside #if.
1905         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1906         #if.
1907         (parse_xml_btrace_conf): Likewise.
1908
1909 2018-07-22  Tom Tromey  <tom@tromey.com>
1910
1911         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1912
1913 2018-07-22  Tom Tromey  <tom@tromey.com>
1914
1915         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1916         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1917         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1918         * buildsym-legacy.c (get_macro_table): Remove unused variable.
1919         * stack.c (frame_apply_level_command): Remove unused variable.
1920         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1921         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1922         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1923         unused variable.
1924         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1925         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1926         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1927         variable.
1928         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1929         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1930         variable.
1931         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1932         Remove unused variable.
1933         * cli/cli-script.c (recurse_read_control_structure): Remove unused
1934         variable.
1935         * common/tdesc.c (print_xml_feature::visit): Remove unused
1936         variable.
1937         * compile/compile-object-load.c (store_regs): Remove unused
1938         variables.
1939         * complaints.c (clear_complaints): Remove unused variable.
1940         * corelow.c (core_target_open): Remove unused variable.
1941         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1942         variable.
1943         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1944         variable.
1945         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1946         variable.
1947         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1948         variable.
1949         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1950         variable.
1951         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1952         variable.
1953         * ia64-tdep.c (examine_prologue): Remove unused variable.
1954         * infcall.c (run_inferior_call): Remove unused variable.
1955         * inferior.c (exit_inferior): Remove unused variable.
1956         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1957         * linespec.c (decode_line_2): Remove unused variable.
1958         * linux-nat.c (super_close): Remove.
1959         * linux-tdep.c (linux_info_proc): Remove unused variable.
1960         * mi/mi-main.c (mi_execute_command): Remove unused variable.
1961         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1962         Remove unused variable.
1963         * parse.c (find_minsym_type_and_address): Remove unused variable.
1964         * printcmd.c (info_symbol_command, printf_floating): Remove unused
1965         variable.
1966         * python/py-breakpoint.c (bppy_set_commands): Remove unused
1967         variable.
1968         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1969         variables.
1970         * record-btrace.c (record_btrace_target::store_registers): Remove
1971         unused variable.
1972         (cmd_show_record_btrace_cpu): Remove unused variable.
1973         * riscv-tdep.c (riscv_register_reggroup_p)
1974         (riscv_push_dummy_call, riscv_return_value): Remove unused
1975         variable.
1976         * rust-exp.y (literal): Remove unused variable.
1977         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1978         unused variable.
1979         <STRUCTOP_ANONYMOUS>: Likewise.
1980         * s390-linux-tdep.c (s390_linux_init_abi_31)
1981         (s390_linux_init_abi_64): Remove unused variable.
1982         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1983         (file_select_thread, net_windows_open, _initialize_ser_windows):
1984         Remove unused variables.
1985         * symtab.c (find_pc_sect_line): Remove unused variable.
1986         * target-memory.c (compute_garbled_blocks): Remove unused
1987         variable.
1988         (target_write_memory_blocks): Remove unused variable.
1989         * target.c (target_stack::unpush): Remove unused variables.
1990         * tracepoint.c (start_tracing, all_tracepoint_actions)
1991         (merge_uploaded_trace_state_variables)
1992         (print_one_static_tracepoint_marker): Remove unused variable.
1993         * unittests/basic_string_view/element_access/char/1.cc (test01):
1994         Remove unused variable.
1995         * windows-nat.c (windows_continue, windows_add_all_dlls)
1996         (do_initial_windows_stuff, windows_nat_target::create_inferior):
1997         Remove unused variables.
1998
1999 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2000
2001         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2002         attr_profile in HAVE_ELF.
2003         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2004         HAVE_ELF.
2005
2006 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2007
2008         * frame.c (frame_register_unwind): Change parameter name.
2009         (frame_unwind_register): Likewise.
2010         (frame_unwind_register_value): Likewise.
2011         (frame_unwind_register_signed): Likewise.
2012         (frame_unwind_register_unsigned): Likewise.
2013         * frame.h (frame_register_unwind): Likewise.
2014         (frame_unwind_register): Likewise.
2015         (frame_unwind_register_value): Likewise.
2016         (frame_unwind_register_signed): Likewise.
2017         (frame_unwind_register_unsigned): Likewise.
2018         (frame_unwind_arch): Likewise.
2019
2020 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2021
2022         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2023         ISA maintenance.
2024
2025 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2026
2027         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2028         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2029         hand.
2030
2031 2018-07-20  Keith Seitz  <keiths@redhat.com>
2032
2033         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2034         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2035         m_compunit_symtab, m_language>: Add "m_" prefix.
2036         Update all uses.
2037         * buildsym.c: Update all uses.
2038
2039 2018-07-20  Tom Tromey  <tom@tromey.com>
2040
2041         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2042         * buildsym.h (record_line_ftype): Remove typedef.
2043
2044 2018-07-20  Tom Tromey  <tom@tromey.com>
2045
2046         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2047         (end_expandable_symtab): Likewise.
2048         (end_symtab_get_static_block): Likewise.
2049         (end_symtab_from_static_block): Likewise.
2050         * buildsym-legacy.c (augment_type_symtab): Remove.
2051         (end_expandable_symtab): Remove.
2052         (end_symtab_get_static_block): Remove.
2053         (end_symtab_from_static_block): Remove.
2054
2055 2018-07-20  Tom Tromey  <tom@tromey.com>
2056
2057         * dwarf2read.c: Include buildsym.h.
2058         (struct dwarf2_cu) <builder>: New method.
2059         (fixup_go_packaging): Update.
2060         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2061         use scoped_free_pendings.
2062         (using_directives): Add "cu" parameter, remove "language".
2063         (read_import_statement, setup_type_unit_groups, )
2064         (read_func_scope, read_lexical_block_scope)
2065         (dwarf2_record_block_ranges, read_namespace): Update.
2066         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2067         (lnp_state_machine::handle_end_sequence): Update.
2068         (class lnp_state_machine) <m_cu>: New member.
2069         <m_record_line_callback>: Remove.
2070         <m_currently_recording_lines>: New member.
2071         (lnp_state_machine::handle_set_file): Update.
2072         (noop_record_line): Remove.
2073         (dwarf_record_line_p): Add cu parameter.
2074         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2075         (lnp_state_machine::record_line)
2076         (lnp_state_machine::lnp_state_machine)
2077         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2078         (dwarf_decode_lines): Update.
2079         (dwarf2_start_subfile): Add cu parameter.
2080         (dwarf2_start_symtab, new_symbol): Update.
2081         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2082         Remove dwarf2_per_objfile parameter.
2083         (dwarf_decode_macros): Update.
2084
2085 2018-07-20  Tom Tromey  <tom@tromey.com>
2086
2087         * stabsread.c (define_symbol): Update.
2088         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2089         * dwarf2read.c (new_symbol): Update.
2090         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2091         * cp-namespace.c: Include buildsym.h.
2092         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2093         * buildsym-legacy.c (get_buildsym_compunit): New function.
2094
2095 2018-07-20  Tom Tromey  <tom@tromey.com>
2096
2097         * xcoffread.c: Include buildsym-legacy.h.
2098         * windows-nat.c: Include buildsym-legacy.h.
2099         * stabsread.c: Include buildsym-legacy.h.
2100         * mdebugread.c: Include buildsym-legacy.h.
2101         * buildsym-legacy.h: New file.
2102         * buildsym-legacy.c: New file, from buildsym.c.
2103         * go32-nat.c: Include buildsym-legacy.h.
2104         * dwarf2read.c: Include buildsym-legacy.h.
2105         * dbxread.c: Include buildsym-legacy.h.
2106         * cp-namespace.c: Include buildsym-legacy.h.
2107         * coffread.c: Include buildsym-legacy.h.
2108         * buildsym.h: Move some contents to buildsym-legacy.h.
2109         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2110         buildsym-legacy.c.
2111         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2112
2113 2018-07-20  Tom Tromey  <tom@tromey.com>
2114
2115         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2116         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2117         (buildsym_compunit::buildsym_compunit)
2118         (buildsym_compunit::~buildsym_compunit)
2119         (buildsym_compunit::get_macro_table): Define.
2120
2121 2018-07-20  Tom Tromey  <tom@tromey.com>
2122
2123         * buildsym.c (reset_symtab_globals): Remove.
2124         (buildsym_compunit::end_symtab_from_static_block): Update.
2125         (buildsym_compunit::augment_type_symtab): Update.
2126         (end_symtab_from_static_block): Call free_buildsym_compunit.
2127         (augment_type_symtab, end_symtab, end_expandable_symtab):
2128         Likewise.
2129
2130 2018-07-20  Tom Tromey  <tom@tromey.com>
2131
2132         * arch-utils.c: Do not include buildsym.h.
2133         * mipsread.c: Do not include buildsym.h.
2134         * machoread.c: Do not include buildsym.h.
2135         * elfread.c: Do not include buildsym.h.
2136
2137 2018-07-20  Tom Tromey  <tom@tromey.com>
2138
2139         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2140         initialization.
2141         (buildsym_compunit): Add new constructor.
2142         (struct buildsym_compunit) <get_last_source_file, finish_block,
2143         record_block_range, start_subfile, patch_subfile_names,
2144         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2145         set_last_source_start_addr, get_last_source_start_addr,
2146         get_local_using_directives, set_local_using_directives,
2147         get_global_using_directives, outermost_context_p,
2148         get_current_context_stack, get_context_stack_depth,
2149         get_current_subfile, get_local_symbols, get_file_symbols,
2150         get_global_symbols, record_debugformat, record_producer,
2151         push_context, pop_context, end_symtab_get_static_block,
2152         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2153         New public methods.
2154         <record_pending_block, finish_block_internal, make_blockvector,
2155         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2156         private methods.
2157         Update all users.
2158
2159 2018-05-22  Tom Tromey  <tom@tromey.com>
2160
2161         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2162         parameter.
2163         (finish_block_internal): Update.
2164
2165 2018-07-20  Tom Tromey  <tom@tromey.com>
2166
2167         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2168         parameter.
2169         (finish_block_internal): Update.
2170
2171 2018-07-20  Tom Tromey  <tom@tromey.com>
2172
2173         * buildsym.h (EXTERN): Don't define or undef.
2174         * buildsym.c (EXTERN): Don't define.
2175
2176 2018-07-20  Tom Tromey  <tom@tromey.com>
2177
2178         * buildsym.c: Remove TODO comment.
2179
2180 2018-07-20  Tom Tromey  <tom@tromey.com>
2181
2182         * coffread.c (coff_symtab_read): Update.
2183         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2184         (xcoff_new_init): Update.
2185         * mipsread.c (mipscoff_new_init): Update.
2186         * mdebugread.c (mdebug_build_psymtabs): Update.
2187         * elfread.c (elf_new_init): Update.
2188         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2189         Update.
2190         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2191         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2192         (stabsect_build_psymtabs): Update.
2193         * buildsym.h (buildsym_init): Don't declare.
2194         * buildsym.c: Update comment.
2195         (prepare_for_building): Remove.
2196         (start_symtab, restart_symtab): Update.
2197         (reset_symtab_globals): Update comment.
2198         (buildsym_init): Remove.
2199
2200 2018-07-20  Tom Tromey  <tom@tromey.com>
2201
2202         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2203         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2204         (read_enum_type, common_block_start, common_block_end)
2205         (cleanup_undefined_types_1, finish_global_stabs): Update.
2206         * mdebugread.c (psymtab_to_symtab_1): Update.
2207         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2208         (read_lexical_block_scope, new_symbol): Update.
2209         * dbxread.c (process_one_symbol): Update.
2210         * coffread.c (coff_symtab_read, process_coff_symbol)
2211         (coff_read_enum_type): Update.
2212         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2213         declare.
2214         (get_local_symbols, get_file_symbols, get_global_symbols): New
2215         functions.
2216         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2217         m_global_symbols.
2218         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2219         (~scoped_free_pendings): Update.
2220         (finish_block, prepare_for_building, reset_symtab_globals)
2221         (end_symtab_get_static_block, end_symtab_with_blockvector)
2222         (augment_type_symtab, push_context): Update.
2223         (get_local_symbols, get_file_symbols, get_global_symbols): New
2224         functions.
2225         (buildsym_init): Update.
2226
2227 2018-07-20  Tom Tromey  <tom@tromey.com>
2228
2229         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2230         (process_full_type_unit): Likewise.
2231         (dwarf2_start_symtab): Set list_in_scope.
2232
2233 2018-07-20  Tom Tromey  <tom@tromey.com>
2234
2235         * dwarf2read.c (process_psymtab_comp_unit_reader)
2236         (build_type_psymtabs_reader): Do not set list_in_scope.
2237
2238 2018-07-20  Tom Tromey  <tom@tromey.com>
2239
2240         * buildsym.c (free_pendings): Remove.
2241         (add_symbol_to_list, scoped_free_pendings)
2242         (finish_block_internal, buildsym_init): Update.
2243
2244 2018-07-20  Tom Tromey  <tom@tromey.com>
2245
2246         * xcoffread.c (read_xcoff_symtab): Update.
2247         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2248         Update.
2249         * dbxread.c (process_one_symbol): Update.
2250         * coffread.c (coff_symtab_read): Update.
2251         * buildsym.h (finish_block): Update.
2252         * buildsym.c (finish_block): Remove "listhead" argument.
2253         (end_symtab_get_static_block): Update.
2254
2255 2018-07-20  Tom Tromey  <tom@tromey.com>
2256
2257         * buildsym.h (class scoped_free_pendings): Remove constructor.
2258         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2259         method.
2260         <m_pending_block_obstack, m_pending_blocks>: New members.
2261         (pending_block_obstack, pending_blocks): Remove.
2262         (scoped_free_pendings::scoped_free_pendings): Default.
2263         (~scoped_free_pendings): Update.
2264         (free_pending_blocks): Remove.
2265         (finish_block_internal, record_pending_block, make_blockvector)
2266         (end_symtab_get_static_block, augment_type_symtab, push_context)
2267         (buildsym_init): Update.
2268
2269 2018-07-20  Tom Tromey  <tom@tromey.com>
2270
2271         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2272         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2273         members.
2274         (pending_addrmap, pending_addrmap_obstack)
2275         (pending_addrmap_interesting): Remove.
2276         (scoped_free_pendings, record_block_range, make_blockvector)
2277         (prepare_for_building, reset_symtab_globals, buildsym_init):
2278         Update.
2279
2280 2018-07-20  Tom Tromey  <tom@tromey.com>
2281
2282         * xcoffread.c (process_linenos): Update.
2283         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2284         * mdebugread.c (psymtab_to_symtab_1): Update.
2285         * dwarf2read.c (setup_type_unit_groups)
2286         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2287         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2288         * dbxread.c (process_one_symbol): Update.
2289         * coffread.c (coff_symtab_read, enter_linenos)
2290         (process_coff_symbol): Update.
2291         * buildsym.h (current_subfile): Don't declare.
2292         (get_current_subfile): Declare.
2293         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2294         member.
2295         (start_subfile, free_buildsym_compunit, push_subfile)
2296         (prepare_for_building, start_symtab): Update.
2297         (get_current_subfile): New function.
2298
2299 2018-07-20  Tom Tromey  <tom@tromey.com>
2300
2301         * coffread.c (coff_symtab_read): Update.
2302         * xcoffread.c (read_xcoff_symtab): Update.
2303         * dwarf2read.c (new_symbol): Update.
2304         (read_func_scope, read_lexical_block_scope): Update.
2305         * dbxread.c (process_one_symbol): Update.
2306         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2307         (outermost_context_p): Remove macro.
2308         (outermost_context_p, get_current_context_stack)
2309         (get_context_stack_depth): Declare.
2310         (pop_context): Return struct context_stack.
2311         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2312         member.
2313         (context_stack_size): Remove.
2314         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2315         (prepare_for_building, end_symtab_get_static_block)
2316         (augment_type_symtab, push_context): Update.
2317         (pop_context): Return struct context_stack.
2318         (outermost_context_p, get_current_context_stack)
2319         (get_context_stack_depth): New functions.
2320         (buildsym_init): Update.
2321
2322 2018-07-20  Tom Tromey  <tom@tromey.com>
2323
2324         * rust-exp.y: Now a pure parser.  Update all rules.
2325         (%union): Move earlier.
2326         (current_parser, work_obstack): Remove globals.
2327         (rust_parser, ~rust_parser): Update.
2328         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2329         lex_character, lex_number, lex_string, lex_identifier,
2330         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2331         convert_name, convert_params_to_expression,
2332         convert_ast_to_expression, ast_basic_type, ast_operation,
2333         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2334         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2335         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2336         ast_array_type, ast_slice_type, ast_reference_type,
2337         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2338         (rust_parse): Update.
2339         (rustyyerror, rustyylex): Add parser parameter.
2340         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2341         (rust_lex_stringish_test, rust_lex_test_sequence)
2342         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2343         (rust_lex_test_push_back, rust_lex_tests): Update.
2344
2345 2018-07-19  Pedro Alves  <palves@redhat.com>
2346
2347         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2348         gdb::unique_xmalloc_ptr.
2349         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2350         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2351         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2352         copy-initialization.
2353         * guile/scm-pretty-print.c (ppscm_print_children): Use
2354         gdb::unique_xmalloc_ptr instead of cleanups.
2355         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2356         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2357         gdb::unique_xmalloc_ptr.
2358         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2359         Adjust to use gdb::unique_xmalloc_ptr.
2360         * guile/scm-utils.c (extract_arg): Adjust.
2361         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2362         gdb::unique_xmalloc_ptr instead of a cleanup.
2363
2364 2018-07-19  Tom Tromey  <tom@tromey.com>
2365
2366         * utils.c (do_value_free_to_mark)
2367         (make_cleanup_value_free_to_mark): Remove.
2368         * utils.h (make_cleanup_value_free_to_mark): Remove.
2369
2370 2018-07-19  Pedro Alves  <palves@redhat.com>
2371
2372         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2373         forwarding reference.
2374
2375 2018-07-18  Pedro Alves  <palves@redhat.com>
2376
2377         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2378         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2379         cleanup.
2380
2381 2018-07-18  Pedro Alves  <palves@redhat.com>
2382
2383         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2384         exceptions.
2385         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2386         (gdbscm_wrap): New.
2387         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2388         directly instead of a cleanup.
2389         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2390         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2391         (vlscm_binop_gdbthrow): New, factored out from ...
2392         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2393         (vlscm_rich_compare): Use gdbscm_wrap.
2394         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2395         instead of a cleanup.
2396         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2397         cleanup.
2398         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2399         Use xfree directly instead of a cleanup.
2400         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2401         Adjust to use gdbscm_wrap and scoped_value_mark.
2402         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2403         (gdbscm_value_address, gdbscm_value_dereference)
2404         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2405         scoped_value_mark.
2406         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2407         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2408         scoped_value_mark.
2409         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2410         gdbscm_wrap and scoped_value_mark.
2411         (gdbscm_value_to_string): Use xfree directly instead of a
2412         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2413         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2414         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2415         scoped_value_mark.
2416         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2417         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2418         scoped_value_mark.
2419         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2420         gdbscm_wrap.
2421
2422 2018-07-18  Tom de Vries  <tdevries@suse.de>
2423
2424         * findvar.c (default_read_var_value): Also resolve dynamic type for
2425         LOC_OPTIMIZED_OUT vars.
2426
2427 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2428
2429         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2430         decoding.
2431
2432 2018-07-17  Tom Tromey  <tom@tromey.com>
2433
2434         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2435         (compute_enum_list, pascm_set_param_value_x)
2436         (gdbscm_parameter_value): Update.
2437         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2438         (gdbscm_scm_to_host_string): Update.
2439         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2440         Update.
2441         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2442         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2443         * guile/scm-string.c (gdbscm_scm_to_string): Return
2444         unique_xmalloc_ptr.
2445         (gdbscm_scm_to_host_string): Likewise.
2446
2447 2018-07-17  Tom Tromey  <tom@tromey.com>
2448
2449         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2450         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2451         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2452         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2453         unique_xmalloc_ptr.
2454
2455 2018-07-17  Tom Tromey  <tom@tromey.com>
2456
2457         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2458         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2459         Update.
2460         * guile/scm-cmd.c (cmdscm_function): Update.
2461         * guile/scm-pretty-print.c
2462         (ppscm_print_exception_unless_memory_error): Update.
2463         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2464         Return unique_xmalloc_ptr.
2465
2466 2018-07-17  Tom Tromey  <tom@tromey.com>
2467
2468         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2469         Use string_printf.
2470
2471 2018-07-17  Jim Wilson  <jimw@sifive.com>
2472
2473         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2474         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2475         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2476         unecessary braces after EF_RISCV_RVC test.  Delete call to
2477         set_gdbarch_decr_pc_after_break.
2478
2479         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2480         RISCV_LAST_FP_REGNUM + 1.
2481         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2482
2483 2018-07-17  Tom Tromey  <tom@tromey.com>
2484
2485         * configure.ac: Remove --disable-gdbcli.
2486         * configure: Rebuild.
2487         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2488         (SUBDIR_CLI_CFLAGS): Remove.
2489         (SFILES): Use SUBDIR_CLI_SRCS.
2490         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2491
2492 2018-07-17  Tom Tromey  <tom@tromey.com>
2493
2494         PR gdb/18624:
2495         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2496
2497 2018-07-16  Jim Wilson  <jimw@sifive.com>
2498
2499         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2500
2501 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2502
2503         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2504         variable.
2505         (libunwind_frame_sniffer): Likewise.
2506         (libunwind_frame_prev_register): Likewise.
2507         (libunwind_sigtramp_frame_sniffer): Likewise.
2508         * ia64-tdep.c (ia64_access_reg): Likewise.
2509         (ia64_access_rse_reg): Likewise.
2510         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2511         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2512
2513 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2514
2515         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2516
2517 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2518
2519         * remote-sim.c (gdbsim_target::close,
2520         gdbsim_target::mourn_inferior): Remove unused variables.
2521
2522 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2523
2524         * ia64-tdep.c (ktab_buf): New global.
2525         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2526         (get_kernel_table): Adjust.
2527
2528 2018-07-16  Tom Tromey  <tom@tromey.com>
2529
2530         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2531         * dwarf2read.c (using_directives, new_symbol): Use
2532         outermost_context_p.
2533         * dbxread.c (process_one_symbol): Use outermost_context_p.
2534         * coffread.c (coff_symtab_read): Use outermost_context_p.
2535
2536 2018-07-16  Tom Tromey  <tom@tromey.com>
2537
2538         * dwarf2read.c (using_directives, read_func_scope)
2539         (read_lexical_block_scope): Update.
2540         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2541         * buildsym.h (local_using_directives, global_using_directives):
2542         Don't declare.
2543         (get_local_using_directives, set_local_using_directives)
2544         (get_global_using_directives): Declare.
2545         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2546         m_global_using_directives>: New members.
2547         (finish_block_internal, prepare_for_building)
2548         (reset_symtab_globals, end_symtab_get_static_block)
2549         (push_context): Update.
2550         (get_local_using_directives, set_local_using_directives)
2551         (get_global_using_directives): New functions.
2552         (buildsym_init): Update.
2553
2554 2018-07-16  Tom Tromey  <tom@tromey.com>
2555
2556         * xcoffread.c (xcoff_initial_scan): Don't call
2557         free_pending_blocks.
2558         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2559         * buildsym.h (class scoped_free_pendings): Add constructor.
2560         (free_pending_blocks): Don't declare.
2561         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2562         (free_pending_blocks): Now static.
2563
2564 2018-07-16  Tom Tromey  <tom@tromey.com>
2565
2566         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2567         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2568         member.
2569         (struct subfile_stack): Remove.
2570         (subfile_stack): Remove.
2571         (push_subfile, pop_subfile, buildsym_init): Update.
2572
2573 2018-07-16  Tom Tromey  <tom@tromey.com>
2574
2575         * buildsym.c (push_subfile): Use gdb_assert.
2576         (pop_subfile): Use gdb_assert.
2577
2578 2018-07-16  Tom Tromey  <tom@tromey.com>
2579
2580         * buildsym.h (merge_symbol_lists): Remove.
2581         * buildsym.c (merge_symbol_lists): Remove.
2582
2583 2018-07-16  Tom Tromey  <tom@tromey.com>
2584
2585         * stabsread.c (scan_file_globals): Update comment.
2586         * stabsread.h (scan_file_globals): Move from buildsym.h.
2587         * buildsym.h (scan_file_globals): Move to stabsread.h.
2588
2589 2018-07-16  Tom Tromey  <tom@tromey.com>
2590
2591         * xcoffread.c (xcoff_new_init): Update.
2592         * mipsread.c (mipscoff_new_init): Update.
2593         * mdebugread.c (mdebug_build_psymtabs): Update.
2594         * elfread.c (elf_new_init): Update.
2595         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2596         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2597         * buildsym.h (buildsym_new_init): Don't declare.
2598         * buildsym.c (buildsym_new_init): Remove.
2599
2600 2018-07-16  Tom Tromey  <tom@tromey.com>
2601
2602         * stabsread.h (within_function): Move from buildsym.h.
2603         * stabsread.c (start_stabs): Clear within_function.
2604         * coffread.c (coff_start_symtab): Clear within_function.
2605         * buildsym.h (within_function): Move to stabsread.h.
2606         * buildsym.c (prepare_for_building): Update.
2607
2608 2018-07-16  Tom Tromey  <tom@tromey.com>
2609
2610         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2611         * dwarf2read.c (dwarf2_start_symtab): Don't set
2612         processing_gcc_compilation.
2613         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2614
2615 2018-07-16  Tom Tromey  <tom@tromey.com>
2616
2617         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2618         (next_symbol_text_func): Move from buildsym.h.
2619         * stabsread.c (hashname): Move from buildsym.c.
2620         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2621         (next_symbol_text_func, hashname): Move to stabsread.h.
2622         * buildsym.c: Don't include bcache.h
2623         (hashname): Move to stasbread.c.
2624
2625 2018-07-16  Tom Tromey  <tom@tromey.com>
2626
2627         * buildsym.h (context_stack_size): Don't declare.
2628         * buildsym.c (context_stack_size): New global.
2629
2630 2018-07-16  Tom Tromey  <tom@tromey.com>
2631
2632         * dbxread.c (processing_acc_compilation): New global.
2633         * buildsym.h (processing_acc_compilation): Don't declare.
2634
2635 2018-07-16  Tom Tromey  <tom@tromey.com>
2636
2637         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2638         * dbxread.c (read_ofile_symtab): Update.
2639         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2640         * buildsym.h (last_source_start_addr): Remove.
2641         (set_last_source_start_addr, get_last_source_start_addr):
2642         Declare.
2643         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2644         parameter.
2645         (struct buildsym_compunit) <m_last_source_start_addr>: New
2646         member.
2647         (prepare_for_building): Remove start_addr parameter.
2648         (start_symtab, restart_symtab, end_symtab_get_static_block)
2649         (end_symtab_with_blockvector): Update.
2650         (set_last_source_start_addr, get_last_source_start_addr): New
2651         functions.
2652
2653 2018-07-16  Tom Tromey  <tom@tromey.com>
2654
2655         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2656         member.
2657         (have_line_numbers): Remove.
2658         (record_line, prepare_for_building, end_symtab_get_static_block)
2659         (augment_type_symtab): Update.
2660
2661 2018-07-16  Tom Tromey  <tom@tromey.com>
2662
2663         * buildsym.c (~buildsym_compunit): Free the macro table.
2664         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2665         methods.
2666         <m_pending_macros>: New member.
2667         (pending_macros): Remove.
2668         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2669         (reset_symtab_globals, end_symtab_get_static_block)
2670         (end_symtab_with_blockvector, augment_type_symtab)
2671         (buildsym_init): Update.
2672
2673 2018-07-16  Tom Tromey  <tom@tromey.com>
2674
2675         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2676         parameter.
2677         (buildsym_compunit::set_last_source_file): New method.
2678         <m_last_source_file>: New member.
2679         (prepare_for_building): Remove "name" parameter.
2680         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2681         (last_source_file): Remove.
2682         (set_last_source_file, get_last_source_file): Update.
2683
2684 2018-07-16  Tom Tromey  <tom@tromey.com>
2685
2686         * buildsym.c (prepare_for_building): Add assert.
2687
2688 2018-07-16  Tom Tromey  <tom@tromey.com>
2689
2690         * buildsym.c (~buildsym_compunit): Update.
2691         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2692         (start_subfile, patch_subfile_names)
2693         (end_symtab_with_blockvector): Update.
2694
2695 2018-07-16  Tom Tromey  <tom@tromey.com>
2696
2697         * buildsym.c (struct buildsym_compunit): Add constructor,
2698         destructor, initializers.
2699         (start_buildsym_compunit): Remove.
2700         (free_buildsym_compunit): Use "delete".
2701         (start_symtab, restart_symtab): Use "new".
2702
2703 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2704
2705         * symfile.c (set_objfile_default_section_offset): Remove struct
2706         keyword.
2707
2708 2018-07-14  Stafford Horne  <shorne@gmail.com>
2709
2710         * (Responsible Maintainers): Add myself as or1k maintainer.
2711
2712 2018-07-13  Tom Tromey  <tom@tromey.com>
2713
2714         * symfile.c (set_objfile_default_section_offset): Use extra braces
2715         around initializer.
2716
2717 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2718
2719         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2720         non-branching basr.
2721
2722 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2723
2724         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2725         unittests/cli-utils-selftests.c
2726         * unittests/cli-utils-selftests.c: New file.
2727
2728 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2729
2730         * NEWS: Mention new commands. Mention change to 'thread apply'.
2731
2732 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2733
2734         * thread.c (thr_try_catch_cmd): New function.
2735         (thread_apply_all_command): Handle qcs flags.
2736         (thread_apply_command): Handle qcs flags.
2737         (taas_command): New function.
2738         (tfaas_command): New function.
2739         (_initialize_thread): Update to setup the new commands 'taas
2740         and 'tfaas'. Change doc string for 'thread apply'.
2741
2742 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2743
2744         * stack.c: (trailing_outermost_frame): New function, mostly
2745         extracted from backtrace_command_1.
2746         (leading_innermost_frame): New function.
2747         (backtrace_command_1): Update to call trailing_outermost_frame.
2748         (frame_apply_command_count): New function.
2749         (frame_apply_level_command): New function.
2750         (frame_apply_all_command): New function.
2751         (frame_apply_command): New function.
2752         (faas_command): New function.
2753         (frame_cmd_list): New variable.
2754         (_initialize_stack): Update to setup the new commands 'frame apply'
2755         and 'faas'.
2756
2757 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2758
2759         * cli-utils.c (number_or_range_parser::get_number): Only handle
2760         numbers or convenience var as numbers.
2761         (parse_flags): New function.
2762         (parse_flags_qcs): New function.
2763         (number_or_range_parser::finished): Ensure parsing end is detected
2764         before end of string.
2765         * cli-utils.h (parse_flags): New function.
2766         (parse_flags_qcs): New function.
2767         (number_or_range_parser): Remove m_finished bool.
2768         (number_or_range_parser::skip_range): Set m_in_range to false.
2769
2770 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2771
2772         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2773         on Windows.
2774
2775 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2776             Jan Kratochvil  <jan.kratochvil@redhat.com>
2777             Paul Fertser  <fercerpav@gmail.com>
2778             Tsutomu Seki  <sekiriki@gmail.com>
2779             Pedro Alves  <palves@redhat.com>
2780
2781         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2782         'unittests/parse-connection-spec-selftests.c'.
2783         (COMMON_SFILES): Add 'common/netstuff.c'.
2784         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2785         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2786         * common/netstuff.c: New file.
2787         * common/netstuff.h: New file.
2788         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2789         (wait_for_connect): Update comment.  New parameter
2790         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2791         Use 'sock' directly instead of 'scb->fd'.
2792         (try_connect): New function, with code from 'net_open'.
2793         (net_open): Rewrite main loop to deal with multiple
2794         sockets/addresses.  Handle IPv6-style hostnames; implement
2795         support for IPv6 connections.
2796         * unittests/parse-connection-spec-selftests.c: New file.
2797
2798 2018-07-11  Pedro Alves  <palves@redhat.com>
2799
2800         PR gdb/23377
2801         * remote.c (remote_target::remote_detach_pid): Call
2802         set_current_process.
2803
2804 2018-07-11  Pedro Alves  <palves@redhat.com>
2805
2806         * h8300-tdep.c (h8300_gdbarch_init): Remove
2807         set_gdbarch_ecoff_reg_to_regnum calls.
2808
2809 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2810
2811         PR c++/23373
2812         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2813         offsets/sizes for static members of a class/struct.
2814
2815 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2816
2817         * target-descriptions.c (tdesc_register_bitsize): Rename.
2818         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2819         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2820         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2821
2822 2018-07-10  Tom Tromey  <tom@tromey.com>
2823
2824         * breakpoint.c (moribund_locations): Now static and a
2825         std::vector.
2826         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2827         (build_bpstat_chain, update_global_location_list)
2828         (breakpoint_retire_moribund): Update.
2829         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2830         VEC.
2831
2832 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2833
2834         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2835         (riscv_register_reggroup_p): Use new function, remove unneeded
2836         parenthesis.
2837         (riscv_push_dummy_call): Extend assert to compare against xlen or
2838         flen based on register type.
2839
2840 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2841
2842         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2843
2844 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2845
2846         * remote.c (show_hardware_watchpoint_limit): New function.
2847         (show_hardware_watchpoint_length_limit): New function.
2848         (show_hardware_breakpoint_limit): New function.
2849         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2850         where appropriate, update help text.
2851
2852 2018-07-09  Tom Tromey  <tom@tromey.com>
2853
2854         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2855         (CLIBS): Don't mention NAT_CLIBS.
2856
2857 2018-07-09  Tom Tromey  <tom@tromey.com>
2858
2859         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2860         (LIBGDB_OBS, clean mostlyclean): Update.
2861         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2862
2863 2018-07-09  Tom Tromey  <tom@tromey.com>
2864
2865         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2866         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2867         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2868
2869 2018-07-09  Tom Tromey  <tom@tromey.com>
2870
2871         * Makefile.in (ALLDEPFILES): Remove exec.c.
2872         (COMMON_OBS): Remove exec.o.
2873         (COMMON_SFILES): Add exec.c.
2874
2875 2018-07-09  Tom Tromey  <tom@tromey.com>
2876
2877         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2878
2879 2018-07-09  Tom Tromey  <tom@tromey.com>
2880
2881         * Makefile.in (clean mostlyclean): Remove stamp-version.
2882         (version.c): Depend on stamp-version.
2883         (stamp-version): New rule, from version.c rule.
2884
2885 2018-07-09  Tom Tromey  <tom@tromey.com>
2886
2887         * Makefile.in (init.c): Depend on stamp-init.
2888         (stamp-init): New rule, from init.c rule.
2889         (clean mostlyclean): Remove stamp-init.
2890
2891 2018-07-09  Tom Tromey  <tom@tromey.com>
2892
2893         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2894         SUBDIR_GCC_COMPILE_SRCS.
2895
2896 2018-07-09  Tom Tromey  <tom@tromey.com>
2897
2898         * Makefile.in (init.c): Remove some unused sed rules.
2899
2900 2018-07-09  Tom Tromey  <tom@tromey.com>
2901
2902         * Makefile.in (TSOBS): Remove.
2903         (INIT_FILES): Update.
2904         (LIBGDB_OBS): Update.
2905         (COMMON_SFILES): Add inflow.c.
2906         (SFILES): Remove inflow.c.
2907
2908 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2909
2910         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2911
2912 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
2913
2914         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2915         get_saveloc_name, is_signal_frame_name, step_name,
2916         init_remote_name, create_addr_space_name,
2917         destroy_addr_space_name, search_unwind_table_name,
2918         find_dyn_list_name): Constify.
2919
2920 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
2921
2922         * darwin-nat.c (darwin_pthread_kill): New function.
2923         (darwin_resume_thread): Use darwin_pthread_kill.
2924
2925 2018-07-05  Tom de Vries  <tdevries@suse.de>
2926
2927         * macroexp.c (macro_buffer) <operator=>: New member function.
2928
2929 2018-07-04  Tom Tromey  <tom@tromey.com>
2930
2931         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2932
2933 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
2934
2935         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2936         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2937         * maint.c: Likewise.
2938         * top.c: Likewise.
2939
2940 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2941
2942         * NEWS: Create a new section for the next release branch.
2943         Rename the section of the current branch, now that it has
2944         been cut.
2945
2946 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2947
2948         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2949         * version.in: Bump version to 8.2.50.DATE-git.
2950
2951 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
2952             Pedro Alves  <palves@redhat.com>
2953
2954         * linux-nat.c (linux_init_ptrace): Rename to ...
2955         (linux_init_ptrace_procfs): ... this.  Call
2956         linux_proc_init_warnings.
2957         (linux_nat_target::post_attach)
2958         (linux_nat_target::post_startup_inferior): Adjust.
2959         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2960         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2961
2962 2018-07-04  Tom de Vries  <tdevries@suse.de>
2963
2964         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2965         check ...
2966         (read_comp_unit_head): ... here.
2967
2968 2018-07-03  Tom Tromey  <tom@tromey.com>
2969
2970         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2971         (stop_tracing, tstatus_command)
2972         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2973         (print_one_static_tracepoint_marker): Update.
2974         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2975         std::vector.
2976         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
2977         VEC.
2978         (all_tracepoints, static_tracepoints_here): Return std::vector.
2979
2980 2018-07-03  Tom Tromey  <tom@tromey.com>
2981
2982         * common/ptid.c (ptid_equal): Remove.
2983         * common/ptid.h (ptid_equal): Don't declare.
2984         * ada-tasks.c: Update.
2985         * breakpoint.c: Update.
2986         * common/agent.c: Update.
2987         * corelow.c: Update.
2988         * darwin-nat-info.c: Update.
2989         * darwin-nat.c: Update.
2990         * dcache.c: Update.
2991         * dtrace-probe.c: Update.
2992         * dummy-frame.c: Update.
2993         * fbsd-nat.c: Update.
2994         * frame.c: Update.
2995         * gdbthread.h: Update.
2996         * gnu-nat.c: Update.
2997         * go32-nat.c: Update.
2998         * inf-loop.c: Update.
2999         * inf-ptrace.c: Update.
3000         * infcall.c: Update.
3001         * infcmd.c: Update.
3002         * inflow.c: Update.
3003         * infrun.c: Update.
3004         * linux-fork.c: Update.
3005         * linux-nat.c: Update.
3006         * linux-thread-db.c: Update.
3007         * mi/mi-cmd-var.c: Update.
3008         * mi/mi-interp.c: Update.
3009         * mi/mi-main.c: Update.
3010         * nto-procfs.c: Update.
3011         * ppc-linux-tdep.c: Update.
3012         * procfs.c: Update.
3013         * python/py-inferior.c: Update.
3014         * python/py-record-btrace.c: Update.
3015         * python/py-record.c: Update.
3016         * ravenscar-thread.c: Update.
3017         * regcache.c: Update.
3018         * remote-sim.c: Update.
3019         * remote.c: Update.
3020         * sol-thread.c: Update.
3021         * solib.c: Update.
3022         * target.c: Update.
3023         * tui/tui-stack.c: Update.
3024         * varobj.c: Update.
3025         * windows-nat.c: Update.
3026         * windows-tdep.c: Update.
3027
3028 2018-07-03  Tom Tromey  <tom@tromey.com>
3029
3030         * common/ptid.c (ptid_match): Remove.
3031         * common/ptid.h (ptid_match): Don't declare.
3032         * fbsd-nat.c: Update.
3033         * infcmd.c: Update.
3034         * infrun.c: Update.
3035         * linux-nat.c: Update.
3036         * record-btrace.c: Update.
3037         * regcache.c: Update.
3038         * remote.c: Update.
3039
3040 2018-07-03  Tom Tromey  <tom@tromey.com>
3041
3042         * common/ptid.c (ptid_tid_p): Remove.
3043         * common/ptid.h (ptid_tid_p): Don't declare.
3044         * sol-thread.c: Update.
3045
3046 2018-07-03  Tom Tromey  <tom@tromey.com>
3047
3048         * common/ptid.c (ptid_lwp_p): Remove.
3049         * common/ptid.h (ptid_lwp_p): Don't declare.
3050         * fbsd-nat.c: Update.
3051         * linux-nat.c: Update.
3052         * nat/linux-procfs.c: Update.
3053         * nat/x86-linux-dregs.c: Update.
3054         * sol-thread.c: Update.
3055
3056 2018-07-03  Tom Tromey  <tom@tromey.com>
3057
3058         * common/ptid.c (ptid_is_pid): Remove.
3059         * common/ptid.h (ptid_is_pid): Don't declare.
3060         * infrun.c: Update.
3061         * linux-nat.c: Update.
3062         * mi/mi-interp.c: Update.
3063         * remote.c: Update.
3064         * thread.c: Update.
3065
3066 2018-07-03  Tom Tromey  <tom@tromey.com>
3067
3068         * common/ptid.c (ptid_get_tid): Remove.
3069         * common/ptid.h (ptid_get_tid): Don't declare.
3070         * ada-tasks.c: Update.
3071         * aix-thread.c: Update.
3072         * bsd-uthread.c: Update.
3073         * darwin-nat.c: Update.
3074         * fbsd-nat.c: Update.
3075         * i386-darwin-nat.c: Update.
3076         * infrun.c: Update.
3077         * linux-tdep.c: Update.
3078         * nto-procfs.c: Update.
3079         * ppc-ravenscar-thread.c: Update.
3080         * python/py-infthread.c: Update.
3081         * ravenscar-thread.c: Update.
3082         * sol-thread.c: Update.
3083         * sparc-ravenscar-thread.c: Update.
3084         * windows-nat.c: Update.
3085
3086 2018-07-03  Tom Tromey  <tom@tromey.com>
3087
3088         * common/ptid.c (ptid_get_lwp): Remove.
3089         * common/ptid.h (ptid_get_lwp): Don't declare.
3090         * aarch64-linux-nat.c: Update.
3091         * ada-tasks.c: Update.
3092         * aix-thread.c: Update.
3093         * amd64-linux-nat.c: Update.
3094         * arm-linux-nat.c: Update.
3095         * corelow.c: Update.
3096         * fbsd-nat.c: Update.
3097         * fbsd-tdep.c: Update.
3098         * gnu-nat.c: Update.
3099         * i386-cygwin-tdep.c: Update.
3100         * i386-gnu-nat.c: Update.
3101         * i386-linux-nat.c: Update.
3102         * ia64-linux-nat.c: Update.
3103         * inf-ptrace.c: Update.
3104         * infrun.c: Update.
3105         * linux-fork.c: Update.
3106         * linux-nat.c: Update.
3107         * linux-tdep.c: Update.
3108         * linux-thread-db.c: Update.
3109         * mips-linux-nat.c: Update.
3110         * nat/aarch64-linux-hw-point.c: Update.
3111         * nat/aarch64-linux.c: Update.
3112         * nat/linux-btrace.c: Update.
3113         * nat/linux-osdata.c: Update.
3114         * nat/linux-procfs.c: Update.
3115         * nat/x86-linux-dregs.c: Update.
3116         * obsd-nat.c: Update.
3117         * ppc-fbsd-nat.c: Update.
3118         * ppc-linux-nat.c: Update.
3119         * procfs.c: Update.
3120         * python/py-infthread.c: Update.
3121         * ravenscar-thread.c: Update.
3122         * remote.c: Update.
3123         * s390-linux-nat.c: Update.
3124         * sol-thread.c: Update.
3125         * sol2-tdep.c: Update.
3126         * spu-linux-nat.c: Update.
3127         * x86-linux-nat.c: Update.
3128         * xtensa-linux-nat.c: Update.
3129
3130 2018-07-03  Tom Tromey  <tom@tromey.com>
3131
3132         * common/ptid.c (ptid_get_pid): Remove.
3133         * common/ptid.h (ptid_get_pid): Don't declare.
3134         * aarch64-linux-nat.c: Update.
3135         * ada-lang.c: Update.
3136         * aix-thread.c: Update.
3137         * alpha-bsd-nat.c: Update.
3138         * amd64-fbsd-nat.c: Update.
3139         * amd64-linux-nat.c: Update.
3140         * arm-linux-nat.c: Update.
3141         * arm-nbsd-nat.c: Update.
3142         * auxv.c: Update.
3143         * break-catch-syscall.c: Update.
3144         * breakpoint.c: Update.
3145         * bsd-uthread.c: Update.
3146         * corelow.c: Update.
3147         * ctf.c: Update.
3148         * darwin-nat.c: Update.
3149         * fbsd-nat.c: Update.
3150         * fbsd-tdep.c: Update.
3151         * gcore.c: Update.
3152         * gnu-nat.c: Update.
3153         * hppa-nbsd-nat.c: Update.
3154         * hppa-obsd-nat.c: Update.
3155         * i386-fbsd-nat.c: Update.
3156         * ia64-linux-nat.c: Update.
3157         * inf-ptrace.c: Update.
3158         * infcmd.c: Update.
3159         * inferior.c: Update.
3160         * inferior.h: Update.
3161         * inflow.c: Update.
3162         * infrun.c: Update.
3163         * linux-fork.c: Update.
3164         * linux-nat.c: Update.
3165         * linux-tdep.c: Update.
3166         * linux-thread-db.c: Update.
3167         * m68k-bsd-nat.c: Update.
3168         * mi/mi-interp.c: Update.
3169         * mi/mi-main.c: Update.
3170         * mips-linux-nat.c: Update.
3171         * mips-nbsd-nat.c: Update.
3172         * mips64-obsd-nat.c: Update.
3173         * nat/aarch64-linux-hw-point.c: Update.
3174         * nat/aarch64-linux.c: Update.
3175         * nat/linux-btrace.c: Update.
3176         * nat/linux-osdata.c: Update.
3177         * nat/linux-procfs.c: Update.
3178         * nat/x86-linux-dregs.c: Update.
3179         * nto-procfs.c: Update.
3180         * obsd-nat.c: Update.
3181         * ppc-linux-nat.c: Update.
3182         * ppc-nbsd-nat.c: Update.
3183         * ppc-obsd-nat.c: Update.
3184         * proc-service.c: Update.
3185         * procfs.c: Update.
3186         * python/py-inferior.c: Update.
3187         * python/py-infthread.c: Update.
3188         * ravenscar-thread.c: Update.
3189         * record.c: Update.
3190         * remote-sim.c: Update.
3191         * remote.c: Update.
3192         * rs6000-nat.c: Update.
3193         * s390-linux-nat.c: Update.
3194         * sh-nbsd-nat.c: Update.
3195         * sol-thread.c: Update.
3196         * sparc-nat.c: Update.
3197         * sparc64-tdep.c: Update.
3198         * spu-linux-nat.c: Update.
3199         * spu-tdep.c: Update.
3200         * target-debug.h: Update.
3201         * target.c: Update.
3202         * thread.c: Update.
3203         * tid-parse.c: Update.
3204         * tracefile-tfile.c: Update.
3205         * vax-bsd-nat.c: Update.
3206         * windows-nat.c: Update.
3207         * x86-linux-nat.c: Update.
3208         * x86-nat.c: Update.
3209
3210 2018-07-03  Tom Tromey  <tom@tromey.com>
3211
3212         * common/ptid.c (pid_to_ptid): Remove.
3213         * common/ptid.h (pid_to_ptid): Don't declare.
3214         * aix-thread.c: Update.
3215         * arm-linux-nat.c: Update.
3216         * common/ptid.c: Update.
3217         * common/ptid.h: Update.
3218         * corelow.c: Update.
3219         * ctf.c: Update.
3220         * darwin-nat.c: Update.
3221         * fbsd-nat.c: Update.
3222         * fork-child.c: Update.
3223         * gnu-nat.c: Update.
3224         * go32-nat.c: Update.
3225         * inf-ptrace.c: Update.
3226         * infcmd.c: Update.
3227         * inferior.c: Update.
3228         * infrun.c: Update.
3229         * linux-fork.c: Update.
3230         * linux-nat.c: Update.
3231         * nat/aarch64-linux-hw-point.c: Update.
3232         * nat/fork-inferior.c: Update.
3233         * nat/x86-linux-dregs.c: Update.
3234         * nto-procfs.c: Update.
3235         * obsd-nat.c: Update.
3236         * procfs.c: Update.
3237         * progspace.c: Update.
3238         * remote.c: Update.
3239         * rs6000-nat.c: Update.
3240         * s390-linux-nat.c: Update.
3241         * sol-thread.c: Update.
3242         * spu-linux-nat.c: Update.
3243         * target.c: Update.
3244         * top.c: Update.
3245         * tracefile-tfile.c: Update.
3246         * windows-nat.c: Update.
3247
3248 2018-07-03  Tom Tromey  <tom@tromey.com>
3249
3250         * common/ptid.h (ptid_build): Don't declare.
3251         * common/ptid.c (ptid_build): Remove.
3252         * aix-thread.c: Update.
3253         * bsd-kvm.c: Update.
3254         * bsd-uthread.c: Update.
3255         * common/agent.c: Update.
3256         * common/ptid.c: Update.
3257         * common/ptid.h: Update.
3258         * corelow.c: Update.
3259         * darwin-nat.c: Update.
3260         * fbsd-nat.c: Update.
3261         * gnu-nat.c: Update.
3262         * linux-fork.c: Update.
3263         * linux-nat.c: Update.
3264         * linux-thread-db.c: Update.
3265         * nat/linux-osdata.c: Update.
3266         * nat/linux-procfs.c: Update.
3267         * nto-procfs.c: Update.
3268         * obsd-nat.c: Update.
3269         * proc-service.c: Update.
3270         * procfs.c: Update.
3271         * ravenscar-thread.c: Update.
3272         * remote-sim.c: Update.
3273         * remote.c: Update.
3274         * sol-thread.c: Update.
3275         * target.c: Update.
3276         * windows-nat.c: Update.
3277
3278 2018-07-03  Tom Tromey  <tom@tromey.com>
3279
3280         * infrun.c (follow_exec): Use exit_inferior_silent.
3281         * inferior.c (exit_inferior_num_silent): Remove.
3282         * inferior.h (exit_inferior_num_silent): Don't declare.
3283
3284 2018-07-03  Tom Tromey  <tom@tromey.com>
3285
3286         PR cli/23340:
3287         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3288         inferior_ptid on error.
3289
3290 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3291             Simon Marchi  <simon.marchi@polymtl.ca>
3292
3293         PR tdep/8282
3294         * disasm.h (gdb_disassembler): Add
3295         `m_disassembler_options_holder'. member
3296         * disasm.c (get_all_disassembler_options): New function.
3297         (gdb_disassembler::gdb_disassembler): Use it.
3298         (gdb_buffered_insn_length_init_dis): Likewise.
3299         (gdb_buffered_insn_length): Adjust accordingly.
3300         (set_disassembler_options): Handle options with arguments.
3301         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3302         line if showing options with descriptions.
3303         (disassembler_options_completer): Adapt to using the
3304         `disasm_options_and_args_t' structure.
3305         * mips-tdep.c (mips_disassembler_options): New variable.
3306         (mips_disassembler_options_o32): Likewise.
3307         (mips_disassembler_options_n32): Likewise.
3308         (mips_disassembler_options_n64): Likewise.
3309         (gdb_print_insn_mips): Don't set `disassembler_options'.
3310         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3311         functions.
3312         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3313         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3314         `gdbarch_disassembler_options_implicit' and
3315         `gdbarch_valid_disassembler_options'.
3316         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3317         `disasm_options_and_args_t' structure.
3318         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3319         method.
3320         (valid_disassembler_options): Switch from `disasm_options_t' to
3321         the `disasm_options_and_args_t' structure.
3322         * NEWS: Document `set disassembler-options' support for the MIPS
3323         target.
3324         * gdbarch.h: Regenerate.
3325         * gdbarch.c: Regenerate.
3326
3327 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3328
3329         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3330
3331 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3332
3333         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3334         parameter in call to amd64_target_description.
3335         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3336         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3337         (amd64fbsd_init_abi): Likewise.
3338         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3339         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3340         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3341         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3342
3343 2018-06-29  Pedro Alves  <palves@redhat.com>
3344
3345         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3346         "segments" parameter.
3347         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3348         (_initialize_amd64_tdep): Update call to
3349         amd64_create_target_description.
3350         (amd64_target_description): Add "segments" parameter.  Adjust
3351         the implementation to use it.
3352         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3353         call to amd64_create_target_description.
3354         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3355         * gdb/arch/amd64.h (amd64_create_target_description): Add
3356         "segments" register.
3357         * gdb/arch/amd64.c (amd64_create_target_description): Add
3358         "segments" parameter.  Call create_feature_i386_64bit_segments
3359         only if SEGMENTS is true.
3360         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3361         call to amd64_create_target_description.
3362
3363 2018-06-29  Pedro Alves  <palves@redhat.com>
3364
3365         * thread.c (thread_target_id_str): New, factored out from ...
3366         (print_thread_info_1): ... here.  Use it to compute the max
3367         "Target Id" column width.
3368
3369 2018-06-29  Pedro Alves  <palves@redhat.com>
3370
3371         * remote.c (remote_target::extra_thread_info): Delete
3372         'display_buf' and 'n' locals.  from the cache, regardless of
3373         packet mechanims is in use.  Use cache for qThreadExtra and qP
3374         methods too.
3375
3376 2018-06-29  Pedro Alves  <palves@redhat.com>
3377
3378         * blockframe.c (find_pc_sect_containing_function): New function.
3379         * breakpoint.c (print_breakpoint_location): Don't call
3380         find_pc_sect_function.
3381         * linespec.c (create_sals_line_offset): Record the location's
3382         symbol in the sal.
3383         * linespec.c (convert_address_location_to_sals): Fill in sal's
3384         symbol with find_pc_sect_containing_function.
3385         * symtab.c (find_function_start_sal): Rename to ...
3386         (find_function_start_sal_1): ... this.
3387         (find_function_start_sal): Reimplement as wrapper around
3388         find_function_start_sal_1, and use
3389         find_pc_sect_containing_function to fill in the sal's symbol.
3390         (find_function_start_sal(symbol*, bool)): Adjust.
3391         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3392         comments.
3393         (find_pc_sect_containing_function): Declare.
3394
3395 2018-06-29  Pedro Alves  <palves@redhat.com>
3396
3397         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3398         true if the the location has no symbol.
3399
3400 2018-06-28  Tom Tromey  <tom@tromey.com>
3401
3402         * NEWS: Mention --enable-codesign.
3403         * silent-rules.mk (ECHO_SIGN): New variable.
3404         * configure.ac: Add --enable-codesign.
3405         * configure: Rebuild.
3406         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3407         (gdb$(EXEEXT)): Optionally invoke codesign.
3408
3409 2018-06-28  Pedro Alves  <palves@redhat.com>
3410
3411         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3412         comments.
3413         (switch_to_thread_no_regs): Adjust comment.
3414         * infcmd.c (stop_pc): Delete.
3415         (post_create_inferior, info_program_command): Replace references
3416         to stop_pc with references to thread_info->suspend.stop_pc.
3417         * inferior.h (stop_pc): Delete declaration.
3418         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3419         (handle_inferior_event_1, handle_signal_stop)
3420         (process_event_stop_test, keep_going_stepped_thread)
3421         (handle_step_into_function, handle_step_into_function_backward)
3422         (print_stop_location): Replace references to stop_pc with
3423         references to thread_info->suspend.stop_pc.
3424         (struct infcall_suspend_state) <stop_pc>: Delete field.
3425         (save_infcall_suspend_state, restore_infcall_suspend_state):
3426         Remove references to inf_stat->stop_pc.
3427         * linux-fork.c (fork_load_infrun_state): Likewise.
3428         * record-btrace.c (record_btrace_set_replay): Likewise.
3429         * record-full.c (record_full_goto_entry): Likewise.
3430         * remote.c (print_one_stopped_thread): Likewise.
3431         * target.c (target_resume): Extend comment.
3432         * thread.c (set_executing_thread): New.
3433         (set_executing): Use it.
3434         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3435         Remove references to stop_pc.
3436
3437 2018-06-28  Pedro Alves  <palves@redhat.com>
3438
3439         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3440         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3441
3442 2018-06-28  Tom Tromey  <tom@tromey.com>
3443
3444         * coffread.c (coff_symfile_finish): Update.
3445         * xcoffread.c (xcoff_symfile_finish): Update.
3446         * elfread.c (elf_symfile_finish): Update.
3447         * symfile.h (dwarf2_free_objfile): Don't declare.
3448         * dwarf2read.c (_initialize_dwarf2_read): Use
3449         register_objfile_data_with_cleanup.
3450         (dwarf2_free_objfile): Now static.  Change signature.
3451
3452 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3453
3454         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3455         option "-o" to add-symbol-file-load to add an offset to each
3456         section's load address.
3457         * symfile.c (set_objfile_default_section_offset): New function.
3458
3459 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3460
3461         * symfile.c (add_symbol_file_command): Make sure that sections
3462         with the same name are sorted in the same order.
3463
3464 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3465
3466         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3467         require the second argument.  If omitted, load sections at the
3468         addresses specified in the file.
3469
3470 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3471
3472         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3473         (_initialize_symfile): Add option "-o" to symbol-file to add an
3474         offset to each section of the symbol file.
3475
3476 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3477
3478         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3479
3480 2018-06-27  Tom Tromey  <tom@tromey.com>
3481
3482         * stack.c (_initialize_stack): Update "func" help text.
3483
3484 2018-06-27  Tom Tromey  <tom@tromey.com>
3485
3486         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3487         std::vector.
3488         (unwind_infopy_str, pyuw_create_unwind_info)
3489         (unwind_infopy_add_saved_register, pyuw_sniffer)
3490         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3491         Update.
3492         (struct saved_reg): Add constructor.
3493         <value>: Now a gdbpy_ref<>.
3494
3495 2018-06-27  Tom Tromey  <tom@tromey.com>
3496
3497         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3498
3499 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3500
3501         * gdb-gdb.py.in: Format using autopep8.
3502
3503 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3504
3505         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3506         (type_lookup_function): Recognize CORE_ADDR values.
3507
3508 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3509
3510         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3511         print tag_name.
3512
3513 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3514
3515         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3516         <__lt__>: Add.
3517
3518 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3519
3520         * gdb-gdb.py: Move to...
3521         * gdb-gdb.py.in: ... here.
3522         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3523         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3524         dependencies.
3525         (distclean): Remove gdb-gdb.py when cleaning.
3526         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3527         * configure: Re-generate.
3528
3529 2018-06-27  Pedro Alves  <palves@redhat.com>
3530
3531         * proc-service.c (get_ps_regcache): New.
3532         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3533         (ps_lsetfpregs): Use it.
3534
3535 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3536
3537         PR gdb/21695
3538         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3539         (dwarf_decode_lines_1): Adjust.
3540
3541 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3542
3543         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3544         override.
3545         <info_proc>: Likewise.
3546
3547 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3548
3549         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3550         to windows_fetch_one_register, and only handle the case of
3551         fetching one register.  Move the code that reloads the context
3552         and iterates over all registers if R is negative to...
3553         (windows_nat_target::fetch_registers): ... here.
3554         (do_windows_store_inferior_registers): Rename to
3555         windows_store_one_register, and only handle the case of storing
3556         one register.  Move the code that handles the case where r is
3557         negative to...
3558         (windows_nat_target::store_registers) ... here.
3559
3560 2018-06-26  Tom Tromey  <tom@tromey.com>
3561
3562         PR rust/22574:
3563         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3564         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3565         Update.
3566         (rust_internal_print_type): Add podata parameter.
3567         (rust_print_type): Update.
3568
3569 2018-06-26  Tom Tromey  <tom@tromey.com>
3570
3571         * typeprint.h (struct print_offset_data) <update, finish,
3572         maybe_print_hole>: New methods.
3573         <indentation>: New constant.
3574         * typeprint.c (print_offset_data::indentation): Define.
3575         (print_offset_data::maybe_print_hole, print_offset_data::update)
3576         (print_offset_data::finish): Move from c-typeprint.c and rename.
3577         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3578         (print_spaces_filtered_with_print_options): Update.
3579         (c_print_type_union_field_offset, maybe_print_hole)
3580         (c_print_type_struct_field_offset): Move to typeprint.c and
3581         rename.
3582         (c_type_print_base_struct_union): Update.
3583
3584 2018-06-25  Pedro Alves  <palves@redhat.com>
3585
3586         * gdbthread.h (thread_info_ref, delete_thread)
3587         (delete_thread_silent, first_thread_of_inferior)
3588         (any_thread_of_inferior, switch_to_thread)
3589         (enable_thread_stack_temporaries)
3590         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3591         (get_last_thread_stack_temporary)
3592         (value_in_thread_stack_temporaries, can_access_registers_thread):
3593         Spell out "struct thread_info" instead of just "thread_info".
3594         * inferior.h (notice_new_inferior): Likewise.
3595
3596 2018-06-25  Pedro Alves  <palves@redhat.com>
3597
3598         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3599         pass thread_info pointer to delete_thread.
3600         (windows_nat_target::detach): Pass inferior pointer to
3601         detach_inferior.
3602         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3603         delete_thread.
3604         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3605         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3606         and pass a thread_info pointer to delete_thread.
3607         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3608         pass thread_info pointer to delete_thread.
3609         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3610         delete_thread_silent call.
3611         * procfs.c (procfs_target::detach): Pass inferior pointer to
3612         detach_inferior.
3613         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3614         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3615         delete_thread_silent call.
3616         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3617         pass thread_info pointer to delete_thread.
3618         (windows_nat_target::detach): Pass inferior pointer to
3619         delete_inferior.
3620
3621 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3622
3623         * regcache.c (readable_regcache::read_part): Fix asserts.
3624         (reg_buffer::raw_collect_part): New function.
3625         (regcache::write_part): Fix asserts.
3626         (reg_buffer::raw_supply_part): New function.
3627         (regcache::transfer_regset_register): New helper function.
3628         (regcache::transfer_regset): Call new functions.
3629         (regcache_supply_regset): Use gdb_byte*.
3630         (regcache::supply_regset): Likewise.
3631         (regcache_collect_regset): Likewise.
3632         (regcache::collect_regset): Likewise.
3633         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3634         (reg_buffer::raw_supply_part): Likewise.
3635         (regcache::transfer_regset_register): Likewise.
3636         (regcache::transfer_regset): Use gdb_byte*.
3637
3638 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3639
3640         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3641
3642 2018-06-21  Pedro Alves  <palves@redhat.com>
3643
3644         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3645         instead of a ptid_t.  All callers adjusted.
3646         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3647         adjusted.
3648         (print_ada_task_info, display_current_task_id, task_command_1):
3649         Adjust.
3650         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3651         inferior_thread.
3652         (breakpoint_kind): Adjust.
3653         (remove_breakpoints_pid): Rename to ...
3654         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3655         pointer.  All callers adjusted.
3656         (bpstat_clear_actions): Use inferior_thread.
3657         (get_bpstat_thread): New.
3658         (bpstat_do_actions): Use it.
3659         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3660         to take a thread_info pointer.  All callers adjusted.
3661         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3662         (breakpoint_re_set_thread): Use inferior_thread.
3663         * breakpoint.h (struct inferior): Forward declare.
3664         (bpstat_stop_status): Update.
3665         (remove_breakpoints_pid): Delete.
3666         (remove_breakpoints_inf): New.
3667         * bsd-uthread.c (bsd_uthread_target::wait)
3668         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3669         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3670         (maint_btrace_packet_history_cmd)
3671         (maint_btrace_clear_packet_history_cmd): Adjust.
3672         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3673         inferior_thread.
3674         * cli/cli-interp.c: Include "inferior.h".
3675         * common/refcounted-object.h (struct
3676         refcounted_object_ref_policy): New.
3677         * compile/compile-object-load.c: Include gdbthread.h.
3678         (store_regs): Use inferior_thread.
3679         * corelow.c (core_target::close): Use current_inferior.
3680         (core_target_open): Adjust to use first_thread_of_inferior and use
3681         the current inferior.
3682         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3683         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3684         <thread>: ... this new field.  All references adjusted.
3685         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3686         Take a thread_info pointer instead of a ptid_t.
3687         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3688         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3689         thread_info pointer instead of a ptid_t.
3690         * elfread.c: Include "inferior.h".
3691         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3692         Use inferior_thread.
3693         * eval.c (evaluate_subexp): Likewise.
3694         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3695         inferior_thread.
3696         * gdb_proc_service.h (struct thread_info): Forward declare.
3697         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3698         <thread>: ... this new field.  All references adjusted.
3699         * gdbarch.h, gdbarch.c: Regenerate.
3700         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3701         'thread' parameter.  All implementations and callers adjusted.
3702         * gdbthread.h (thread_info) <set_running>: New method.
3703         (delete_thread, delete_thread_silent): Take a thread_info pointer
3704         instead of a ptid.
3705         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3706         (first_thread_of_process): Delete, replaced by ...
3707         (first_thread_of_inferior): ... this new function.  All callers
3708         adjusted.
3709         (any_live_thread_of_process): Delete, replaced by ...
3710         (any_live_thread_of_inferior): ... this new function.  All callers
3711         adjusted.
3712         (switch_to_thread, switch_to_no_thread): Declare.
3713         (is_executing): Delete.
3714         (enable_thread_stack_temporaries): Update comment.
3715         <enable_thread_stack_temporaries>: Take a thread_info pointer
3716         instead of a ptid_t.  Incref the thread.
3717         <~enable_thread_stack_temporaries>: Decref the thread.
3718         <m_ptid>: Delete
3719         <m_thr>: New.
3720         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3721         (get_last_thread_stack_temporary)
3722         (value_in_thread_stack_temporaries, can_access_registers_thread):
3723         Take a thread_info pointer instead of a ptid_t.  All callers
3724         adjusted.
3725         * infcall.c (get_call_return_value): Use inferior_thread.
3726         (run_inferior_call): Work with thread pointers instead of ptid_t.
3727         (call_function_by_hand_dummy): Work with thread pointers instead
3728         of ptid_t.  Use thread_info_ref.
3729         * infcmd.c (proceed_thread_callback): Access thread's state
3730         directly.
3731         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3732         access thread's state directly.
3733         (continue_command): Use inferior_thread.
3734         (info_program_command): Use find_thread_ptid and access thread
3735         state directly.
3736         (proceed_after_attach_callback): Use thread state directly.
3737         (notice_new_inferior): Take a thread_info pointer instead of a
3738         ptid_t.  All callers adjusted.
3739         (exit_inferior): Take an inferior pointer instead of a pid.  All
3740         callers adjusted.
3741         (exit_inferior_silent): New.
3742         (detach_inferior): Delete.
3743         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3744         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3745         (detach_inferior_command, kill_inferior_command): Use
3746         find_inferior_id instead of valid_gdb_inferior_id and
3747         gdb_inferior_id_to_pid.
3748         (inferior_command): Use inferior and thread pointers.
3749         * inferior.h (struct thread_info): Forward declare.
3750         (notice_new_inferior): Take a thread_info pointer instead of a
3751         ptid_t.  All callers adjusted.
3752         (detach_inferior): Delete declaration.
3753         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3754         instead of a pid.  All callers adjusted.
3755         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3756         (valid_gdb_inferior_id): Delete.
3757         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3758         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3759         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3760         ...
3761         <inf>: ... this new field.
3762         <step_ptid>: Delete, replaced by ...
3763         <step_thread>: ... this new field.
3764         (get_displaced_stepping_state): Take an inferior pointer instead
3765         of a pid.  All callers adjusted.
3766         (displaced_step_in_progress_any_inferior): Adjust.
3767         (displaced_step_in_progress_thread): Take a thread pointer instead
3768         of a ptid_t.  All callers adjusted.
3769         (displaced_step_in_progress, add_displaced_stepping_state): Take
3770         an inferior pointer instead of a pid.  All callers adjusted.
3771         (get_displaced_step_closure_by_addr): Adjust.
3772         (remove_displaced_stepping_state): Take an inferior pointer
3773         instead of a pid.  All callers adjusted.
3774         (displaced_step_prepare_throw, displaced_step_prepare)
3775         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3776         All callers adjusted.
3777         (start_step_over): Adjust.
3778         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3779         displaced step queue.
3780         (do_target_resume): Adjust.
3781         (fetch_inferior_event): Use inferior_thread.
3782         (context_switch, get_inferior_stop_soon): Take an
3783         execution_control_state pointer instead of a ptid_t.  All callers
3784         adjusted.
3785         (switch_to_thread_cleanup): Delete.
3786         (stop_all_threads): Use scoped_restore_current_thread.
3787         * inline-frame.c: Include "gdbthread.h".
3788         (inline_state) <inline_state>: Take a thread pointer instead of a
3789         ptid_t.  All callers adjusted.
3790         <ptid>: Delete, replaced by ...
3791         <thread>: ... this new field.
3792         (find_inline_frame_state): Take a thread pointer instead of a
3793         ptid_t.  All callers adjusted.
3794         (skip_inline_frames, step_into_inline_frame)
3795         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3796         pointer instead of a ptid_t.  All callers adjusted.
3797         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3798         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3799         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3800         pointers directly.
3801         * linux-nat.c (get_detach_signal): Likewise.
3802         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3803         (thread_db_notice_clone): Adjust.
3804         (thread_db_find_new_threads_silently)
3805         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3806         a thread pointer instead of a ptid_t.  All callers adjusted.
3807         * mi/mi-cmd-var.c: Include "inferior.h".
3808         (mi_cmd_var_update_iter): Update to use thread pointers.
3809         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3810         inferior directly.
3811         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3812         out to ...
3813         (mi_output_running): ... this new function.
3814         (mi_on_resume_1): Adjust to use it.
3815         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3816         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3817         directly.
3818         (interrupt_thread_callback): : Adjust to use thread and inferior
3819         pointers.
3820         * proc-service.c: Include "gdbthread.h".
3821         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3822         * progspace-and-thread.c: Include "inferior.h".
3823         * progspace.c: Include "inferior.h".
3824         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3825         hold a reference to an inferior_object.
3826         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3827         inferior_thread.
3828         * python/py-inferior.c (struct inferior_object): Give the type a
3829         tag name instead of a typedef.
3830         (python_on_normal_stop): No need to check if the current thread is
3831         listed.
3832         (inferior_to_inferior_object): Change return type to
3833         inferior_object.  All callers adjusted.
3834         (find_thread_object): Delete, bits factored out to ...
3835         (thread_to_thread_object): ... this new function.
3836         * python/py-infthread.c (create_thread_object): Use
3837         inferior_to_inferior_object.
3838         (thpy_is_stopped): Use thread pointer directly.
3839         (gdbpy_selected_thread): Use inferior_thread.
3840         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3841         field, replaced with ...
3842         <thread>: ... this new field.  All users adjusted.
3843         (btpy_insn_or_gap_new): Drop const.
3844         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3845         callers adjusted.
3846         * python/py-record.c: Include "gdbthread.h".
3847         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3848         a ptid_t.  All callers adjusted.
3849         (gdbpy_current_recording): Use inferior_thread.
3850         * python/py-record.h (recpy_record_object) <ptid>: Delete
3851         field, replaced with ...
3852         <thread>: ... this new field.  All users adjusted.
3853         (recpy_element_object) <ptid>: Delete
3854         field, replaced with ...
3855         <thread>: ... this new field.  All users adjusted.
3856         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3857         a ptid_t.  All callers adjusted.
3858         * python/py-threadevent.c: Include "gdbthread.h".
3859         (get_event_thread): Use thread_to_thread_object.
3860         * python/python-internal.h (struct inferior_object): Forward
3861         declare.
3862         (find_thread_object, find_inferior_object): Delete declarations.
3863         (thread_to_thread_object, inferior_to_inferior_object): New
3864         declarations.
3865         * record-btrace.c: Include "inferior.h".
3866         (require_btrace_thread): Use inferior_thread.
3867         (record_btrace_frame_sniffer)
3868         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3869         (get_thread_current_frame): Use scoped_restore_current_thread and
3870         switch_to_thread.
3871         (get_thread_current_frame): Use thread pointer directly.
3872         (record_btrace_replay_at_breakpoint): Use thread's inferior
3873         pointer directly.
3874         * record-full.c: Include "inferior.h".
3875         * regcache.c: Include "gdbthread.h".
3876         (get_thread_arch_regcache): Use the inferior's address space
3877         directly.
3878         (get_thread_regcache, registers_changed_thread): New.
3879         * regcache.h (get_thread_regcache(thread_info *thread)): New
3880         overload.
3881         (registers_changed_thread): New.
3882         (remote_target) <remote_detach_1>: Swap order of parameters.
3883         (remote_add_thread): <remote_add_thread>: Return the new thread.
3884         (get_remote_thread_info(ptid_t)): New overload.
3885         (remote_target::remote_notice_new_inferior): Use thread pointers
3886         directly.
3887         (remote_target::process_initial_stop_replies): Use
3888         thread_info::set_running.
3889         (remote_target::remote_detach_1, remote_target::detach)
3890         (extended_remote_target::detach): Adjust.
3891         * stack.c (frame_show_address): Use inferior_thread.
3892         * target-debug.h (target_debug_print_thread_info_pp): New.
3893         * target-delegates.c: Regenerate.
3894         * target.c (default_thread_address_space): Delete.
3895         (memory_xfer_partial_1): Use current_inferior.
3896         (target_detach): Use current_inferior.
3897         (target_thread_address_space): Delete.
3898         (generic_mourn_inferior): Use current_inferior.
3899         * target.h (struct target_ops) <thread_address_space>: Delete.
3900         (target_thread_address_space): Delete.
3901         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
3902         pointers directly.
3903         (delete_thread_1, delete_thread, delete_thread_silent): Take a
3904         thread pointer instead of a ptid_t.  Adjust all callers.
3905         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3906         (first_thread_of_process): Delete, replaced by ...
3907         (first_thread_of_inferior): ... this new function.  All callers
3908         adjusted.
3909         (any_thread_of_process): Rename to ...
3910         (any_thread_of_inferior): ... this, and take an inferior pointer.
3911         (any_live_thread_of_process): Rename to ...
3912         (any_live_thread_of_inferior): ... this, and take an inferior
3913         pointer.
3914         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3915         (value_in_thread_stack_temporaries)
3916         (get_last_thread_stack_temporary): Take a thread pointer instead
3917         of a ptid_t.  Adjust all callers.
3918         (thread_info::set_running): New.
3919         (validate_registers_access): Use inferior_thread.
3920         (can_access_registers_ptid): Rename to ...
3921         (can_access_registers_thread): ... this, and take a thread
3922         pointer.
3923         (print_thread_info_1): Adjust to compare thread pointers instead
3924         of ptids.
3925         (switch_to_no_thread, switch_to_thread): Make extern.
3926         (scoped_restore_current_thread::~scoped_restore_current_thread):
3927         Use m_thread pointer directly.
3928         (scoped_restore_current_thread::scoped_restore_current_thread):
3929         Use inferior_thread.
3930         (thread_command): Use thread pointer directly.
3931         (thread_num_make_value_helper): Use inferior_thread.
3932         * top.c (execute_command): Use inferior_thread.
3933         * tui/tui-interp.c: Include "inferior.h".
3934         * varobj.c (varobj_create): Use inferior_thread.
3935         (value_of_root_1): Use find_thread_global_id instead of
3936         global_thread_id_to_ptid.
3937
3938 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
3939
3940         * regcache.c (readable_regcache::read_part): Avoid memcpy when
3941         possible.
3942         (regcache::write_part): Likewise.
3943         (readable_regcache::cooked_read_part): Update comment.
3944         (readable_regcache::cooked_write_part): Likewise.
3945         * regcache.h: (readable_regcache::read_part): Likewise.
3946         (regcache::write_part): Likewise.
3947
3948 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
3949             Dirk Schubert  <dirk.schubert@arm.com>
3950
3951         * aarch64-linux-nat.c (post_attach): New.
3952         (aarch64_linux_nat_target::post_attach): Override post_attach to
3953         record the number of hardware debug registers.
3954
3955 2018-06-20  Tom Tromey  <tom@tromey.com>
3956
3957         * python/py-param.c (add_setshow_generic): Make parameters const.
3958         (parmpy_init): Update.
3959
3960 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3961
3962         * regcache.h (regcache_cooked_read_ftype): Rename to...
3963         (register_read_ftype): ...this, change type to function_view.
3964         (class reg_buffer) <save>: Remove src parameter.
3965         (readonly_detached_regcache) <readonly_detached_regcache>: Make
3966         parameter non-const in first overload.  Remove src parameter in
3967         second overload.
3968         * regcache.c (do_cooked_read): Remove.
3969         (readonly_detached_regcache::readonly_detached_regcache): Make
3970         parameter non-const, adjust call to other constructor.
3971         (reg_buffer::save): Remove src parameter.
3972         * frame.c (do_frame_register_read): Remove.
3973         (frame_save_as_regcache): Use lambda function.
3974         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3975         parameter to ppu2spu_data *.
3976         (ppu2spu_sniffer): Use lambda function.
3977
3978 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3979
3980         * record-full.c (record_full_target::insert_breakpoint): Remove
3981         "struct" keyword, add const.
3982
3983 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
3984
3985         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3986         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3987         * configure.ac: Remove AC_PREREQ, add missing quoting.
3988         * gnulib/configure.ac: Modernize usage of
3989         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
3990         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3991         (AUTOMAKE_VERSION): Bump to 1.15.1.
3992         * configure: Re-generate.
3993         * config.in: Re-generate.
3994         * aclocal.m4: Re-generate.
3995         * gnulib/aclocal.m4: Re-generate.
3996         * gnulib/config.in: Re-generate.
3997         * gnulib/configure: Re-generate.
3998         * gnulib/import/Makefile.in: Re-generate.
3999
4000 2018-06-19  Pedro Alves  <palves@redhat.com>
4001
4002         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4003         (lookup_minimal_symbol_by_pc_section): ... here with
4004         gdb_assert_not_reached added.
4005
4006 2018-06-19  Pedro Alves  <palves@redhat.com>
4007
4008         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4009         parameter with a block parameter.  Compare location's block symbol
4010         with the frame's block instead of addresses.
4011         (skip_inline_frames): Pass the current block instead of the
4012         frame's address.  Break out as soon as we determine the frame
4013         should not be skipped.
4014
4015 2018-06-18  Tom Tromey  <tom@tromey.com>
4016
4017         * solib-aix.c (solib_aix_get_section_offsets): Return
4018         unique_xmalloc_ptr.
4019         (solib_aix_solib_create_inferior_hook): Update.
4020
4021 2018-06-18  Tom Tromey  <tom@tromey.com>
4022
4023         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4024
4025 2018-06-18  Tom Tromey  <tom@tromey.com>
4026
4027         * solib-frv.c (frv_relocate_main_executable): Use
4028         unique_xmalloc_ptr.
4029         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4030         unique_xmalloc_ptr.
4031
4032 2018-06-18  Tom Tromey  <tom@tromey.com>
4033
4034         * objfiles.h (inhibit_section_map_updates): Update.
4035         (resume_section_map_updates, resume_section_map_updates_cleanup):
4036         Remove.
4037         * solib-svr4.c (svr4_handle_solib_event): Update.
4038         * objfiles.c (inhibit_section_map_updates): Return
4039         scoped_restore_tmpl<int>.
4040         (resume_section_map_updates, resume_section_map_updates_cleanup):
4041         Remove.
4042
4043 2018-06-18  Tom Tromey  <tom@tromey.com>
4044
4045         * valprint.h (read_string): Update.
4046         * valprint.c (read_string): Change type of "buffer".
4047         (val_print_string): Update.
4048         * python/py-value.c (valpy_string): Update.
4049         * language.h (struct language_defn) <la_get_string>: Change
4050         type of "buffer".
4051         (default_get_string, c_get_string): Update.
4052         * language.c (default_get_string): Change type of "buffer".
4053         * guile/scm-value.c (gdbscm_value_to_string): Update.
4054         * c-lang.c (c_get_string): Change type of "buffer".
4055
4056 2018-06-18  Tom Tromey  <tom@tromey.com>
4057
4058         * ser-mingw.c (struct pipe_state_destroyer): New.
4059         (pipe_state_up): New typedef.
4060         (cleanup_pipe_state): Remove.
4061         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4062
4063 2018-06-18  Tom Tromey  <tom@tromey.com>
4064
4065         * rust-lang.h (rust_yyerror): Don't declare.
4066         * rust-lang.c (rust_language_defn): Update.
4067         * rust-exp.y (yyerror): Now static.
4068         * parse.c (parse_exp_in_context_1): Update.
4069         * p-lang.h (p_yyerror): Don't declare.
4070         * p-lang.c (p_language_defn): Update.
4071         * p-exp.y (yyerror): Now static.
4072         * opencl-lang.c (opencl_language_defn): Update.
4073         * objc-lang.c (objc_language_defn): Update.
4074         * m2-lang.h (m2_yyerror): Don't declare.
4075         * m2-lang.c (m2_language_defn): Update.
4076         * m2-exp.y (yyerror): Now static.
4077         * language.h (struct language_defn) <la_error>: Remove.
4078         * language.c (unk_lang_error): Remove.
4079         (unknown_language_defn, auto_language_defn): Remove.
4080         * go-lang.h (go_yyerror): Don't declare.
4081         * go-lang.c (go_language_defn): Update.
4082         * go-exp.y (yyerror): Now static.
4083         * f-lang.h (f_yyerror): Don't declare.
4084         * f-lang.c (f_language_defn): Update.
4085         * f-exp.y (yyerror): Now static.
4086         * d-lang.h (d_yyerror): Don't declare.
4087         * d-lang.c (d_language_defn): Update.
4088         * d-exp.y (yyerror): Now static.
4089         * c-lang.h (c_yyerror): Don't declare.
4090         * c-lang.c (c_language_defn, cplus_language_defn)
4091         (asm_language_defn, minimal_language_defn): Update.
4092         * c-exp.y (yyerror): Now static.
4093         * ada-lang.h (ada_yyerror): Don't declare.
4094         * ada-lang.c (ada_language_defn): Update.
4095         * ada-exp.y (yyerror): Now static.
4096
4097 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4098
4099         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4100         (store_sveregs_to_thread): Likewise.
4101         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4102         (aarch64_linux_store_inferior_registers): Likewise.
4103         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4104         function.
4105         (aarch64_sve_regs_copy_to_regcache): Likewise.
4106         (aarch64_sve_regs_copy_from_regcache): Likewise.
4107         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4108         declaration.
4109         (aarch64_sve_regs_copy_to_regcache): Likewise.
4110         (aarch64_sve_regs_copy_from_regcache): Likewise.
4111         (sve_context): Structure from Linux headers.
4112         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4113         (SVE_SIG_ZREG_SIZE): Likewise.
4114         (SVE_SIG_PREG_SIZE): Likewise.
4115         (SVE_SIG_FFR_SIZE): Likewise.
4116         (SVE_SIG_REGS_OFFSET): Likewise.
4117         (SVE_SIG_ZREGS_OFFSET): Likewise.
4118         (SVE_SIG_ZREG_OFFSET): Likewise.
4119         (SVE_SIG_ZREGS_SIZE): Likewise.
4120         (SVE_SIG_PREGS_OFFSET): Likewise.
4121         (SVE_SIG_PREG_OFFSET): Likewise.
4122         (SVE_SIG_PREGS_SIZE): Likewise.
4123         (SVE_SIG_FFR_OFFSET): Likewise.
4124         (SVE_SIG_REGS_SIZE): Likewise.
4125         (SVE_SIG_CONTEXT_SIZE): Likewise.
4126         (SVE_PT_REGS_MASK): Likewise.
4127         (SVE_PT_REGS_FPSIMD): Likewise.
4128         (SVE_PT_REGS_SVE): Likewise.
4129         (SVE_PT_VL_INHERIT): Likewise.
4130         (SVE_PT_VL_ONEXEC): Likewise.
4131         (SVE_PT_REGS_OFFSET): Likewise.
4132         (SVE_PT_FPSIMD_OFFSET): Likewise.
4133         (SVE_PT_FPSIMD_SIZE): Likewise.
4134         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4135         (SVE_PT_SVE_PREG_SIZE): Likewise.
4136         (SVE_PT_SVE_FFR_SIZE): Likewise.
4137         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4138         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4139         (__SVE_SIG_TO_PT): Likewise.
4140         (SVE_PT_SVE_OFFSET): Likewise.
4141         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4142         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4143         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4144         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4145         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4146         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4147         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4148         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4149         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4150         (SVE_PT_SVE_SIZE): Likewise.
4151         (SVE_PT_SIZE): Likewise.
4152         (HAS_SVE_STATE): New define.
4153
4154 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4155
4156         * nat/aarch64-sve-linux-sigcontext.h: New file.
4157         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4158         new files.
4159         (SVE_VQ_MIN): Likewise.
4160         (SVE_VQ_MAX): Likewise.
4161         (SVE_VL_MIN): Likewise.
4162         (SVE_VL_MAX): Likewise.
4163         (SVE_NUM_ZREGS): Likewise.
4164         (SVE_NUM_PREGS): Likewise.
4165         (sve_vl_valid): Likewise.
4166         (struct user_sve_header): Likewise.
4167
4168 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4169             Richard Bunt <Richard.Bunt@arm.com>
4170
4171         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4172         was requested by GDB.
4173
4174 2018-06-15  Tom de Vries  <tdevries@suse.de>
4175
4176         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4177
4178 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4179
4180         * gnulib/update-gnulib.sh: Print expected versions of
4181         autoconf/aclocal.
4182
4183 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4184
4185         * arch-utils.c (default_type_align): Use type_length_units.
4186         * gdbtypes.c (type_align): Use type_length_units.
4187
4188 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4189
4190         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4191         of 'define' command.
4192
4193 2018-06-14  Tom de Vries  <tdevries@suse.de>
4194
4195         PR cli/22573
4196         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4197         get_no_prettyformat_print_options.
4198
4199 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4200
4201         * sparc-nat.h: Include target.h.
4202         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4203         <fetch_registers>: Remove this argument in function call.
4204         <store_registers>: Remove this argument in function call, remove
4205         extra semicolon.
4206         <low_forget_process>: Call sparc64_forget_process instead of
4207         sparc_forget_process.
4208
4209 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4210
4211         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4212         (procfs_target::make_corefile_notes): Adjust to new
4213         target_read_alloc return type.
4214
4215 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4216             Stephen Roberts  <stephen.roberts@arm.com>
4217
4218         PR gdb/22882
4219         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4220         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4221         Move should_notify_stop local into more inner scope.
4222
4223 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4224             Stephen Roberts  <stephen.roberts@arm.com>
4225
4226         PR gdb/22882
4227         * infrun.c (resume_1): Add call to mark_async_event_handler.
4228
4229 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4230
4231         * infrun.c (do_target_wait): Change old version of $pc printed.
4232
4233 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4234
4235         * dwarf2read.c (read_index_from_section): Rename to...
4236         (read_gdb_index_from_section): ... this, update all callers.
4237         (dwarf2_read_index): Rename to...
4238         (dwarf2_read_gdb_index): ... this, update all callers.
4239
4240 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4241
4242         * gdb/hppa-linux-nat.c
4243         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4244         hppa_linux_nat_target::fetch_registers.
4245
4246 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4247
4248         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4249         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4250         (AARCH64_DWARF_SVE_FFR): Likewise.
4251         (AARCH64_DWARF_SVE_P0): Likewise.
4252         (AARCH64_DWARF_SVE_Z0): Likewise.
4253
4254 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4255
4256         * common/common-regcache.h (raw_compare): New function.
4257         * regcache.c (regcache::raw_compare): Likewise.
4258         * regcache.h (regcache::raw_compare): New declaration.
4259
4260 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4261
4262         * common/common-regcache.h (reg_buffer_common): New structure.
4263         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4264         (reg_buffer::raw_supply): Likewise.
4265         (reg_buffer::raw_supply_integer): Likewise.
4266         (reg_buffer::raw_supply_zeroed): Likewise.
4267         (reg_buffer::raw_collect): Likewise.
4268         (reg_buffer::raw_collect_integer): Likewise.
4269         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4270         (reg_buffer::raw_supply): Likewise.
4271         (reg_buffer::raw_supply_integer): Likewise.
4272         (reg_buffer::raw_supply_zeroed): Likewise.
4273         (reg_buffer::raw_collect): Likewise.
4274         (reg_buffer::raw_collect_integer): Likewise.
4275
4276 2018-06-10  Tom Tromey  <tom@tromey.com>
4277
4278         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4279         (class remote_state) <stop_reply_queue>: Now std::vector.
4280         (remote_state::~remote_state)
4281         (remote_target::stop_reply_queue_length): Update.
4282         (struct queue_iter_param, remove_child_of_pending_fork)
4283         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4284         (check_pending_event_prevents_wildcard_vcont_callback)
4285         (remove_stop_reply_for_inferior)
4286         (remove_stop_reply_of_remote_state)
4287         (remote_notif_remove_once_on_match)
4288         (stop_reply_match_ptid_and_ws)
4289         (remote_kill_child_of_pending_fork): Remove.
4290         (remote_target::remove_new_fork_children)
4291         (remote_target::check_pending_events_prevent_wildcard_vcont)
4292         (remote_target::discard_pending_stop_replies)
4293         (remote_target::discard_pending_stop_replies_in_queue)
4294         (remote_target::remote_notif_remove_queued_reply)
4295         (remote_target::queued_stop_reply)
4296         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4297         (remote_target::wait, remote_target::kill_new_fork_children)
4298         (remote_target::async): Update.
4299
4300 2018-06-10  Tom Tromey  <tom@tromey.com>
4301
4302         * record-full.c (record_full_arch_list_cleanups): Remove.
4303         (record_full_message): Use try/catch.
4304         (record_full_wait_cleanups): Remove.
4305         (record_full_wait_1): Use try/catch.
4306         (record_full_restore): Likewise.
4307
4308 2018-06-10  Tom Tromey  <tom@tromey.com>
4309
4310         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4311         declare VEC.  Add constructor.
4312         <in_target_beneath>: Now bool.
4313         (record_full_breakpoints): Now a std::vector, static.
4314         (record_full_sync_record_breakpoints)
4315         (record_full_init_record_breakpoints)
4316         (record_full_target::insert_breakpoint)
4317         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4318
4319 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4320
4321         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4322         * serial.c (serial_interface_lookup): Remove struct keyword.
4323
4324 2018-06-10  Tom Tromey  <tom@tromey.com>
4325
4326         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4327         method.
4328         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4329         a method.
4330         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4331         method.
4332         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4333         "beneath" as a method.
4334         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4335         Use "beneath" as a method.
4336
4337 2018-06-10  Tom Tromey  <tom@tromey.com>
4338
4339         * tracefile.c (struct trace_file_writer_deleter): New.
4340         <operator()>: Rename from trace_file_writer_xfree.
4341         (trace_file_writer_up): New typedef.
4342         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4343
4344 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4345
4346         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4347         <m_registers, m_register_status>: Change type to
4348         std::unique_ptr.
4349         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4350         XCNEWVEC.
4351
4352 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4353
4354         * common/common-regcache.h (enum register_status): Add
4355         underlying type "signed char".
4356         * regcache.h (reg_buffer) <m_register_status>: Change type to
4357         register_status *.
4358         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4359         register_status instead of signed char.
4360         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4361         (reg_buffer::get_register_status): Remove cast.
4362         (readable_regcache::raw_read): Remove cast.
4363         (readable_regcache::cooked_read): Remove cast.
4364
4365 2018-06-09  Tom Tromey  <tom@tromey.com>
4366
4367         * source.c (reverse_search_command, forward_search_command): Use
4368         scoped_fd.
4369
4370 2018-06-09  Tom Tromey  <tom@tromey.com>
4371
4372         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4373         (serial_ops_list): Now static, std::vector.
4374         (serial_interface_lookup, serial_add_interface): Update.
4375
4376 2018-06-09  Tom Tromey  <tom@tromey.com>
4377
4378         * dwarf2read.c (process_cu_includes): Update.
4379         (process_full_comp_unit): Update.
4380         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4381         std::vector.
4382
4383 2018-06-08  Paul Koning  <paul_koning@dell.com>
4384
4385         PR gdb/23252
4386
4387         * python/python.c (do_start_initialization):
4388         Avoid call to internal Python API.
4389         (init__gdb_module): New function.
4390
4391 2018-06-08  Gary Benson <gbenson@redhat.com>
4392
4393         * linux-thread-db.c (valprint.h): New include.
4394         (struct check_thread_db_info): New structure.
4395         (check_thread_db_on_load, tdb_testinfo): New static globals.
4396         (check_thread_db, check_thread_db_callback): New functions.
4397         (try_thread_db_load_1): Run integrity checks if requested.
4398         (maintenance_check_libthread_db): New function.
4399         (_initialize_thread_db): Register "maint check libthread-db"
4400         and "maint set/show check-libthread-db".
4401         * NEWS: Mention the above new commands.
4402
4403 2018-06-08  Tom Tromey  <tom@tromey.com>
4404
4405         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4406         now a method.
4407
4408 2018-06-08  Tom Tromey  <tom@tromey.com>
4409
4410         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4411
4412 2018-06-08  Tom Tromey  <tom@tromey.com>
4413
4414         * common/btrace-common.h (struct btrace_data): Add constructor,
4415         destructor, move assignment operator.
4416         <empty, clear, fini>: New methods.
4417         <format>: Initialize.
4418         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4419         (btrace_data_empty): Don't declare.
4420         * common/btrace-common.c (btrace_data_init): Remove.
4421         (btrace_data::fini): Rename from btrace_data_fini.
4422         (btrace_data::empty): Rename from btrace_data_empty.
4423         (btrace_data::clear): Rename from btrace_data_clear.  Return
4424         bool.
4425         * btrace.h (make_cleanup_btrace_data): Don't declare.
4426         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4427         (parse_xml_btrace): Update.
4428         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4429         (maint_btrace_clear_packet_history_cmd): Update.
4430
4431 2018-06-07  Pedro Alves  <palves@redhat.com>
4432
4433         * target.h (target_ops) <beneath>: Now a method.  All references
4434         updated.
4435         (class target_stack): New.
4436         * target.c (g_target_stack): New.
4437         (g_current_top_target): Delete.
4438         (current_top_target): Get the top target out of g_target_stack.
4439         (target_stack::push, target_stack::unpush): New.
4440         (push_target, unpush_target): Reimplement.
4441         (target_is_pushed): Reimplement in terms of g_target_stack.
4442         (target_ops::beneath, target_stack::find_beneath): New.
4443
4444 2018-06-07  Pedro Alves  <palves@redhat.com>
4445
4446         * target.h (find_target_beneath): Delete declaration.
4447         * target.c (find_target_beneath): Delete definition.
4448         * aix-thread.c: All callers of find_target_beneath adjusted to
4449         call target_ops::beneath instead.
4450         * bsd-uthread.c: Likewise.
4451         * linux-thread-db.c: Likewise.
4452         * ravenscar-thread.c: Likewise.
4453         * sol-thread.c: Likewise.
4454         * spu-multiarch.c: Likewise.
4455
4456 2018-06-07  Pedro Alves  <palves@redhat.com>
4457
4458         * target.h (target_ops) <beneath>: Now a method.  All references
4459         updated.
4460         (target_ops) <m_beneath>: New.
4461         * target.c (target_ops::beneath): New.
4462         * corelow.c: Adjust all references to target_ops::beneath.
4463         * linux-thread-db.c: Likewise.
4464         * make-target-delegates: Likewise.
4465         * record-btrace.c: Likewise.
4466         * record-full.c: Likewise.
4467         * remote.c: Likewise.
4468         * target.c: Likewise.
4469         * target-delegates.c: Regenerate.
4470
4471 2018-06-07  Pedro Alves  <palves@redhat.com>
4472
4473         * target.h (target_stack): Delete.
4474         (current_top_target): Declare function.
4475         * target.c (target_stack): Delete.
4476         (g_current_top_target): New.
4477         (current_top_target): New function.
4478         * auxv.c: Use current_top_target instead of target_stack
4479         throughout.
4480         * avr-tdep.c: Likewise.
4481         * breakpoint.c: Likewise.
4482         * corefile.c: Likewise.
4483         * elfread.c: Likewise.
4484         * eval.c: Likewise.
4485         * exceptions.c: Likewise.
4486         * frame.c: Likewise.
4487         * gdbarch-selftests.c: Likewise.
4488         * gnu-v3-abi.c: Likewise.
4489         * ia64-tdep.c: Likewise.
4490         * ia64-vms-tdep.c: Likewise.
4491         * infcall.c: Likewise.
4492         * infcmd.c: Likewise.
4493         * infrun.c: Likewise.
4494         * linespec.c: Likewise.
4495         * linux-tdep.c: Likewise.
4496         * minsyms.c: Likewise.
4497         * ppc-linux-nat.c: Likewise.
4498         * ppc-linux-tdep.c: Likewise.
4499         * procfs.c: Likewise.
4500         * regcache.c: Likewise.
4501         * remote.c: Likewise.
4502         * rs6000-tdep.c: Likewise.
4503         * s390-linux-nat.c: Likewise.
4504         * s390-tdep.c: Likewise.
4505         * solib-aix.c: Likewise.
4506         * solib-darwin.c: Likewise.
4507         * solib-dsbt.c: Likewise.
4508         * solib-spu.c: Likewise.
4509         * solib-svr4.c: Likewise.
4510         * solib-target.c: Likewise.
4511         * sparc-tdep.c: Likewise.
4512         * sparc64-tdep.c: Likewise.
4513         * spu-tdep.c: Likewise.
4514         * symfile.c: Likewise.
4515         * symtab.c: Likewise.
4516         * target-descriptions.c: Likewise.
4517         * target-memory.c: Likewise.
4518         * target.c: Likewise.
4519         * target.h: Likewise.
4520         * tracefile-tfile.c: Likewise.
4521         * tracepoint.c: Likewise.
4522         * valops.c: Likewise.
4523         * valprint.c: Likewise.
4524         * value.c: Likewise.
4525         * windows-tdep.c: Likewise.
4526         * mi/mi-main.c: Likewise.
4527
4528 2018-06-07  Tom Tromey  <tom@tromey.com>
4529
4530         * valprint.h (build_address_symbolic): Declare.
4531         * printcmd.c (print_address_symbolic): Update.
4532         (build_address_symbolic): Change "name" and "filename" to
4533         std::string.
4534         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4535         Update.
4536         * defs.h (build_address_symbolic): Remove declaration.
4537
4538 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4539
4540         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4541         (aarch64_vnv_type): Add function.
4542         (aarch64_pseudo_register_name): Add V regs for SVE.
4543         (aarch64_pseudo_register_type): Likewise.
4544         (aarch64_pseudo_register_reggroup_p): Likewise.
4545         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4546         (aarch64_pseudo_read_value): Add V regs for SVE.
4547         (aarch64_pseudo_write_2): Use V0 offset for SVE
4548         (aarch64_pseudo_write): Add V regs for SVE.
4549         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4550
4551 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4552
4553         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4554         (sve_vl_from_vq): Likewise.
4555
4556 2018-06-05  Tom Tromey  <tom@tromey.com>
4557
4558         * cli/cli-cmds.c (show_version): Update.
4559         * top.c (print_gdb_version): Add "interactive" parameter.
4560         Update.
4561         * main.c (captured_main_1): Update.
4562         * top.h (print_gdb_version): Add "interactive" parameter and a
4563         comment.
4564
4565 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4566
4567         * common/enum-flags.h: Add trailing semicolon to example in
4568         comment.
4569
4570 2018-06-05  Tom Tromey  <tom@tromey.com>
4571
4572         PR cli/12326:
4573         * NEWS: Add entry about pager.
4574         * utils.c (pagination_disabled_for_command): New global.
4575         (prompt_for_continue): Allow "c" response to prompt.
4576         (reinitialize_more_filter): Clear
4577         pagination_disabled_for_command.
4578         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4579
4580 2018-06-04  Tom Tromey  <tom@tromey.com>
4581
4582         * ada-lang.h (ada_lookup_symbol_list): Update.
4583         * ada-lang.c (resolve_subexp): Update.
4584         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4585         parameter.
4586         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4587         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4588         results parameter to std::vector.
4589         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4590         Update.
4591         * ada-exp.y (block_lookup): Update.
4592         (select_possible_type_sym): Change type of syms.  Remove nsyms
4593         parameter.
4594         (write_var_or_type, write_name_assoc): Update.
4595
4596 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4597
4598         * windows-nat.c (windows_nat_target::xfer_partial): Return
4599         TARGET_XFER_E_IO if we need to delegate to the target beneath
4600         but BENEATH is NULL.
4601
4602 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4603
4604         * Makefile.in (config.status): Add configure.nat as a
4605         dependency.
4606
4607 2018-06-04  Tom Tromey  <tom@tromey.com>
4608
4609         * cp-name-parser.y (cpname_state): Add method declarations.
4610         (HANDLE_QUAL): Update.
4611         (cpname_state::d_grab, cpname_state::fill_comp)
4612         (cpname_state::make_operator, cpname_state::make_dtor)
4613         (cpname_state::make_builtin_type, cpname_state::make_name)
4614         (cpname_state::d_qualify, cpname_state::d_int_type)
4615         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4616         (%union): Move earlier.
4617
4618 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4619
4620         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4621
4622 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4623
4624         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4625         (aarch64_pseudo_write_1): Likewise.
4626         (aarch64_pseudo_read_value): Use helper.
4627         (aarch64_pseudo_write): Likewise.
4628
4629 2018-06-04  Pedro Alves  <palves@redhat.com>
4630
4631         * darwin-nat.c (darwin_ops): Delete.
4632         (darwin_attach_pid): Use get_native_target.
4633
4634 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4635
4636         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4637         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4638
4639 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4640
4641         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4642         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4643         (aarch64_gdbarch_init): Check for SVE.
4644         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4645
4646 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4647
4648         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4649         * aarch64-tdep.h (aarch64_read_description): Likewise.
4650         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4651         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4652         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4653         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4654         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4655
4656 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4657
4658         * value.c (value_fetch_lazy_bitfield): New.
4659         (value_fetch_lazy_memory): New.
4660         (value_fetch_lazy_register): New.
4661         (value_fetch_lazy): Factor out to smaller functions.
4662
4663 2018-06-01  Tom Tromey  <tom@tromey.com>
4664
4665         * cp-name-parser.y (backslashable, represented): Now const.
4666
4667 2018-06-01  Tom Tromey  <tom@tromey.com>
4668
4669         * cp-name-parser.y: Include parser-defs.h.
4670         (parser_fprintf): Remove declaration.
4671
4672 2018-06-01  Tom Tromey  <tom@tromey.com>
4673
4674         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4675         %parse-param.
4676         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4677         (global_result): Remove globals.
4678         (struct cpname_state): New.
4679         (yyparse): Don't declare.
4680         (yylex, yyerror): Move declarations after %union.
4681         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4682         (make_name): Add state parameter.
4683         Update all callers.
4684         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4685         parameter.
4686         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4687         Update.
4688         (yylex): Add lvalp, state parameters.
4689         (yyerror): Add state parameter.
4690         (cp_demangled_name_to_comp): Update.
4691
4692 2018-06-01  Tom Tromey  <tom@tromey.com>
4693
4694         * cp-name-parser.y (parser_fprintf): Declare.
4695         (GDB_YY_REMAP_PREFIX): Define.
4696         Include yy-remap.h.  Don't redefine yy* identifiers.
4697
4698 2018-06-01  Tom Tromey  <tom@tromey.com>
4699
4700         * python/py-type.c (typy_legacy_template_argument): Update.
4701         * cp-support.h (cp_demangled_name_to_comp): Update.
4702         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4703         parameter to be a "std::string *".
4704         (main): Update.
4705
4706 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4707
4708         * ada-lex.l: Include "diagnostics.h" instead of
4709         "common/diagnostics.h".
4710         * unittests/environ-selftests.c: Likewise.
4711         * common/diagnostics.h: Moved to ../include.
4712
4713 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4714
4715         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4716         to language_mode_manual while calling breakpoint_re_set_one.
4717
4718 2018-06-01  Tom Tromey  <tom@tromey.com>
4719
4720         * valops.c (value_cast_structs, destructor_name_p): Update.
4721         * symtab.c (gdb_mangle_name): Update.
4722         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4723         Update.
4724         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4725         (pascal_object_print_value_fields, pascal_object_print_value):
4726         Update.
4727         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4728         * linespec.c (find_methods): Update.
4729         * gdbtypes.h (type_name_no_tag): Remove.
4730         (type_name_or_error): Rename from type_name_no_tag_or_error.
4731         * gdbtypes.c (type_name_no_tag): Remove.
4732         (type_name_or_error): Rename from type_name_no_tag_or_error.
4733         (lookup_struct_elt_type, check_typedef): Update.
4734         * expprint.c (print_subexp_standard): Update.
4735         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4736         * d-namespace.c (d_lookup_nested_symbol): Update.
4737         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4738         (cp_print_class_member): Update.
4739         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4740         * completer.c (add_struct_fields): Update.
4741         * c-typeprint.c (cp_type_print_derivation_info)
4742         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4743         Update.
4744         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4745         (ada_prefer_type, ada_is_exception_sym): Update.
4746
4747 2018-06-01  Tom Tromey  <tom@tromey.com>
4748
4749         * valops.c (enum_constant_from_type, value_namespace_elt)
4750         (value_maybe_namespace_elt): Update.
4751         * valarith.c (find_size_for_pointer_math): Update.
4752         * target-descriptions.c (make_gdb_type): Update.
4753         * symmisc.c (print_symbol): Update.
4754         * stabsread.c (define_symbol, read_type)
4755         (complain_about_struct_wipeout, add_undefined_type)
4756         (cleanup_undefined_types_1): Update.
4757         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4758         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4759         (rust_internal_print_type, rust_composite_type)
4760         (rust_evaluate_funcall, rust_evaluate_subexp)
4761         (rust_inclusive_range_type_p): Update.
4762         * python/py-type.c (typy_get_tag): Update.
4763         * p-typeprint.c (pascal_type_print_base): Update.
4764         * mdebugread.c (parse_symbol, parse_type): Update.
4765         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4766         Update.
4767         * guile/scm-type.c (gdbscm_type_tag): Update.
4768         * go-lang.c (sixg_string_p): Update.
4769         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4770         Update.
4771         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4772         (TYPE_TAG_NAME): Remove.
4773         * gdbtypes.c (type_name_no_tag): Simplify.
4774         (check_typedef, check_types_equal, recursive_dump_type)
4775         (copy_type_recursive, arch_composite_type): Update.
4776         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4777         in summary mode when needed.
4778         * eval.c (evaluate_funcall): Update.
4779         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4780         (process_structure_scope, read_enumeration_type)
4781         (read_namespace_type, read_module_type, determine_prefix): Update.
4782         * cp-support.c (inspect_type): Update.
4783         * coffread.c (process_coff_symbol, decode_base_type): Update.
4784         * c-varobj.c (c_is_path_expr_parent): Update.
4785         * c-typeprint.c (c_type_print_base_struct_union): Update.
4786         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4787         summary when using C language.
4788         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4789         (gen_maybe_namespace_elt): Update.
4790         * ada-lang.c (ada_type_name): Simplify.
4791         (empty_record, ada_template_to_fixed_record_type_1)
4792         (template_to_static_fixed_type)
4793         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4794
4795 2018-06-01  Tom Tromey  <tom@tromey.com>
4796
4797         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4798         c_print_type.
4799         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4800         (c_print_type): Update.
4801         (c_print_type): New overload.
4802         (c_type_print_varspec_prefix, c_type_print_args)
4803         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4804         (c_type_print_base_struct_union, c_type_print_base_1)
4805         (cp_type_print_method_args): Add "language" parameter.
4806         (c_type_print_base): Update.
4807         * c-lang.h (c_print_type): Add new overload.
4808
4809 2018-06-01  Tom Tromey  <tom@tromey.com>
4810
4811         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4812         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4813
4814 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4815
4816         * aarch64-tdep.c (aarch64_sve_register_names): New const
4817         var.
4818         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4819         (AARCH64_SVE_Z_REGS_NUM): New define.
4820         (AARCH64_SVE_P_REGS_NUM): Likewise.
4821         (AARCH64_SVE_NUM_REGS): Likewise.
4822
4823 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4824
4825         * nat/linux-ptrace.h [__alpha__]
4826         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4827         definitions.
4828
4829 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4830
4831         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4832         the endianness selected.
4833         * NEWS: Document `set endian auto' mode operation update.
4834
4835 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4836
4837         * Makefile.in: Add new header.
4838         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4839         (sve_vl_from_vg): Likewise.
4840         (sve_vq_from_vl): Likewise.
4841         (sve_vl_from_vq): Likewise.
4842         (sve_vq_from_vg): Likewise.
4843         (sve_vg_from_vq): Likewise.
4844         * configure.nat: Add new c file.
4845         * nat/aarch64-sve-linux-ptrace.c: New file.
4846         * nat/aarch64-sve-linux-ptrace.h: New file.
4847
4848 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4849
4850         * aarch64-linux-nat.c (aarch64_linux_read_description):
4851         Add parmeter zero.
4852         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4853         Likewise.
4854         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4855         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4856         (aarch64_gdbarch_init): Add parmeter zero.
4857         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4858         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4859         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4860         parmeter.
4861         * doc/gdb.texinfo: Describe SVE feature
4862         * features/aarch64-sve.c: New file.
4863
4864 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4865
4866         PR gdb/23210
4867         * gdbarch.sh (significant_addr_bit): Default to zero when
4868         not set by target architecture.
4869         * gdbarch.c: Re-generated.
4870         * utils.c (address_significant): Update.
4871
4872 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4873
4874         * stack.c (func_command): Remove trailing newline in call to error.
4875
4876 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4877
4878         * regcache.h (regcache_raw_collect): Remove, update callers to
4879         use regcache::raw_collect.
4880         * regcache.c (regcache_raw_collect): Remove.
4881
4882 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4883
4884         * regcache.h (regcache_raw_supply): Remove, update callers to
4885         use detached_regcache::raw_supply.
4886         * regcache.c (regcache_raw_supply): Remove.
4887
4888 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4889
4890         * regcache.h (regcache_cooked_write_part): Remove, update
4891         callers to use regcache::cooked_write_part.
4892         * regcache.c (regcache_cooked_write_part): Remove.
4893
4894 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4895
4896         * regcache.h (regcache_cooked_read_part): Remove, update callers
4897         to use readable_regcache::cooked_read_part.
4898         * regcache.c (regcache_cooked_read_part): Remove.
4899
4900 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4901
4902         * regcache.h (regcache_cooked_read_value): Remove, update
4903         callers to use readable_regcache::cooked_read_value.
4904         * regcache.c (regcache_cooked_read_value): Remove.
4905
4906 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4907
4908         * regcache.h (regcache_cooked_write): Remove, update callers to
4909         use regcache::cooked_write.
4910         * regcache.c (regcache_cooked_write): Remove.
4911
4912 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4913
4914         * regcache.h (regcache_invalidate): Remove, update callers to
4915         use detached_regcache::invalidate instead.
4916         * regcache.c (regcache_invalidate): Remove.
4917
4918 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4919
4920         * regcache.h (regcache_raw_write_part): Remove, update callers
4921         to use regcache::raw_write_part instead.
4922         * regcache.c (regcache_raw_write_part): Remove.
4923
4924 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4925
4926         * regcache.h (regcache_raw_read_part): Remove, update callers to
4927         use readable_regcache::raw_read_part instead.
4928         * regcache.c (regcache_raw_read_part): Remove.
4929
4930 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4931
4932         * regcache.h (regcache_cooked_read): Remove, update callers to
4933         use readable_regcache::cooked_read instead.
4934         * regcache.c (regcache_cooked_read): Remove.
4935
4936 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4937
4938         * regcache.h (regcache_raw_write): Remove, update callers to use
4939         regcache::raw_write instead.
4940         * regcache.c (regcache_raw_write): Remove.
4941
4942 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4943
4944         * regcache.h (regcache_raw_read): Remove, update callers to use
4945         readable_regcache::raw_read instead.
4946         * regcache.c (regcache_raw_read): Remove.
4947
4948 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4949
4950         * regcache.h (regcache_raw_update): Remove, update callers to
4951         use readable_regcache::raw_update instead.
4952         * regcache.c (regcache_raw_update): Remove.
4953
4954 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4955
4956         * regcache.h (regcache_register_status): Remove, update callers
4957         to use reg_buffer::get_register_status directly instead.
4958         * regcache.c (regcache_register_status): Remove.
4959
4960 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4961
4962         * regcache.h (regcache_get_ptid): Remove, update all callers to
4963         call regcache::ptid instead.
4964         * regcache.c (regcache_get_ptid): Remove.
4965
4966 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4967
4968         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4969
4970 2018-05-30  Pedro Alves  <palves@redhat.com>
4971
4972         * common/common-exceptions.h (exception_rethrow): Use
4973         ATTRIBUTE_NORETURN.
4974
4975 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
4976
4977         * breakpoint.c (print_solib_event, check_status_catch_solib):
4978         Remove struct keyword in range-based for loops.
4979         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4980         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4981         Likewise.
4982         * linespec.c (find_superclass_methods, search_minsyms_for_name):
4983         Likewise.
4984         * symfile.c (addr_info_make_relative): Likewise.
4985         * thread.c (value_in_thread_stack_temporaries): Likewise.
4986
4987 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
4988
4989         PR gdb/16841
4990         * valops.c (value_struct_elt_for_reference): Call check_typedef on
4991         aggregate type to get its real type before accessing it.
4992
4993 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
4994
4995         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4996         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4997         * coff-pe-read.c (add_pe_forwarded_sym): Replace
4998         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4999         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5000         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5001         * printcmd.c (info_address_command): Likewise.
5002
5003 2018-05-29  Tom Tromey  <tom@tromey.com>
5004
5005         * windows-nat.c (handle_exception): Update fall-through comment.
5006
5007 2018-05-29  Tom Tromey  <tom@tromey.com>
5008
5009         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5010         (struct program_space) <added_solibs>: Now a std::vector.
5011         * breakpoint.c (print_solib_event): Update.
5012         (check_status_catch_solib): Update.
5013         * progspace.c (clear_program_space_solib_cache): Update.
5014         * solib.c (update_solib_list): Update.
5015
5016 2018-05-29  Tom Tromey  <tom@tromey.com>
5017
5018         * python/py-type.c (typy_richcompare): Update.
5019         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5020         * gdbtypes.h (types_deeply_equal): Return bool.
5021         (types_equal): Likewise.
5022         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5023         declare VEC.
5024         (check_types_equal): Change worklist to std::vector.  Return
5025         bool.
5026         (struct type_equality_entry): Add constructor.
5027         (compare_maybe_null_strings): Return bool.
5028         (check_types_worklist): Return bool.  Change worklist to
5029         std::vector.
5030         (types_deeply_equal): Use std::vector.
5031         (types_equal): Return bool.
5032         (compare_maybe_null_strings): Simplify.
5033
5034 2018-05-29  Tom Tromey  <tom@tromey.com>
5035
5036         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5037
5038 2018-05-29  Tom Tromey  <tom@tromey.com>
5039
5040         * objc-lang.h: Don't include cp-support.h.
5041         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5042         declare VEC.
5043
5044 2018-05-27  Tom Tromey  <tom@tromey.com>
5045
5046         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5047
5048 2018-05-25  Tom Tromey  <tom@tromey.com>
5049
5050         * value.c (value::location): Initialize.
5051
5052 2018-05-25  Tom Tromey  <tom@tromey.com>
5053
5054         * dbxread.c (init_bincl_list): Remove.
5055         (bincl_list): Now a std::vector.
5056         (bincls_allocated, next_bincl): Remove.
5057         (free_bincl_list, do_free_bincl_list_cleanup)
5058         (make_cleanup_free_bincl_list): Remove.
5059         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5060         unique_xmalloc_ptr.
5061         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5062         (struct header_file_location): Add constructor.
5063         (add_bincl_to_list): Remove.
5064
5065 2018-05-25  Tom Tromey  <tom@tromey.com>
5066
5067         * tui/tui.c (tui_enable): Update.
5068         * mi/mi-interp.c (mi_interp::init): Update.
5069         * interps.h (class interp) <name>: New method.
5070         <m_name>: Rename from name.
5071         (~scoped_restore_interp): Update.
5072         * interps.c (interp::interp): Update.
5073         (interp_add, interp_set, interp_lookup_existing)
5074         (current_interp_named_p): Update.
5075
5076 2018-05-25  Tom Tromey  <tom@tromey.com>
5077
5078         * interps.c (interp_name): Remove.
5079         * mi/mi-interp.c (mi_interp::init): Update.
5080         * interps.h (interp_name): Remove.
5081         (~scoped_restore_interp): Update.
5082         * tui/tui.c (tui_enable): Update.
5083
5084 2018-05-25  Tom Tromey  <tom@tromey.com>
5085
5086         * utils.c (fputs_maybe_filtered): Update.
5087         * linespec.c (decode_line_full): Update.
5088         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5089         (mi_print_breakpoint_for_event, mi_solib_loaded)
5090         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5091         (mi_user_selected_context_changed): Update.
5092         * mi/mi-main.c (mi_execute_command): Update.
5093         * cli/cli-script.c (execute_control_command): Update.
5094         * python/python.c (execute_gdb_command): Update.
5095         * solib.c (info_sharedlibrary_command): Update.
5096         * interps.c (interp_ui_out): Remove.
5097         * interps.h (interp_ui_out): Remove.
5098
5099 2018-05-25  Tom Tromey  <tom@tromey.com>
5100
5101         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5102         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5103         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5104
5105 2018-05-25  Tom Tromey  <tom@tromey.com>
5106
5107         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5108         * interps.c (interp_exec): Use scoped_restore.
5109
5110 2018-05-25  Tom Tromey  <tom@tromey.com>
5111
5112         * remote.c (remote_target::remote_file_get): Use
5113         gdb::byte_vector.
5114         (remote_target::remote_file_put): Likewise.
5115
5116 2018-05-25  Tom Tromey  <tom@tromey.com>
5117
5118         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5119         a std::string.
5120         (get_pe_section_index, add_pe_exported_sym): Update.
5121         (read_pe_exported_syms): Use gdb::def_vector.
5122
5123 2018-05-25  Tom Tromey  <tom@tromey.com>
5124
5125         * frame.c (remove_prev_frame): Remove.
5126         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5127
5128 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5129
5130         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5131         Remove prototypes.
5132         * mips-linux-nat.c (supply_fpregset): Always call
5133         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5134         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5135         `mips_fill_fpregset'.
5136         * mips-linux-tdep.c (mips_supply_fpregset)
5137         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5138         (mips_fill_fpregset_wrapper): Remove functions.
5139         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5140         (mips_linux_fpregset): Remove variable.
5141         (mips_linux_iterate_over_regset_sections): Use
5142         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5143         (mips_linux_o32_sigframe_init): Remove comment.
5144
5145 2018-05-25  Pedro Alves  <palves@redhat.com>
5146
5147         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5148         (struct readahead_cache, struct packet_reg, struct
5149         remote_arch_state, class remote_state): Move higher up in the
5150         file.
5151         (remote_target::m_remote_state): Now an object instead of a pointer.
5152         (remote_target::get_remote_state): Adjust.
5153
5154 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5155
5156         * stack.c (select_and_print_frame): Delete.
5157         (struct function_bounds): Move struct within function.
5158         (func_command): Most content moved into new function
5159         find_frame_for_function, use new function, print result, add
5160         function comment.
5161         (find_frame_for_function): New function, now returns a result.
5162
5163 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5164
5165         * stack.c (iterate_over_block_arg_vars): Fix comment.
5166         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5167
5168 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5169
5170         PR gdb/23203
5171         * frame.c
5172         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5173         Define.
5174         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5175         Define.
5176         * frame.h (class scoped_restore_selected_frame): New class.
5177         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5178         of any exception, use scoped_restore_selected_frame to restore the
5179         frame instead.
5180
5181 2018-05-24  Pedro Alves  <palves@redhat.com>
5182
5183         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5184         override.
5185
5186 2018-05-23  Tom Tromey  <tom@tromey.com>
5187
5188         * complaints.c (struct complaints): Remove.
5189         (symfile_complaint_book): Remove.
5190         (series): New global.
5191         (complaint_internal): Update.
5192         (clear_complaints): Update.
5193
5194 2018-05-23  Tom Tromey  <tom@tromey.com>
5195
5196         * complaints.c (counters): New global.
5197         (struct complain): Remove.
5198         (struct complaints) <root>: Remove.
5199         (complaint_sentinel): Remove.
5200         (symfile_complaint_book): Update.
5201         (find_complaint) Remove.
5202         (complaint_internal, clear_complaints): Update.
5203
5204 2018-05-23  Tom Tromey  <tom@tromey.com>
5205
5206         * complaints.c (struct complain) <file, line>: Remove.
5207         (find_complaint): Remove file, line parameters.
5208         (complaint_internal): Update.
5209
5210 2018-05-23  Tom Tromey  <tom@tromey.com>
5211
5212         * complaints.c (vcomplaint): Remove.
5213         (complaint_internal) Merge in contents of vcomplaint.
5214
5215 2018-05-23  Tom Tromey  <tom@tromey.com>
5216
5217         * complaints.c (struct complaints) <explanation>: Remove.
5218         (symfile_explanations): Remove.
5219         (symfile_complaint_book): Update.
5220         (vcomplaint): Update.
5221         (struct explanation): Remove.
5222
5223 2018-05-23  Tom Tromey  <tom@tromey.com>
5224
5225         * complaints.c (symfile_complaints): Remove.
5226         (complaint_internal): Remove "complaints" parameter.
5227         (clear_complaints, vcomplaint): Remove "c" parameter.
5228         (get_complaints): Remove.
5229         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5230         (dwarf2_debug_line_missing_file_complaint)
5231         (dwarf2_debug_line_missing_end_sequence_complaint)
5232         (dwarf2_complex_location_expr_complaint)
5233         (dwarf2_const_value_length_mismatch_complaint)
5234         (dwarf2_section_buffer_overflow_complaint)
5235         (dwarf2_macro_malformed_definition_complaint)
5236         (dwarf2_invalid_attrib_class_complaint)
5237         (create_addrmap_from_index, dw2_symtab_iter_next)
5238         (dw2_expand_marked_cus)
5239         (dw2_debug_names_iterator::find_vec_in_debug_names)
5240         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5241         (create_debug_type_hash_table, init_cutu_and_read_dies)
5242         (partial_die_parent_scope, add_partial_enumeration)
5243         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5244         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5245         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5246         (create_cus_hash_table, create_dwp_hash_table)
5247         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5248         (dwarf2_rnglists_process, dwarf2_ranges_process)
5249         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5250         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5251         (handle_struct_member_die, process_structure_scope)
5252         (read_array_type, read_common_block, read_module_type)
5253         (read_tag_pointer_type, read_typedef, read_base_type)
5254         (read_subrange_type, load_partial_dies, partial_die_info::read)
5255         (partial_die_info::read, partial_die_info::read)
5256         (partial_die_info::read, read_checked_initial_length_and_offset)
5257         (dwarf2_string_attr, read_formatted_entries)
5258         (dwarf_decode_line_header)
5259         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5260         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5261         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5262         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5263         (get_signatured_type, get_DW_AT_signature_type)
5264         (decode_locdesc, file_file_name, consume_improper_spaces)
5265         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5266         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5267         (dwarf2_symbol_mark_computed, set_die_type)
5268         (read_attribute_value): Update.
5269         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5270         Update.
5271         * dbxread.c (unknown_symtype_complaint)
5272         (lbrac_mismatch_complaint, repeated_header_complaint)
5273         (set_namestring, function_outside_compilation_unit_complaint)
5274         (read_dbx_symtab, process_one_symbol): Update.
5275         * gdbtypes.c (stub_noname_complaint): Update.
5276         * windows-nat.c (handle_unload_dll): Update.
5277         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5278         (decode_base_type): Update.
5279         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5280         (eb_complaint, record_include_begin, record_include_end)
5281         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5282         (process_xcoff_symbol, read_symbol)
5283         (function_outside_compilation_unit_complaint)
5284         (scan_xcoff_symtab): Update.
5285         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5286         * buildsym.c (finish_block_internal, make_blockvector)
5287         (end_symtab_get_static_block, augment_type_symtab): Update.
5288         * dtrace-probe.c (dtrace_process_dof)
5289         (dtrace_static_probe_ops::get_probes): Update.
5290         * complaints.h (struct complaint): Don't declare.
5291         (symfile_complaints): Remove.
5292         (complaint_internal): Remove "complaints" parameter.
5293         (complaint): Likewise.
5294         (clear_complaints): Likewise.
5295         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5296         (reread_symbols): Update.
5297         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5298         (dwarf2_frame_cache, decode_frame_entry): Update.
5299         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5300         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5301         (info_selectors_command): Update.
5302         * macrotab.c (macro_include, check_for_redefinition)
5303         (macro_undef): Update.
5304         * objfiles.c (filter_overlapping_sections): Update.
5305         * stabsread.c (invalid_cpp_abbrev_complaint)
5306         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5307         (define_symbol, error_type, read_type, rs6000_builtin_type)
5308         (stabs_method_name_from_physname, read_member_functions)
5309         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5310         (attach_fields_to_type, complain_about_struct_wipeout)
5311         (read_range_type, read_args, common_block_start)
5312         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5313         Update.
5314         * mdebugread.c (index_complaint, unknown_ext_complaint)
5315         (basic_type_complaint, bad_tag_guess_complaint)
5316         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5317         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5318         (parse_procedure, parse_lines)
5319         (function_outside_compilation_unit_complaint)
5320         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5321         (bad_tag_guess_complaint, reg_value_complaint): Update.
5322         * cp-support.c (demangled_name_complaint): Update.
5323         * macroscope.c (sal_macro_scope): Update.
5324         * dwarf-index-write.c (class debug_names): Update.
5325
5326 2018-05-23  Tom Tromey  <tom@tromey.com>
5327
5328         * complaints.c (clear_complaints): Remove "noisy" parameter.
5329         * complaints.h (clear_complaints): Update.
5330         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5331         (reread_symbols): Update.
5332
5333 2018-05-23  Tom Tromey  <tom@tromey.com>
5334
5335         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5336         SUBSEQUENT_MESSAGE.
5337         (vcomplaint, clear_complaints): Update.
5338         (symfile_explanations): Remove some messages.
5339
5340 2018-05-23  Tom Tromey  <tom@tromey.com>
5341
5342         * complaints.c (internal_complaint): Remove.
5343         * complaints.h (internal_complaint): Remove.
5344
5345 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5346
5347         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5348
5349 2018-05-22  Pedro Alves  <palves@redhat.com>
5350
5351         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5352         (remote_fileio_badfd, remote_fileio_return_errno)
5353         (remote_fileio_return_success, remote_fileio_func_open)
5354         (remote_fileio_func_open, remote_fileio_func_close)
5355         (remote_fileio_func_read, remote_fileio_func_write)
5356         (remote_fileio_func_lseek, remote_fileio_func_rename)
5357         (remote_fileio_func_unlink, remote_fileio_func_stat)
5358         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5359         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5360         remote_target parameter.
5361         (remote_fio_func_map) <func>: Add remote_target parameter.
5362         (do_remote_fileio_request, remote_fileio_request):
5363         * remote-fileio.h (remote_fileio_request):
5364         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5365         remote_target parameter.
5366         (remote_notif_process, handle_notification): Adjust to pass down
5367         the remote.
5368         (remote_notif_state_allocate): Add remote_target parameter.  Save
5369         it.
5370         * remote-notif.h (struct remote_target): Forward declare.
5371         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5372         remote_target parameter.
5373         (struct remote_notif_state) <remote>: New field.
5374         (remote_notif_ack, remote_notif_parse): Add remote_target
5375         parameter.
5376         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5377         remote_target parameter.
5378         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5379         (threads_listing_context, rmt_thread_action, protocol_feature)
5380         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5381         (packet_result, struct threads_listing_context, remote_state):
5382         Move definitions and declarations higher up.
5383         (remote_target) <~remote_target>: Declare.
5384         (remote_download_command_source, remote_file_put, remote_file_get)
5385         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5386         (remote_hostio_pread_vFile, remote_hostio_send_command)
5387         (remote_hostio_set_filesystem, remote_hostio_open)
5388         (remote_hostio_close, remote_hostio_unlink, remote_state)
5389         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5390         (get_memory_write_packet_size, get_memory_read_packet_size)
5391         (append_pending_thread_resumptions, remote_detach_1)
5392         (append_resumption, remote_resume_with_vcont)
5393         (add_current_inferior_and_thread, wait_ns, wait_as)
5394         (process_stop_reply, remote_notice_new_inferior)
5395         (process_initial_stop_replies, remote_add_thread)
5396         (btrace_sync_conf, remote_btrace_maybe_reopen)
5397         (remove_new_fork_children, kill_new_fork_children)
5398         (discard_pending_stop_replies, stop_reply_queue_length)
5399         (check_pending_events_prevent_wildcard_vcont)
5400         (discard_pending_stop_replies_in_queue, stop_reply)
5401         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5402         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5403         (remote_interrupt_as, remote_interrupt_ns)
5404         (remote_get_noisy_reply, remote_query_attached)
5405         (remote_add_inferior, remote_current_thread, get_current_thread)
5406         (set_thread, set_general_thread, set_continue_thread)
5407         (set_general_process, write_ptid)
5408         (remote_unpack_thread_info_response, remote_get_threadinfo)
5409         (parse_threadlist_response, remote_get_threadlist)
5410         (remote_threadlist_iterator, remote_get_threads_with_ql)
5411         (remote_get_threads_with_qxfer)
5412         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5413         (get_offsets, remote_check_symbols, remote_supported_packet)
5414         (remote_query_supported, remote_packet_size)
5415         (remote_serial_quit_handler, remote_detach_pid)
5416         (remote_vcont_probe, remote_resume_with_hc)
5417         (send_interrupt_sequence, interrupt_query)
5418         (remote_notif_get_pending_events, fetch_register_using_p)
5419         (send_g_packet, process_g_packet, fetch_registers_using_g)
5420         (store_register_using_P, store_registers_using_G)
5421         (set_remote_traceframe, check_binary_download)
5422         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5423         (remote_xfer_live_readonly_partial, remote_read_bytes)
5424         (remote_send_printf, remote_flash_write, readchar)
5425         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5426         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5427         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5428         (extended_remote_disable_randomization, extended_remote_run)
5429         (send_environment_packet, extended_remote_environment_support)
5430         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5431         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5432         (packet_command): Now methods of ...
5433         (remote_target): ... this class.
5434         (m_remote_state) <remote_target>: New field.
5435         (struct remote_state) <stop_reply_queue,
5436         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5437         fields.
5438         (remote_state::remote_state): Allocate stop_reply_queue.
5439         (remote_state): Delete global.
5440         (get_remote_state_raw): Delete.
5441         (remote_target::get_remote_state): Allocate m_remote_state on
5442         demand.
5443         (get_current_remote_target): New.
5444         (remote_ops, extended_remote_ops): Delete.
5445         (wait_forever_enabled_p, remote_async_inferior_event_token):
5446         Delete, moved to struct remote_state.
5447         (remote_target::close): Delete self.  Destruction bits split to
5448         ...
5449         (remote_target::~remote_target): ... this.
5450         (show_memory_packet_size): Adjust to use
5451         get_current_remote_target.
5452         (struct protocol_feature) <func>: Add remote_target parameter.
5453         All callers adjusted.
5454         (curr_quit_handler_target): New.
5455         (remote_serial_quit_handler): Reimplement.
5456         (remote_target::open_1): Adjust to use get_current_remote_target.
5457         Heap-allocate remote_target/extended_remote_target instances.
5458         (vcont_builder::vcont_builder): Add remote_target parameter, and
5459         save it in m_remote.  All callers adjusted.
5460         (vcont_builder::m_remote): New field.
5461         (vcont_builder::restart, vcont_builder::flush)
5462         (vcont_builder::push_action): Use it.
5463         (remote_target::commit_resume): Use it.
5464         (struct queue_iter_param) <remote>: New field.
5465         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5466         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5467         (check_pending_event_prevents_wildcard_vcont_callback)
5468         (remote_target::check_pending_events_prevent_wildcard_vcont)
5469         (remote_target::discard_pending_stop_replies)
5470         (remote_target::discard_pending_stop_replies_in_queue)
5471         (remote_target::remote_notif_remove_queued_reply): Fill in
5472         'remote' field.
5473         (remote_notif_get_pending_events): New.
5474         (remote_target::readchar, remote_target::remote_serial_write):
5475         Save/restore curr_quit_handler_target.
5476         (putpkt): New.
5477         (kill_new_fork_children): Fill in 'remote' field.
5478         (packet_command): Use get_current_remote_target, defer to
5479         remote_target method of same name.
5480         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5481         parameter, and save it in m_remote.  All callers adjusted.
5482         (scoped_remote_fd::release): Use m_remote.
5483         (scoped_remote_fd::m_remote): New field.
5484         (remote_file_put, remote_file_get, remote_file_delete): Use
5485         get_current_remote_target, defer to remote_target method of same
5486         name.
5487         (remote_btrace_reset): Add remote_state paremeter.  Update all
5488         callers.
5489         (remote_async_inferior_event_handler). Pass down 'data'.
5490         (remote_new_objfile): Use get_current_remote_target.
5491         (remote_target::vcont_r_supported): New.
5492         (set_range_stepping): Use get_current_remote_target and
5493         remote_target::vcont_r_supported.
5494         (_initialize_remote): Don't allocate 'remote_state' and
5495         'stop_reply_queue' globals.
5496         * remote.h (struct remote_target): Forward declare.
5497         (getpkt, putpkt, remote_notif_get_pending_events): Add
5498         'remote_target' parameter.
5499
5500 2018-05-22  Pedro Alves  <palves@redhat.com>
5501
5502         * remote.c (vcont_builder): Now a class.  Make all data members
5503         private.
5504         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5505         Declare methods.
5506         (vcont_builder_restart): Rename to ...
5507         (vcont_builder::restart): ... this.
5508         (vcont_builder_flush): Rename to ...
5509         (vcont_builder::flush): ... this.
5510         (vcont_builder_push_action): Rename to ...
5511         (vcont_builder::push_action): ... this.
5512         (remote_target::commit_resume): Adjust.
5513
5514 2018-05-22  Pedro Alves  <palves@redhat.com>
5515
5516         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5517         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5518         (get_fixed_memory_packet_size): New.
5519         (get_memory_packet_size): Use it.
5520         (set_memory_packet_size): Don't override the config size with
5521         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5522         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5523         Don't refer to get_memory_packet_size if not connected to a remote
5524         target.  Show "(default)" if configured size is 0.
5525
5526 2018-05-22  Pedro Alves  <palves@redhat.com>
5527
5528         * remote.c (remote_target::mourn_inferior): Move
5529         discard_pending_stop_replies call here from ...
5530         (_initialize_remote): ... here.
5531
5532 2018-05-22  Pedro Alves  <palves@redhat.com>
5533
5534         * remote.c (compare_section_command): Remove set_general_process
5535         call.
5536
5537 2018-05-22  Pedro Alves  <palves@redhat.com>
5538
5539         * remote.c (struct packet_reg, struct remote_arch_state):
5540         Move higher up in the file.
5541         (remote_state) <m_arch_states>: Store remote_arch_state values
5542         instead of remote_arch_state pointers.
5543         (remote_state::get_remote_arch_state): Adjust.
5544
5545 2018-05-22  Pedro Alves  <palves@redhat.com>
5546
5547         * remote.c: Include <unordered_map>.
5548         (remote_state): Now a class.
5549         (remote_state) <get_remote_arch_state>: Declare method.
5550         <get_remote_arch_state>: New field.
5551         (remote_arch_state) <remote_arch_state>: Declare ctor.
5552         <regs>: Now a unique_ptr.
5553         (remote_gdbarch_data_handle): Delete.
5554         (get_remote_arch_state): Delete.
5555         (remote_state::get_remote_arch_state): New.
5556         (get_remote_state): Adjust to call remote_state's
5557         get_remote_arch_state method.
5558         (init_remote_state): Delete, bits factored out to ...
5559         (remote_arch_state::remote_arch_state): ... this new method.
5560         (get_remote_packet_size, get_memory_packet_size)
5561         (process_g_packet, remote_target::fetch_registers)
5562         (remote_target::prepare_to_store, store_registers_using_G)
5563         (remote_target::store_registers, remote_target::get_trace_status):
5564         Adjust to call remote_state's method.
5565         (_initialize_remote): Remove reference to
5566         remote_gdbarch_data_handle.
5567
5568 2018-05-22  Pedro Alves  <palves@redhat.com>
5569
5570         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5571         pread>: New method declarations.
5572         (remote_target::open_1): Adjust.
5573         (readahead_cache_invalidate): Rename to ...
5574         (readahead_cache::invalidate): ... this, and adjust to be a class
5575         method.
5576         (readahead_cache_invalidate_fd): Rename to ...
5577         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5578         class method.
5579         (remote_hostio_pwrite): Adjust.
5580         (remote_hostio_pread_from_cache): Rename to ...
5581         (readahead_cache::pread): ... this, and adjust to be a class
5582         method.
5583         (remote_hostio_close): Adjust.
5584
5585 2018-05-22  Pedro Alves  <palves@redhat.com>
5586
5587         * remote.c (remote_hostio_close_cleanup): Delete.
5588         (class scoped_remote_fd): New.
5589         (remote_file_put, remote_file_get): Use it.
5590
5591 2018-05-22  Pedro Alves  <palves@redhat.com>
5592
5593         (struct vCont_action_support): Use bool and initialize all fields.
5594         (struct readahead_cache): Initialize all fields.
5595         (remote_state): Use bool and initialize all fields.
5596         (remote_state::remote_state, remote_state::~remote_state): New.
5597         (new_remote_state): Delete.
5598         (_initialize_remote): Use new to allocate remote_state.
5599
5600 2018-05-22  Pedro Alves  <palves@redhat.com>
5601             張俊芝  <zjz@zjz.name>
5602
5603         PR gdb/22973
5604         * c-exp.y: Include "c-support.h".
5605         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5606         of tolower.  Use c_ident_is_alpha to scan names.
5607         * c-lang.c: Include "c-support.h".
5608         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5609         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5610         * c-support.h: New file, with bits factored out from ...
5611         * cp-name-parser.y: ... this file.
5612         Include "c-support.h".
5613         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5614         c-support.h and renamed.
5615         (symbol_end, yylex): Adjust.
5616
5617 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5618
5619         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5620         parameter type to CORE_ADDR.
5621         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5622         parameter type in declaration to CORE_ADDR.
5623         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5624         target_auxv_search to get AT_HWCAP and use the result to get the
5625         target description.
5626         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5627         to CORE_ADDR. Remove the cast of the return value to unsigned
5628         long. Fix error predicate of target_auxv_search.
5629         (ppc_linux_nat_target::read_description): Change the type of the
5630         hwcap variable to CORE_ADDR.
5631
5632 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5633
5634         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5635         if the size of fpscr is larger than 32 bits.
5636
5637 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5638
5639         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5640         (ppc32_linux_vsxregmap): New global.
5641         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5642         regcache_supply_regset, and regcache_collect_regset.
5643         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5644         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5645         (fetch_vsx_register, store_vsx_register): Remove.
5646         (fetch_vsx_registers): Add regno parameter. Get regset using
5647         ppc_linux_vsxregset. Use regset to supply registers.
5648         (store_vsx_registers): Add regno parameter. Get regset using
5649         ppc_linux_vsxregset. Use regset to collect registers.
5650         (fetch_register): Call fetch_vsx_registers instead of
5651         fetch_vsx_register.
5652         (store_register): Call store_vsx_registers instead of
5653         store_vsx_register.
5654         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5655         new regno parameter.
5656         (store_ppc_registers): Call store_vsx_registers with -1 for the
5657         new regno parameter.
5658         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5659         (ppc_collect_vsxregset): Remove.
5660
5661 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5662
5663         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5664         offset fields.
5665         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5666         for vector register offset fields.
5667         (ppc64_fbsd_reg_offsets): Likewise.
5668         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5669         to vector register offset fields.
5670         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5671         to vector register offset fields.
5672         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5673         vector register offset fields.
5674         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5675         initializers for vector register offset fields.
5676         (rs6000_aix64_reg_offsets): Likewise.
5677         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5678         (ppc_supply_vrregset): Remove.
5679         (ppc_collect_vrregset): Remove.
5680         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5681         (ppc_linux_vrregset) : New function.
5682         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5683         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5684         (ppc32_linux_vrregset): Remove.
5685         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5686         and use result instead of ppc32_linux_vrregset.
5687         (ppc32_linux_reg_offsets): Remove initializers for vector register
5688         offset fields.
5689         (ppc64_linux_reg_offsets): Likewise.
5690         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5691         * ppc-linux-nat.c: Include regset.h.
5692         (gdb_vrregset_t): Adjust comment to account for little-endian
5693         mode.
5694         (supply_vrregset, fill_vrregset): Remove.
5695         (fetch_altivec_register, store_altivec_register): Remove.
5696         (fetch_altivec_registers): Add regno parameter. Get regset using
5697         ppc_linux_vrregset. Use regset to supply registers.
5698         (store_altivec_registers): Add regno parameter. Get regset using
5699         ppc_linux_vrregset. Use regset to collect registers.
5700         (fetch_register): Call fetch_altivec_registers instead of
5701         fetch_altivec_register.
5702         (store_register): Call store_altivec_registers instead of
5703         store_altivec_register.
5704         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5705         the new regno parameter.
5706         (store_ppc_registers): Call store_altivec_registers with -1 for
5707         the new regno parameter.
5708
5709 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5710
5711         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5712         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5713         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5714         (gdb_vrregset_t): Change array type size to
5715         PPC_LINUX_SIZEOF_VRREGSET.
5716         (gdb_vsxregset_t): Change array type size to
5717         PPC_LINUX_SIZEOF_VSXREGSET.
5718         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5719         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5720         PPC_LINUX_SIZEOF_VSXREGSET.
5721
5722 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5723
5724         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5725         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5726         nat/ppc-linux.c.
5727         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5728         ppc_linux_target_wordsize with tid.
5729         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5730         wordsize with tid.
5731         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5732         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5733         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5734         tid parameter. Remove static specifier.
5735         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5736         (ppc_linux_target_wordsize): New declaration.
5737
5738 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5739
5740         * arch/ppc-linux-common.c: New file.
5741         * arch/ppc-linux-common.h: New file.
5742         * arch/ppc-linux-tdesc.h: New file.
5743         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5744         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5745         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5746         arch/ppc-linux-tdesc.h.
5747         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5748         arch/ppc-linux-tdesc.h.
5749         (ppc_linux_nat_target::read_description): Remove target
5750         description matching code. Fill a ppc_linux_features struct and
5751         call ppc_linux_match_description with it. Move comment about ISA
5752         2.05 to ppc-linux-common.c.
5753         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5754         arch/ppc-linux-tdesc.h.
5755         (ppc_linux_core_read_description): Remove target description
5756         matching code. Fill a ppc_linux_features struct and call
5757         ppc_linux_match_description with it.
5758         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5759         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5760         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5761         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5762         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5763         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5764         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5765         (tdesc_powerpc_e500l): Remove.
5766
5767 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5768
5769         * ada-lang.c (catch_assert_command): Pass empty string instead
5770         of NULL for excep_string argument.
5771
5772 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5773
5774         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5775         the width of the requested register exceeds the width of the
5776         `ptrace' data type.
5777
5778 2018-05-21  Tom Tromey  <tom@tromey.com>
5779
5780         * printcmd.c (output_command): Remove.
5781         (output_command_const): Rename to output_command.
5782         * valprint.h (output_command): Rename from output_command_const.
5783         * tracepoint.c (trace_dump_actions): Call output_command.
5784
5785 2018-05-21  Tom Tromey  <tom@tromey.com>
5786
5787         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5788         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5789         * ada-lang.h (create_ada_exception_catchpoint): Update.
5790         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5791         std::string.
5792         (create_excep_cond_exprs, ~ada_catchpoint)
5793         (should_stop_exception, print_one_exception)
5794         (print_mention_exception, print_recreate_exception): Update.
5795         (ada_get_next_arg): Remove.
5796         (catch_ada_exception_command_split): Use std::string.  Change type
5797         of "excep_string", "cond_string".
5798         (catch_ada_exception_command): Update.
5799         (create_ada_exception_catchpoint): Change type of excep_string.
5800         (ada_exception_sal): Remove excep_string parameter.
5801         (~ada_catchpoint): Remove.
5802
5803 2018-05-21  Tom Tromey  <tom@tromey.com>
5804
5805         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5806         cleanup.
5807
5808 2018-05-21  Tom Tromey  <tom@tromey.com>
5809
5810         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5811         Return unique_xmalloc_ptr.
5812         (print_it_exception): Update.
5813
5814 2018-05-21  Tom Tromey  <tom@tromey.com>
5815
5816         * tracepoint.c (trace_dump_actions): Use std::string.
5817
5818 2018-05-21  Tom Tromey  <tom@tromey.com>
5819
5820         * symfile.c (reread_symbols): Use std::string for original_name.
5821
5822 2018-05-21  Tom Tromey  <tom@tromey.com>
5823
5824         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5825         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5826         constructor.
5827
5828 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5829
5830         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5831         instance to...
5832         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5833         * objfiles.c (get_objfile_bfd_data): Allocate
5834         objfile_per_bfd_storage with obstack_new when allocating on
5835         obstack.
5836
5837 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5838
5839         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5840         OBSTACK_ZALLOC.
5841         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5842         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5843         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5844         (add_pending): Likewise.
5845         (parse_symbol): Likewise.
5846         (parse_partial_symbols): Likewise.
5847         (psymtab_to_symtab_1): Likewise.
5848         (new_psymtab): Likewise.
5849         (elfmdebug_build_psymtabs): Likewise.
5850         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5851         * objfiles.c (get_objfile_bfd_data): Likewise.
5852         (objfile_register_static_link): Likewise.
5853         * psymtab.c (allocate_psymtab): Likewise.
5854         * stabsread.c (read_member_functions): Likewise.
5855         * xcoffread.c (xcoff_end_psymtab): Likewise.
5856
5857 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5858
5859         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5860         compiler supports std::is_trivially_constructible.
5861         * common/poison.h: Include obstack.h.
5862         (IsMallocable): Define to is_trivially_constructible if the
5863         compiler supports it, define to true_type otherwise.
5864         (xobnew): New.
5865         (XOBNEW): Redefine.
5866         (xobnewvec): New.
5867         (XOBNEWVEC): Redefine.
5868         * gdb_obstack.h (obstack_zalloc): New.
5869         (OBSTACK_ZALLOC): Redefine.
5870         (obstack_calloc): New.
5871         (OBSTACK_CALLOC): Redefine.
5872         (obstack_new): New.
5873         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5874         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5875         gdbarch.c.
5876         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5877         obstack_calloc/obstack_zalloc.
5878         (gdbarch_obstack_zalloc): Remove.
5879         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5880
5881 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5882
5883         * stack.c (backtrace_command_1): Remove useless variable int i.
5884
5885 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5886
5887         * stack.c (print_frame_info): Fix comment.
5888
5889 2018-05-18  Tom Tromey  <tom@tromey.com>
5890
5891         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5892         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5893         (~dwarf2_per_objfile): Update
5894         (dwarf2_get_dwz_file): Use new.
5895         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5896         unique_ptr.
5897
5898 2018-05-18  Tom Tromey  <tom@tromey.com>
5899
5900         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5901         unique_ptr.
5902         * dwarf2read.c (struct dwp_file): Add constructor and
5903         initializers.
5904         (open_and_init_dwp_file): Return a unique_ptr.
5905         (dwarf2_per_objfile, create_dwp_hash_table)
5906         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5907         (lookup_dwo_unit_in_dwp): Update.
5908         (open_and_init_dwp_file, get_dwp_file): Update.
5909
5910 2018-05-18  Tom Tromey  <tom@tromey.com>
5911
5912         * dwarf2read.c (dwarf2_per_objfile): Update.
5913         (struct mapped_index): Add initializers.
5914         (dwarf2_read_index): Use new.
5915         (dw2_symtab_iter_init): Update.
5916         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5917         unique_ptr.
5918
5919 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5920
5921         * dwarf2read.c (mapped_index) <total_size>: Remove.
5922
5923 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5924
5925         * unittests/format_pieces-selftests.c (test_format_specifier):
5926         Add ARI comments.
5927
5928 2018-05-18  Tom Tromey  <tom@tromey.com>
5929
5930         * c-typeprint.c (maybe_print_hole): New function.
5931         (c_print_type_struct_field_offset): Update.
5932         (c_type_print_base_struct_union): Call maybe_print_hole.
5933
5934 2018-05-17  Keith Seitz  <keiths@redhat.com>
5935
5936         * breakpoint.c (build_bpstat_chain): New function, moved from
5937         bpstat_stop_status.
5938         (bpstat_stop_status): Add optional parameter, `stop_chain'.
5939         If no stop chain is passed, call build_bpstat_chain to build it.
5940         * breakpoint.h (build_bpstat_chain): Declare.
5941         (bpstat_stop_status): Move documentation here from breakpoint.c.
5942         * infrun.c (handle_signal_stop): Before eliding inlined frames,
5943         build the stop chain and pass it to skip_inline_frames.
5944         Pass this stop chain to bpstat_stop_status.
5945         * inline-frame.c: Include breakpoint.h.
5946         (stopped_by_user_bp_inline_frame): New function.
5947         (skip_inline_frames): Add parameter `stop_chain'.
5948         Move documention to inline-frame.h.
5949         If non-NULL, use stopped_by_user_bp_inline_frame to determine
5950         whether the frame should be elided.
5951         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5952         Add moved documentation and update for new parameter.
5953
5954 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5955
5956         PR cli/14975
5957         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5958         unittests/format_pieces-selftests.c.
5959         * common/format.h (format_piece) <operator==>: New.
5960         (format_pieces) <operator[]>: Remove.
5961         * common/format.c (format_pieces::format_pieces): Handle \e.
5962         * unittests/format_pieces-selftests.c: New.
5963
5964 2018-05-17  Tom Tromey  <tom@tromey.com>
5965
5966         PR symtab/23010:
5967         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5968         (dw2_instantiate_symtab): Add skip_partial parameter.
5969         (dw2_find_last_source_symtab, dw2_map_expand_apply)
5970         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5971         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5972         (dw2_expand_symtabs_matching_one)
5973         (dw2_find_pc_sect_compunit_symtab)
5974         (dw2_debug_names_lookup_symbol)
5975         (dw2_debug_names_expand_symtabs_for_function): Update.
5976         (init_cutu_and_read_dies): Add skip_partial parameter.
5977         (process_psymtab_comp_unit, build_type_psymtabs_1)
5978         (process_skeletonless_type_unit, load_partial_comp_unit)
5979         (psymtab_to_symtab_1): Update.
5980         (load_full_comp_unit): Add skip_partial parameter.
5981         (process_imported_unit_die, dwarf2_read_addr_index)
5982         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5983         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5984         (read_signatured_type): Update.
5985
5986 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5987
5988         * value.c (release_value): Remove unused variable.
5989         (record_latest_value): Likewise.
5990         (access_value_history): Likewise.
5991         (preserve_values): Likewise.
5992
5993 2018-05-17  Tom Tromey  <tom@tromey.com>
5994
5995         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5996         Initialize.
5997
5998 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
5999
6000         PR gdb/22286
6001         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6002         Also handle registers whose width is not a multiple of
6003         PTRACE_TYPE_RET.
6004         (linux_nat_trad_target::store_register): Likewise.
6005
6006 2018-05-16  Tom Tromey  <tom@tromey.com>
6007
6008         * gdbcore.h (core_bfd): Redefine.
6009         * corelow.c (core_target::close): Update.
6010         (core_target_open): Update.
6011         * progspace.h (struct program_space) <cbfd>: Now a
6012         gdb_bfd_ref_ptr.
6013
6014 2018-05-16  Tom Tromey  <tom@tromey.com>
6015
6016         PR cli/19551:
6017         * symfile-add-flags.h (enum symfile_add_flags)
6018         <SYMFILE_NOT_FILENAME>: New constant.
6019         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6020         objfile name from BFD.
6021         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6022         * minidebug.c (find_separate_debug_file_in_section): Put
6023         ".gnu_debugdata" into BFD's file name.
6024
6025 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6026
6027         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6028         Remove.
6029
6030 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6031
6032         PR binutils/21446
6033         * aarch64-tdep.c (aarch64_analyze_prologue,
6034         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6035         Indicate not interested in errors.
6036
6037 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6038
6039         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6040         Supply the MIPS_ZERO_REGNUM register.
6041
6042 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6043
6044         * mips-tdep.c (mask_address_var): Make variable static.
6045
6046 2018-05-14  Tom Tromey  <tom@tromey.com>
6047
6048         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6049
6050 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6051
6052         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6053         FXSAVE_ADDR for the mxcsr register.
6054
6055 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6056
6057         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6058
6059 2018-05-11  Pedro Alves  <palves@redhat.com>
6060
6061         * corelow.c (core_target) <core_target>: No longer inline.
6062         Initialize m_core_gdbarch, m_core_vec and build the section table
6063         here.
6064         <~core_target>: New.
6065         <core_gdbarch, get_core_register_section>: New methods.
6066         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6067         factored out from ...
6068         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6069         (core_ops): Delete.
6070         (sniff_core_bfd): Add gdbarch parameter.
6071         (core_close): Delete, merged into ...
6072         (core_target::close): ... here.  Delete self.
6073         (core_close_cleanup): Delete.
6074         (core_target_open): Allocate a core_target on the heap.  Use a
6075         unique_ptr instead of a cleanup.  Bits moved into the core_target
6076         ctor.  Adjust to use core_target methods instead of globals.
6077         (get_core_register_section): Rename to ...
6078         (core_target::get_core_register_section): ... this and adjust.
6079         (struct get_core_registers_cb_data): New.
6080         (get_core_registers_cb): Use it.  Use bool.
6081         (core_target::fetch_registers, core_target::files_info)
6082         (core_target::xfer_partial, core_target::read_description)
6083         (core_target::pid_to, core_target::thread_name): Adjust to
6084         reference class fields instead of globals.
6085         * target.h (struct target_ops_deleter, target_ops_up): New.
6086
6087 2018-05-11  Pedro Alves  <palves@redhat.com>
6088
6089         * corefile.c (core_file_command): Move to corelow.c.
6090         * corelow.c (the_core_target): Delete.
6091         (core_file_command): Moved from corefile.c.  Check exec_bfd
6092         instead of the_core_target.  Use target_detach instead of calling
6093         into the_core_target directly.
6094         (maybe_say_no_core_file_now): New.
6095         (core_target::detach): Use it.
6096         (_initialize_corelow): Remove references to the_core_target.
6097         * gdbcore.h (the_core_target): Delete.
6098
6099 2018-05-11  Tom Tromey  <tromey@redhat.com>
6100             Pedro Alves  <palves@redhat.com>
6101
6102         * corefile.c (core_bfd): Remove.
6103         * gdbcore.h (core_bfd): Now a macro.
6104         * progspace.h (struct program_space) <cbfd>: New field.
6105
6106 2018-05-11  Tom Tromey  <tom@tromey.com>
6107
6108         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6109         gdb::def_vector.
6110
6111 2018-05-10  Tom Tromey  <tom@tromey.com>
6112
6113         * configure: Rebuild.
6114         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6115
6116 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6117
6118         PR server/23158:
6119         * regformats/regdat.sh: Adjust script, following the addition
6120         of the new expedite_regs parameter to init_target_desc.
6121
6122 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6123     
6124         PR gdb/23127
6125         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6126         set_gdbarch_significant_addr_bit.
6127         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6128         set_gdbarch_significant_addr_bit.
6129         * utils.c (address_significant): Update to sign extend addr.
6130
6131 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6132
6133         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6134         (xtensa_linux_init_abi): Limit tdep->num_regs by
6135         tdep->num_nopriv_regs.
6136         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6137         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6138         not initialized.
6139
6140 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6141
6142         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6143
6144 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6145
6146         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6147         (I387_MXCSR_INIT_VAL): New constant.
6148         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6149         buffer if it was supplied by the inferior.
6150         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6151         (i387_xsave_get_clear_bv): New function.
6152         (i387_supply_xsave): Only read x87 control registers from the
6153         xsave buffer if the feature is enabled, and the state will have
6154         been written, otherwise, provide a suitable default.
6155         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6156         including x87 control registers.  Update control registers if they
6157         have changed from the default value, and mark features as enabled
6158         as required.
6159         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6160
6161 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6162
6163         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6164
6165 2018-05-07  Tom Tromey  <tom@tromey.com>
6166
6167         * configure: Rebuild.
6168         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6169
6170 2018-05-07  Tom Tromey  <tom@tromey.com>
6171
6172         PR tdep/20362:
6173         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6174         bit.  Use correct value for VDIV.
6175
6176 2018-05-04  Tom Tromey  <tom@tromey.com>
6177
6178         * configure: Rebuild.
6179         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6180
6181 2018-05-04  Tom Tromey  <tom@tromey.com>
6182
6183         * linux-record.c (record_linux_system_call) <case
6184         RECORD_SYS_RECVFROM>: Add "break".
6185
6186 2018-05-04  Tom Tromey  <tom@tromey.com>
6187
6188         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6189         Add missing "break".
6190         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6191         Add missing "break".
6192
6193 2018-05-04  Tom Tromey  <tom@tromey.com>
6194
6195         * rs6000-tdep.c (ppc_process_record_op4)
6196         (ppc_process_record_op63): Add fall-through comment.
6197
6198 2018-05-04  Tom Tromey  <tom@tromey.com>
6199
6200         * i386-tdep.c (i386_process_record): Add fall-through comment.
6201
6202 2018-05-04  Tom Tromey  <tom@tromey.com>
6203
6204         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6205         comment.
6206
6207 2018-05-04  Tom Tromey  <tom@tromey.com>
6208
6209         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6210         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6211         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6212         comment.
6213         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6214         comment.
6215         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6216         comment.
6217
6218 2018-05-04  Tom Tromey  <tom@tromey.com>
6219
6220         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6221
6222 2018-05-04  Tom Tromey  <tom@tromey.com>
6223
6224         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6225         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6226         * symfile.c (section_is_mapped): Fix fall-through comment.
6227         * stabsread.c (define_symbol, read_member_functions): Fix
6228         fall-through comment.
6229         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6230         comment.
6231         * remote.c (remote_wait_as): Fix fall-through comment.
6232         * p-exp.y (yylex): Fix fall-through comment.
6233         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6234         comment.
6235         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6236         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6237         * jv-exp.y (yylex): Fix fall-through comment.
6238         * go-exp.y (lex_one_token): Fix fall-through comment.
6239         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6240         fall-through comment.
6241         * f-exp.y (yylex): Fix fall-through comment.
6242         * dwarf2read.c (process_die): Fix fall-through comments.
6243         * dbxread.c (process_one_symbol): Fix fall-through comment.
6244         * d-exp.y (lex_one_token): Fix fall-through comment.
6245         * cp-name-parser.y (yylex): Fix fall-through comment.
6246         * coffread.c (coff_symtab_read): Fix fall-through comment.
6247         * c-exp.y (lex_one_token): Fix fall-through comment.
6248         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6249         comment.
6250         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6251         comment.
6252
6253 2018-05-04  Tom Tromey  <tom@tromey.com>
6254
6255         PR python/22730:
6256         * NEWS: Mention gdb.execute change.
6257         * gdbcmd.h (execute_control_command): Don't declare.
6258         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6259         execute_control_commands, execute_control_commands_to_string.
6260         * cli/cli-script.h (execute_control_commands)
6261         (execute_control_commands_to_string): Declare.
6262         (execute_control_command): Add from_tty parameter.
6263         * cli/cli-script.c (execute_control_commands)
6264         (execute_control_commands_to_string): New functions.
6265         (execute_user_command): Use execute_control_commands.
6266         (execute_control_command_1): Add "from_tty" parameter.  Update.
6267         (execute_control_command): Likewise.
6268
6269 2018-05-04  Tom Tromey  <tom@tromey.com>
6270
6271         PR python/22731:
6272         * NEWS: Mention that breakpoint commands are writable.
6273         * python/py-breakpoint.c (bppy_set_commands): New function.
6274         (breakpoint_object_getset) <"commands">: Use it.
6275
6276 2018-05-04  Tom Tromey  <tom@tromey.com>
6277
6278         * tracepoint.c (actions_command): Update.
6279         * mi/mi-cmd-break.c (mi_command_line_array)
6280         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6281         (mi_read_next_line): Remove.
6282         (mi_cmd_break_commands): Update.
6283         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6284         function_view.
6285         * cli/cli-script.c (get_command_line): Update.
6286         (process_next_line): Use function_view.  Constify.
6287         (recurse_read_control_structure, read_command_lines)
6288         (read_command_lines_1): Change argument types to function_view.
6289         (do_define_command, document_command): Update.
6290         * breakpoint.h (check_tracepoint_command): Don't declare.
6291         * breakpoint.c (check_tracepoint_command): Remove.
6292         (commands_command_1, create_tracepoint_from_upload): Update.
6293
6294 2018-05-04  Tom Tromey  <tom@tromey.com>
6295
6296         PR gdb/11750:
6297         * cli/cli-script.h (enum command_control_type) <define_control>:
6298         New constant.
6299         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6300         (build_command_line, execute_control_command_1)
6301         (process_next_line): Likewise.
6302         (do_define_command): New function, extracted from define_command.
6303         (define_command): Use it.
6304
6305 2018-05-04  Tom Tromey  <tom@tromey.com>
6306
6307         * tracepoint.c (actions_command): Update.
6308         * cli/cli-script.h (read_command_lines): Update.
6309         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6310         (MAX_TMPBUF): Remove define.
6311         (define_command): Use string_printf.
6312         (document_command): Likewise.
6313         * breakpoint.c (commands_command_1): Update.
6314
6315 2018-05-04  Tom Tromey  <tom@tromey.com>
6316
6317         * top.c (execute_command): Update.
6318         * cli/cli-script.h (print_command_lines): Now varargs.
6319         * cli/cli-script.c (print_command_lines): Now varargs.
6320         (execute_control_command_1) <case while_control, case if_control>:
6321         Update.
6322
6323 2018-05-04  Tom Tromey  <tom@tromey.com>
6324
6325         * tracepoint.c (all_tracepoint_actions): Rename from
6326         all_tracepoint_actions_and_cleanup.  Change return type.
6327         (actions_command, encode_actions_1, encode_actions)
6328         (trace_dump_actions, tdump_command): Update.
6329         * remote.c (remote_download_command_source): Update.
6330         * python/python.c (gdbpy_eval_from_control_command)
6331         (python_command, python_interactive_command): Update.
6332         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6333         * guile/guile.c (guile_command)
6334         (gdbscm_eval_from_control_command, guile_command): Update.
6335         * compile/compile.c (compile_code_command)
6336         (compile_print_command, compile_to_object): Update.
6337         * cli/cli-script.h (struct command_lines_deleter): New.
6338         (counted_command_line): New typedef.
6339         (struct command_line): Add constructor, destructor.
6340         <body_list>: Remove.
6341         <body_list_0, body_list_1>: New members.
6342         (command_line_up): Remove typedef.
6343         (read_command_lines, read_command_lines_1, get_command_line):
6344         Update.
6345         (copy_command_lines): Don't declare.
6346         * cli/cli-script.c (build_command_line): Use "new".
6347         (get_command_line): Return counted_command_line.
6348         (print_command_lines, execute_user_command)
6349         (execute_control_command_1, while_command, if_command): Update.
6350         (realloc_body_list): Remove.
6351         (process_next_line, recurse_read_control_structure): Update.
6352         (read_command_lines, read_command_lines_1): Return counted_command_line.
6353         (free_command_lines): Use "delete".
6354         (copy_command_lines): Remove.
6355         (define_command, document_command, show_user_1): Update.
6356         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6357         a counted_command_line.
6358         * breakpoint.h (counted_command_line): Remove typedef.
6359         (breakpoint_set_commands): Update.
6360         * breakpoint.c (check_no_tracepoint_commands)
6361         (validate_commands_for_breakpoint): Update.
6362         (breakpoint_set_commands): Change commands to be a
6363         counted_command_line.
6364         (commands_command_1, update_dprintf_command_list)
6365         (create_tracepoint_from_upload): Update.
6366
6367 2018-05-04  Tom Tromey  <tom@tromey.com>
6368
6369         * cli/cli-decode.h (cmd_list_element): New constructor.
6370         (~cmd_list_element): New destructor.
6371         (struct cmd_list_element): Add initializers.
6372         * cli/cli-decode.c (do_add_cmd): Use "new".
6373         (delete_cmd): Use "delete".
6374
6375 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6376             Pedro Alves <palves@redhat.com>
6377
6378         PR breakpoints/19806 and support for PR external/20207.
6379         * NEWS: Mention Aarch64 watchpoint improvements.
6380         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6381         watchpoints and PR external/20207 watchpoints.
6382         * nat/aarch64-linux-hw-point.c
6383         (kernel_supports_any_contiguous_range): New.
6384         (aarch64_watchpoint_offset): New.
6385         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6386         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6387         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6388         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6389         next_addr_orig_p.  Support PR external/20207 watchpoints.
6390         (aarch64_downgrade_regs): New.
6391         (aarch64_dr_state_insert_one_point): New parameters offset and
6392         addr_orig.
6393         (aarch64_dr_state_remove_one_point): Likewise.
6394         (aarch64_handle_breakpoint): Update caller.
6395         (aarch64_handle_aligned_watchpoint): Likewise.
6396         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6397         aligned_offset.
6398         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6399         aarch64_downgrade_regs.
6400         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6401         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6402         (DR_CONTROL_MASK): ... this.
6403         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6404         (unsigned int aarch64_watchpoint_offset): New prototype.
6405         (aarch64_linux_set_debug_regs): Remove const from state.
6406         * utils.c (align_up, align_down): Move to ...
6407         * common/common-utils.c (align_up, align_down): ... here.
6408         * utils.h (align_up, align_down): Move to ...
6409         * common/common-utils.h (align_up, align_down): ... here.
6410
6411 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6412
6413         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6414         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6415         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6416         Re-implement to match the ABI as summarized in GCC's
6417         gcc/config/sparc/sparc.c.  All callers updated.
6418         (sparc32_store_arguments): Remove assertion.
6419
6420 2018-05-04  Tom Tromey  <tom@tromey.com>
6421
6422         * printcmd.c: Don't include tui.h.
6423         (decode_format): Use skip_spaces.
6424
6425 2018-05-04  Tom Tromey  <tom@tromey.com>
6426
6427         PR gdb/22619:
6428         * printcmd.c (last_count): New global.
6429         (x_command): Use saved count when repeating.
6430
6431 2018-05-04  Tom Tromey  <tom@tromey.com>
6432
6433         * nto-procfs.c (do_closedir_cleanup): Remove.
6434         (procfs_pidlist): Use gdb_dir_up.
6435         * procfs.c (do_closedir_cleanup): Remove.
6436         (proc_update_threads): Use gdb_dir_up.
6437         * common/filestuff.h (struct gdb_dir_deleter): New.
6438         (gdb_dir_up): New typedef.
6439
6440 2018-05-04  Tom Tromey  <tom@tromey.com>
6441
6442         * ada-lang.c (print_mention_exception): Use std::string.
6443
6444 2018-05-04  Tom Tromey  <tom@tromey.com>
6445
6446         * ada-lang.c (create_excep_cond_exprs): Update.
6447         (ada_exception_catchpoint_cond_string): Use std::string.
6448
6449 2018-05-04  Tom Tromey  <tom@tromey.com>
6450
6451         * ada-lang.c (xget_renaming_scope): Return std::string.
6452         (old_renaming_is_invisible): Update.
6453
6454 2018-05-04  Tom Tromey  <tom@tromey.com>
6455
6456         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6457         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6458
6459 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6460
6461         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6462
6463 2018-05-04  Tom Tromey  <tom@tromey.com>
6464
6465         * remote.c (remote_query_supported_append): Change type.
6466         (remote_check_symbols): Update.
6467
6468 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6469
6470         PR gdb/11420
6471         * configure.ac: Prepend libpython.
6472         * python/python-config.py: Likewise.
6473         * configure: Regenerate.
6474
6475 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6476
6477         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6478
6479 2018-05-03  Pedro Alves  <palves@redhat.com>
6480
6481         * s390-linux-nat.c
6482         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6483         override.  Write 'true' instead of '1'.
6484         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6485         declaration.
6486
6487 2018-05-02  Pedro Alves  <palves@redhat.com>
6488
6489         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6490         add_inf_child_target.
6491         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6492         add_inf_child_target.
6493         * aix-thread.c (aix_thread_target_info): New.
6494         (aix_thread_target) <shortname, longname, doc>: Delete.
6495         <info>: New.
6496         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6497         add_inf_child_target.
6498         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6499         add_inf_child_target.
6500         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6501         add_inf_child_target.
6502         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6503         add_inf_child_target.
6504         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6505         add_inf_child_target.
6506         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6507         add_inf_child_target.
6508         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6509         add_inf_child_target.
6510         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6511         add_inf_child_target.
6512         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6513         add_inf_child_target.
6514         * bfd-target.c (target_bfd_target_info): New.
6515         (target_bfd) <shortname, longname, doc>: Delete.
6516         <info>: New.
6517         * bsd-kvm.c (bsd_kvm_target_info): New.
6518         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6519         <info>: New.
6520         (bsd_kvm_target::open): Rename to ...
6521         (bsd_kvm_target_open): ... this.  Adjust.
6522         * bsd-uthread.c (bsd_uthread_target_info): New.
6523         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6524         <info>: New.
6525         * corefile.c (core_file_command): Adjust.
6526         * corelow.c (core_target_info): New.
6527         (core_target) <shortname, longname, doc>: Delete.
6528         <info>: New.
6529         (core_target::open): Rename to ...
6530         (core_target_open): ... this.  Adjust.
6531         * ctf.c (ctf_target_info): New.
6532         (ctf_target) <shortname, longname, doc>: Delete.
6533         <info>: New.
6534         (ctf_target::open): Rename to ...
6535         (ctf_target_open): ... this.
6536         (_initialize_ctf): Adjust.
6537         * exec.c (exec_target_info): New.
6538         (exec_target) <shortname, longname, doc>: Delete.
6539         <info>: New.
6540         (exec_target::open): Rename to ...
6541         (exec_target_open): ... this.
6542         * gdbcore.h (core_target_open): Declare.
6543         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6544         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6545         add_inf_child_target.
6546         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6547         add_inf_child_target.
6548         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6549         add_inf_child_target.
6550         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6551         add_inf_child_target.
6552         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6553         add_inf_child_target.
6554         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6555         add_inf_child_target.
6556         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6557         add_inf_child_target.
6558         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6559         add_inf_child_target.
6560         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6561         add_inf_child_target.
6562         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6563         add_inf_child_target.
6564         * inf-child.c (inf_child_target_info): New.
6565         (inf_child_target::info): New.
6566         (inf_child_open_target): Remove 'target' parameter.  Use
6567         get_native_target instead.
6568         (inf_child_target::open): Delete.
6569         (add_inf_child_target): New.
6570         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6571         Delete.
6572         <info>: New.
6573         (add_inf_child_target): Declare.
6574         (inf_child_open_target): Declare.
6575         * linux-thread-db.c (thread_db_target_info): New.
6576         (thread_db_target) <shortname, longname, doc>: Delete.
6577         <info>: New.
6578         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6579         add_inf_child_target.
6580         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6581         add_inf_child_target.
6582         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6583         add_inf_child_target.
6584         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6585         add_inf_child_target.
6586         * make-target-delegates (print_class): Adjust.
6587         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6588         add_inf_child_target.
6589         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6590         add_inf_child_target.
6591         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6592         add_inf_child_target.
6593         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6594         add_inf_child_target.
6595         * nto-procfs.c (nto_native_target_info): New.
6596         (nto_procfs_target_native) <shortname, longname, doc>:
6597         Delete.
6598         <info>: New.
6599         (nto_procfs_target_info): New.
6600         (nto_procfs_target_procfs) <shortname, longname, doc>:
6601         Delete.
6602         <info>: New.
6603         (init_procfs_targets): Adjust.
6604         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6605         add_inf_child_target.
6606         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6607         add_inf_child_target.
6608         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6609         add_inf_child_target.
6610         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6611         add_inf_child_target.
6612         * ravenscar-thread.c (ravenscar_target_info): New.
6613         (ravenscar_thread_target) <shortname, longname, doc>:
6614         Delete.
6615         <info>: New.
6616         * record-btrace.c (record_btrace_target_info):
6617         (record_btrace_target) <shortname, longname, doc>: Delete.
6618         <info>: New.
6619         (record_btrace_target::open): Rename to ...
6620         (record_btrace_target_open): ... this.  Adjust.
6621         * record-full.c (record_longname, record_doc): New.
6622         (record_full_base_target) <shortname, longname, doc>: Delete.
6623         <info>: New.
6624         (record_full_target_info): New.
6625         (record_full_target): <shortname>: Delete.
6626         <info>: New.
6627         (record_full_core_open_1, record_full_open_1): Update comments.
6628         (record_full_base_target::open): Rename to ...
6629         (record_full_open): ... this.
6630         (cmd_record_full_restore): Update.
6631         (_initialize_record_full): Update.
6632         * remote-sim.c (remote_sim_target_info): New.
6633         (gdbsim_target) <shortname, longname, doc>: Delete.
6634         <info>: New.
6635         (gdbsim_target::open): Rename to ...
6636         (gdbsim_target_open): ... this.
6637         (_initialize_remote_sim): Adjust.
6638         * remote.c (remote_doc): New.
6639         (remote_target_info): New.
6640         (remote_target) <shortname, longname, doc>: Delete.
6641         <info>: New.
6642         (extended_remote_target_info): New.
6643         (extended_remote_target) <shortname, longname, doc>: Delete.
6644         <info>: New.
6645         (remote_target::open_1): Make static.  Adjust.
6646         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6647         * s390-linux-nat.c (_initialize_s390_nat): Use
6648         add_inf_child_target.
6649         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6650         add_inf_child_target.
6651         * sol-thread.c (thread_db_target_info): New.
6652         (sol_thread_target) <shortname, longname, doc>: Delete.
6653         <info>: New.
6654         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6655         add_inf_child_target.
6656         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6657         add_inf_child_target.
6658         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6659         add_inf_child_target.
6660         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6661         add_inf_child_target.
6662         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6663         add_inf_child_target.
6664         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6665         add_inf_child_target.
6666         * spu-linux-nat.c (_initialize_spu_nat): Use
6667         add_inf_child_target.
6668         * spu-multiarch.c (spu_multiarch_target_info): New.
6669         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6670         <info>: New.
6671         * target-delegates.c: Regenerate.
6672         * target.c: Include <unordered_map>.
6673         (target_ops_p): Delete.
6674         (DEF_VEC_P(target_ops_p)): Delete.
6675         (target_factories): New.
6676         (test_target_info): New.
6677         (test_target_ops::info): New.
6678         (open_target): Adjust to use target_factories.
6679         (add_target_with_completer): Rename to ...
6680         (add_target): ... this.  Change prototype.  Register target_info
6681         and open callback in target_factories.  Register target_info in
6682         command context instead of target_ops.
6683         (add_target): Delete old implementation.
6684         (add_deprecated_target_alias): Change prototype.  Adjust.
6685         (the_native_target): New.
6686         (set_native_target, get_native_target): New.
6687         (find_default_run_target): Use the_native_target.
6688         (find_attach_target, find_run_target): Simplify.
6689         (target_ops::open): Delete.
6690         (dummy_target_info): New.
6691         (dummy_target::shortname, dummy_target::longname)
6692         (dummy_target::doc): Delete.
6693         (dummy_target::info): New.
6694         (debug_target::shortname, debug_target::longname)
6695         (debug_target::doc): Delete.
6696         (debug_target::info): New.
6697         * target.h (struct target_info): New.
6698         (target_ops::~target_ops): Add comment.
6699         (target_ops::info): New.
6700         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6701         longer virtual.  Implement in terms of target_info.
6702         (set_native_target, get_native_target): Declare.
6703         (target_open_ftype): New.
6704         (add_target, add_target_with_completer)
6705         (add_deprecated_target_alias): Change prototype.
6706         (test_target) <shortname, longname, doc>: Delete.
6707         <info>: New.
6708         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6709         add_inf_child_target.
6710         * tracefile-tfile.c (tfile_target_info): New.
6711         (tfile_target) <shortname, longname, doc>: Delete.
6712         <info>: New.
6713         (tfile_target::open): Rename to ...
6714         (tfile_target_open): ... this.
6715         (_initialize_tracefile_tfile): Adjust.
6716         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6717         add_inf_child_target.
6718         * windows-nat.c (_initialize_windows_nat): Use
6719         add_inf_child_target.
6720         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6721         add_inf_child_target.
6722
6723 2018-05-02  Pedro Alves  <palves@redhat.com>
6724
6725         * linux-nat.h (linux_nat_target) <low_new_thread,
6726         low_delete_thread, low_new_fork, low_forget_process,
6727         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6728         New virtual methods.
6729         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6730         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6731         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6732         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6733         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6734         Delete.
6735         * linux-fork.c (delete_fork): Adjust to call low method.
6736         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6737         (linux_nat_new_fork, linux_nat_forget_process_hook)
6738         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6739         (linux_nat_status_is_event):
6740         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6741         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6742         to call low method.
6743         (sigtrap_is_event): Rename to ...
6744         (linux_nat_target::low_status_is_event): ... this.
6745         (linux_nat_set_status_is_event): Delete.
6746         (save_stop_reason, linux_nat_wait_1)
6747         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6748         low methods.
6749         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6750         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6751         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6752         (linux_nat_set_prepare_to_resume): Delete.
6753         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6754         low virtual methods.
6755         * amd64-linux-nat.c: Likewise.
6756         * arm-linux-nat.c: Likewise.
6757         * i386-linux-nat.c: Likewise.
6758         * ia64-linux-nat.c: Likewise.
6759         * mips-linux-nat.c: Likewise.
6760         * ppc-linux-nat.c: Likewise.
6761         * s390-linux-nat.c: Likewise.
6762         * sparc64-linux-nat.c: Likewise.
6763         * x86-linux-nat.c: Likewise.
6764         * x86-linux-nat.h: Include "nat/x86-linux.h".
6765         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6766         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6767         Override methods.
6768
6769 2018-05-02  Pedro Alves  <palves@redhat.com>
6770
6771         * target.h (target_ops)
6772         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6773         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6774         stopped_by_watchpoint, have_continuable_watchpoint,
6775         stopped_data_address, watchpoint_addr_within_range,
6776         can_accel_watchpoint_condition, can_run, thread_alive,
6777         has_all_memory, has_memory, has_stack, has_registers,
6778         has_execution, can_async_p, is_async_p, supports_non_stop,
6779         always_non_stop_p, can_execute_reverse, supports_multi_process,
6780         supports_enable_disable_tracepoint,
6781         supports_disable_randomization, supports_string_tracing,
6782         supports_evaluation_of_breakpoint_conditions,
6783         can_run_breakpoint_commands, filesystem_is_local,
6784         can_download_tracepoint, get_trace_state_variable_value,
6785         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6786         record_is_replaying, record_will_replay,
6787         augmented_libraries_svr4_read>: Adjust to return bool.
6788         * aarch64-linux-nat.c: All implementations adjusted.
6789         * aix-thread.c: All implementations adjusted.
6790         * arm-linux-nat.c: All implementations adjusted.
6791         * breakpoint.c: All implementations adjusted.
6792         * bsd-kvm.c: All implementations adjusted.
6793         * bsd-uthread.c: All implementations adjusted.
6794         * corelow.c: All implementations adjusted.
6795         * ctf.c: All implementations adjusted.
6796         * darwin-nat.c: All implementations adjusted.
6797         * darwin-nat.h: All implementations adjusted.
6798         * exec.c: All implementations adjusted.
6799         * fbsd-nat.c: All implementations adjusted.
6800         * fbsd-nat.h: All implementations adjusted.
6801         * gnu-nat.c: All implementations adjusted.
6802         * gnu-nat.h: All implementations adjusted.
6803         * go32-nat.c: All implementations adjusted.
6804         * ia64-linux-nat.c: All implementations adjusted.
6805         * inf-child.c: All implementations adjusted.
6806         * inf-child.h: All implementations adjusted.
6807         * inf-ptrace.c: All implementations adjusted.
6808         * inf-ptrace.h: All implementations adjusted.
6809         * linux-nat.c: All implementations adjusted.
6810         * linux-nat.h: All implementations adjusted.
6811         * mips-linux-nat.c: All implementations adjusted.
6812         * nto-procfs.c: All implementations adjusted.
6813         * ppc-linux-nat.c: All implementations adjusted.
6814         * procfs.c: All implementations adjusted.
6815         * ravenscar-thread.c: All implementations adjusted.
6816         * record-btrace.c: All implementations adjusted.
6817         * record-full.c: All implementations adjusted.
6818         * remote-sim.c: All implementations adjusted.
6819         * remote.c: All implementations adjusted.
6820         * s390-linux-nat.c: All implementations adjusted.
6821         * sol-thread.c: All implementations adjusted.
6822         * spu-multiarch.c: All implementations adjusted.
6823         * target-delegates.c: All implementations adjusted.
6824         * target.c: All implementations adjusted.
6825         * target.h: All implementations adjusted.
6826         * tracefile-tfile.c: All implementations adjusted.
6827         * tracefile.c: All implementations adjusted.
6828         * tracefile.h: All implementations adjusted.
6829         * windows-nat.c: All implementations adjusted.
6830         * x86-linux-nat.h: All implementations adjusted.
6831         * x86-nat.h: All implementations adjusted.
6832
6833 2018-05-02  Pedro Alves  <palves@redhat.com>
6834
6835         * make-target-delegates (scan_target_h): Don't trim lines here.
6836         Replace sequences of tabs and/or whitespace with a single
6837         whitespace.
6838         (top level, parsing methods): Trim each line before processing it
6839         here.
6840
6841 2018-05-02  Pedro Alves  <palves@redhat.com>
6842             John Baldwin  <jhb@freebsd.org>
6843
6844         * target.h (enum strata) <debug_stratum>: New.
6845         (struct target_ops) <all delegation methods>: Replace by C++
6846         virtual methods, and drop "to_" prefix.  All references updated
6847         throughout.
6848         <to_shortname, to_longname, to_doc, to_data,
6849         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6850         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6851         virtual methods.  All references updated throughout.
6852         <can_attach, supports_terminal_ours, can_create_inferior,
6853         get_thread_control_capabilities, attach_no_wait>: New
6854         virtual methods.
6855         <insert_breakpoint, remove_breakpoint>: Now
6856         TARGET_DEFAULT_NORETURN methods.
6857         <info_proc>: Now returns bool.
6858         <to_magic>: Delete.
6859         (OPS_MAGIC): Delete.
6860         (current_target): Delete.  All references replaced by references
6861         to ...
6862         (target_stack): ... this.  New.
6863         (target_shortname, target_longname): Adjust.
6864         (target_can_run): Now a function declaration.
6865         (default_child_has_all_memory, default_child_has_memory)
6866         (default_child_has_stack, default_child_has_registers)
6867         (default_child_has_execution): Remove target_ops parameter.
6868         (complete_target_initialization): Delete.
6869         (memory_breakpoint_target): New template class.
6870         (test_target_ops): Refactor as a C++ class with virtual methods.
6871         * make-target-delegates (NAME_PART): Tighten.
6872         (POINTER_PART, CP_SYMBOL): New.
6873         (SIMPLE_RETURN_PART): Reimplement.
6874         (VEC_RETURN_PART): Expect less.
6875         (RETURN_PART, VIRTUAL_PART): New.
6876         (METHOD): Adjust to C++ virtual methods.
6877         (scan_target_h): Remove reference to C99.
6878         (dname): Output "target_ops::" prefix.
6879         (write_function_header): Adjust to output a C++ class method.
6880         (write_declaration): New.
6881         (write_delegator): Adjust to output a C++ class method.
6882         (tdname): Output "dummy_target::" prefix.
6883         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6884         method.
6885         (tdefault_names, debug_names): Delete.
6886         (return_types, tdefaults, styles, argtypes_array): New.
6887         (top level): All methods are delegators.
6888         (print_class): New.
6889         (top level): Print dummy_target and debug_target classes.
6890         * target-delegates.c: Regenerate.
6891         * target-debug.h (target_debug_print_enum_info_proc_what)
6892         (target_debug_print_thread_control_capabilities)
6893         (target_debug_print_thread_info_p): New.
6894         * target.c (dummy_target): Delete.
6895         (the_dummy_target, the_debug_target): New.
6896         (target_stack): Now extern.
6897         (set_targetdebug): Push/unpush debug target.
6898         (default_child_has_all_memory, default_child_has_memory)
6899         (default_child_has_stack, default_child_has_registers)
6900         (default_child_has_execution): Remove target_ops parameter.
6901         (complete_target_initialization): Delete.
6902         (add_target_with_completer): No longer call
6903         complete_target_initialization.
6904         (target_supports_terminal_ours): Use regular delegation.
6905         (update_current_target): Delete.
6906         (push_target): No longer check magic number.  Don't call
6907         update_current_target.
6908         (unpush_target): Don't call update_current_target.
6909         (target_is_pushed): No longer check magic number.
6910         (target_require_runnable): Skip for all stratums over
6911         process_stratum.
6912         (target_ops::info_proc): New.
6913         (target_info_proc): Use find_target_at and
6914         find_default_run_target.
6915         (target_supports_disable_randomization): Use regular delegation.
6916         (target_get_osdata): Use find_target_at.
6917         (target_ops::open, target_ops::close, target_ops::can_attach)
6918         (target_ops::attach, target_ops::can_create_inferior)
6919         (target_ops::create_inferior, target_ops::can_run)
6920         (target_can_run): New.
6921         (default_fileio_target): Use regular delegation.
6922         (target_ops::fileio_open, target_ops::fileio_pwrite)
6923         (target_ops::fileio_pread, target_ops::fileio_fstat)
6924         (target_ops::fileio_close, target_ops::fileio_unlink)
6925         (target_ops::fileio_readlink): New.
6926         (target_fileio_open_1, target_fileio_unlink)
6927         (target_fileio_readlink): Always call the target method.  Handle
6928         FILEIO_ENOSYS.
6929         (return_zero, return_zero_has_execution): Delete.
6930         (init_dummy_target): Delete.
6931         (dummy_target::dummy_target, dummy_target::shortname)
6932         (dummy_target::longname, dummy_target::doc)
6933         (debug_target::debug_target, debug_target::shortname)
6934         (debug_target::longname, debug_target::doc): New.
6935         (target_supports_delete_record): Use regular delegation.
6936         (setup_target_debug): Delete.
6937         (maintenance_print_target_stack): Skip debug_stratum.
6938         (initialize_targets): Instantiate the_dummy_target and
6939         the_debug_target.
6940         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
6941         use target_stack.
6942         (target_auxv_search, fprint_target_auxv): Adjust.
6943         (info_auxv_command): Adjust to use target_stack.
6944         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6945         * exceptions.c (print_flush): Handle a NULL target_stack.
6946         * regcache.c (target_ops_no_register): Refactor as class with
6947         virtual methods.
6948
6949         * exec.c (exec_target): New class.
6950         (exec_ops): Now an exec_target.
6951         (exec_open, exec_close_1, exec_get_section_table)
6952         (exec_xfer_partial, exec_files_info, exec_has_memory)
6953         (exec_make_note_section): Refactor as exec_target methods.
6954         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6955         Delete.
6956         (exec_target::find_memory_regions): New.
6957         (_initialize_exec): Don't call init_exec_ops.
6958         * gdbcore.h (exec_file_clear): Delete.
6959
6960         * corefile.c (core_target): Delete.
6961         (core_file_command): Adjust.
6962         * corelow.c (core_target): New class.
6963         (the_core_target): New.
6964         (core_close): Remove target_ops parameter.
6965         (core_close_cleanup): Adjust.
6966         (core_target::close): New.
6967         (core_open, core_detach, get_core_registers, core_files_info)
6968         (core_xfer_partial, core_thread_alive, core_read_description)
6969         (core_pid_to_str, core_thread_name, core_has_memory)
6970         (core_has_stack, core_has_registers, core_info_proc): Rework as
6971         core_target methods.
6972         (ignore, core_remove_breakpoint, init_core_ops): Delete.
6973         (_initialize_corelow): Initialize the_core_target.
6974         * gdbcore.h (core_target): Delete.
6975         (the_core_target): New.
6976
6977         * ctf.c: (ctf_target): New class.
6978         (ctf_ops): Now a ctf_target.
6979         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6980         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6981         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6982         methods.
6983         (init_ctf_ops): Delete.
6984         (_initialize_ctf): Don't call it.
6985         * tracefile-tfile.c (tfile_target): New class.
6986         (tfile_ops): Now a tfile_target.
6987         (tfile_open, tfile_close, tfile_files_info)
6988         (tfile_get_tracepoint_status, tfile_trace_find)
6989         (tfile_fetch_registers, tfile_xfer_partial)
6990         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6991         Refactor as tfile_target methods.
6992         (tfile_xfer_partial_features): Remove target_ops parameter.
6993         (init_tfile_ops): Delete.
6994         (_initialize_tracefile_tfile): Don't call it.
6995         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6996         (tracefile_has_stack, tracefile_has_registers)
6997         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6998         tracefile_target methods.
6999         (init_tracefile_ops): Delete.
7000         (tracefile_target::tracefile_target): New.
7001         * tracefile.h: Include "target.h".
7002         (tracefile_target): New class.
7003         (init_tracefile_ops): Delete.
7004
7005         * spu-multiarch.c (spu_multiarch_target): New class.
7006         (spu_ops): Now a spu_multiarch_target.
7007         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7008         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7009         (spu_search_memory, spu_mourn_inferior): Refactor as
7010         spu_multiarch_target methods.
7011         (init_spu_ops): Delete.
7012         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7013         complete_target_initialization.
7014
7015         * ravenscar-thread.c (ravenscar_thread_target): New class.
7016         (ravenscar_ops): Now a ravenscar_thread_target.
7017         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7018         (ravenscar_thread_alive, ravenscar_pid_to_str)
7019         (ravenscar_fetch_registers, ravenscar_store_registers)
7020         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7021         (ravenscar_stopped_by_hw_breakpoint)
7022         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7023         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7024         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7025         methods.
7026         (init_ravenscar_thread_ops): Delete.
7027         (_initialize_ravenscar): Remove references to
7028         init_ravenscar_thread_ops and complete_target_initialization.
7029
7030         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7031         (bsd_uthread_target): New class.
7032         (bsd_uthread_ops): Now a bsd_uthread_target.
7033         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7034         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7035         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7036         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7037         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7038         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7039         (bsd_uthread_target): Delete function.
7040         (_initialize_bsd_uthread): Remove reference to
7041         complete_target_initialization.
7042
7043         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7044         (target_bfd): ... this new class.
7045         (target_bfd_xfer_partial, target_bfd_get_section_table)
7046         (target_bfd_close): Refactor as target_bfd methods.
7047         (target_bfd::~target_bfd): New.
7048         (target_bfd_reopen): Adjust.
7049         (target_bfd::close): New.
7050
7051         * record-btrace.c (record_btrace_target): New class.
7052         (record_btrace_ops): Now a record_btrace_target.
7053         (record_btrace_open, record_btrace_stop_recording)
7054         (record_btrace_disconnect, record_btrace_close)
7055         (record_btrace_async, record_btrace_info)
7056         (record_btrace_insn_history, record_btrace_insn_history_range)
7057         (record_btrace_insn_history_from, record_btrace_call_history)
7058         (record_btrace_call_history_range)
7059         (record_btrace_call_history_from, record_btrace_record_method)
7060         (record_btrace_is_replaying, record_btrace_will_replay)
7061         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7062         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7063         (record_btrace_store_registers, record_btrace_prepare_to_store)
7064         (record_btrace_to_get_unwinder)
7065         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7066         (record_btrace_commit_resume, record_btrace_wait)
7067         (record_btrace_stop, record_btrace_can_execute_reverse)
7068         (record_btrace_stopped_by_sw_breakpoint)
7069         (record_btrace_supports_stopped_by_sw_breakpoint)
7070         (record_btrace_stopped_by_hw_breakpoint)
7071         (record_btrace_supports_stopped_by_hw_breakpoint)
7072         (record_btrace_update_thread_list, record_btrace_thread_alive)
7073         (record_btrace_goto_begin, record_btrace_goto_end)
7074         (record_btrace_goto, record_btrace_stop_replaying_all)
7075         (record_btrace_execution_direction)
7076         (record_btrace_prepare_to_generate_core)
7077         (record_btrace_done_generating_core): Refactor as
7078         record_btrace_target methods.
7079         (init_record_btrace_ops): Delete.
7080         (_initialize_record_btrace): Remove reference to
7081         init_record_btrace_ops.
7082         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7083         the execution_direction global.
7084         (record_full_base_target, record_full_target)
7085         (record_full_core_target): New classes.
7086         (record_full_ops): Now a record_full_target.
7087         (record_full_core_ops): Now a record_full_core_target.
7088         (record_full_target::detach, record_full_target::disconnect)
7089         (record_full_core_target::disconnect)
7090         (record_full_target::mourn_inferior, record_full_target::kill):
7091         New.
7092         (record_full_open, record_full_close, record_full_async): Refactor
7093         as methods of the record_full_base_target class.
7094         (record_full_resume, record_full_commit_resume): Refactor
7095         as methods of the record_full_target class.
7096         (record_full_wait, record_full_stopped_by_watchpoint)
7097         (record_full_stopped_data_address)
7098         (record_full_stopped_by_sw_breakpoint)
7099         (record_full_supports_stopped_by_sw_breakpoint)
7100         (record_full_stopped_by_hw_breakpoint)
7101         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7102         methods of the record_full_base_target class.
7103         (record_full_store_registers, record_full_xfer_partial)
7104         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7105         Refactor as methods of the record_full_target class.
7106         (record_full_can_execute_reverse, record_full_get_bookmark)
7107         (record_full_goto_bookmark, record_full_execution_direction)
7108         (record_full_record_method, record_full_info, record_full_delete)
7109         (record_full_is_replaying, record_full_will_replay)
7110         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7111         (record_full_stop_replaying): Refactor as methods of the
7112         record_full_base_target class.
7113         (record_full_core_resume, record_full_core_kill)
7114         (record_full_core_fetch_registers)
7115         (record_full_core_prepare_to_store)
7116         (record_full_core_store_registers, record_full_core_xfer_partial)
7117         (record_full_core_insert_breakpoint)
7118         (record_full_core_remove_breakpoint)
7119         (record_full_core_has_execution): Refactor
7120         as methods of the record_full_core_target class.
7121         (record_full_base_target::supports_delete_record): New.
7122         (init_record_full_ops): Delete.
7123         (init_record_full_core_ops): Delete.
7124         (record_full_save): Refactor as method of the
7125         record_full_base_target class.
7126         (_initialize_record_full): Remove references to
7127         init_record_full_ops and init_record_full_core_ops.
7128
7129         * remote.c (remote_target, extended_remote_target): New classes.
7130         (remote_ops): Now a remote_target.
7131         (extended_remote_ops): Now an extended_remote_target.
7132         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7133         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7134         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7135         (remote_pass_signals, remote_set_syscall_catchpoint)
7136         (remote_program_signals, )
7137         (remote_thread_always_alive): Remove target_ops parameter.
7138         (remote_thread_alive, remote_thread_name)
7139         (remote_update_thread_list, remote_threads_extra_info)
7140         (remote_static_tracepoint_marker_at)
7141         (remote_static_tracepoint_markers_by_strid)
7142         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7143         (remote_open): Refactor as methods of remote_target.
7144         (extended_remote_open, extended_remote_detach)
7145         (extended_remote_attach, extended_remote_post_attach):
7146         (extended_remote_supports_disable_randomization)
7147         (extended_remote_create_inferior): : Refactor as method of
7148         extended_remote_target.
7149         (remote_set_permissions, remote_open_1, remote_detach)
7150         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7151         (remote_resume, remote_commit_resume, remote_stop)
7152         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7153         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7154         (remote_prepare_to_store, remote_store_registers)
7155         (remote_flash_erase, remote_flash_done, remote_files_info)
7156         (remote_kill, remote_mourn, remote_insert_breakpoint)
7157         (remote_remove_breakpoint, remote_insert_watchpoint)
7158         (remote_watchpoint_addr_within_range)
7159         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7160         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7161         (remote_supports_stopped_by_sw_breakpoint)
7162         (remote_stopped_by_hw_breakpoint)
7163         (remote_supports_stopped_by_hw_breakpoint)
7164         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7165         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7166         (remote_verify_memory): Refactor as methods of remote_target.
7167         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7168         parameter.
7169         (remote_xfer_partial, remote_get_memory_xfer_limit)
7170         (remote_search_memory, remote_rcmd, remote_memory_map)
7171         (remote_pid_to_str, remote_get_thread_local_address)
7172         (remote_get_tib_address, remote_read_description): Refactor as
7173         methods of remote_target.
7174         (remote_target::fileio_open, remote_target::fileio_pwrite)
7175         (remote_target::fileio_pread, remote_target::fileio_close): New.
7176         (remote_hostio_readlink, remote_hostio_fstat)
7177         (remote_filesystem_is_local, remote_can_execute_reverse)
7178         (remote_supports_non_stop, remote_supports_disable_randomization)
7179         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7180         (remote_supports_enable_disable_tracepoint)
7181         (remote_supports_string_tracing)
7182         (remote_can_run_breakpoint_commands, remote_trace_init)
7183         (remote_download_tracepoint, remote_can_download_tracepoint)
7184         (remote_download_trace_state_variable, remote_enable_tracepoint)
7185         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7186         (remote_trace_start, remote_get_trace_status)
7187         (remote_get_tracepoint_status, remote_trace_stop)
7188         (remote_trace_find, remote_get_trace_state_variable_value)
7189         (remote_save_trace_data, remote_get_raw_trace_data)
7190         (remote_set_disconnected_tracing, remote_core_of_thread)
7191         (remote_set_circular_trace_buffer, remote_traceframe_info)
7192         (remote_get_min_fast_tracepoint_insn_len)
7193         (remote_set_trace_buffer_size, remote_set_trace_notes)
7194         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7195         (remote_disable_btrace, remote_teardown_btrace)
7196         (remote_read_btrace, remote_btrace_conf)
7197         (remote_augmented_libraries_svr4_read, remote_load)
7198         (remote_pid_to_exec_file, remote_can_do_single_step)
7199         (remote_execution_direction, remote_thread_handle_to_thread_info):
7200         Refactor as methods of remote_target.
7201         (init_remote_ops, init_extended_remote_ops): Delete.
7202         (remote_can_async_p, remote_is_async_p, remote_async)
7203         (remote_thread_events, remote_upload_tracepoints)
7204         (remote_upload_trace_state_variables): Refactor as methods of
7205         remote_target.
7206         (_initialize_remote): Remove references to init_remote_ops and
7207         init_extended_remote_ops.
7208
7209         * remote-sim.c (gdbsim_target): New class.
7210         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7211         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7212         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7213         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7214         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7215         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7216         Refactor as methods of gdbsim_target.
7217         (gdbsim_ops): Now a gdbsim_target.
7218         (init_gdbsim_ops): Delete.
7219         (gdbsim_cntrl_c): Adjust.
7220         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7221
7222         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7223         (the_amd64_linux_nat_target): New.
7224         (amd64_linux_fetch_inferior_registers)
7225         (amd64_linux_store_inferior_registers): Refactor as methods of
7226         amd64_linux_nat_target.
7227         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7228         * i386-linux-nat.c: Don't include "linux-nat.h".
7229         (i386_linux_nat_target): New class.
7230         (the_i386_linux_nat_target): New.
7231         (i386_linux_fetch_inferior_registers)
7232         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7233         as methods of i386_linux_nat_target.
7234         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7235         * inf-child.c (inf_child_ops): Delete.
7236         (inf_child_fetch_inferior_registers)
7237         (inf_child_store_inferior_registers): Delete.
7238         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7239         methods of inf_child_target.
7240         (inf_child_target::supports_terminal_ours)
7241         (inf_child_target::terminal_init)
7242         (inf_child_target::terminal_inferior)
7243         (inf_child_target::terminal_ours_for_output)
7244         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7245         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7246         New.
7247         (inf_child_open, inf_child_disconnect, inf_child_close)
7248         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7249         (inf_child_post_startup_inferior, inf_child_can_run)
7250         (inf_child_pid_to_exec_file): Refactor as methods of
7251         inf_child_target.
7252         (inf_child_follow_fork): Delete.
7253         (inf_child_target::can_create_inferior)
7254         (inf_child_target::can_attach): New.
7255         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7256         (inf_child_target::has_stack, inf_child_target::has_registers)
7257         (inf_child_target::has_execution): New.
7258         (inf_child_fileio_open, inf_child_fileio_pwrite)
7259         (inf_child_fileio_pread, inf_child_fileio_fstat)
7260         (inf_child_fileio_close, inf_child_fileio_unlink)
7261         (inf_child_fileio_readlink, inf_child_use_agent)
7262         (inf_child_can_use_agent): Refactor as methods of
7263         inf_child_target.
7264         (return_zero, inf_child_target): Delete.
7265         (inf_child_target::inf_child_target): New.
7266         * inf-child.h: Include "target.h".
7267         (inf_child_target): Delete function prototype.
7268         (inf_child_target): New class.
7269         (inf_child_open_target, inf_child_mourn_inferior)
7270         (inf_child_maybe_unpush_target): Delete.
7271         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7272         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7273         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7274         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7275         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7276         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7277         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7278         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7279         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7280         methods of inf_ptrace_target.
7281         (inf_ptrace_target): Delete function.
7282         * inf-ptrace.h: Include "inf-child.h".
7283         (inf_ptrace_target): Delete function declaration.
7284         (inf_ptrace_target): New class.
7285         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7286         * linux-nat.c (linux_target): New.
7287         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7288         (linux_nat_target::~linux_nat_target): New.
7289         (linux_child_post_attach, linux_child_post_startup_inferior)
7290         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7291         (linux_child_remove_fork_catchpoint)
7292         (linux_child_insert_vfork_catchpoint)
7293         (linux_child_remove_vfork_catchpoint)
7294         (linux_child_insert_exec_catchpoint)
7295         (linux_child_remove_exec_catchpoint)
7296         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7297         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7298         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7299         (linux_nat_stopped_data_address)
7300         (linux_nat_stopped_by_sw_breakpoint)
7301         (linux_nat_supports_stopped_by_sw_breakpoint)
7302         (linux_nat_stopped_by_hw_breakpoint)
7303         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7304         (linux_nat_kill, linux_nat_mourn_inferior)
7305         (linux_nat_xfer_partial, linux_nat_thread_alive)
7306         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7307         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7308         (linux_child_static_tracepoint_markers_by_strid)
7309         (linux_nat_is_async_p, linux_nat_can_async_p)
7310         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7311         (linux_nat_supports_multi_process)
7312         (linux_nat_supports_disable_randomization, linux_nat_async)
7313         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7314         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7315         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7316         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7317         methods of linux_nat_target.
7318         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7319         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7320         parameter.
7321         (check_stopped_by_watchpoint): Adjust.
7322         (linux_xfer_partial): Delete.
7323         (linux_target_install_ops, linux_target, linux_nat_add_target):
7324         Delete.
7325         (linux_nat_target::linux_nat_target): New.
7326         * linux-nat.h: Include "inf-ptrace.h".
7327         (linux_nat_target): New.
7328         (linux_target, linux_target_install_ops, linux_nat_add_target):
7329         Delete function declarations.
7330         (linux_target): Declare global.
7331         * linux-thread-db.c (thread_db_target): New.
7332         (thread_db_target::thread_db_target): New.
7333         (thread_db_ops): Delete.
7334         (the_thread_db_target): New.
7335         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7336         (thread_db_update_thread_list, thread_db_pid_to_str)
7337         (thread_db_extra_thread_info)
7338         (thread_db_thread_handle_to_thread_info)
7339         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7340         (thread_db_resume): Refactor as methods of thread_db_target.
7341         (init_thread_db_ops): Delete.
7342         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7343         * x86-linux-nat.c: Don't include "linux-nat.h".
7344         (super_post_startup_inferior): Delete.
7345         (x86_linux_nat_target::~x86_linux_nat_target): New.
7346         (x86_linux_child_post_startup_inferior)
7347         (x86_linux_read_description, x86_linux_enable_btrace)
7348         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7349         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7350         methods of x86_linux_nat_target.
7351         (x86_linux_create_target): Delete.  Bits folded ...
7352         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7353         pointer.
7354         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7355         (x86_linux_nat_target): New class.
7356         (x86_linux_create_target): Delete.
7357         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7358         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7359         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7360         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7361         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7362         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7363         make extern.
7364         (x86_use_watchpoints): Delete.
7365         * x86-nat.h: Include "breakpoint.h" and "target.h".
7366         (x86_use_watchpoints): Delete.
7367         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7368         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7369         (x86_insert_watchpoint, x86_remove_watchpoint)
7370         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7371         (x86_stopped_by_hw_breakpoint): New declarations.
7372         (x86_nat_target): New template class.
7373
7374         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7375         (the_ppc_linux_nat_target): New.
7376         (ppc_linux_fetch_inferior_registers)
7377         (ppc_linux_can_use_hw_breakpoint)
7378         (ppc_linux_region_ok_for_hw_watchpoint)
7379         (ppc_linux_ranged_break_num_registers)
7380         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7381         (ppc_linux_insert_mask_watchpoint)
7382         (ppc_linux_remove_mask_watchpoint)
7383         (ppc_linux_can_accel_watchpoint_condition)
7384         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7385         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7386         (ppc_linux_watchpoint_addr_within_range)
7387         (ppc_linux_masked_watch_num_registers)
7388         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7389         (ppc_linux_read_description): Refactor as methods of
7390         ppc_linux_nat_target.
7391         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7392
7393         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7394         (procfs_target): New class.
7395         (the_procfs_target): New.
7396         (procfs_target): Delete function.
7397         (procfs_auxv_parse, procfs_attach, procfs_detach)
7398         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7399         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7400         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7401         (procfs_create_inferior, procfs_update_thread_list)
7402         (procfs_thread_alive, procfs_pid_to_str)
7403         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7404         (procfs_stopped_data_address, procfs_insert_watchpoint)
7405         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7406         (proc_find_memory_regions, procfs_info_proc)
7407         (procfs_make_note_section): Refactor as methods of procfs_target.
7408         (_initialize_procfs): Adjust.
7409         * sol-thread.c (sol_thread_target): New class.
7410         (sol_thread_ops): Now a sol_thread_target.
7411         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7412         (sol_thread_fetch_registers, sol_thread_store_registers)
7413         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7414         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7415         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7416         (init_sol_thread_ops): Delete.
7417         (_initialize_sol_thread): Adjust.  Remove references to
7418         init_sol_thread_ops and complete_target_initialization.
7419
7420         * windows-nat.c (windows_nat_target): New class.
7421         (windows_fetch_inferior_registers)
7422         (windows_store_inferior_registers, windows_resume, windows_wait)
7423         (windows_attach, windows_detach, windows_pid_to_exec_file)
7424         (windows_files_info, windows_create_inferior)
7425         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7426         (windows_close, windows_pid_to_str, windows_xfer_partial)
7427         (windows_get_tib_address, windows_get_ada_task_ptid)
7428         (windows_thread_name, windows_thread_alive): Refactor as
7429         windows_nat_target methods.
7430         (do_initial_windows_stuff): Adjust.
7431         (windows_target): Delete function.
7432         (_initialize_windows_nat): Adjust.
7433
7434         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7435         (darwin_mourn_inferior, darwin_kill_inferior)
7436         (darwin_create_inferior, darwin_attach, darwin_detach)
7437         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7438         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7439         (darwin_supports_multi_process): Refactor as darwin_nat_target
7440         methods.
7441         (darwin_resume_to, darwin_files_info): Delete.
7442         (_initialize_darwin_inferior): Rename to ...
7443         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7444         * darwin-nat.h: Include "inf-child.h".
7445         (darwin_nat_target): New class.
7446         (darwin_complete_target): Delete.
7447         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7448         (darwin_target): New.
7449         (i386_darwin_fetch_inferior_registers)
7450         (i386_darwin_store_inferior_registers): Refactor as methods of
7451         darwin_nat_target.
7452         (darwin_complete_target): Delete, with ...
7453         (_initialize_i386_darwin_nat): ... bits factored out here.
7454
7455         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7456         (the_alpha_linux_nat_target): New.
7457         (alpha_linux_register_u_offset): Refactor as
7458         alpha_linux_nat_target method.
7459         (_initialize_alpha_linux_nat): Adjust.
7460         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7461         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7462         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7463         methods of linux_nat_trad_target.
7464         (linux_trad_target): Delete.
7465         * linux-nat-trad.h (linux_trad_target): Delete function.
7466         (linux_nat_trad_target): New class.
7467         * mips-linux-nat.c (mips_linux_nat_target): New class.
7468         (super_fetch_registers, super_store_registers, super_close):
7469         Delete.
7470         (the_mips_linux_nat_target): New.
7471         (mips64_linux_regsets_fetch_registers)
7472         (mips64_linux_regsets_store_registers)
7473         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7474         (mips_linux_register_u_offset, mips_linux_read_description)
7475         (mips_linux_can_use_hw_breakpoint)
7476         (mips_linux_stopped_by_watchpoint)
7477         (mips_linux_stopped_data_address)
7478         (mips_linux_region_ok_for_hw_watchpoint)
7479         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7480         (mips_linux_close): Refactor as methods of mips_linux_nat.
7481         (_initialize_mips_linux_nat): Adjust to C++ification.
7482
7483         * aix-thread.c (aix_thread_target): New class.
7484         (aix_thread_ops): Now an aix_thread_target.
7485         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7486         (aix_thread_fetch_registers, aix_thread_store_registers)
7487         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7488         (aix_thread_thread_alive, aix_thread_pid_to_str)
7489         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7490         Refactor as methods of aix_thread_target.
7491         (init_aix_thread_ops): Delete.
7492         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7493         and complete_target_initialization.
7494         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7495         (rs6000_nat_target): New class.
7496         (the_rs6000_nat_target): New.
7497         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7498         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7499         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7500         (super_create_inferior): Delete.
7501         (_initialize_rs6000_nat): Adjust to C++ification.
7502
7503         * arm-linux-nat.c (arm_linux_nat_target): New class.
7504         (the_arm_linux_nat_target): New.
7505         (arm_linux_fetch_inferior_registers)
7506         (arm_linux_store_inferior_registers, arm_linux_read_description)
7507         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7508         (arm_linux_remove_hw_breakpoint)
7509         (arm_linux_region_ok_for_hw_watchpoint)
7510         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7511         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7512         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7513         arm_linux_nat_target.
7514         (_initialize_arm_linux_nat): Adjust to C++ification.
7515
7516         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7517         (the_aarch64_linux_nat_target): New.
7518         (aarch64_linux_fetch_inferior_registers)
7519         (aarch64_linux_store_inferior_registers)
7520         (aarch64_linux_child_post_startup_inferior)
7521         (aarch64_linux_read_description)
7522         (aarch64_linux_can_use_hw_breakpoint)
7523         (aarch64_linux_insert_hw_breakpoint)
7524         (aarch64_linux_remove_hw_breakpoint)
7525         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7526         (aarch64_linux_region_ok_for_hw_watchpoint)
7527         (aarch64_linux_stopped_data_address)
7528         (aarch64_linux_stopped_by_watchpoint)
7529         (aarch64_linux_watchpoint_addr_within_range)
7530         (aarch64_linux_can_do_single_step): Refactor as methods of
7531         aarch64_linux_nat_target.
7532         (super_post_startup_inferior): Delete.
7533         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7534
7535         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7536         (the_hppa_linux_nat_target): New.
7537         (hppa_linux_fetch_inferior_registers)
7538         (hppa_linux_store_inferior_registers): Refactor as methods of
7539         hppa_linux_nat_target.
7540         (_initialize_hppa_linux_nat): Adjust to C++ification.
7541
7542         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7543         (the_ia64_linux_nat_target): New.
7544         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7545         (ia64_linux_stopped_data_address)
7546         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7547         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7548         ia64_linux_nat_target methods.
7549         (super_xfer_partial): Delete.
7550         (_initialize_ia64_linux_nat): Adjust to C++ification.
7551
7552         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7553         (the_m32r_linux_nat_target): New.
7554         (m32r_linux_fetch_inferior_registers)
7555         (m32r_linux_store_inferior_registers): Refactor as
7556         m32r_linux_nat_target methods.
7557         (_initialize_m32r_linux_nat): Adjust to C++ification.
7558
7559         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7560         (the_m68k_linux_nat_target): New.
7561         (m68k_linux_fetch_inferior_registers)
7562         (m68k_linux_store_inferior_registers): Refactor as
7563         m68k_linux_nat_target methods.
7564         (_initialize_m68k_linux_nat): Adjust to C++ification.
7565
7566         * s390-linux-nat.c (s390_linux_nat_target): New class.
7567         (the_s390_linux_nat_target): New.
7568         (s390_linux_fetch_inferior_registers)
7569         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7570         (s390_insert_watchpoint, s390_remove_watchpoint)
7571         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7572         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7573         (s390_auxv_parse, s390_read_description): Refactor as methods of
7574         s390_linux_nat_target.
7575         (_initialize_s390_nat): Adjust to C++ification.
7576
7577         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7578         (the_sparc_linux_nat_target): New.
7579         (_initialize_sparc_linux_nat): Adjust to C++ification.
7580         * sparc-nat.c (sparc_fetch_inferior_registers)
7581         (sparc_store_inferior_registers): Remove target_ops parameter.
7582         * sparc-nat.h (sparc_fetch_inferior_registers)
7583         (sparc_store_inferior_registers): Remove target_ops parameter.
7584         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7585         (the_sparc64_linux_nat_target): New.
7586         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7587
7588         * spu-linux-nat.c (spu_linux_nat_target): New class.
7589         (the_spu_linux_nat_target): New.
7590         (spu_child_post_startup_inferior, spu_child_post_attach)
7591         (spu_child_wait, spu_fetch_inferior_registers)
7592         (spu_store_inferior_registers, spu_xfer_partial)
7593         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7594         methods.
7595         (_initialize_spu_nat): Adjust to C++ification.
7596
7597         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7598         (the_tilegx_linux_nat_target): New.
7599         (fetch_inferior_registers, store_inferior_registers):
7600         Refactor as methods.
7601         (_initialize_tile_linux_nat): Adjust to C++ification.
7602
7603         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7604         (the_xtensa_linux_nat_target): New.
7605         (xtensa_linux_fetch_inferior_registers)
7606         (xtensa_linux_store_inferior_registers): Refactor as
7607         xtensa_linux_nat_target methods.
7608         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7609
7610         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7611         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7612         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7613         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7614         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7615         (fbsd_stopped_by_sw_breakpoint)
7616         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7617         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7618         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7619         (fbsd_post_startup_inferior, fbsd_post_attach)
7620         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7621         (fbsd_set_syscall_catchpoint)
7622         (super_xfer_partial, super_resume, super_wait)
7623         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7624         (fbsd_handle_debug_trap): Remove target_ops parameter.
7625         (fbsd_nat_add_target): Delete.
7626         * fbsd-nat.h: Include "inf-ptrace.h".
7627         (fbsd_nat_add_target): Delete.
7628         (USE_SIGTRAP_SIGINFO): Define.
7629         (fbsd_nat_target): New class.
7630
7631         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7632         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7633         (amd64bsd_target): Delete.
7634         * amd64-bsd-nat.h: New file.
7635         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7636         "x86-bsd-nat.h".
7637         (amd64_fbsd_nat_target): New class.
7638         (the_amd64_fbsd_nat_target): New.
7639         (amd64fbsd_read_description): Refactor as method of
7640         amd64_fbsd_nat_target.
7641         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7642         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7643         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7644         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7645         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7646         (i386bsd_target): Delete.
7647         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7648         (i386bsd_fetch_inferior_registers)
7649         (i386bsd_store_inferior_registers): Declare.
7650         (i386_bsd_nat_target): New class.
7651         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7652         (the_i386_fbsd_nat_target): New.
7653         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7654         i386_fbsd_nat_target methods.
7655         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7656         (_initialize_i386fbsd_nat): Adjust to C++ification.
7657         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7658         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7659         (_initialize_x86_bsd_nat): Adjust to C++ification.
7660         * x86-bsd-nat.h: Include "x86-nat.h".
7661         (x86bsd_target): Delete declaration.
7662         (x86bsd_nat_target): New class.
7663
7664         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7665         (the_aarch64_fbsd_nat_target): New.
7666         (aarch64_fbsd_fetch_inferior_registers)
7667         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7668         aarch64_fbsd_nat_target.
7669         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7670         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7671         (the_alpha_bsd_nat_target): New.
7672         (alphabsd_fetch_inferior_registers)
7673         (alphabsd_store_inferior_registers): Refactor as
7674         alpha_bsd_nat_target methods.
7675         (_initialize_alphabsd_nat): Refactor as methods of
7676         alpha_bsd_nat_target.
7677         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7678         (the_amd64_nbsd_nat_target): New.
7679         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7680         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7681         (the_amd64_obsd_nat_target): New.
7682         (_initialize_amd64obsd_nat): Adjust to C++ification.
7683         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7684         (the_arm_fbsd_nat_target): New.
7685         (arm_fbsd_fetch_inferior_registers)
7686         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7687         (_initialize_arm_fbsd_nat): Refactor as methods of
7688         arm_fbsd_nat_target.
7689         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7690         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7691         (the_arm_netbsd_nat_target): New.
7692         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7693         arm_netbsd_nat_target.
7694         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7695         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7696         (the_hppa_nbsd_nat_target): New.
7697         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7698         hppa_nbsd_nat_target methods.
7699         (_initialize_hppanbsd_nat): Adjust to C++ification.
7700         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7701         (the_hppa_obsd_nat_target): New.
7702         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7703         methods of hppa_obsd_nat_target.
7704         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7705         add_target.
7706         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7707         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7708         add_target.
7709         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7710         (_initialize_i386obsd_nat): Use add_target.
7711         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7712         (the_m68k_bsd_nat_target): New.
7713         (m68kbsd_fetch_inferior_registers)
7714         (m68kbsd_store_inferior_registers): Refactor as methods of
7715         m68k_bsd_nat_target.
7716         (_initialize_m68kbsd_nat): Adjust to C++ification.
7717         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7718         (the_mips_fbsd_nat_target): New.
7719         (mips_fbsd_fetch_inferior_registers)
7720         (mips_fbsd_store_inferior_registers): Refactor as methods of
7721         mips_fbsd_nat_target.
7722         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7723         add_target.
7724         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7725         (the_mips_nbsd_nat_target): New.
7726         (mipsnbsd_fetch_inferior_registers)
7727         (mipsnbsd_store_inferior_registers): Refactor as methods of
7728         mips_nbsd_nat_target.
7729         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7730         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7731         (the_mips64_obsd_nat_target): New.
7732         (mips64obsd_fetch_inferior_registers)
7733         (mips64obsd_store_inferior_registers): Refactor as methods of
7734         mips64_obsd_nat_target.
7735         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7736         add_target.
7737         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7738         nbsd_nat_target.
7739         * nbsd-nat.h: Include "inf-ptrace.h".
7740         (nbsd_nat_target): New class.
7741         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7742         (obsd_wait): Refactor as methods of obsd_nat_target.
7743         (obsd_add_target): Delete.
7744         * obsd-nat.h: Include "inf-ptrace.h".
7745         (obsd_nat_target): New class.
7746         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7747         (the_ppc_fbsd_nat_target): New.
7748         (ppcfbsd_fetch_inferior_registers)
7749         (ppcfbsd_store_inferior_registers): Refactor as methods of
7750         ppc_fbsd_nat_target.
7751         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7752         add_target.
7753         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7754         (the_ppc_nbsd_nat_target): New.
7755         (ppcnbsd_fetch_inferior_registers)
7756         (ppcnbsd_store_inferior_registers): Refactor as methods of
7757         ppc_nbsd_nat_target.
7758         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7759         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7760         (the_ppc_obsd_nat_target): New.
7761         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7762         methods of ppc_obsd_nat_target.
7763         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7764         add_target.
7765         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7766         (the_sh_nbsd_nat_target): New.
7767         (shnbsd_fetch_inferior_registers)
7768         (shnbsd_store_inferior_registers): Refactor as methods of
7769         sh_nbsd_nat_target.
7770         (_initialize_shnbsd_nat): Adjust to C++ification.
7771         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7772         (inf_ptrace_xfer_partial): Delete.
7773         (sparc_xfer_partial, sparc_target): Delete.
7774         * sparc-nat.h (sparc_fetch_inferior_registers)
7775         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7776         (sparc_target): Delete function declaration.
7777         (sparc_target): New template class.
7778         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7779         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7780         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7781         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7782         add_target.
7783         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7784         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7785         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7786         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7787         add_target.
7788         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7789         (the_vax_bsd_nat_target): New.
7790         (vaxbsd_fetch_inferior_registers)
7791         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7792         methods.
7793         (_initialize_vaxbsd_nat): Adjust to C++ification.
7794
7795         * bsd-kvm.c (bsd_kvm_target): New class.
7796         (bsd_kvm_ops): Now a bsd_kvm_target.
7797         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7798         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7799         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7800         bsd_kvm_target.
7801         (bsd_kvm_return_one): Delete.
7802         (bsd_kvm_add_target): Adjust to C++ification.
7803
7804         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7805         (nto_procfs_target_procfs): New classes.
7806         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7807         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7808         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7809         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7810         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7811         (procfs_remove_hw_breakpoint, procfs_resume)
7812         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7813         (procfs_kill_inferior, procfs_store_registers)
7814         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7815         as methods of nto_procfs_target.
7816         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7817         (nto_native_ops): Delete.
7818         (procfs_open, procfs_native_open): Delete.
7819         (nto_native_ops): Now an nto_procfs_target_native.
7820         (init_procfs_targets): Adjust to C++ification.
7821         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7822         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7823         Refactor as methods of nto_procfs_target.
7824
7825         * go32-nat.c (go32_nat_target): New class.
7826         (the_go32_nat_target): New.
7827         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7828         (go32_store_registers, go32_xfer_partial, go32_files_info)
7829         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7830         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7831         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7832         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7833         (go32_target): Delete.
7834         (_initialize_go32_nat): Adjust to C++ification.
7835
7836         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7837         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7838         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7839         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7840         gnu_nat_target.
7841         (gnu_target): Delete.
7842         * gnu-nat.h (gnu_target): Delete.
7843         (gnu_nat_target): New class.
7844         * i386-gnu-nat.c (gnu_base_target): New.
7845         (i386_gnu_nat_target): New class.
7846         (the_i386_gnu_nat_target): New.
7847         (_initialize_i386gnu_nat): Adjust to C++ification.
7848
7849 2018-05-02  Pedro Alves  <palves@redhat.com>
7850
7851         * bfd-target.c (target_bfd_xclose): Rename to ...
7852         (target_bfd_close): ... this.
7853         (target_bfd_reopen): Adjust.
7854         * target.c (target_close): Remove references to to_xclose.
7855         * target.h (target_ops::to_xclose): Delete.
7856         (target_ops::to_close): Update comments.
7857
7858 2018-05-02  Pedro Alves  <palves@redhat.com>
7859
7860         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7861         "linux-nat.h".
7862         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7863         * inf-ptrace.c (inf_ptrace_register_u_offset)
7864         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7865         (inf_ptrace_store_register, inf_ptrace_store_registers)
7866         (inf_ptrace_trad_target): Move to ...
7867         * linux-nat-trad.c: ... this new file.
7868         * linux-nat-trad.h: New file.
7869         * linux-nat.c (linux_target_install_ops): Make extern.
7870         (linux_trad_target): Delete.
7871         * linux-nat.h (linux_trad_target): Delete declaration.
7872         (linux_target_install_ops): Declare.
7873         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7874         "linux-nat.h".
7875
7876 2018-05-02  Pedro Alves  <palves@redhat.com>
7877
7878         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7879         procfs_target/add_target here.
7880         * procfs.c (procfs_target): Make static.
7881         (_initialize_procfs): Call add_target here.
7882         * procfs.h (struct target_ops): Remove forward declaration.
7883         (procfs_target): Remove declaration.
7884         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7885
7886 2018-05-02  Pedro Alves  <palves@redhat.com>
7887
7888         * procfs.c (procfs_stopped_by_watchpoint)
7889         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7890         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7891         Forward declare.
7892         (procfs_use_watchpoints): Delete, move contents...
7893         (procfs_target): ... here.
7894         * procfs.h (procfs_use_watchpoints): Delete declaration.
7895         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7896         procfs_use_watchpoints.
7897         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7898         procfs_use_watchpoints.
7899
7900 2018-05-02  Tom Tromey  <tom@tromey.com>
7901
7902         PR python/20084:
7903         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7904         and var_zuinteger_unlimited.
7905         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7906         and PARAM_ZUINTEGER_UNLIMITED.
7907         (set_parameter_value): Handle var_zuinteger and
7908         var_zuinteger_unlimited.
7909         (add_setshow_generic): Likewise.
7910         (parmpy_init): Likewise.
7911
7912 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
7913
7914         PR rust/23124
7915         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7916         pointer is not null before dereferencing it.
7917
7918 2018-04-30  Tom Tromey  <tom@tromey.com>
7919
7920         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7921         is_mi_like_p.
7922
7923 2018-04-30  Tom Tromey  <tom@tromey.com>
7924
7925         * breakpoint.c (mention): Remove use of is_mi_like_p.
7926         (print_mention_ranged_breakpoint): Likewise.
7927         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7928         of is_mi_like_p.
7929
7930 2018-04-30  Tom Tromey  <tom@tromey.com>
7931
7932         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7933
7934 2018-04-30  Tom Tromey  <tom@tromey.com>
7935
7936         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7937         (info_spu_event_command): Remove some uses of is_mi_like_p.
7938
7939 2018-04-30  Tom Tromey  <tom@tromey.com>
7940
7941         * python/py-framefilter.c (py_print_single_arg)
7942         (enumerate_locals, py_print_args, py_print_frame): Remove some
7943         uses of is_mi_like_p.
7944
7945 2018-04-30  Tom Tromey  <tom@tromey.com>
7946
7947         * ui-out.c: Update.
7948         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7949         * ui-out.h (ui_out::is_mi_like_p): Now const.
7950         (ui_out::do_is_mi_like_p): Now const.
7951         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7952
7953 2018-04-30  Tom Tromey  <tom@tromey.com>
7954
7955         * varobj.c (varobj_set_visualizer): Use new_reference.
7956         * python/python.c (gdbpy_decode_line): Use new_reference.
7957         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7958         new_reference.
7959
7960 2018-04-30  Tom Tromey  <tom@tromey.com>
7961
7962         * varobj.c (install_new_value): Use new_reference.
7963         * value.h (value_incref): Return void.  Swap intro comment with
7964         value_decref.
7965         * value.c (set_value_parent): Use new_reference.
7966         (value_incref): Return void.  Update intro comment.
7967         (release_value): Use new_reference.
7968         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7969
7970 2018-04-30  Tom Tromey  <tom@tromey.com>
7971
7972         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7973         * gdb_bfd.h (new_bfd_ref): Remove.
7974         (gdb_bfd_open): Update comment.
7975         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7976         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7977         (gdb_bfd_fdopenr): Use new_reference.
7978         * exec.c (exec_file_attach): Use new_reference.
7979
7980 2018-04-30  Tom Tromey  <tom@tromey.com>
7981
7982         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7983         method.
7984
7985 2018-04-30  Tom Tromey  <tom@tromey.com>
7986
7987         * jit.c (jit_read_code_entry): Use type_align.
7988         * i386-tdep.c (i386_gdbarch_init): Don't call
7989         set_gdbarch_long_long_align_bit.
7990         * gdbarch.sh: Remove long_long_align_bit.
7991         * gdbarch.c, gdbarch.h: Rebuild.
7992         * arc-tdep.c (arc_type_align): New function.
7993         (arc_gdbarch_init): Use arc_type_align.  Don't call
7994         set_gdbarch_long_long_align_bit.
7995
7996 2018-04-30  Tom Tromey  <tom@tromey.com>
7997
7998         * rust-lang.c (rust_type_alignment): Remove.
7999         (rust_composite_type): Use type_align.
8000
8001 2018-04-30  Tom Tromey  <tom@tromey.com>
8002
8003         * NEWS: Mention Type.align.
8004         * python/py-type.c (typy_get_alignof): New function.
8005         (type_object_getset): Add "alignof".
8006
8007 2018-04-30  Tom Tromey  <tom@tromey.com>
8008
8009         PR exp/17095:
8010         * NEWS: Update.
8011         * std-operator.def (UNOP_ALIGNOF): New operator.
8012         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8013         New.
8014         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8015         * c-lang.c (c_op_print_tab): Add alignof.
8016         * c-exp.y (ALIGNOF): New token.
8017         (exp): Add "ALIGNOF" production.
8018         (ident_tokens): Add _Alignof and alignof.
8019
8020 2018-04-30  Tom Tromey  <tom@tromey.com>
8021
8022         * i386-tdep.c (i386_type_align): New function.
8023         (i386_gdbarch_init): Update.
8024         * gdbarch.sh (type_align): New method.
8025         * gdbarch.c, gdbarch.h: Rebuild.
8026         * arch-utils.h (default_type_align): Declare.
8027         * arch-utils.c (default_type_align): New function.
8028         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8029         (struct type) <align_log2>: New field.
8030         <instance_flags>: Now a bitfield.
8031         (TYPE_RAW_ALIGN): New macro.
8032         (type_align, type_raw_align, set_type_align): Declare.
8033         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8034         functions.
8035         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8036         (get_alignment, maybe_set_alignment): New functions.
8037         (read_structure_type, read_enumeration_type, read_array_type)
8038         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8039         (read_subrange_type, read_base_type): Set type alignment.
8040
8041 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8042
8043         * dwarf2read.c (read_index_from_section): Use bool.
8044
8045 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8046
8047         PR gdb/22950
8048         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8049         with #ifdef.
8050
8051 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8052
8053         PR build/22873
8054         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8055         last step, and do it atomically.
8056
8057 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8058
8059         * compile/compile-c-types.c (convert_int, convert_float):
8060         Update for C FE v1.
8061
8062 2018-04-27  Tom Tromey  <tom@tromey.com>
8063
8064         PR rust/22545:
8065         * rust-lang.c (rust_inclusive_range_type_p): New function.
8066         (rust_range): Handle inclusive ranges.
8067         (rust_compute_range): Likewise.
8068         * rust-exp.y (struct rust_op) <inclusive>: New field.
8069         (DOTDOTEQ): New constant.
8070         (range_expr): Add "..=" productions.
8071         (operator_tokens): Add "..=" token.
8072         (ast_range): Add "inclusive" parameter.
8073         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8074         ranges.
8075         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8076         bounds values.
8077         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8078         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8079         Update comments.
8080         * expprint.c (print_subexp_standard): Handle new bounds values.
8081         (dump_subexp_body_standard): Likewise.
8082
8083 2018-04-27  Tom Tromey  <tom@tromey.com>
8084
8085         * configure: Rebuild.
8086         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8087         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8088         "OVERRIDE".
8089         (class symbol_needs_eval_context): Likewise.
8090         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8091         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8092         "virtual".
8093         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8094         "override".
8095         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8096         * aarch64-tdep.c (instruction_reader::read): Use "override".
8097         (instruction_reader_test::read): Likewise.
8098         * arm-tdep.c (instruction_reader::read): Use "override".
8099         (instruction_reader_thumb::read): Likewise.
8100
8101 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8102
8103         PR remote/9665
8104         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8105         instead of remote_send.
8106         (remote_send): Remove.
8107
8108 2018-04-26  Pedro Alves  <palves@redhat.com>
8109
8110         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8111         find_function_start_sal instead of find_pc_line.
8112
8113 2018-04-26  Pedro Alves  <palves@redhat.com>
8114
8115         * breakpoint.c (set_breakpoint_location_function): Handle
8116         mst_data_gnu_ifunc.
8117         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8118         * elfread.c (elf_symtab_read): Give data symbols with
8119         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8120         (elf_rel_plt_read): Update comment.
8121         * linespec.c (convert_linespec_to_sals): Handle
8122         mst_data_gnu_ifunc.
8123         (minsym_found): Handle mst_data_gnu_ifunc.
8124         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8125         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8126         * parse.c (find_minsym_type_and_address): Handle
8127         mst_data_gnu_ifunc.
8128         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8129         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8130         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8131         comment.
8132         <mst_data_gnu_ifunc>: New enumerator.
8133
8134 2018-04-26  Pedro Alves  <palves@redhat.com>
8135
8136         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8137         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8138         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8139         Handle it.
8140         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8141         (lookup_minimal_symbol_by_pc): Adjust.
8142         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8143         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8144         * minsyms.h (lookup_msym_prefer): New enum.
8145         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8146         parameter by a lookup_msym_prefer parameter.
8147
8148 2018-04-26  Pedro Alves  <palves@redhat.com>
8149
8150         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8151         ends in "@plt" instead of looking at the symbol's section.
8152
8153 2018-04-26  Pedro Alves  <palves@redhat.com>
8154
8155         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8156         all references.
8157         (find_pc_partial_function_gnu_ifunc): Rename to ...
8158         (find_pc_partial_function): ... this, and remove references to
8159         'is_gnu_ifunc_p'.
8160         (find_pc_partial_function): Delete old implementation.
8161         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8162
8163 2018-04-26  Pedro Alves  <palves@redhat.com>
8164
8165         * linespec.c (struct bound_minimal_symbol_search_key): New.
8166         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8167         skip first line if we found a GNU ifunc minimal symbol by name.
8168         (compare_msymbols): Change parameters to work with a destructured
8169         lhs minsym.
8170         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8171         functions.
8172
8173 2018-04-26  Pedro Alves  <palves@redhat.com>
8174
8175         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8176         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8177         address/name.
8178         (add_location_to_breakpoint): Store the minsym and the objfile in
8179         the breakpoint location.
8180         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8181         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8182         Record the minsym in the sal.
8183         * symtab.h (symtab_and_line) <msymbol>: New field.
8184
8185 2018-04-26  Pedro Alves  <palves@redhat.com>
8186
8187         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8188         unless we actually resolved the ifunc.
8189
8190 2018-04-26  Pedro Alves  <palves@redhat.com>
8191
8192         * c-exp.y (variable production): Prefer ifunc minsyms over
8193         regular function symbols.
8194         * symtab.c (find_gnu_ifunc): New function.
8195         * minsyms.h (lookup_msym_prefer): New enum.
8196         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8197         parameter by a lookup_msym_prefer parameter.
8198         * symtab.h (find_gnu_ifunc): New declaration.
8199
8200 2018-04-26  Pedro Alves  <palves@redhat.com>
8201
8202         * blockframe.c (find_gnu_ifunc_target_type): New function.
8203         (find_function_type): New.
8204         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8205         return a value with a memory address.
8206         (eval_call): For calls to GNU ifunc functions, try to find the
8207         type of the target function from the type that the resolver
8208         returns.
8209         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8210         symbols.
8211         * infcall.c (find_function_return_type): Delete.
8212         (find_function_addr): Add 'function_type' parameter.  For calls to
8213         GNU ifunc functions, try to find the type of the target function
8214         from the type that the resolver returns, and return it via
8215         FUNCTION_TYPE.
8216         (call_function_by_hand_dummy): Adjust to use the function type
8217         returned by find_function_addr.
8218         (find_function_addr): Add 'function_type' parameter and move
8219         description here.
8220         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8221         declarations.
8222
8223 2018-04-26  Pedro Alves  <palves@redhat.com>
8224
8225         * c-exp.y (variable production): Skip finding an alias for ifunc
8226         symbols.
8227
8228 2018-04-26  Pedro Alves  <palves@redhat.com>
8229
8230         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8231
8232 2018-04-25  Pedro Alves  <palves@redhat.com>
8233
8234         * infcmd.c (kill_command): Print the pid as string, not the whole
8235         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8236         message.
8237         * remote.c (remote_detach_1): Print the pid as string, not the
8238         whole thread's ptid.
8239
8240 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8241             Sergio Durigan Junior  <sergiodj@redhat.com>
8242             Pedro Alves  <palves@redhat.com>
8243
8244         * infcmd.c (kill_command): Print message when inferior has
8245         been killed.
8246         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8247         '1'.
8248         (add_inferior): Improve message printed when
8249         'print_inferior_events' is on.
8250         (exit_inferior): Remove message printed when
8251         'print_inferior_events' is on.
8252         (detach_inferior): Improve message printed when
8253         'print_inferior_events' is on.
8254         (initialize_inferiors): Use 'add_inferior_silent' to set
8255         'current_inferior_'.
8256         * inferior.h (print_inferior_events): Declare here as
8257         'extern'.
8258         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8259         '[Detaching...]' messages when 'print_inferior_events' is on.
8260         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8261         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8262         'Detaching after fork from child...', replace it by '... from
8263         parent...'.
8264         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8265         prefix/suffix when printing 'Detaching...' messages.  Print
8266         them when 'print_inferior_events' is on.
8267         * remote.c (remote_detach_1): Print message when detaching
8268         from inferior and '!is_fork_parent'.
8269
8270 2018-04-24  Tom Tromey  <tom@tromey.com>
8271
8272         * cli-out.h: Reindent.
8273
8274 2018-04-24  Tom Tromey  <tom@tromey.com>
8275
8276         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8277         (cli_ui_out::do_field_string): Use fputs_filtered.
8278         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8279
8280 2018-04-23  Tom Tromey  <tom@tromey.com>
8281
8282         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8283         gdb::unique_xmalloc_ptr.
8284
8285 2018-04-23  Tom Tromey  <tom@tromey.com>
8286
8287         * configure: Rebuild.
8288
8289 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8290
8291         PR gdb/23095
8292         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8293         prepare_for_testing.  Set normal_bp to r_debug_state if target
8294         is bsd.
8295
8296 2018-04-21  Pedro Alves  <palves@redhat.com>
8297             Rajendra SY  <rajendra.sy@gmail.com>
8298
8299         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8300         * remote.c (extended_remote_attach): In all-stop mode, mark the
8301         thread as executing.
8302
8303 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8304
8305         * thread.c (thread_apply_all_command): Fix comment.
8306         (thread_command): Fix comment.
8307
8308 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8309
8310         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8311         parameter.
8312         * features/aarch64-core.c (create_feature_aarch64_core):
8313         Regenerate.
8314         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8315         Likewise.
8316         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8317         Likewise.
8318         * features/i386/32bit-avx512.c
8319         (create_feature_i386_32bit_avx512): Likewise.
8320         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8321         Likewise.
8322         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8323         Likewise.
8324         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8325         Likewise.
8326         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8327         Likewise.
8328         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8329         Likewise.
8330         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8331         Likewise.
8332         * features/i386/64bit-avx512.c
8333         (create_feature_i386_64bit_avx512): Likewise.
8334         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8335         Likewise.
8336         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8337         Likewise.
8338         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8339         Likewise.
8340         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8341         Likewise.
8342         * features/i386/64bit-segments.c
8343         (create_feature_i386_64bit_segments): Likewise.
8344         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8345         Likewise.
8346         * features/i386/x32-core.c
8347         (create_feature_i386_x32_core): Likewise.
8348         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8349         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8350         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8351         * target-descriptions.c: In generated code, don't pass xml
8352         filename.
8353
8354 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8355
8356         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8357         (print_xml_feature::visit_post): Likewise.
8358         (print_xml_feature::visit): Likewise.
8359         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8360         (print_xml_feature): Add new class.
8361         * regformats/regdat.sh: Null xmltarget on feature targets.
8362         * target-descriptions.c (struct target_desc): Add xmltarget.
8363         (maintenance_check_tdesc_xml_convert): Add unittest function.
8364         (tdesc_get_features_xml): Add function to get xml.
8365         (maintenance_check_xml_descriptions): Test xml generation.
8366         * xml-tdesc.c (string_read_description_xml): Add function.
8367         * xml-tdesc.h (string_read_description_xml): Add declaration.
8368
8369 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8370
8371         * features/Makefile: Add feature marker to targets with new style
8372         target descriptions.
8373         * regformats/aarch64.dat: Regenerate.
8374         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8375         * regformats/i386/amd64-avx-linux.dat: Likewise.
8376         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8377         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8378         * regformats/i386/amd64-linux.dat: Likewise.
8379         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8380         * regformats/i386/amd64.dat: Likewise.
8381         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8382         * regformats/i386/i386-avx-linux.dat: Likewise.
8383         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8384         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8385         * regformats/i386/i386-linux.dat: Likewise.
8386         * regformats/i386/i386-mmx-linux.dat: Likewise.
8387         * regformats/i386/i386-mpx-linux.dat: Likewise.
8388         * regformats/i386/i386.dat: Likewise.
8389         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8390         * regformats/i386/x32-avx-linux.dat: Likewise.
8391         * regformats/i386/x32-linux.dat: Likewise.
8392         * regformats/tic6x-c62x-linux.dat: Likewise.
8393         * regformats/tic6x-c64x-linux.dat: Likewise.
8394         * regformats/tic6x-c64xp-linux.dat: Likewise.
8395         * regformats/regdat.sh: Parse feature marker.
8396
8397 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8398
8399         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8400         (tdesc_osabi_name): Likewise.
8401         * target-descriptions.c (tdesc_architecture_name): Add new
8402         function.
8403         (tdesc_osabi_name): Likewise.
8404
8405 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8406
8407         * common/tdesc.c (tdesc_predefined_type): Move to here.
8408         (tdesc_named_type): Likewise.
8409         (tdesc_create_vector): Likewise.
8410         (tdesc_create_struct): Likewise.
8411         (tdesc_set_struct_size): Likewise.
8412         (tdesc_create_union): Likewise.
8413         (tdesc_create_flags): Likewise.
8414         (tdesc_create_enum): Likewise.
8415         (tdesc_add_field): Likewise.
8416         (tdesc_add_typed_bitfield): Likewise.
8417         (tdesc_add_bitfield): Likewise.
8418         (tdesc_add_flag): Likewise.
8419         (tdesc_add_enum_value): Likewise.
8420         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8421         (struct tdesc_type_vector): Likewise.
8422         (struct tdesc_type_field): Likewise.
8423         (struct tdesc_type_with_fields): Likewise.
8424         (tdesc_create_enum): Add declaration.
8425         (tdesc_add_typed_bitfield): Likewise.
8426         (tdesc_add_enum_value): Likewise.
8427         * target-descriptions.c (tdesc_type_field): Move from here.
8428         (tdesc_type_builtin): Likewise.
8429         (tdesc_type_vector): Likewise.
8430         (tdesc_type_with_fields): Likewise.
8431         (tdesc_predefined_types): Likewise.
8432         (tdesc_named_type): Likewise.
8433         (tdesc_create_vector): Likewise.
8434         (tdesc_create_struct): Likewise.
8435         (tdesc_set_struct_size): Likewise.
8436         (tdesc_create_union): Likewise.
8437         (tdesc_create_flags): Likewise.
8438         (tdesc_create_enum): Likewise.
8439         (tdesc_add_field): Likewise.
8440         (tdesc_add_typed_bitfield): Likewise.
8441         (tdesc_add_bitfield): Likewise.
8442         (tdesc_add_flag): Likewise.
8443         (tdesc_add_enum_value): Likewise.
8444         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8445         (tdesc_add_typed_bitfield): Likewise.
8446         (tdesc_add_enum_value): Likewise.
8447
8448 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8449
8450         * common/tdesc.c (tdesc_feature::accept): Move to here.
8451         (tdesc_feature::operator==): Likewise.
8452         (tdesc_create_reg): Likewise.
8453         * common/tdesc.h (tdesc_type_kind): Likewise.
8454         (struct tdesc_type): Likewise.
8455         (struct tdesc_feature): Likewise.
8456         * regformats/regdat.sh: Create a feature.
8457         * target-descriptions.c (tdesc_type_kind): Move from here.
8458         (tdesc_type): Likewise.
8459         (tdesc_type_up): Likewise.
8460         (tdesc_feature): Likewise.
8461         (tdesc_create_reg): Likewise.
8462
8463 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8464
8465         * Makefile.in: Add arch/tdesc.c
8466         * common/tdesc.c: New file.
8467         * common/tdesc.h (tdesc_element_visitor): Move to here.
8468         (tdesc_element): Likewise.
8469         (tdesc_reg): Likewise.
8470         (tdesc_reg_up): Likewise.
8471         * regformats/regdef.h (reg): Add offset to constructors.
8472         * target-descriptions.c (tdesc_element_visitor): Move from here.
8473         (tdesc_element): Likewise.
8474         (tdesc_reg): Likewise.
8475         (tdesc_reg_up): Likewise.
8476
8477 2018-04-17  Tom Tromey  <tom@tromey.com>
8478
8479         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8480         discriminant field.
8481
8482 2018-04-17  Tom Tromey  <tom@tromey.com>
8483
8484         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8485
8486 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8487
8488         * symtab.c (print_symbol_info): Skip printing filename and line
8489         number when `last' is NULL.
8490         (symtab_symbol_info): Use empty string instead of NULL for first
8491         invocation of print_symbol_info.
8492         (rbreak_command): Pass NULL to `last' parameter of
8493         print_symbol_info.
8494
8495 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8496
8497         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8498         instead of nullptr.
8499
8500 2018-04-16  Pedro Alves  <palves@redhat.com>
8501
8502         * MAINTAINERS (sh): Remove.
8503         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8504         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8505         (ALLDEPFILES): Remove sh64-tdep.c.
8506         * NEWS: Mentions that support for SH-5/SH64 is removed.
8507         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8508         (sh*-*-openbsd*): Ditto.
8509         (sh64-*-elf*): Remove.
8510         (sh*): Remove.
8511         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8512         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8513         * sh-tdep.c: No longer include "sh64-tdep.h".
8514         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8515         * sh64-tdep.c, sh64-tdep.h: Remove files.
8516
8517 2018-04-16  Pedro Alves  <palves@redhat.com>
8518
8519         * MAINTAINERS: Remove m88k.
8520         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8521         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8522         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8523         * NEWS: Mention that support for m88k was removed.
8524         * configure.host (m88*-*-*): Remove support.
8525         * configure.nat (m88k-*-*): Remove support.
8526         * configure.tgt (m88*-*-openbsd*): Remove.
8527         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8528
8529 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8530
8531         * configure.tgt (x86_tobjs): New variable.
8532         (amd64_tobjs, i386_tobjs): Use it.
8533
8534 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8535
8536         * symtab.c (print_symbol_info): Precede the symbol definition by
8537         the line number when available.
8538         * NEWS: Advertise this enhancement.
8539
8540 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8541
8542         * NEWS (New options): announce set/show record btrace cpu.
8543         * btrace.c: Include record-btrace.h.
8544         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8545         the vendor is unknown.
8546         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8547         Maybe overwrite the btrace configuration's cpu.
8548         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8549         (btrace_fetch): Add cpu parameter.  Update callers.
8550         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8551         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8552         errata workarounds if the vendor is unknown.
8553         * python/py-record-btrace.c: Include record-btrace.h.
8554         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8555         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8556         * record-btrace.c (record_btrace_cpu_state_kind): New.
8557         (record_btrace_cpu): New.
8558         (set_record_btrace_cpu_cmdlist): New.
8559         (record_btrace_get_cpu): New.
8560         (require_btrace_thread, record_btrace_info)
8561         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8562         (cmd_set_record_btrace_cpu_none): New.
8563         (cmd_set_record_btrace_cpu_auto): New.
8564         (cmd_set_record_btrace_cpu): New.
8565         (cmd_show_record_btrace_cpu): New.
8566         (_initialize_record_btrace): Initialize set/show record btrace cpu
8567         commands.
8568         * record-btrace.h (record_btrace_get_cpu): New.
8569
8570 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8571
8572         * record.c (set_record_command): Fix typo in message.
8573
8574 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8575
8576         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8577
8578 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8579
8580         * infrun.c (process_event_stop_test): Call
8581         gdbarch_in_indirect_branch_thunk.
8582         * gdbarch.sh (in_indirect_branch_thunk): New.
8583         * gdbarch.c: Regenerated.
8584         * gdbarch.h: Regenerated.
8585         * x86-tdep.h: New.
8586         * x86-tdep.c: New.
8587         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8588         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8589         (ALLDEPFILES): Add x86-tdep.c.
8590         * arch-utils.h (default_in_indirect_branch_thunk): New.
8591         * arch-utils.c (default_in_indirect_branch_thunk): New.
8592         * i386-tdep: Include x86-tdep.h.
8593         (i386_in_indirect_branch_thunk): New.
8594         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8595         function.
8596         * amd64-tdep: Include x86-tdep.h.
8597         (amd64_in_indirect_branch_thunk): New.
8598         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8599
8600 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8601
8602         PR gdb/23053
8603         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8604         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8605         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8606         regression.
8607
8608 2018-04-12  Tom Tromey  <tom@tromey.com>
8609
8610         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8611         (rust_evaluate_subexp): Likewise.
8612
8613 2018-04-12  Pedro Alves  <palves@redhat.com>
8614
8615         * procfs.c (procfs_detach): Make forward declaration's prototype
8616         match definition's protototype.
8617         (proc_get_LDT_entry): Remove stale do_cleanups call.
8618
8619 2018-04-12  Pedro Alves  <palves@redhat.com>
8620
8621         * target.h (target_ops::to_has_exited): Delete.
8622         (target_has_exited): Delete.
8623         * target-delegates.c: Regenerate.
8624
8625 2018-04-11  Pedro Alves  <palves@redhat.com>
8626
8627         * target.c (fileio_fh_t::t): Add comment.
8628         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8629         (target_fileio_close): Handle a NULL target.
8630         (invalidate_fileio_fh): New.
8631         (target_close): Call it.
8632         * remote.c (remote_hostio_send_command): No longer check whether
8633         remote_desc is open.
8634
8635 2018-04-11  Pedro Alves  <palves@redhat.com>
8636
8637         * target.c (fileio_fh_t): Make it a named struct instead of a
8638         typedef.
8639         (fileio_fh_t::is_closed): New method.
8640         (DEF_VEC_O (fileio_fh_t)): Remove.
8641         (fileio_fhandles): Now a std::vector.
8642         (is_closed_fileio_fh): Delete.
8643         (acquire_fileio_fd): Adjust.  Rename parameters.
8644         (release_fileio_fd): Adjust.
8645         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8646         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8647         (target_fileio_close): Adjust.
8648
8649 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8650
8651         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8652         index.
8653
8654 2018-04-10  Pedro Alves  <palves@redhat.com>
8655
8656         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8657         (scoped_finish_thread_state): New class.
8658         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8659         cleanup.
8660         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8661         (fetch_inferior_event, normal_stop): Likewise.
8662         * thread.c (finish_thread_state_cleanup): Delete.
8663
8664 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8665             Pedro Alves  <palves@redhat.com>
8666
8667         * value.c: Include "selftest.h" and "common/array-view.h".
8668         (struct range) <operator ==>: New.
8669         (test_ranges_contain): New.
8670         (check_ranges_vector): New.
8671         (test_insert_into_bit_range_vector): New.
8672         (_initialize_values): Register selftests.
8673         * common/array-view.h (operator==, operator!=): New.
8674
8675 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8676
8677         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8678         an iterator.
8679         * inline-frame.c: Include <algorithm>.
8680         (struct inline_state): Add constructor.
8681         (inline_state_s): Remove.
8682         (DEF_VEC_O(inline_state_s)): Remove.
8683         (inline_states): Change type to std::vector.
8684         (find_inline_frame_state): Adjust to std::vector.
8685         (allocate_inline_frame_state): Remove.
8686         (clear_inline_frame_state): Adjust to std::vector.
8687         (skip_inline_frames): Adjust to std::vector.
8688
8689 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8690
8691         * tracepoint.h (struct trace_state_variable): Add constructor.
8692         <name>: Change type to std::string.
8693         * tracepoint.c (tsv_s): Remove.
8694         (DEF_VEC_O(tsv_s)): Remove.
8695         (tvariables): Change to std::vector.
8696         (create_trace_state_variable): Adjust to std::vector.
8697         (find_trace_state_variable): Likewise.
8698         (find_trace_state_variable_by_number): Likewise.
8699         (delete_trace_state_variable): Likewise.
8700         (trace_variable_command): Adjust to std::string.
8701         (delete_trace_variable_command): Likewise.
8702         (tvariables_info_1): Adjust to std::vector.
8703         (save_trace_state_variables): Likewise.
8704         (start_tracing): Likewise.
8705         (merge_uploaded_trace_state_variables): Adjust to std::vector
8706         and std::string.
8707         * target.h (struct target_ops)
8708         <to_download_trace_state_variable>: Pass reference to
8709         trace_state_variable.
8710         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8711         * target-delegates.c: Re-generate.
8712         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8713         (mi_tsv_deleted): Likewise.
8714         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8715         * remote.c (remote_download_trace_state_variable): Change
8716         pointer to reference and adjust.
8717         * make-target-delegates (parse_argtypes): Handle references.
8718         (write_function_header): Likewise.
8719         (munge_type): Likewise.
8720
8721 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8722
8723         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8724         string_view-selftests.c.
8725         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8726         testsuite.
8727         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8728         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8729         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8730         * unittests/basic_string_view/element_access/char/1.cc:
8731         Likewise.
8732         * unittests/basic_string_view/element_access/char/empty.cc:
8733         Likewise.
8734         * unittests/basic_string_view/element_access/char/front_back.cc:
8735         Likewise.
8736         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8737         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8738         Likewise.
8739         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8740         Likewise.
8741         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8742         Likewise.
8743         * unittests/basic_string_view/operations/compare/char/1.cc:
8744         Likewise.
8745         * unittests/basic_string_view/operations/compare/char/13650.cc:
8746         Likewise.
8747         * unittests/basic_string_view/operations/copy/char/1.cc:
8748         Likewise.
8749         * unittests/basic_string_view/operations/data/char/1.cc:
8750         Likewise.
8751         * unittests/basic_string_view/operations/find/char/1.cc:
8752         Likewise.
8753         * unittests/basic_string_view/operations/find/char/2.cc:
8754         Likewise.
8755         * unittests/basic_string_view/operations/find/char/3.cc:
8756         Likewise.
8757         * unittests/basic_string_view/operations/find/char/4.cc:
8758         Likewise.
8759         * unittests/basic_string_view/operations/rfind/char/1.cc:
8760         Likewise.
8761         * unittests/basic_string_view/operations/rfind/char/2.cc:
8762         Likewise.
8763         * unittests/basic_string_view/operations/rfind/char/3.cc:
8764         Likewise.
8765         * unittests/basic_string_view/operations/substr/char/1.cc:
8766         Likewise.
8767         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8768         * unittests/string_view-selftests.c: New file.
8769
8770 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8771
8772         * unittests/basic_string_view/capacity/1.cc: New file.
8773         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8774         * unittests/basic_string_view/cons/char/1.cc: New file.
8775         * unittests/basic_string_view/cons/char/2.cc: New file.
8776         * unittests/basic_string_view/cons/char/3.cc: New file.
8777         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8778         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8779         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8780         * unittests/basic_string_view/element_access/char/1.cc: New file.
8781         * unittests/basic_string_view/element_access/char/2.cc: New file.
8782         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8783         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8784         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8785         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8786         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8787         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8788         * unittests/basic_string_view/include.cc: New file.
8789         * unittests/basic_string_view/inserters/char/1.cc: New file.
8790         * unittests/basic_string_view/inserters/char/2.cc: New file.
8791         * unittests/basic_string_view/inserters/char/3.cc: New file.
8792         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8793         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8794         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8795         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8796         * unittests/basic_string_view/literals/types.cc: New file.
8797         * unittests/basic_string_view/literals/values.cc: New file.
8798         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8799         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8800         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8801         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8802         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8803         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8804         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8805         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8806         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8807         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8808         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8809         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8810         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8811         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8812         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8813         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8814         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8815         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8816         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8817         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8818         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8819         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8820         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8821         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8822         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8823         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8824         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8825         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8826         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8827         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8828         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8829         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8830         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8831         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8832         * unittests/basic_string_view/operators/char/2.cc: New file.
8833         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8834         * unittests/basic_string_view/range_access/char/1.cc: New file.
8835         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8836         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8837         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8838         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8839         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8840         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8841         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8842         * unittests/basic_string_view/typedefs.cc: New file.
8843         * unittests/basic_string_view/types/1.cc: New file.
8844
8845 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8846
8847         * common/gdb_string_view.h: Remove libstdc++ implementation
8848         details, adjust to gdb reality.
8849         * common/gdb_string_view.tcc: Likewise.
8850         * cli/cli-script.c (struct string_view): Remove.
8851         (user_args) <m_args>: Change element type to gdb::string_view.
8852         (user_args::insert_args): Adjust.
8853
8854 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8855
8856         * common/gdb_string_view.h: New file.
8857         * common/gdb_string_view.tcc: New file.
8858
8859 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8860
8861         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8862         * configure: Re-generate.
8863
8864 2018-04-09  Pedro Alves  <palves@redhat.com>
8865
8866         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8867         (set_target_gdbarch): Call
8868         gdb::observers::architecture_changed.notify instead of
8869         observer_notify_architecture_changed.
8870
8871 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8872
8873         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8874         (do_restore_current_traceframe_cleanup): Remove.
8875         (restore_current_traceframe_cleanup_dtor): Remove.
8876         (make_cleanup_restore_current_traceframe): Remove.
8877         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8878         New.
8879         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8880         * infrun.c (fetch_inferior_event): Use
8881         scoped_restore_current_traceframe.
8882
8883 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8884
8885         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8886         Remove.
8887         <n_allocated_type_units>: Remove.
8888         <all_type_units>: Change to std::vector.
8889         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8890         to std::vector change.
8891         (dwarf2_per_objfile::get_cutu): Likewise.
8892         (dwarf2_per_objfile::get_tu): Likewise.
8893         (create_signatured_type_table_from_index): Likewise.
8894         (create_signatured_type_table_from_debug_names): Likewise.
8895         (dw2_symtab_iter_next): Likewise.
8896         (dw2_print_stats): Likewise.
8897         (dw2_expand_all_symtabs): Likewise.
8898         (dw2_expand_marked_cus): Likewise.
8899         (dw2_debug_names_iterator::next): Likewise.
8900         (dwarf2_initialize_objfile): Likewise.
8901         (add_signatured_type_cu_to_table): Likewise.
8902         (create_all_type_units): Likewise.
8903         (add_type_unit): Likewise.
8904         (struct tu_abbrev_offset): Add constructor.
8905         (build_type_psymtabs_1): Adjust to std::vector change.
8906         (print_tu_stats): Likewise.
8907         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8908         (write_debug_names): Likewise.
8909
8910 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8911
8912         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8913         Make an std::vector.
8914         <n_comp_units>: Remove.
8915         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8916         to std::vector change.
8917         (dwarf2_per_objfile::get_cutu): Likewise.
8918         (dwarf2_per_objfile::get_cu): Likewise.
8919         (create_cus_from_index): Likewise.
8920         (create_addrmap_from_index): Likewise.
8921         (create_addrmap_from_aranges): Likewise.
8922         (dwarf2_read_index): Likewise.
8923         (dw2_find_last_source_symtab): Likewise.
8924         (dw2_map_symtabs_matching_filename): Likewise.
8925         (dw2_symtab_iter_next): Likewise.
8926         (dw2_print_stats): Likewise.
8927         (dw2_expand_all_symtabs): Likewise.
8928         (dw2_expand_symtabs_with_fullname): Likewise.
8929         (dw2_expand_marked_cus): Likewise.
8930         (dw2_map_symbol_filenames): Likewise.
8931         (create_cus_from_debug_names): Likewise.
8932         (dwarf2_read_debug_names): Likewise.
8933         (dw2_debug_names_iterator::next): Likewise.
8934         (dwarf2_initialize_objfile): Likewise.
8935         (set_partial_user): Likewise.
8936         (dwarf2_build_psymtabs_hard): Likewise.
8937         (read_comp_units_from_section): Remove arguments, adjust to
8938         std::vector change.
8939         (create_all_comp_units): Adjust to std::vector and
8940         read_comp_units_from_section changes.
8941         (dwarf2_find_containing_comp_unit): Adjust to std::vector
8942         change.
8943         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8944         (psyms_seen_size): Likewise.
8945         (write_gdbindex): Likewise.
8946         (write_debug_names): Likewise.
8947
8948 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8949
8950         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8951         with dwarf2_per_objfile.
8952         (create_cus_from_index): Likewise.
8953         (create_signatured_type_table_from_index): Likewise.
8954         (dwarf2_read_index): Likewise.
8955         (dwarf2_initialize_objfile): Likewise.
8956         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
8957         per_cu rather than get_dwarf2_per_objfile.
8958
8959 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8960
8961         * dwarf2read.h (struct signatured_type): Forward declare.
8962         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8963         New methods.
8964         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8965         (dw2_get_cutu): ...this.
8966         (dwarf2_per_objfile::get_cu): Rename from...
8967         (dw2_get_cu): ...this.
8968         (dwarf2_per_objfile::get_tu): New.
8969         (create_addrmap_from_index): Adjust.
8970         (create_addrmap_from_aranges): Adjust.
8971         (dw2_find_last_source_symtab): Adjust.
8972         (dw2_map_symtabs_matching_filename): Adjust.
8973         (dw2_symtab_iter_next): Adjust.
8974         (dw2_print_stats): Adjust.
8975         (dw2_expand_all_symtabs): Adjust.
8976         (dw2_expand_symtabs_with_fullname): Adjust.
8977         (dw2_expand_marked_cus): Adjust.
8978         (dw_expand_symtabs_matching_file_matcher): Adjust.
8979         (dw2_map_symbol_filenames): Adjust.
8980         (dw2_debug_names_iterator::next): Adjust.
8981         (dwarf2_initialize_objfile): Adjust.
8982         (set_partial_user): Adjust.
8983         (dwarf2_build_psymtabs_hard): Adjust.
8984
8985 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8986
8987         * dwarf2read.c (create_signatured_type_table_from_debug_names):
8988         Remove unused variables.
8989         (dw2_map_symtabs_matching_filename): Likewise.
8990         (dwarf2_record_block_ranges): Likewise.
8991         (dwarf2_read_addr_index): Likewise.
8992         (follow_die_offset): Likewise.
8993
8994 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8995
8996         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8997         to symbol_file_add_main.
8998
8999 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9000
9001         PR mi/22299
9002         * mi/mi-console.c (do_fputc_async_safe): New.
9003         (mi_console_file::write_async_safe): New.
9004         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9005         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9006         New.
9007         * ui-file.c (ui_file::putstrn): Adjust call to
9008         fputstrn_unfiltered.
9009         * utils.c (printchar): Replace do_fputs and do_fprintf
9010         parameters by do_fputc.
9011         (fputstr_filtered): Adjust call to printchar.
9012         (fputstr_unfiltered): Likewise.
9013         (fputstrn_filtered): Likewise.
9014         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9015         printchar.
9016         * utils.h (do_fputc_ftype): New typedef.
9017         (fputstrn_unfiltered): Add do_fputc parameter.
9018
9019 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9020
9021         * regformats/i386/i386-avx.dat: Remove.
9022
9023 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9024
9025         PR gdb/22979
9026         * amd64-tdep.c (amd64_none_init_abi): New function.
9027         (amd64_x32_none_init_abi): New function.
9028         (_initialize_amd64_tdep): Register handlers for x86-64 and
9029         x64_32 with GDB_OSABI_NONE.
9030         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9031         GDB_OSABI_NONE osabi.
9032
9033 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9034
9035         PR gdb/22980
9036         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9037         GDB_OSABI_NONE.
9038         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9039         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9040
9041 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9042
9043         * common/byte-vector.h (char_vector): New type.
9044         * target.h (target_read_alloc): Return
9045         gdb::optional<byte_vector>.
9046         (target_read_stralloc): Return gdb::optional<char_vector>.
9047         (target_get_osdata): Return gdb::optional<char_vector>.
9048         * target.c (target_read_alloc_1): Templatize.  Replacement
9049         manual memory management with vector.
9050         (target_read_alloc): Change return type, adjust.
9051         (target_read_stralloc): Change return type, adjust.
9052         (target_get_osdata): Change return type, adjust.
9053         * auxv.c (struct auxv_info) <length>: Remove.
9054         <data>: Change type to gdb::optional<byte_vector>.
9055         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9056         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9057         (target_auxv_search): Adjust.
9058         (fprint_target_auxv): Adjust.
9059         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9060         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9061         (linux_make_corefile_notes): Adjust.
9062         * osdata.c (get_osdata): Adjust.
9063         * remote.c (remote_get_threads_with_qxfer): Adjust.
9064         (remote_memory_map): Adjust.
9065         (remote_traceframe_info): Adjust.
9066         (btrace_read_config): Adjust.
9067         (remote_read_btrace): Adjust.
9068         (remote_pid_to_exec_file): Adjust.
9069         * solib-aix.c (solib_aix_get_library_list): Adjust.
9070         * solib-dsbt.c (decode_loadmap): Don't free buf.
9071         (dsbt_get_initial_loadmaps): Adjust.
9072         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9073         * solib-target.c (solib_target_current_sos): Adjust.
9074         * tracepoint.c (sdata_make_value): Adjust.
9075         * xml-support.c (xinclude_start_include): Adjust.
9076         (xml_fetch_content_from_file): Adjust.
9077         * xml-support.h (xml_fetch_another): Change return type.
9078         (xml_fetch_content_from_file): Change return type.
9079         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9080         * xml-tdesc.c (file_read_description_xml): Adjust.
9081         (fetch_available_features_from_target): Change return type.
9082         (target_fetch_description_xml): Adjust.
9083         (target_read_description_xml): Adjust.
9084
9085 2018-04-06  Tom Tromey  <tom@tromey.com>
9086
9087         * value.c (~value): Update.
9088         (struct value) <contents>: Now unique_xmalloc_ptr.
9089         (value_contents_bits_eq, allocate_value_contents)
9090         (value_contents_raw, value_contents_all_raw)
9091         (value_contents_for_printing, value_contents_for_printing_const)
9092         (set_value_enclosing_type): Update.
9093
9094 2018-04-06  Tom Tromey  <tom@tromey.com>
9095
9096         * value.c (range_s): Remove typedef, VEC.
9097         (struct range): Add operator<.
9098         (range_lessthan): Remove.
9099         (ranges_contain): Change type.
9100         (~value): Update.
9101         (struct value) <unavailable, optimized_out>: Now std::vector.
9102         (value_entirely_available)
9103         (value_entirely_covered_by_range_vector)
9104         (value_entirely_unavailable, value_entirely_optimized_out):
9105         Update.
9106         (insert_into_bit_range_vector): Change argument type.
9107         (find_first_range_overlap): Likewise.
9108         (struct ranges_and_idx, value_contents_bits_eq)
9109         (require_not_optimized_out, require_available): Update.
9110         (ranges_copy_adjusted): Change argument types.
9111         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9112
9113 2018-04-06  Tom Tromey  <tom@tromey.com>
9114
9115         * value.c (~value): Update.
9116         (struct value) <parent>: Now a value_ref_ptr.
9117         (value_parent, set_value_parent, value_address, value_copy):
9118         Update.
9119
9120 2018-04-06  Tom Tromey  <tom@tromey.com>
9121
9122         * value.c (struct value): Add constructor, destructor, and member
9123         initializers.
9124         (allocate_value_lazy, value_decref): Update.
9125
9126 2018-04-06  Tom Tromey  <tom@tromey.com>
9127
9128         * value.c (struct value) <released, next>: Remove.
9129         (all_values): Now a std::vector.
9130         (allocate_value_lazy): Update.
9131         (value_next): Remove.
9132         (value_mark, value_free_to_mark, release_value)
9133         (value_release_to_mark): Update.
9134
9135 2018-04-06  Tom Tromey  <tom@tromey.com>
9136
9137         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9138         (free_value_chain): Remove.
9139         * value.c (free_value_chain): Remove.
9140         (value_release_to_mark): Return a std::vector.
9141         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9142         std::vector.
9143         (check_condition): Update.
9144         * eval.c (fetch_subexp_value): Change "val_chain" to a
9145         std::vector.
9146         * breakpoint.c (update_watchpoint): Update.
9147         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9148
9149 2018-04-06  Tom Tromey  <tom@tromey.com>
9150
9151         * value.h (free_all_values): Remove.
9152         * value.c (free_all_values): Remove.
9153
9154 2018-04-06  Tom Tromey  <tom@tromey.com>
9155
9156         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9157         (value_history_chain, value_history_count): Remove.
9158         (value_history): New global.
9159         (record_latest_value, access_value_history, show_values)
9160         (preserve_values): Update.
9161
9162 2018-04-06  Tom Tromey  <tom@tromey.com>
9163
9164         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9165         * varobj.c (varobj_set_display_format, varobj_set_value)
9166         (install_default_visualizer, construct_visualizer)
9167         (install_new_value, ~varobj, varobj_get_value_type)
9168         (my_value_of_variable, varobj_editable_p): Update.
9169         * c-varobj.c (c_describe_child, c_value_of_variable)
9170         (cplus_number_of_children, cplus_describe_child): Update.
9171         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9172         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9173         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9174
9175 2018-04-06  Tom Tromey  <tom@tromey.com>
9176
9177         * printcmd.c (last_examine_address): Change type to
9178         value_ref_ptr.
9179         (do_examine, x_command): Update.
9180
9181 2018-04-06  Tom Tromey  <tom@tromey.com>
9182
9183         * value.c (release_value): Update.
9184         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9185         (struct bpstats) <val>: Now a value_ref_ptr.
9186         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9187         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9188         (~watchpoint, print_it_watchpoint, watch_command_1)
9189         (invalidate_bp_value_on_memory_change): Update.
9190
9191 2018-04-06  Tom Tromey  <tom@tromey.com>
9192
9193         * varobj.c (varobj_clear_saved_item)
9194         (update_dynamic_varobj_children, install_new_value, ~varobj):
9195         Update.
9196         * value.h (value_incref): Move declaration earlier.
9197         (value_decref): Rename from value_free.
9198         (struct value_ref_policy): New.
9199         (value_ref_ptr): New typedef.
9200         (struct value_deleter): Remove.
9201         (gdb_value_up): Remove typedef.
9202         (release_value): Change return type.
9203         (release_value_or_incref): Remove.
9204         * value.c (set_value_parent): Update.
9205         (value_incref): Change return type.
9206         (value_decref): Rename from value_free.
9207         (value_free_to_mark, free_all_values, free_value_chain): Update.
9208         (release_value): Return value_ref_ptr.
9209         (release_value_or_incref): Remove.
9210         (record_latest_value, set_internalvar, clear_internalvar):
9211         Update.
9212         * stack.c (info_frame_command): Don't call value_free.
9213         * python/py-value.c (valpy_dealloc, valpy_new)
9214         (value_to_value_object): Update.
9215         * printcmd.c (do_examine): Update.
9216         * opencl-lang.c (lval_func_free_closure): Update.
9217         * mi/mi-main.c (register_changed_p): Don't call value_free.
9218         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9219         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9220         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9221         value_free.
9222         * guile/scm-value.c (vlscm_free_value_smob)
9223         (vlscm_scm_from_value): Update.
9224         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9225         (frame_unwind_register_unsigned, get_frame_register_bytes)
9226         (put_frame_register_bytes): Don't call value_free.
9227         * findvar.c (address_from_register): Don't call value_free.
9228         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9229         * dwarf2loc.c (entry_data_value_free_closure)
9230         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9231         (dwarf2_evaluate_loc_desc_full): Update.
9232         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9233         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9234         (~watchpoint, watch_command_1)
9235         (invalidate_bp_value_on_memory_change): Update.
9236         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9237
9238 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9239
9240         PR gdb/23022
9241         * warning.m4: Add -Wno-error=deprecated-register.
9242         * configure: Re-generate.
9243
9244 2018-04-05  Tom Tromey  <tom@tromey.com>
9245
9246         * linespec.h: Remove include of "vec.h".
9247
9248 2018-04-05  Tom Tromey  <tom@tromey.com>
9249
9250         * linespec.c (typep): Remove typedef.
9251         (find_methods, find_superclass_methods): Take a std::vector.
9252         (find_method): Use std::vector.
9253
9254 2018-04-05  Tom Tromey  <tom@tromey.com>
9255
9256         * utils.c (compare_strings): Remove.
9257         * utils.h (compare_strings): Remove.
9258         * objc-lang.h (find_imps): Update.
9259         * objc-lang.c (find_methods): Take a std::vector.
9260         (uniquify_strings, find_imps): Likewise.
9261         * linespec.c (find_methods): Take a std::vector.
9262         (decode_objc): Use std::vector.
9263         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9264         a std::vector.
9265         (find_method, find_function_symbols): Use std::vector.
9266
9267 2018-04-05  Tom Tromey  <tom@tromey.com>
9268
9269         * completer.c (completion_tracker::completion_tracker): Remove
9270         cast.
9271         (completion_tracker::discard_completions): Likewise.
9272         * breakpoint.c (ambiguous_names_p): Remove cast.
9273         * ada-lang.c (_initialize_ada_language): Remove cast.
9274         * utils.h (streq): Update.
9275         (streq_hash): Add new declaration.
9276         * utils.c (streq): Return bool.
9277         (streq_hash): New function.
9278
9279 2018-04-05  Tom Tromey  <tom@tromey.com>
9280
9281         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9282         Remove a string copy.
9283
9284 2018-04-05  Tom Tromey  <tom@tromey.com>
9285
9286         * linespec.c (filter_results): Use std::vector.
9287         (decode_line_2, decode_line_full): Update.
9288
9289 2018-04-05  Tom Tromey  <tom@tromey.com>
9290
9291         * linespec.c (canonical_to_fullform): Return std::string.
9292         (filter_results): Update.
9293         (struct decode_line_2_item): Add constructor.
9294         <fullform, displayform>: Now std::string.
9295         (decode_line_2_compare_items): Now a std::sort comparator.
9296         (decode_line_2): Update.
9297
9298 2018-04-05  Tom Tromey  <tom@tromey.com>
9299
9300         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9301         (unexpected_linespec_error): Update.
9302         (linespec_parse_basic, parse_linespec): Update.
9303
9304 2018-04-05  Tom Tromey  <tom@tromey.com>
9305
9306         * linespec.c (linespec_parse_basic): Reindent.
9307
9308 2018-04-05  Tom Tromey  <tom@tromey.com>
9309
9310         * minsyms.h (iterate_over_minimal_symbols): Update.
9311         * minsyms.c (iterate_over_minimal_symbols): Take a
9312         gdb::function_view.
9313         * linespec.c (struct collect_minsyms): Remove.
9314         (compare_msyms): Now a std::sort comparator.
9315         (add_minsym): Add parameters.
9316         (search_minsyms_for_name): Update.  Use std::vector.
9317
9318 2018-04-03  Tom Tromey  <tom@tromey.com>
9319
9320         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9321         gdb::byte_vector.
9322
9323 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9324
9325         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9326
9327 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9328
9329         PR gdb/16959
9330         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9331         printing static type.
9332
9333 2018-04-01  Tom Tromey  <tom@tromey.com>
9334
9335         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9336         (rs6000_xfer_shared_libraries): Update.
9337
9338 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9339
9340         * common/gdb_vecs.h (char_ptr): Remove.
9341         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9342
9343 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9344
9345         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9346         with std::vector.
9347         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9348
9349 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9350
9351         * tracepoint.h (struct uploaded_tp): Initialize fields.
9352         <actions, step_actions, cmd_strings>: Change type to
9353         std::vector<char *>.
9354         * tracepoint.c (get_uploaded_tp): Allocate with new.
9355         (free_uploaded_tps): Free with delete.
9356         (parse_tracepoint_definition): Adjust to std::vector change.
9357         * breakpoint.c (read_uploaded_action): Likewise.
9358         (create_tracepoint_from_upload): Likewise.
9359         * ctf.c (ctf_write_uploaded_tp): Likewise.
9360         (SET_ARRAY_FIELD): Likewise.
9361         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9362
9363 2018-03-30  Tom Tromey  <tom@tromey.com>
9364
9365         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9366         std::unique_ptr.
9367         (svr4_keep_data_in_core): Update.
9368         (svr4_read_so_list): Update.
9369
9370 2018-03-30  Tom Tromey  <tom@tromey.com>
9371
9372         * windows-nat.c (handle_output_debug_string, handle_exception):
9373         Update.
9374         * target.h (target_read_string): Update.
9375         * target.c (target_read_string): Change "string" to
9376         unique_xmalloc_ptr.
9377         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9378         Update.
9379         * solib-frv.c (frv_current_sos): Update.
9380         * solib-dsbt.c (dsbt_current_sos): Update.
9381         * solib-darwin.c (darwin_current_sos): Update.
9382         * linux-thread-db.c (inferior_has_bug): Update.
9383         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9384         Update.  Remove alloca.
9385         * ada-lang.c (ada_main_name): Update.
9386
9387 2018-03-30  Tom Tromey  <tom@tromey.com>
9388
9389         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9390         (struct dwo_file_deleter): New.
9391         (dwo_file_up): New typedef.
9392         (open_and_init_dwo_file): Use dwo_file_up.
9393         (free_dwo_file_cleanup): Remove.
9394
9395 2018-03-30  Tom Tromey  <tom@tromey.com>
9396
9397         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9398         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9399
9400 2018-03-30  Tom Tromey  <tom@tromey.com>
9401
9402         * dwarf2read.c (class free_cached_comp_units): New class.
9403         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9404         (free_cached_comp_units): Remove function.
9405
9406 2018-03-30  Tom Tromey  <tom@tromey.com>
9407
9408         * utils.h (make_cleanup_unpush_target): Remove.
9409         * inf-ptrace.c (struct target_unpusher): New.
9410         (target_unpush_up) New typedef.
9411         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9412         target_unpush_up.
9413         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9414
9415 2018-03-27  Tom Tromey  <tom@tromey.com>
9416
9417         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9418
9419 2018-03-27  Pedro Alves  <palves@redhat.com>
9420             Tom Tromey  <tom@tromey.com>
9421
9422         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9423         destructor.  Now a class.
9424         (gdb_readline_wrapper_cleanup): Remove function.
9425         (gdb_readline_wrapper): Remove cleanups.
9426
9427 2018-03-27  Tom Tromey  <tom@tromey.com>
9428
9429         * typeprint.h (struct type_print_options) <local_typedefs,
9430         global_typedefs>: Remove "struct" keyword.
9431         (class typedef_hash_table): New class.
9432         (recursively_update_typedef_hash, add_template_parameters)
9433         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9434         (find_typedef_in_hash): Don't declare.
9435         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9436         (typedef_hash_table::recursively_update): Rename from
9437         recursively_update_typedef_hash.  Now a member.
9438         (typedef_hash_table::add_template_parameters): Rename from
9439         add_template_parameters.  Now a member.
9440         (typedef_hash_table::typedef_hash_table): Now a constructor;
9441         rename from create_typedef_hash.
9442         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9443         rename from free_typedef_hash.
9444         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9445         (do_free_global_table): Remove.
9446         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9447         from copy_type_recursive.
9448         (create_global_typedef_table): Remove.
9449         (typedef_hash_table::find_global_typedef): Now a member of
9450         typedef_hash_table.
9451         (typedef_hash_table::find_typedef): Rename from
9452         find_typedef_in_hash; now a member.
9453         (whatis_exp): Update.
9454         * extension.h (struct ext_lang_type_printers): Add constructor and
9455         destructor.
9456         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9457         declare.
9458         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9459         Now a constructor; rename from start_ext_lang_type_printers.
9460         (ext_lang_type_printers): Now a destructor; rename from
9461         free_ext_lang_type_printers.
9462         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9463         Update.
9464         (c_type_print_base_struct_union): Update.  Remove cleanups.
9465
9466 2018-03-27  Tom Tromey  <tom@tromey.com>
9467
9468         * dwarf-index-write.c: Include <cmath>.
9469
9470 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9471
9472         * NEWS: Add entry describing new "set|show varsize-limit" command.
9473         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9474         command.
9475         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9476         "set variable".
9477
9478 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9479
9480         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9481         dwarf-index-write.c
9482         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9483         * dwarf-index-common.c: New file.
9484         * dwarf-index-common.h: New file.
9485         * dwarf-index-write.c: New file.
9486         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9487         (struct dwarf2_section_info): Move from here.
9488         (dwarf2_section_info_def): Likewise.
9489         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9490         (offset_type): Likewise.
9491         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9492         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9493         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9494         (byte_swap): Likewise.
9495         (MAYBE_SWAP): Likewise.
9496         (dwarf2_per_cu_ptr): Likewise.
9497         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9498         (struct tu_stats): Likewise.
9499         (struct dwarf2_per_objfile): Likewise.
9500         (struct dwarf2_per_cu_data): Likewise.
9501         (struct signatured_type): Likewise.
9502         (sig_type_ptr): Likewise.
9503         (DEF_VEC_P (sig_type_ptr)): Likewise.
9504         (INDEX4_SUFFIX): Likewise.
9505         (INDEX5_SUFFIX): Likewise.
9506         (DEBUG_STR_SUFFIX): Likewise.
9507         (dwarf2_read_section): Make non-static.
9508         (mapped_index_string_hash): Move from here.
9509         (dwarf5_djb_hash): Likewise.
9510         (file_write): Likewise.
9511         (class data_buf): Likewise.
9512         (struct symtab_index_entry): Likewise.
9513         (struct mapped_symtab): Likewise.
9514         (find_slot): Likewise.
9515         (hash_expand): Likewise.
9516         (add_index_entry): Likewise.
9517         (uniquify_cu_indices): Likewise.
9518         (class c_str_view): Likewise.
9519         (class c_str_view_hasher): Likewise.
9520         (class vector_hasher): Likewise.
9521         (write_hash_table): Likewise.
9522         (psym_index_map): Likewise.
9523         (struct addrmap_index_data): Likewise.
9524         (add_address_entry): Likewise.
9525         (add_address_entry_worker): Likewise.
9526         (write_address_map): Likewise.
9527         (symbol_kind): Likewise.
9528         (write_psymbols): Likewise.
9529         (struct signatured_type_index_data): Likewise.
9530         (write_one_signatured_type): Likewise.
9531         (recursively_count_psymbols): Likewise.
9532         (recursively_write_psymbols): Likewise.
9533         (class debug_names): Likewise.
9534         (check_dwarf64_offsets): Likewise.
9535         (psyms_seen_size): Likewise.
9536         (write_gdbindex): Likewise.
9537         (write_debug_names): Likewise.
9538         (assert_file_size): Likewise.
9539         (write_psymtabs_to_index): Likewise.
9540         (save_gdb_index_command): Likewise.
9541         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9542         command.
9543         * dwarf2read.h: New file.
9544
9545 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9546
9547         PR gdb/22670
9548         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9549         symbol name if the CU's language stores symbol names in linkage
9550         format.
9551         * language.h (struct language_defn)
9552         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9553         all instances of this struct.
9554
9555 2018-03-26  Tom Tromey  <tom@tromey.com>
9556
9557         * stack.c (backtrace_command_1): Remove verbose code.
9558
9559 2018-03-26  Tom Tromey  <tom@tromey.com>
9560
9561         * python/py-framefilter.c (py_print_type): Don't catch
9562         exceptions.  Return void.
9563         (py_print_value): Likewise.
9564         (py_print_single_arg): Likewise.
9565         (enumerate_args): Don't catch exceptions.
9566         (py_print_args): Likewise.
9567         (py_print_frame): Likewise.
9568         (gdbpy_apply_frame_filter): Catch exceptions here.
9569
9570 2018-03-26  Tom Tromey  <tom@tromey.com>
9571
9572         * stack.c (_initialize_stack): Remove trailing newlines from help
9573         text.  Add "Usage" line to "backtrace" help.
9574
9575 2018-03-26  Tom Tromey  <tom@tromey.com>
9576
9577         PR python/16486:
9578         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9579
9580 2018-03-26  Tom Tromey  <tom@tromey.com>
9581
9582         * python/py-framefilter.c (py_print_single_arg): Return
9583         EXT_LANG_BT_ERROR from catch.
9584
9585 2018-03-26  Tom Tromey  <tom@tromey.com>
9586
9587         PR backtrace/15584:
9588         * stack.c (backtrace_command_1): Move some code into no-filters
9589         "if".
9590
9591 2018-03-26  Tom Tromey  <tom@tromey.com>
9592
9593         * python/py-framefilter.c (throw_quit_or_print_exception): New
9594         function.
9595         (gdbpy_apply_frame_filter): Use it.
9596
9597 2018-03-26  Tom Tromey  <tom@tromey.com>
9598
9599         PR cli/17716:
9600         * python/py-framefilter.c (py_print_type, py_print_value)
9601         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9602         RETURN_MASK_ERROR.
9603
9604 2018-03-26  Tom Tromey  <tom@tromey.com>
9605
9606         * python/py-framefilter.c (enumerate_args): Use
9607         gdb::unique_xmalloc_ptr.
9608
9609 2018-03-26  Tom Tromey  <tom@tromey.com>
9610
9611         * python/py-framefilter.c (py_print_frame): Return
9612         EXT_LANG_BT_OK.
9613         (gdbpy_apply_frame_filter): Update comment.
9614         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9615         Remove.
9616         <EXT_LANG_BT_NO_FILTERS>: Change value.
9617
9618 2018-03-26  Tom Tromey  <tom@tromey.com>
9619
9620         PR backtrace/15582:
9621         * stack.c (backtrace_command): Parse "hide" argument.
9622         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9623         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9624         constant.
9625
9626 2018-03-26  Tom Tromey  <tom@tromey.com>
9627
9628         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9629         add "flags".
9630         (backtrace_command): Remove "fulltrace", add "flags".
9631
9632 2018-03-26  Tom Tromey  <tom@tromey.com>
9633
9634         * stack.c (backtrace_command): Rewrite command line parsing.
9635
9636 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9637
9638         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9639
9640 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9641
9642         * filename-seen-cache.h: Add include guard.
9643
9644 2018-03-26  Keith Seitz  <keiths@redhat.com>
9645
9646         * symfile.c (place_section): Remove "struct" from section_addr_info
9647         in comment.
9648         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9649         "struct" keyword from section_addr_info.
9650
9651 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9652
9653         * regformats/regdef.h (reg): Add constructors.
9654
9655 2018-03-25  Pedro Alves  <palves@redhat.com>
9656
9657         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9658         if then/else bodies in var_func_name extraction.
9659
9660 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9661
9662         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9663         lookup_minimal_symbol() to find symbol entry.
9664         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9665
9666 2018-03-23  Keith Seitz  <keiths@redhat.com>
9667
9668         PR c++/22968
9669         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9670         nested type definitions for C++, too.
9671
9672 2018-03-23  Tom Tromey  <tom@tromey.com>
9673
9674         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9675         a typedef.
9676         (macho_register_oso): Remove.
9677         (macho_symtab_read): Take a std::vector.
9678         (oso_el_compare_name): Now a std::sort comparator.
9679         (macho_symfile_read_all_oso): Take a std::vector.
9680         (macho_symfile_read): Use std::vector.  Remove cleanups.
9681
9682 2018-03-22  Tom Tromey  <tom@tromey.com>
9683
9684         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9685         (record_full_goto_bookmark): Use std::string.
9686
9687 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9688
9689         PR tdep/18295
9690         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9691         a single mask.
9692
9693 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9694
9695         * rs6000-tdep.c (store_insn_p): New function.
9696         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9697         and cr_reg to their unshifted values. Use store_insn_p to
9698         match LR saves using either R1 or fdata->alloca_reg. Use
9699         store_insn_p to match CR saves. Set alloca_reg_offset
9700         when alloca_reg and framep are set. Remove lr_reg shift
9701         when assigning to fdata->lr_register.
9702
9703 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9704
9705         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9706         command line args instead of emitting a warning.
9707
9708 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9709
9710         * tracepoint.h (struct static_tracepoint_marker): Initialize
9711         fields, define default constructor, move constructor and move
9712         assignment, disable the rest.
9713         <str_id, extra>: Make std::string.
9714         (release_static_tracepoint_marker): Remove.
9715         (free_current_marker): Remove.
9716         * tracepoint.c (free_current_marker): Remove.
9717         (parse_static_tracepoint_marker_definition): Adjust to
9718         std::string, use new hex2str overload.
9719         (release_static_tracepoint_marker): Remove.
9720         (print_one_static_tracepoint_marker): Get marker by reference
9721         and adjust to std::string.
9722         (info_static_tracepoint_markers_command): Adjust to std::vector
9723         changes
9724         * target.h (static_tracepoint_marker_p): Remove typedef.
9725         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9726         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9727         bool.
9728         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9729         * target-debug.h
9730         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9731         (target_debug_print_std_vector_static_tracepoint_marker): New.
9732         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9733         to...
9734         (target_debug_print_static_tracepoint_marker_p): ... this.
9735         * target-delegates.c: Re-generate.
9736         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9737         Make std::string.
9738         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9739         (decode_static_tracepoint_spec): Adjust to std::vector.
9740         (tracepoint_print_one_detail): Adjust to std::string.
9741         (strace_marker_decode_location): Adjust to std::string.
9742         (update_static_tracepoint): Adjust to std::string, remove call
9743         to release_static_tracepoint_marker.
9744         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9745         Adjust to std::vector.
9746         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9747         (remote_static_tracepoint_markers_by_strid): Adjust to
9748         std::vector.
9749         * common/rsp-low.h (hex2str): New overload with explicit count
9750         of bytes.
9751         * common/rsp-low.c (hex2str): New overload with explicit count
9752         of bytes.
9753         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9754         (_initialize_rsp_low_selftests): Add test_hex2str test.
9755         * unittests/tracepoint-selftests.c
9756         (test_parse_static_tracepoint_marker_definition): Adjust to
9757         std::string.
9758
9759 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9760
9761         * tracepoint.c (parse_static_tracepoint_marker_definition):
9762         Consider case where the definition is followed by more
9763         definitions.
9764         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9765         tracepoint-selftests.c.
9766         * unittests/tracepoint-selftests.c: New.
9767
9768 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9769
9770         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9771         Carvalho.
9772
9773 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9774
9775         * symtab.c (find_pc_sect_line): fixed indentation.
9776
9777 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9778
9779         * symtab.c (find_pc_sect_line): now uses binary search.
9780
9781 2018-03-19  Tom Tromey  <tom@tromey.com>
9782
9783         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9784         "IDENT" production.
9785
9786 2018-03-19  Pedro Alves  <palves@redhat.com>
9787             Tom Tromey  <tom@tromey.com>
9788
9789         * unittests/observable-selftests.c: New file.
9790         * common/observable.h: New file.
9791         * observable.h: New file.
9792         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9793         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9794         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9795         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9796         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9797         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9798         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9799         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9800         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9801         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9802         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9803         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9804         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9805         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9806         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9807         tui/tui-interp.c, valops.c: Update all users.
9808         * tui/tui-hooks.c (tui_bp_created_observer)
9809         (tui_bp_deleted_observer, tui_bp_modified_observer)
9810         (tui_inferior_exit_observer, tui_before_prompt_observer)
9811         (tui_normal_stop_observer, tui_register_changed_observer):
9812         Remove.
9813         (tui_observers_token): New global.
9814         (attach_or_detach, tui_attach_detach_observers): New functions.
9815         (tui_install_hooks, tui_remove_hooks): Use
9816         tui_attach_detach_observers.
9817         * record-btrace.c (record_btrace_thread_observer): Remove.
9818         (record_btrace_thread_observer_token): New global.
9819         * observer.sh: Remove.
9820         * observer.c: Rename to observable.c.
9821         * observable.c (namespace gdb_observers): Define new objects.
9822         (observer_debug): Move into gdb_observers namespace.
9823         (struct observer, struct observer_list, xalloc_observer_list_node)
9824         (xfree_observer_list_node, generic_observer_attach)
9825         (generic_observer_detach, generic_observer_notify): Remove.
9826         (_initialize_observer): Update.
9827         Don't include observer.inc.
9828         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9829         (clean mostlyclean): Likewise.
9830         (observer.h, observer.inc): Remove targets.
9831         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9832         (COMMON_SFILES): Use observable.c, not observer.c.
9833         * .gitignore: Remove observer.h.
9834
9835 2018-03-18  Tom Tromey  <tom@tromey.com>
9836
9837         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9838         gdb::def_vector.
9839         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9840
9841 2018-03-17  Tom Tromey  <tom@tromey.com>
9842
9843         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9844
9845 2018-03-17  Tom Tromey  <tom@tromey.com>
9846
9847         * target.c (class scoped_target_fd): New.
9848         (target_fileio_close_cleanup): Remove.
9849         (target_fileio_read_alloc_1): Use scoped_target_fd.
9850
9851 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9852
9853         * silent-rules.mk: New.
9854         * Makefile.in: Include silent-rules.mk
9855         (srcdir, VPATH, top_srcdir): Move up.
9856         (COMPILE): Add ECHO_CXX.
9857         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9858         (init.c): Add ECHO_INIT_C.
9859         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9860         (version.c): Add ECHO_GEN.
9861         (printcmd.o): Add ECHO_CXX.
9862         (target-float.o): Add ECHO_CXX.
9863         (ada-exp.o): Add ECHO_CXX.
9864         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9865         (insight$(EXEEXT)): Add ECHO_CXXLD.
9866         * gnulib/configure.ac: Add AM_SILENT_RULES.
9867         * gnulib/aclocal.m4: Re-generate.
9868         * gnulib/configure: Re-generate.
9869         * gnulib/import/Makefile.in: Re-generate.
9870
9871 2018-03-16  Tom Tromey  <tom@tromey.com>
9872
9873         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9874         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9875         * utils.c (do_free_section_addr_info)
9876         (make_cleanup_free_section_addr_info): Remove.
9877         * symfile.h (struct other_sections): Add constructor.
9878         (struct section_addr_info): Remove.
9879         (section_addr_info): New typedef.
9880         (struct sym_fns) <sym_offsets>: Change type of parameter.
9881         (build_section_addr_info_from_objfile)
9882         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9883         (default_symfile_offsets, symbol_file_add)
9884         (symbol_file_add_from_bfd)
9885         (build_section_addr_info_from_section_table): Update.
9886         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9887         * symfile.c (alloc_section_addr_info): Remove.
9888         (build_section_addr_info_from_section_table): Change return type.
9889         Update.
9890         (build_section_addr_info_from_bfd)
9891         (build_section_addr_info_from_objfile): Likewise.
9892         (free_section_addr_info): Remove.
9893         (relative_addr_info_to_section_offsets): Change type of "addrs".
9894         (addrs_section_compar): Now a std::sort comparator.
9895         (addrs_section_sort): Change return type.
9896         (addr_info_make_relative): Change type of "addrs".  Update.
9897         (default_symfile_offsets, syms_from_objfile_1)
9898         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9899         (symbol_file_add_separate): Update.
9900         (symbol_file_add): Change type of "addrs".  Update.
9901         (add_symbol_file_command): Update.  Remove cleanups.
9902         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
9903         cleanups.
9904         * symfile-debug.c (debug_sym_offsets): Change type of "info".
9905         * solib.c (solib_read_symbols): Update.
9906         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
9907         * machoread.c (macho_symfile_offsets): Update.
9908         * jit.c (jit_bfd_try_read_symtab): Update.
9909
9910 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
9911
9912         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9913         unittests/utils-selftests.c.
9914         * unittests/utils-selftests.c: New file.
9915
9916 2018-03-14  Tom Tromey  <tom@tromey.com>
9917
9918         PR cli/14977:
9919         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9920         for NULL.
9921
9922 2018-03-14  Tom Tromey  <tom@tromey.com>
9923
9924         PR cli/19918:
9925         * printcmd.c (printf_pointer): Allow "-" in format.
9926
9927 2018-03-14  Tom Tromey  <tom@tromey.com>
9928
9929         * printcmd.c (_initialize_printcmd): Add usage to printf.
9930
9931 2018-03-14  Yao Qi  <qiyao@sourceware.org>
9932
9933         * MAINTAINERS: Update my email address.
9934
9935 2018-03-13  Tom Tromey  <tom@tromey.com>
9936
9937         * machoread.c (macho_check_dsym): Change filenamep to a
9938         std::string*.
9939         (macho_symfile_read): Update.
9940         * symfile.c (load_command): Use std::string.
9941
9942 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9943
9944         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9945         to error message string.
9946         (riscv_register_name): Use xsnprintf instead of sprintf.
9947         (riscv_insn::fetch_instruction): Use gdb_assert instead of
9948         internal_error.
9949         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9950         error.
9951         (riscv_push_dummy_call): Likewise.
9952
9953 2018-03-12  Tom Tromey  <tom@tromey.com>
9954
9955         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9956         Use gdb::byte_vector.
9957         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9958
9959 2018-03-12  Yao Qi  <yao.qi@linaro.org>
9960
9961         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9962         parameter type to readable_regcache.
9963         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9964         the declaration.
9965
9966 2018-03-11  Tom Tromey  <tom@tromey.com>
9967
9968         * dwarf2read.c (struct nextfield): Add initializers.
9969         (struct nextfnfield): Remove.
9970         (struct fnfieldlist): Add initializers.  Remove "length" and
9971         "head", use std::vector.
9972         (struct decl_field_list): Remove.
9973         (struct field_info): Add initializers.
9974         <fields, baseclasses>: Now std::vector.
9975         <nbaseclasses, nfnfields, typedef_field_list_count,
9976         nested_types_list_count>: Remove.
9977         (dwarf2_add_field, dwarf2_add_type_defn)
9978         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9979         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9980         (process_structure_scope): Update.
9981
9982 2018-03-11  Tom Tromey  <tom@tromey.com>
9983
9984         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9985         for use by std::sort.
9986         (build_type_psymtabs_1): Use std::vector.
9987
9988 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
9989
9990         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9991         and LIBMPFR in the printed configuration.
9992
9993 2018-03-08  Tom Tromey  <tom@tromey.com>
9994
9995         * source.c (get_filename_and_charpos): Use scoped_fd.
9996         * nto-procfs.c (procfs_open_1): Use scoped_fd.
9997         (procfs_pidlist): Likewise.
9998         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9999         (iterate_over_mappings): Likewise.
10000
10001 2018-03-08  Tom Tromey  <tom@tromey.com>
10002
10003         * infcall.c (struct call_return_meta_info)
10004         <stack_temporaries_enabled>: Remove.
10005         (get_call_return_value, call_function_by_hand_dummy): Update.
10006         * thread.c (disable_thread_stack_temporaries): Remove.
10007         (enable_thread_stack_temporaries): Remove.
10008         (thread_stack_temporaries_enabled_p): Return bool.
10009         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10010         (get_last_thread_stack_temporary): Update.
10011         * eval.c (evaluate_subexp): Update.
10012         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10013         class, not a function.
10014         (value_ptr, value_vec): Remove typedefs.
10015         (class thread_info) <stack_temporaries_enabled>: Now bool.
10016         <stack_temporaries>: Now a std::vector.
10017         (thread_stack_temporaries_enabled_p)
10018         (value_in_thread_stack_temporaries): Return bool.
10019
10020 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10021
10022         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10023         (getpkt_or_notif_sane_1): Likewise.
10024
10025 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10026
10027         * build-id.c (build_id_to_debug_bfd): Use std::string.
10028
10029 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10030
10031         * build-id.c (find_separate_debug_file_by_buildid): Return
10032         std::string.
10033         * build-id.h (find_separate_debug_file_by_buildid): Return
10034         std::string.
10035         * coffread.c (coff_symfile_read): Adjust to std::string.
10036         * elfread.c (elf_symfile_read): Adjust to std::string.
10037         * symfile.c (separate_debug_file_exists): Change parameter to
10038         std::string.
10039         (find_separate_debug_file): Return std::string.
10040         (find_separate_debug_file_by_debuglink): Return std::string.
10041         * symfile.h (find_separate_debug_file_by_debuglink): Return
10042         std::string.
10043
10044 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10045
10046         * common/xml-utils.c (xml_escape_text): Move code to...
10047         (xml_escape_text_append): ... this new function.
10048         * common/xml-utils.h (xml_escape_text_append): New declaration.
10049         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10050         New function.
10051         (_initialize_xml_utils): register test_xml_escape_text_append as
10052         a selftest.
10053
10054 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10055
10056         * defs.h: Remove MAX_REGISTER_SIZE.
10057         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10058         asserts.
10059         * python/py-unwind.c (pyuw_sniffer): Likewise.
10060
10061 2018-03-07  Tom Tromey  <tom@tromey.com>
10062
10063         * linux-tdep.c (linux_info_proc): Update.
10064         * target.h (struct target_ops) <to_fileio_readlink>: Return
10065         optional<string>.
10066         (target_fileio_readlink): Return optional<string>.
10067         * remote.c (remote_hostio_readlink): Return optional<string>.
10068         * inf-child.c (inf_child_fileio_readlink): Return
10069         optional<string>.
10070         * target.c (target_fileio_readlink): Return optional<string>.
10071
10072 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10073
10074         * regcache.c (cooked_read_test): Add riscv to the list of
10075         architectures that have a save_reggroup.
10076
10077 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10078
10079         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10080         value is not a dynamic class object.
10081
10082 2018-03-06  Tom Tromey  <tom@tromey.com>
10083
10084         * rust-exp.y: Formatting fixes.
10085
10086 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10087
10088         * riscv-tdep.c (riscv_register_name): Remove target description
10089         support.
10090         (riscv_gdbarch_init): Remove target description check.
10091
10092 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10093
10094         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10095         comment.
10096         * riscv-tdep.h: Likewise.
10097
10098 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10099
10100         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10101         (riscv_pseudo_register_write): Delete.
10102         (riscv_gdbarch_init): Remove all use of pseudo registers.
10103
10104 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10105
10106         * record-btrace.c (btrace_print_lines): Replace cleanup
10107         parameter with RAII equivalents.
10108         (btrace_insn_history): Replace cleanup with RAII equivalents.
10109         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10110         make_cleanup_ui_out_tuple_begin_end): Remove.
10111         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10112         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10113         make_cleanup_ui_out_list_begin_end): Remove.
10114
10115 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10116
10117         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10118         parameter types to std::vector.  Use bool.
10119         (record_btrace_wait): Replace VEC(tp_t) with
10120         std::vector<thread_info *>.
10121         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10122
10123 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10124
10125         * record-btrace.c (record_btrace_disable_callback): Remove.
10126         (struct scoped_btrace_disable): New.
10127         (record_btrace_open): Use scoped_btrace_disable.
10128
10129 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10130
10131         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10132         reading values from registers.
10133
10134 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10135
10136         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10137         where appropriate.
10138
10139 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10140
10141         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10142         change parameter type.  Use GDB's print functions, and use
10143         core_addr_to_string where appropriate.
10144         (riscv_push_dummy_call): Use core_addr_to_string where
10145         appropriate, update call to riscv_print_arg_location, and reindent
10146         a few lines.
10147         (riscv_return_value): Update call to riscv_print_arg_location.
10148
10149 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10150             Tim Newsome <tim@sifive.com>
10151             Albert Ou <a0u@eecs.berkeley.edu>
10152             Darius Rad <darius@bluespec.com>
10153
10154         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10155         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10156         (ALLDEPFILES): Add riscv-tdep.c
10157         * configure.tgt: Add riscv support.
10158         * riscv-tdep.c: New file.
10159         * riscv-tdep.h: New file.
10160         * NEWS: Mention new target.
10161         * MAINTAINERS: Add entry for riscv.
10162
10163 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10164
10165         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10166         fields within aggregates.
10167
10168 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10169
10170         * record-btrace.c (btrace_print_lines): Change type of flags to
10171         gdb_disassembly_flags.
10172
10173 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10174
10175         * fbsd-nat.c: Include "inf-ptrace.h".
10176         (USE_SIGTRAP_SIGINFO): Conditionally define.
10177         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10178         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10179         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10180         function.
10181         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10182         Likewise.
10183         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10184         Likewise.
10185         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10186         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10187         "supports_stopped_by_hw_breakpoint" target methods.
10188
10189 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10190
10191         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10192         * fbsd-nat.c (debug_fbsd_nat): New variable.
10193         (show_fbsd_nat_debug): New function.
10194         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10195         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10196
10197 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10198
10199         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10200         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10201         prototype.
10202         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10203         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10204         method.
10205
10206 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10207
10208         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10209         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10210
10211 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10212
10213         * charset.c (struct charset_vector): New.
10214         (charsets): Change type to charset_vector.
10215         (find_charset_names): Adjust.
10216         (add_one): Adjust.
10217         (_initialize_charset): Adjust.
10218
10219 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10220
10221         * progspace.h (struct program_space) <deleted_solibs>: Change
10222         type to std::vector<std::string>.
10223         * progspace.c (clear_program_space_solib_cache): Adjust.
10224         * breakpoint.c (print_solib_event): Adjust.
10225         (check_status_catch_solib): Adjust.
10226         * solib.c (update_solib_list): Adjust.
10227         * ui-out.h (class ui_out) <field_string>: New overload.
10228         * ui-out.c (ui_out::field_string): New overload.
10229
10230 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10231
10232         * progspace.h (struct program_space): Add constructor and
10233         destructor, initialize fields.
10234         (add_program_space): Remove.
10235         * progspace.c (add_program_space): Rename to...
10236         (program_space::program_space): ... this.
10237         (release_program_space): Rename to...
10238         (program_space::~program_space): ... this.
10239         (delete_program_space): Use delete to delete program_space.
10240         (initialize_progspace): Use new to allocate program_space.
10241         * inferior.c (add_inferior_with_spaces): Likewise.
10242         (clone_inferior_command): Likewise.
10243         * infrun.c (follow_fork_inferior): Likewise.
10244         (handle_vfork_child_exec_or_exit): Likewise.
10245
10246 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10247
10248         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10249         (delim_string_to_char_ptr_vec): Return std::vector of
10250         gdb::unique_xmalloc_ptr.
10251         (dirnames_to_char_ptr_vec_append): Take std::vector of
10252         gdb::unique_xmalloc_ptr.
10253         (dirnames_to_char_ptr_vec): Return std::vector of
10254         gdb::unique_xmalloc_ptr.
10255         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10256         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10257         (delim_string_to_char_ptr_vec): Return an std::vector of
10258         gdb::unique_xmalloc_ptr, adjust the code.
10259         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10260         gdb::unique_xmalloc_ptr, adjust the code.
10261         (dirnames_to_char_ptr_vec): Return an std::vector of
10262         gdb::unique_xmalloc_ptr, adjust the code.
10263         * auto-load.c (auto_load_safe_path_vec): Change type to
10264         std::vector of gdb::unique_xmalloc_ptr.
10265         (auto_load_expand_dir_vars): Return an std::vector of
10266         gdb::unique_xmalloc_ptr, adjust the code.
10267         (auto_load_safe_path_vec_update): Adjust.
10268         (filename_is_in_auto_load_safe_path_vec): Adjust.
10269         (auto_load_objfile_script_1): Adjust.
10270         * build-id.c (build_id_to_debug_bfd): Adjust.
10271         * linux-thread-db.c (thread_db_load_search): Adjust.
10272         * source.c (add_path): Adjust.
10273         (openp): Adjust.
10274         * symfile.c (find_separate_debug_file): Adjust.
10275         * utils.c (do_free_char_ptr_vec): Remove.
10276         (make_cleanup_free_char_ptr_vec): Remove.
10277
10278 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10279
10280         PR gdb/22907
10281         * common/pathstuff.c: Conditionally include "<windows.h>".
10282
10283 2018-03-01  Georg Sauthoff  <mail@georg.so>
10284
10285         PR gdb/22888
10286         * gcore.in: Quote variables and switch interpreter to bash.
10287
10288 2018-03-01  Tom Tromey  <tom@tromey.com>
10289
10290         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10291         assertion.  Add assertion for discriminant_index.
10292         (quirk_rust_enum): Use correct base type name in univariant case.
10293
10294 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10295
10296         * record.c (get_call_history_modifiers): Return a
10297         record_print_flags.
10298         (cmd_record_call_history): Adjust.
10299         * record-btrace.c (record_btrace_call_history): Adjust.
10300         (record_btrace_call_history_range): Adjust.
10301         (record_btrace_call_history_from): Adjust.
10302         * target-debug.h (target_debug_print_record_print_flags): New.
10303         * target-delegates.c: Re-generate.
10304         * target.c (target_call_history): Change flags type.
10305         (target_call_history_from): Likewise.
10306         (target_call_history_range): Likewise.
10307         * target.h (struct target_ops) <target_call_history>: Likewise.
10308         (target_call_history_from): Likewise.
10309         (target_call_history_range): Likewise.
10310
10311 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10312             Simon Marchi  <simon.marchi@polymtl.ca>
10313
10314         * common/common-utils.c: Include "sys/stat.h".
10315         (is_regular_file): Move here from "source.c"; change return
10316         type to "bool".
10317         * common/common-utils.h (is_regular_file): New prototype.
10318         * common/pathstuff.c (contains_dir_separator): New function.
10319         * common/pathstuff.h (contains_dir_separator): New prototype.
10320         * source.c: Don't include "sys/stat.h".
10321         (is_regular_file): Move to "common/common-utils.c".
10322
10323 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10324
10325         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10326         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10327         * auto-load.c: Include "common/pathstuff.h".
10328         * common/common-def.h (current_directory): Move here.
10329         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10330         function.
10331         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10332         prototype.
10333         * common/pathstuff.c: New file.
10334         * common/pathstuff.h: New file.
10335         * compile/compile.c: Include "common/pathstuff.h".
10336         * defs.h (current_directory): Move to "common/common-defs.h".
10337         * dwarf2read.c: Include "common/pathstuff.h".
10338         * exec.c: Likewise.
10339         * guile/scm-safe-call.c: Likewise.
10340         * linux-thread-db.c: Likewise.
10341         * main.c: Likewise.
10342         * nto-tdep.c: Likewise.
10343         * objfiles.c: Likewise.
10344         * source.c: Likewise.
10345         * symtab.c: Likewise.
10346         * utils.c: Include "common/pathstuff.h".
10347         (gdb_realpath): Move to "common/pathstuff.c".
10348         (gdb_realpath_keepfile): Likewise.
10349         (gdb_abspath): Likewise.
10350         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10351         (gdb_realpath_keepfile): Likewise.
10352         (gdb_abspath): Likewise.
10353
10354 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10355
10356         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10357         wildcard process pid for super_resume for kernels with a
10358         specific bug.
10359
10360 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10361
10362         * compile/compile.c (get_args): Add additional comments
10363         explaining function.
10364
10365 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10366             Tom Tromey  <tom@tromey.com>
10367
10368         * target.h (memory_write_request_s): Remove typedef.  Don't define
10369         VEC.
10370         (target_write_memory_blocks): Change argument to std::vector.
10371         (struct memory_write_request): Add constructor.
10372         * target-memory.c (compare_block_starting_address): Return bool.
10373         Change argument types.
10374         (claim_memory): Change arguments to use std::vector.
10375         (split_regular_and_flash_blocks, blocks_to_erase)
10376         (compute_garbled_blocks): Likewise.
10377         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10378         (target_write_memory_blocks): Change argument to std::vector.
10379         * symfile.c (struct load_section_data): Add constructor and
10380         destructor.  Use std::vector for "requests".
10381         (struct load_progress_data): Add initializers.
10382         (load_section_callback): Update.  Use "new".
10383         (clear_memory_write_data): Remove.
10384         (generic_load): Update.
10385
10386 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10387
10388         * arch/aarch64.h: Use common/tdesc.h.
10389
10390 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10391
10392         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10393         architecture with a 64-bit ABI.
10394
10395 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10396
10397         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10398         ahead of target description loading.
10399
10400 2018-02-26  Tom Tromey  <tom@tromey.com>
10401
10402         * stack.c (backtrace_command_1): Update.
10403         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10404         of "flags".
10405         * python/py-framefilter.c (py_print_frame)
10406         (gdbpy_apply_frame_filter): Change type of "flags".
10407         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10408         of "flags".
10409         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10410         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10411         * extension.h (enum frame_filter_flag): Rename from
10412         frame_filter_flags.
10413         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10414         (apply_ext_lang_frame_filter): Change type of "flags".
10415         * extension.c (apply_ext_lang_frame_filter): Change type of
10416         "flags".
10417         * extension-priv.h (struct extension_language_ops)
10418         <apply_frame_filter>: Change type of "flags".
10419
10420 2018-02-26  Tom Tromey  <tom@tromey.com>
10421
10422         PR python/16497:
10423         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10424         off-by-one in py_end computation.
10425         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10426         PRINT_MORE_FRAMES.
10427         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10428         constant.
10429
10430 2018-02-26  Tom Tromey  <tom@tromey.com>
10431
10432         * dwarf2read.c (struct variant_field): New.
10433         (struct nextfield) <variant>: New field.
10434         (dwarf2_add_field): Handle DW_TAG_variant_part.
10435         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10436         discriminated union.
10437         (read_structure_type): Handle DW_TAG_variant_part.
10438         (handle_struct_member_die): New function, extracted from
10439         process_structure_scope.  Handle DW_TAG_variant.
10440         (process_structure_scope): Handle discriminated unions.  Call
10441         handle_struct_member_die.
10442
10443 2018-02-26  Tom Tromey  <tom@tromey.com>
10444
10445         * rust-lang.h (rust_last_path_segment): Declare.
10446         * rust-lang.c (rust_last_path_segment): Now public.  Change
10447         contract.
10448         (struct disr_info): Remove.
10449         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10450         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10451         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10452         (rust_enum_p, rust_enum_variant): New function.
10453         (rust_underscore_fields): Remove "offset" parameter.
10454         (rust_print_enum): New function.
10455         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10456         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10457         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10458         enums.
10459         (rust_internal_print_type): New function, from rust_print_type.
10460         Remove enum code.
10461         (rust_print_type): Call rust_internal_print_type.
10462         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10463         Update enum handling.
10464         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10465         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10466         (rust_union_quirks): New functions.
10467         (process_full_comp_unit, process_full_type_unit): Call
10468         rust_union_quirks.
10469         (process_structure_scope): Update rust_unions if necessary.
10470
10471 2018-02-26  Tom Tromey  <tom@tromey.com>
10472
10473         * value.h (value_union_variant): Declare.
10474         * valops.c (value_union_variant): New function.
10475         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10476         (struct discriminant_info): New.
10477         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10478         enumerator.
10479         (struct main_type) <flag_discriminated_union>: New field.
10480
10481 2018-02-26  Tom Tromey  <tom@tromey.com>
10482
10483         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10484         unittests/unpack-selftests.c.
10485         * unittests/unpack-selftests.c: New file.
10486         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10487
10488 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10489
10490         * dwarf2read.c (struct partial_die_info) <read>: New method.
10491         (read_partial_die): Remove the declaration.
10492         (load_partial_dies): Update.
10493         (partial_die_info::partial_die_info):
10494         (read_partial_die): Change it to partial_die_info::read.
10495
10496 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10497
10498         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10499         (fixup_partial_die): Remove declaration.
10500         (scan_partial_symbols): Update.
10501         (partial_die_parent_scope): Likewise.
10502         (partial_die_full_name): Likewise.
10503         (fixup_partial_die): Change it to partial_die_info::fixup.
10504
10505 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10506
10507         * dwarf2read.c (read_partial_die): Update the declaration.
10508         (load_partial_dies): Caller update.
10509         (read_partial_die): Remove one argument abbrev_len.
10510
10511 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10512
10513         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10514         assignment operator.
10515         (load_partial_dies): Use ctor and copy ctor.
10516         (read_partial_die): Update.
10517         (dwarf2_cu::find_partial_die): Use ctor.
10518
10519 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10520
10521         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10522         (find_partial_die_in_comp_unit): Change it to
10523         dwarf2_cu::find_partial_die.
10524         (find_partial_die): Update.
10525
10526 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10527
10528         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10529         is NULL.
10530
10531 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10532
10533         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10534
10535 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10536
10537         * arch/amd64.h: Use common/tdesc.h.
10538         * arch/i386.c: Likewise.
10539         * arch/i386.h: Likewise.
10540         * arch/tic6x.c: Likewise.
10541         * arch/tdesc.h: Move file from here...
10542         * common/tdesc.h: ...to here.
10543         * features/aarch64-core.c: Regenerate.
10544         * features/aarch64-fpu.c: Regenerate.
10545         * features/i386/32bit-avx.c: Regenerate.
10546         * features/i386/32bit-avx512.c: Regenerate.
10547         * features/i386/32bit-core.c: Regenerate.
10548         * features/i386/32bit-linux.c: Regenerate.
10549         * features/i386/32bit-mpx.c: Regenerate.
10550         * features/i386/32bit-pkeys.c: Regenerate.
10551         * features/i386/32bit-sse.c: Regenerate.
10552         * features/i386/64bit-avx.c: Regenerate.
10553         * features/i386/64bit-avx512.c: Regenerate.
10554         * features/i386/64bit-core.c: Regenerate.
10555         * features/i386/64bit-linux.c: Regenerate.
10556         * features/i386/64bit-mpx.c: Regenerate.
10557         * features/i386/64bit-pkeys.c: Regenerate.
10558         * features/i386/64bit-segments.c: Regenerate.
10559         * features/i386/64bit-sse.c: Regenerate.
10560         * features/i386/x32-core.c: Regenerate.
10561         * features/tic6x-c6xp.c: Regenerate.
10562         * features/tic6x-core.c: Regenerate.
10563         * features/tic6x-gp.c: Regenerate.
10564         * target-descriptions.c: Use common/tdesc.h.
10565         * target-descriptions.h: Likewise.
10566
10567 2018-02-24  Tom Tromey  <tom@tromey.com>
10568
10569         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10570         (try_thread_db_load_from_dir, thread_db_load_search): Use
10571         std::string.
10572         (info_auto_load_libthread_db_compare): Return bool.  Change
10573         argument types.
10574         (info_auto_load_libthread_db): Use std::vector, std::string.
10575         Remove cleanups.
10576
10577 2018-02-24  Tom Tromey  <tom@tromey.com>
10578
10579         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10580         std::string.
10581         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10582         std::string*.
10583         * gdbarch.c: Rebuild.
10584         * gdbarch.h: Rebuild.
10585         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10586         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10587         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10588         std::string*.
10589
10590 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10591
10592         * gdbtypes.h (sect_offset): Change type to uint64_t.
10593         (sect_offset_str): New function.
10594         * dwarf2read.c (create_addrmap_from_aranges): Use
10595         sect_offset_str.
10596         (error_check_comp_unit_head): Likewise.
10597         (create_debug_type_hash_table): Likewise.
10598         (read_cutu_die_from_dwo): Likewise.
10599         (init_cutu_and_read_dies): Likewise.
10600         (init_cutu_and_read_dies_no_follow): Likewise.
10601         (process_psymtab_comp_unit_reader): Likewise.
10602         (partial_die_parent_scope): Likewise.
10603         (peek_die_abbrev): Likewise.
10604         (process_queue): Likewise.
10605         (dwarf2_physname): Likewise.
10606         (read_namespace_alias): Likewise.
10607         (read_import_statement): Likewise.
10608         (create_dwo_cu_reader): Likewise.
10609         (create_cus_hash_table): Likewise.
10610         (lookup_dwo_cutu): Likewise.
10611         (inherit_abstract_dies): Likewise.
10612         (read_func_scope): Likewise.
10613         (read_call_site_scope): Likewise.
10614         (dwarf2_add_member_fn): Likewise.
10615         (read_common_block): Likewise.
10616         (read_module_type): Likewise.
10617         (read_typedef): Likewise.
10618         (read_subrange_type): Likewise.
10619         (load_partial_dies): Likewise.
10620         (read_partial_die): Likewise.
10621         (find_partial_die): Likewise.
10622         (read_str_index): Likewise.
10623         (dwarf2_string_attr): Likewise.
10624         (build_error_marker_type): Likewise.
10625         (lookup_die_type): Likewise.
10626         (dump_die_shallow): Likewise.
10627         (follow_die_ref): Likewise.
10628         (dwarf2_fetch_die_loc_sect_off): Likewise.
10629         (dwarf2_fetch_constant_bytes): Likewise.
10630         (follow_die_sig): Likewise.
10631         (get_signatured_type): Likewise.
10632         (get_DW_AT_signature_type): Likewise.
10633         (dwarf2_find_containing_comp_unit): Likewise.
10634         (set_die_type): Likewise.
10635
10636 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10637
10638         * arch/aarch64.c: Include "common-defs.h".
10639         * arch/amd64.c: Likewise.
10640         * arch/i386.c: Likewise.
10641
10642 2018-02-21  Tom Tromey  <tom@tromey.com>
10643
10644         * value.h: (extract_field_op): Update.
10645         * eval.c (extract_field_op): Return a const char *.
10646         * expression.h (parse_expression_for_completion): Update.
10647         * completer.c (complete_expression): Update.
10648         (add_struct_fields): Make fieldname const.
10649         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10650         (mark_completion_tag, parse_exp_in_context_1): Update.
10651         (parse_expression_for_completion): Change "name" to
10652         unique_xmalloc_ptr*.
10653
10654 2018-02-21  Tom Tromey  <tom@tromey.com>
10655
10656         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10657
10658 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10659
10660         * avr-tdep.c (avr_read_pc): Change parameter type to
10661         readable_regcache.
10662         * gdbarch.sh (read_pc): Likewise.
10663         * gdbarch.c: Re-generated.
10664         * gdbarch.h: Re-generated.
10665         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10666         readable_regcache.
10667         * ia64-tdep.c (ia64_read_pc): Likewise.
10668         * mips-tdep.c (mips_read_pc): Likewise.
10669         * spu-tdep.c (spu_read_pc): Likewise.
10670
10671 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10672
10673         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10674         * regcache-dump.c: New file.
10675         * regcache.c: Move register_dump to regcache-dump.c.
10676         (maintenance_print_registers): Likewise.
10677         (maintenance_print_raw_registers): Likewise.
10678         (maintenance_print_cooked_registers): Likewise.
10679         (maintenance_print_register_groups): Likewise.
10680         (maintenance_print_remote_registers): Likewise.
10681         (_initialize_regcache): Likewise.
10682         * regcache.h (register_dump): Moved from regcache.c.
10683
10684 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10685
10686         * regcache.c (regcache::regcache): Update.
10687         (regcache::invalidate): Move it to detached_regcache::invalidate.
10688         (get_thread_arch_aspace_regcache): Update.
10689         (regcache::raw_update): Update.
10690         (regcache::cooked_read): Remove some code.
10691         (regcache::cooked_read_value): Likewise.
10692         (regcache::raw_write): Remove assert on m_readonly_p.
10693         (regcache::raw_supply_integer): Move it to
10694         detached_regcache::raw_supply_integer.
10695         (regcache::raw_supply_zeroed): Likewise.
10696         * regcache.h (detached_regcache) <raw_supply_integer>: New
10697         declaration.
10698         <raw_supply_zeroed, invalidate>: Likewise.
10699         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10700         <invalidate>: Likewise.
10701         <m_readonly_p>: Removed.
10702
10703 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10704
10705         * infcmd.c (get_return_value): Let stop_regs point to
10706         get_current_regcache.
10707         * regcache.c (regcache::regcache): Remove.
10708         (register_dump_reg_buffer): New class.
10709         (regcache_print): Adjust.
10710         * regcache.h (regcache): Remove constructors.
10711
10712 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10713
10714         * regcache.c (class register_dump): New class.
10715         (register_dump_regcache, register_dump_none): New class.
10716         (register_dump_remote, register_dump_groups): New class.
10717         (regcache_print): Update.
10718         * regcache.h (regcache_dump_what): Move it to regcache.c.
10719         (regcache) <dump>: Remove.
10720
10721 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10722
10723         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10724          reg_buffer_rw *.
10725         (jit_unwind_reg_set_impl): Call raw_supply.
10726         (jit_frame_sniffer): Use reg_buffer_rw.
10727         * record-full.c (record_full_core_regbuf): Change its type.
10728         (record_full_core_open_1): Use reg_buffer_rw.
10729         (record_full_close): Likewise.
10730         (record_full_core_fetch_registers): Use regcache->raw_supply.
10731         (record_full_core_store_registers): Likewise.
10732         * regcache.c (regcache::get_register_status): Move it to
10733         reg_buffer.
10734         (regcache_raw_set_cached_value): Remove.
10735         (regcache::raw_set_cached_value): Remove.
10736         (regcache::raw_write): Call raw_supply.
10737         (regcache::raw_supply): Move it to reg_buffer_rw.
10738         * regcache.h (regcache_raw_set_cached_value): Remove.
10739         (reg_buffer_rw): New class.
10740
10741 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10742
10743         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10744         readonly_detached_regcache.
10745         (dummy_frame_prev_register): Use regcache->cooked_read.
10746         * frame.c (frame_save_as_regcache): Change return type.
10747         (frame_pop): Update.
10748         * frame.h (frame_save_as_regcache): Update declaration.
10749         * inferior.h (get_infcall_suspend_state_regcache): Update
10750         declaration.
10751         * infrun.c (infcall_suspend_state) <registers>: use
10752         readonly_detached_regcache.
10753         (save_infcall_suspend_state): Don't use regcache_dup.
10754         (get_infcall_suspend_state_regcache): Change return type.
10755         * linux-fork.c (struct fork_info) <savedregs>: Change to
10756         readonly_detached_regcache.
10757         <pc>: New field.
10758         (fork_save_infrun_state): Don't use regcache_dup.
10759         (info_checkpoints_command): Adjust.
10760         * mi/mi-main.c (register_changed_p): Update declaration.
10761         (mi_cmd_data_list_changed_registers): Use
10762         readonly_detached_regcache.
10763         (register_changed_p): Change parameter type to
10764         readonly_detached_regcache.
10765         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10766         readonly_detached_regcache.
10767         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10768         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10769         New.
10770         (regcache::save): Move it to reg_buffer.
10771         (regcache::restore): Change parameter type.
10772         (regcache_dup): Remove.
10773         * regcache.h (reg_buffer) <save>: New method.
10774         (readonly_detached_regcache): New class.
10775         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10776         readonly_detached_regcache.
10777         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10778
10779 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10780
10781         * frame.c (frame_save_as_regcache): Use regcache method save.
10782         (frame_pop): Use regcache method restore.
10783         * infrun.c (restore_infcall_suspend_state): Likewise.
10784         * linux-fork.c (fork_load_infrun_state): Likewise.
10785         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10786         save.
10787         * regcache.c (regcache_save): Remove.
10788         (regcache::restore): More asserts.
10789         (regcache_cpy): Remove.
10790         * regcache.h (regcache_save): Remove the declaration.
10791         (regcache::restore): Move from private to public.
10792         Remove the friend declaration of regcache_cpy.
10793         (regcache_cpy): Remove declaration.
10794
10795 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10796
10797         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10798         parameter type to 'readable_regcache *'.
10799         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10800         * arm-tdep.c (arm_neon_quad_read): Likewise.
10801         (arm_pseudo_read): Likewise.
10802         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10803         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10804         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10805         * gdbarch.c: Re-generated.
10806         * gdbarch.h: Re-generated.
10807         * gdbarch.sh (pseudo_register_read): Change parameter type to
10808         'readable_regcache *'.
10809         (pseudo_register_read_value): Likewise.
10810         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10811         (h8300_pseudo_register_read): Likewise.
10812         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10813         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10814         (i386_pseudo_register_read_into_value): Likewise.
10815         (i386_pseudo_register_read_value): Likewise.
10816         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10817         declaration.
10818         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10819         * m32c-tdep.c (m32c_raw_read): Likewise.
10820         (m32c_read_flg): Likewise.
10821         (m32c_banked_register): Likewise.
10822         (m32c_banked_read): Likewise.
10823         (m32c_sb_read): Likewise.
10824         (m32c_part_read): Likewise.
10825         (m32c_cat_read): Likewise.
10826         (m32c_r3r2r1r0_read): Likewise.
10827         (m32c_pseudo_register_read): Likewise.
10828         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10829         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10830         (mep_pseudo_cr64_read): Likewise.
10831         (mep_pseudo_register_read): Likewise.
10832         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10833         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10834         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10835         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10836         (regcache::cooked_read): Likewise.
10837         (regcache::cooked_read_value): Likewise.
10838         (regcache_cooked_read_signed):
10839         (regcache::cooked_read): Likewise.
10840         * regcache.h (readable_regcache): New class.
10841         (regcache): Inherit readable_regcache.  Move some methods to
10842         readable_regcache.
10843         * rl78-tdep.c (rl78_pseudo_register_read): Change
10844         parameter type to 'readable_regcache *'.
10845         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10846         (e500_pseudo_register_read): Change parameter type to
10847         'readable_regcache *'.
10848         (dfp_pseudo_register_read): Likewise.
10849         (vsx_pseudo_register_read): Likewise.
10850         (efpr_pseudo_register_read): Likewise.
10851         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10852         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10853         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10854         (sh64_pseudo_register_read): Likewise.
10855         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10856         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10857         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10858         (spu_pseudo_register_read): Likewise.
10859         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10860         (xtensa_pseudo_register_read): Likewise.
10861
10862 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10863
10864         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10865         (regcache::arch): Move it to reg_buffer::arch.
10866         (regcache::register_buffer): Likewise.
10867         (regcache::assert_regnum): Likewise.
10868         (regcache::num_raw_registers): Likewise.
10869         * regcache.h (reg_buffer): New class.
10870         (regcache): Inherit reg_buffer.
10871
10872 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10873
10874         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10875         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10876
10877 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
10878
10879         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10880
10881 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
10882
10883         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10884         (SFILES): Remove common/*.c files.
10885         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10886         * common/common.host: Add common reference.
10887         * configure.ac: Likewise.
10888         * configure: Regenerate.
10889
10890 2018-02-16  Yao Qi  <yao.qi@linaro.org>
10891
10892         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10893         (block_initialize_namespace): Use new.
10894         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10895         (dwarf2_free_objfile): Use delete.
10896         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10897         (copy_type_recursive): Use new.
10898         * gdb_obstack.h (allocate_on_obstack): New.
10899
10900 2018-02-15  Yao Qi  <yao.qi@linaro.org>
10901
10902         PR gdb/22849
10903         * inferior.c (exit_inferior_1): Reset inf->control.
10904
10905 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
10906
10907         * ada-lang.c (ada_to_fixed_value_create): Delete advance
10908         declaration.
10909
10910 2018-02-14  Pedro Alves  <palves@redhat.com>
10911
10912         * frame-unwind.c (frame_unwind_try_unwinder): Always call
10913         frame_cleanup_after_sniffer on exception.
10914
10915 2018-02-14  Tom Tromey  <tom@tromey.com>
10916
10917         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10918         const.
10919         (solib_bfd_open): Make pathname const.
10920         * solib.c (solib_bfd_open): Make pathname const.
10921         * solib-spu.c (spu_bfd_fopen): Make name const.
10922         (spu_bfd_open): Make pathname const.
10923         * solib-darwin.c (darwin_bfd_open): Make pathname const.
10924         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10925
10926 2018-02-14  Tom Tromey  <tom@tromey.com>
10927
10928         * symfile.c (symfile_bfd_open): Update.
10929         * source.h (openp, source_full_path_of, find_and_open_source):
10930         Change argument type to unique_xmalloc_ptr.
10931         * source.c (openp): Take a unique_xmalloc_ptr.
10932         (source_full_path_of, find_and_open_source): Likewise.
10933         (open_source_file, symtab_to_fullname): Update.
10934         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10935         unique_xmalloc_ptr.
10936         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10937         (exec_file_find): Update.
10938         * psymtab.c (psymtab_to_fullname): Update.
10939         * nto-tdep.h (nto_find_and_open_solib): Update.
10940         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10941         unique_xmalloc_ptr.
10942         * exec.c (exec_file_attach): Update.
10943         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10944         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10945
10946 2018-02-14  Tom Tromey  <tom@tromey.com>
10947
10948         * solib.c: Include source.h.
10949         * nto-tdep.c: Include source.h.
10950         * mi/mi-cmd-env.c: Include source.h.
10951         * infcmd.c: Include source.h.
10952         * exec.c: Include source.h.
10953         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10954         (add_path, directory_switch, source_path, init_source_path): Move
10955         declarations...
10956         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10957         (add_path, directory_switch, source_path, init_source_path):
10958         ...here.
10959
10960 2018-02-14  Tom Tromey  <tom@tromey.com>
10961
10962         * solist.h (exec_file_find, solib_find): Return
10963         unique_xmalloc_ptr.
10964         (solib_bfd_fopen): Take a const char *.
10965         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10966         (exec_file_find, solib_find): Likewise.
10967         (solib_bfd_fopen): Do not take ownership of "pathname".
10968         (solib_bfd_open): Use unique_xmalloc_ptr.
10969         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10970         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10971         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10972         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10973
10974 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
10975
10976         * ada-lang.c (name_match_type_from_name): Remove reference to
10977         ada_name_for_lookup in function's documentation.
10978         * ada-lang.h (ada_name_for_lookup): Delete declaration.
10979
10980 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10981
10982         * defs.h (enum openp_flags): New enum.
10983         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10984         Move to enum openp_flags.
10985         (openp_flags): New enum flags.
10986         (openp): Change parameter type to openp_flags.
10987         * source.c (openp): Change parameter type to openp_flags.
10988         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10989         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10990
10991 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10992
10993         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10994         per-command.
10995
10996 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10997
10998         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10999         into...
11000         (class dwarf2_queue_guard): ...the destructor of this new class.
11001         (dw2_do_instantiate_symtab): Create instance of the new class
11002         dwarf2_queue_guard, remove cleanup.
11003
11004 2018-02-09  Tom Tromey  <tom@tromey.com>
11005
11006         * source.c (find_source_lines): Don't reference past the end of
11007         the vector.
11008
11009 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11010
11011         * remote.c (remote_btrace_maybe_reopen): Change error message.
11012         * btrace.c (btrace_enable): Likewise.
11013         (parse_xml_btrace): Likewise.
11014         (parse_xml_btrace_conf): Likewise.
11015
11016 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11017
11018         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11019         (linux_enable_pt, linux_enable_bts): Call
11020         diagnose_perf_event_open_fail.
11021
11022 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11023
11024         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11025         Remove parameter and change return type.  Update callers.  Move it.
11026         (linux_enable_bts, linux_enable_pt): Improve error message.
11027         (linux_enable_pt): Remove zero buffer size check.
11028         (linux_enable_btrace): Improve error messages.  Remove NULL return
11029         check.
11030
11031 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11032
11033         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11034         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11035         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11036         (linux_supports_pt, linux_supports_btrace): Remove.
11037         (linux_enable_bts): Call cpu_supports_bts.
11038         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11039         * remote.c (remote_supports_btrace): Remove.
11040         (init_remote_ops): Remove remote_supports_btrace.
11041         * target-delegates.c: Regenerated.
11042         * target.c (target_supports_btrace): Remove.
11043         * target.h (target_ops) <to_supports_btrace>: Remove
11044         (target_supports_btrace): Remove.
11045         * x86-linux-nat.c (x86_linux_create_target): Remove
11046         linux_supports_btrace.
11047
11048 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11049
11050         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11051         btrace failed.
11052         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11053         exception and use message in own exception.
11054
11055 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11056
11057         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11058         (perf_event_pt_event_type): Use gdb_file_up.
11059         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11060         scoped_fd, and scoped_mmap.
11061
11062 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11063
11064         * common/scoped_mmap.h: New.
11065         * unittests/scoped_mmap-selftest.c: New.
11066         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11067         unittests/scoped_mmap-selftest.c.
11068
11069 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11070
11071         * common/scoped_fd.h: New.
11072         * unittests/scoped_fd-selftest.c: New.
11073         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11074         unittests/scoped_fd-selftest.c.
11075
11076 2018-02-09  Tom Tromey  <tom@tromey.com>
11077
11078         * auto-load.c (auto_load_section_scripts): Use
11079         gdb::unique_xmalloc_ptr.
11080
11081 2018-02-09  Tom Tromey  <tom@tromey.com>
11082
11083         * auto-load.c (execute_script_contents): Use std::string.
11084
11085 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11086
11087         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11088         Python function, rather than a new command.
11089
11090 2018-02-08  Tom Tromey  <tom@tromey.com>
11091
11092         * solib.c (solib_find_1): Use std::string.
11093         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11094
11095 2018-02-08  Tom Tromey  <tom@tromey.com>
11096
11097         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11098
11099 2018-02-08  Tom Tromey  <tom@tromey.com>
11100
11101         * source.c (find_source_lines): Use gdb::def_vector.
11102
11103 2018-02-08  Tom Tromey  <tom@tromey.com>
11104
11105         * macrocmd.c (struct temporary_macro_definition): New.
11106         (macro_define_command): Use temporary_macro_definition.  Remove
11107         cleanups.
11108         (free_macro_definition_ptr): Remove.
11109
11110 2018-02-08  Tom Tromey  <tom@tromey.com>
11111
11112         * macroexp.c (maybe_expand): Use std::string.
11113
11114 2018-02-08  Tom Tromey  <tom@tromey.com>
11115
11116         * macroexp.c (struct macro_buffer): Add initializers for some
11117         members.
11118         (init_buffer, init_shared_buffer, free_buffer)
11119         (free_buffer_return_text): Remove.
11120         (macro_buffer): New constructors.
11121         (~macro_buffer): New destructor.
11122         (macro_buffer::set_shared): New method.
11123         (macro_buffer::resize_buffer, macro_buffer::appendc)
11124         (macro_buffer::appendmem): Now methods, not free functions.
11125         (set_token, append_tokens_without_splicing, stringify)
11126         (macro_stringify): Update.
11127         (gather_arguments): Change return type.  Remove argc_p argument,
11128         add args_ptr argument.  Use std::vector.
11129         (substitute_args): Remove argc argument.  Accept std::vector.
11130         (expand): Update.  Use std::vector.
11131         (scan, macro_expand, macro_expand_next): Update.
11132
11133 2018-02-08  Tom Tromey  <tom@tromey.com>
11134
11135         * symtab.c (default_collect_symbol_completion_matches_break_on):
11136         Use unique_xmalloc_ptr.
11137         * macroscope.h: (sal_macro_scope, user_macro_scope)
11138         (default_macro_scope): Return unique_xmalloc_ptr.
11139         * macroscope.c (sal_macro_scope, user_macro_scope)
11140         (default_macro_scope): Return unique_xmalloc_ptr.
11141         * macroexp.h (macro_expand, macro_expand_once): Return
11142         unique_xmalloc_ptr.
11143         * macroexp.c (macro_expand, macro_expand_once): Return
11144         unique_xmalloc_ptr.
11145         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11146         (info_macro_command, info_macros_command): Use
11147         unique_xmalloc_ptr.
11148         * compile/compile-c-support.c (write_macro_definitions): Use
11149         unique_xmalloc_ptr.
11150         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11151
11152 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11153
11154         * value.c (value_static_field): Assign field type instead of
11155         containing type when returning an optimized out value.
11156
11157 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11158
11159         * ft32-tdep.c (ft32_read_pc): Remove.
11160         (ft32_write_pc): Remove.
11161         (ft32_gdbarch_init): Update.
11162         * m32r-tdep.c (m32r_read_pc): Remove.
11163         (m32r_gdbarch_init): Update.
11164         * mep-tdep.c (mep_read_pc): Remove.
11165         (mep_gdbarch_init): Update.
11166         * microblaze-tdep.c (microblaze_write_pc): Remove.
11167         (microblaze_gdbarch_init): Update.
11168         * mn10300-tdep.c (mn10300_read_pc): Remove.
11169         (mn10300_write_pc): Remove.
11170         (mn10300_gdbarch_init): Update.
11171         * moxie-tdep.c (moxie_read_pc): Remove.
11172         (moxie_write_pc): Remove.
11173         (moxie_gdbarch_init): Update.
11174
11175 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11176
11177         * expprint.c (print_subexp_standard): Handle
11178         OP_F77_UNDETERMINED_ARGLIST.
11179         (dump_subexp_body_standard): Likewise.
11180
11181 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11182
11183         * target-descriptions.c (tdesc_element_visitor) Add empty
11184         implementations.
11185         (tdesc_type): Move make_gdb_type from here.
11186         (tdesc_type_builtin): Likewise.
11187         (tdesc_type_vector): Likewise.
11188         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11189         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11190         (make_gdb_type_union): Likewise.
11191         (make_gdb_type_flags): Likewise.
11192         (make_gdb_type_enum): Likewise.
11193         (make_gdb_type): New function.
11194         (tdesc_register_type): Use static make_gdb_type.
11195
11196 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11197
11198         * infcmd.c (default_print_one_register_info): Align natural-format
11199         column values consistently one under another.
11200         (pad_to_column): New function.
11201
11202 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11203
11204         * dwarf2read.c (dwarf2_physname): Move commment.
11205
11206 2018-02-01  Leszek Swirski  <leszeks@google.com>
11207
11208         * varobj.c (varobj_formatted_print_options): Allow recursive
11209         pretty printing if pretty printing is enabled.
11210
11211 2018-02-01  Leszek Swirski  <leszeks@google.com>
11212
11213         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11214         names after a structop as a filename.
11215
11216 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11217
11218         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11219         (arm_record_coproc_data_proc): Likewise.
11220
11221 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11222
11223         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11224
11225 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11226
11227         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11228         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11229
11230 2018-01-31  Pedro Alves  <palves@redhat.com>
11231
11232         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11233         * inflow.c (child_terminal_save_inferior): Wrap reference to
11234         tcgetpgrp in HAVE_TERMIOS_H.
11235         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11236         _WIN32.
11237         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11238         always iterate over all inferiors.
11239         (gdbsim_cntrl_c): Adjust.
11240         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11241
11242 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11243
11244         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11245         index type is objfile-owned if the element type is as well.
11246
11247 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11248
11249         GDB 8.1 released.
11250
11251 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11252
11253         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11254         "features/s390x-linux64.c".
11255         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11256         s390_linux32 and s390x_linux64.
11257         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11258         default tdesc.
11259         * s390-tdep.c: Include "features/s390-linux32.c" and
11260         "features/s390x-linux64.c".
11261         (s390_tdesc_valid): Add check for tdesc_has_registers.
11262         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11263         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11264         tdesc_s390x_linux64.
11265         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11266         tdesc_s390x_linux64 to...
11267         * s390-tdep.h: ...here.
11268
11269 2018-01-30  Pedro Alves  <palves@redhat.com>
11270
11271         PR gdb/13211
11272         * config.in, configure: Regenerate.
11273         * configure.ac: Check for getpgid.
11274         * go32-nat.c (go32_pass_ctrlc): New.
11275         (go32_target): Install it.
11276         * inf-child.c (inf_child_target): Install
11277         child_terminal_save_inferior, child_pass_ctrlc and
11278         child_interrupt.
11279         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11280         (inf_ptrace_target): No longer install it.
11281         * infcmd.c (interrupt_target_1): Adjust.
11282         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11283         (child_interrupt): Declare.
11284         (inferior::terminal_state): New.
11285         * inflow.c (struct terminal_info): Update comments.
11286         (inferior_process_group): Delete.
11287         (terminal_is_ours): Delete.
11288         (gdb_tty_state): New.
11289         (child_terminal_init): Adjust.
11290         (is_gdb_terminal, sharing_input_terminal_1)
11291         (sharing_input_terminal): New functions.
11292         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11293         Set the process's actual process group in the foreground if
11294         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11295         mark terminal as the inferior's if not sharing GDB's terminal.
11296         Don't check attach_flag.
11297         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11298         pass down a target_terminal_state.
11299         (child_terminal_save_inferior): New, factored out from ...
11300         (child_terminal_ours_1): ... this.  Handle
11301         target_terminal_state::is_ours_for_output.
11302         (child_interrupt, child_pass_ctrlc): New.
11303         (inflow_inferior_exit): Clear the inferior's terminal_state.
11304         (copy_terminal_info): Copy the inferior's terminal state.
11305         (_initialize_inflow): Remove reference to terminal_is_ours.
11306         * inflow.h (inferior_process_group): Delete.
11307         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11308         * procfs.c (procfs_target): Don't install procfs_interrupt.
11309         (procfs_interrupt): Delete.
11310         * remote.c (remote_serial_quit_handler): Adjust.
11311         (remote_interrupt): Remove ptid parameter.  Adjust.
11312         * target-delegates.c: Regenerate.
11313         * target.c: Include "terminal.h".
11314         (target_terminal::terminal_state): Rename to ...
11315         (target_terminal::m_terminal_state): ... this.
11316         (target_terminal::init): Adjust.
11317         (target_terminal::inferior): Adjust to per-inferior
11318         terminal_state.
11319         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11320         (target_terminal::ours, target_terminal::ours_for_output): Use
11321         target_terminal_is_ours_kind.
11322         (target_interrupt): Remove ptid parameter.  Adjust.
11323         (default_target_pass_ctrlc): Adjust.
11324         * target.h (target_ops::to_terminal_save_inferior): New field.
11325         (target_ops::to_interrupt): Remove ptid_t parameter.
11326         (target_interrupt): Remove ptid_t parameter.  Update comment.
11327         (target_pass_ctrlc): Update comment.
11328         * target/target.h (target_terminal_state): New scoped enum,
11329         factored out of ...
11330         (target_terminal::terminal_state): ... here.
11331         (target_terminal::inferior): Update comments.
11332         (target_terminal::restore_inferior): New.
11333         (target_terminal::is_inferior, target_terminal::is_ours)
11334         (target_terminal::is_ours_for_output): Adjust.
11335         (target_terminal::scoped_restore_terminal_state): Adjust to
11336         rename, and call restore_inferior() instead of inferior().
11337         (target_terminal::scoped_restore_terminal_state::m_state): Change
11338         type.
11339         (target_terminal::terminal_state): Rename to ...
11340         (target_terminal::m_terminal_state): ... this and change type.
11341
11342 2018-01-30  Pedro Alves  <palves@redhat.com>
11343
11344         * linux-nat.c (wait_for_signal): New function.
11345         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11346         directly.
11347         (async_terminal_is_ours)
11348         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11349         (linux_nat_add_target): Don't override
11350         to_terminal_inferior/to_terminal_ours.
11351
11352 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11353
11354         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11355
11356 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11357
11358         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11359         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11360         dwarf2_per_objfile_free here.
11361         (dwarf2_per_objfile_free): Remove.
11362         (_initialize_dwarf2_read): Don't register
11363         dwarf2_per_objfile_free as a registry cleanup.
11364
11365 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11366
11367         Avoid compilation errors in MinGW native builds
11368
11369         The error is triggered by including python-internal.h, and the
11370         error message is:
11371
11372              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11373                       from build-gnulib/import/math.h:27,
11374                       from d:/usr/Python26/include/pyport.h:235,
11375                       from d:/usr/Python26/include/Python.h:58,
11376                       from python/python-internal.h:94,
11377                       from python/py-arch.c:24:
11378              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11379         using ::hypot;
11380                 ^~~~~
11381
11382         This happens because Python headers define 'hypot' to expand t
11383         '_hypot' in the Windows builds.
11384         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11385         'hypoth'.  This avoids a compilation error.
11386
11387 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11388
11389         * MAINTAINERS (Write After Approval): Fix ordering.
11390
11391 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11392
11393         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11394
11395 2018-01-26  Alan Modra  <amodra@gmail.com>
11396
11397         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11398         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11399         Remove nop.  Make const.  Comment.
11400         (powerpc32_plt_stub_so_2): New.
11401         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11402         Correct count.  Update uses.
11403         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11404         Move common code reading PLT entry word.  Correct
11405         powerpc32_plt_stub PLT address calculation.
11406         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11407         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11408         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11409         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11410         (ppc64_standard_linkage8): Likewise.
11411         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11412         Correct insns description.
11413         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11414
11415 2018-01-24  Pedro Alves  <palves@redhat.com>
11416
11417         GCC PR libstdc++/83906
11418         * gdbtypes.c (operator==(const dynamic_prop &,
11419         const dynamic_prop &)): New.
11420         (operator==(const range_bounds &, const range_bounds &)): New.
11421         (check_types_equal): Use them instead of memcmp.
11422         * gdbtypes.h (operator==(const dynamic_prop &,
11423         const dynamic_prop &)): Declare.
11424         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11425         (operator==(const range_bounds &, const range_bounds &)): Declare.
11426         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11427
11428 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11429
11430         * s390-linux-tdep.c (s390_record_address_mask)
11431         (s390_record_calc_disp_common, s390_record_calc_disp)
11432         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11433         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11434         (s390_process_record): Move to s390-tdep.c.
11435         (s390_linux_init_abi_any): Adjust.
11436         * s390-tdep.c (s390_record_address_mask)
11437         (s390_record_calc_disp_common, s390_record_calc_disp)
11438         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11439         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11440         (s390_process_record): Moved from s390-linux-tdep.c
11441         (s390_gdbarch_init): Adjust.
11442
11443 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11444
11445         * s390-linux-nat.c (s390-tdep.h): New include.
11446         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11447         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11448         (ALLDEPFILES): Add s390-tdep.c.
11449         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11450         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11451         * s390-tdep.h: ...this.  New file.
11452         * s390-linux-tdep.c (s390-tdep.h): New include.
11453         (_initialize_s390_tdep): Rename to...
11454         (_initialize_s390_linux_tdep): ...this and adjust.
11455         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11456         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11457         s390-tdep.h.
11458         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11459         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11460         (s390_is_partial_instruction, s390_software_single_step)
11461         (is_non_branch_ril, s390_displaced_step_copy_insn)
11462         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11463         (s390_prologue_data, s390_addr, s390_store, s390_load)
11464         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11465         (s390_register_call_saved, s390_guess_tracepoint_registers)
11466         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11467         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11468         (s390_pseudo_register_name, s390_pseudo_register_type)
11469         (s390_pseudo_register_read, s390_pseudo_register_write)
11470         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11471         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11472         (s390_addr_bits_remove, s390_address_class_type_flags)
11473         (s390_address_class_type_flags_to_name)
11474         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11475         (s390_function_arg_float, s390_function_arg_vector)
11476         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11477         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11478         (s390_frame_align, s390_register_return_value, s390_return_value)
11479         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11480         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11481         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11482         (s390_trad_frame_prev_register, s390_unwind_cache)
11483         (s390_prologue_frame_unwind_cache)
11484         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11485         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11486         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11487         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11488         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11489         (s390_frame_base_address, s390_local_base_address)
11490         (s390_frame_base, s390_gcc_target_options)
11491         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11492         (s390_validate_reg_range, s390_tdesc_valid)
11493         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11494         * s390-tdep.c: ...this.  New file.
11495
11496 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11497
11498         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11499         (s390_process_record, s390_gdbarch_tdep_alloc)
11500         (s390_linux_init_abi_any): Use/set new hook.
11501
11502 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11503
11504         * s390-linux-tdep.c (osabi.h): New include.
11505         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11506         (s390_linux_init_abi_any): New functions.
11507         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11508
11509 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11510
11511         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11512         tdesc_has_registers check
11513
11514 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11515
11516         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11517         (s390_validate_reg_range): New macro.
11518         (s390_gdbarch_init): Adjust.
11519
11520 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11521
11522         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11523         (s390_gdbarch_tdep_alloc): Adjust.
11524         (s390_gdbarch_init): Adjust.
11525
11526 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11527
11528         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11529         <have_tdb>: Change type to bool.
11530         (s390_gdbarch_tdep_alloc): Adjust.
11531         (s390_gdbarch_init): Adjust.
11532
11533 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11534
11535         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11536         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11537         (s390_gdbarch_tdep_alloc): New function.
11538         (s390_gdbarch_init): Allocate tdep at start and use its fields
11539         instead of separate variables.
11540
11541 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11542
11543         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11544         when looking for cached gdbarch and add comment for remaining.
11545
11546 2018-01-22  Pedro Alves  <palves@redhat.com>
11547             Sergio Durigan Junior  <sergiodj@redhat.com>
11548
11549         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11550         case.
11551
11552 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11553
11554         * MAINTAINERS: Update my company e-mail address.
11555
11556 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11557
11558         * regcache.c (cooked_write_test): New function.
11559         (_initialize_regcache): Register the test.
11560
11561 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11562
11563         * ia64-tdep.c (ia64_pseudo_register_read): Call
11564         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11565         * m32c-tdep.c (m32c_cat_read): Likewise.
11566         (m32c_r3r2r1r0_read): Likewise.
11567         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11568         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11569
11570 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11571
11572         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11573         method raw_read instead of regcache_raw_read.
11574         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11575         * arm-tdep.c (arm_neon_quad_read): Likewise.
11576         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11577         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11578         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11579         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11580         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11581         (i386_pseudo_register_read_into_value): Likewise.
11582         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11583         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11584         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11585         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11586         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11587         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11588         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11589         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11590         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11591
11592 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11593
11594         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11595         * configure.tgt: Remove target mt.
11596         * mt-tdep.c: Remove.
11597         * regcache.c (cooked_read_test): Remove the check for mt.
11598
11599 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11600
11601         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11602         instead of gdbarch_pseudo_register_read_value.
11603
11604 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11605
11606         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11607         language is Ada.
11608
11609 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11610
11611         * linespec.c (create_sals_line_offset): Remove code that preserved
11612         the symtab_and_line's line number.
11613
11614 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11615
11616         * varobj.c (varobj_create): Don't set valid_block when creating a
11617         floating varobj.
11618
11619 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11620
11621         * varobj.c (varobj_create): Remove out of date comment.
11622
11623 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11624
11625         PR mi/20395
11626         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11627         updating innermost block.
11628         * parse.c (innermost_block_tracker::update): Take extra type
11629         parameter, and check types match before updating innermost block.
11630         (write_dollar_variable): Update innermost block for registers.
11631         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11632         (innermost_block_tracker::innermost_block_tracker): Initialise
11633         m_types member.
11634         (innermost_block_tracker::reset): Take type parameter.
11635         (innermost_block_tracker::update): Take type parameter, and pass
11636         type through as needed.
11637         (innermost_block_tracker::m_types): New member.
11638         * varobj.c (varobj_create): Pass type when reseting innermost
11639         block.
11640
11641 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11642
11643         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11644         * ada-lang.c (resolve_subexp): Likewise.
11645         * breakpoint.c (set_breakpoint_condition) Likewise.
11646         (watch_command_1) Likewise.
11647         * c-exp.y (variable): Likewise.
11648         * d-exp.y (PrimaryExpression): Likewise.
11649         * f-exp.y (variable): Likewise.
11650         * go-exp.y (variable): Likewise.
11651         * m2-exp.y (variable): Likewise.
11652         * objfiles.c (objfile::~objfile): Likewise.
11653         * p-exp.y (variable): Likewise.
11654         * parse.c (innermost_block): Change type.
11655         * parser-defs.h (class innermost_block_tracker): New.
11656         (innermost_block): Change to innermost_block_tracker.
11657         * printcmd.c (display_command): Switch to innermost_block API.
11658         (do_one_display): Likewise.
11659         * rust-exp.y (do_one_display): Likewise.
11660         * symfile.c (clear_symtab_users): Likewise.
11661         * varobj.c (varobj_create): Switch to innermost_block API, replace
11662         use of innermost_block with block stored on varobj object.
11663
11664 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11665
11666         * expression.h (innermost_block): Remove declaration.
11667         * varobj.c: Add 'parser-defs.h' include.
11668
11669 2018-01-19  Tom Tromey  <tom@tromey.com>
11670
11671         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11672         symbols in the static and global blocks.
11673
11674 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11675
11676         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11677         gdb_ptrace.h, and move including gdb_wait.h ...
11678         * nat/linux-ptrace.h: ... to here.
11679
11680 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11681
11682         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11683         inf_ptrace_detach_success.
11684         (inf_ptrace_detach_success): Add inferior parameter, use it
11685         instead of inferior_ptid, pass it to detach_inferior.
11686         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11687         parameter.
11688         * inferior.c (detach_inferior): Add overload that takes an
11689         inferior object.
11690         * inferior.h (detach_inferior): Likewise.
11691         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11692         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11693         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11694
11695 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11696
11697         * target.h (struct target_ops) <to_detach>: Add inferior
11698         parameter.
11699         (target_detach): Likewise.
11700         * target.c (dispose_inferior): Pass inferior down.
11701         (target_detach): Pass inferior down.  Assert that it is equal to
11702         the current inferior.
11703         * aix-thread.c (aix_thread_detach): Pass inferior down.
11704         * corefile.c (core_file_command): Pass current_inferior() down.
11705         * corelow.c (core_detach): Add inferior parameter.
11706         * darwin-nat.c (darwin_detach): Likewise.
11707         * gnu-nat.c (gnu_detach): Likewise.
11708         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11709         * infcmd.c (detach_command): Pass current_inferior() down to
11710         target_detach.
11711         * infrun.c (follow_fork_inferior): Pass parent_inf to
11712         target_detach.
11713         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11714         target_detach.
11715         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11716         * linux-thread-db.c (thread_db_detach): Likewise.
11717         * nto-procfs.c (procfs_detach): Likewise.
11718         * procfs.c (procfs_detach): Likewise.
11719         * record.c (record_detach): Likewise.
11720         * record.h (struct inferior): Forward-declare.
11721         (record_detach): Add inferior parameter.
11722         * remote-sim.c (gdbsim_detach): Likewise.
11723         * remote.c (remote_detach_1): Likewise.
11724         (remote_detach): Likewise.
11725         (extended_remote_detach): Likewise.
11726         * sol-thread.c (sol_thread_detach): Likewise.
11727         * target-debug.h (target_debug_print_inferior_p): New macro.
11728         * target-delegates.c: Re-generate.
11729         * top.c (kill_or_detach): Pass inferior down to target_detach.
11730         * windows-nat.c (windows_detach): Add inferior parameter.
11731
11732 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11733
11734         * target.h (struct target_ops) <to_detach>: Remove args
11735         parameter.
11736         (target_detach): Likewise.
11737         * target.c (dispose_inferior): Adjust.
11738         (target_detach): Remove args parameter, adjust.
11739         * aix-thread.c (aix_thread_detach): Adjust.
11740         * corefile.c (core_file_command): Adjust.
11741         * corelow.c (core_detach): Adjust.
11742         * darwin-nat.c (darwin_detach): Adjust.
11743         * gnu-nat.c (gnu_detach): Adjust.
11744         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11745         * infcmd.c (detach_command): Adjust
11746         * infrun.c (follow_fork_inferior): Adjust.
11747         (handle_vfork_child_exec_or_exit): Adjust.
11748         * linux-fork.c (linux_fork_detach): Remove args parameter.
11749         * linux-fork.h (linux_fork_detach): Likewise.
11750         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11751         * linux-thread-db.c (thread_db_detach): Likewise.
11752         * nto-procfs.c (procfs_detach): Likewise.
11753         * procfs.c (procfs_detach): Likewise.
11754         (do_detach): Remove signo parameter.
11755         * record.c (record_detach): Remove args parameter.
11756         * record.h (record_detach): Likewise.
11757         * remote-sim.c (gdbsim_detach): Likewise.
11758         * remote.c (remote_detach_1): Likewise.
11759         (remote_detach): Likewise.
11760         (extended_remote_detach): Likewise.
11761         * sol-thread.c (sol_thread_detach): Likewise.
11762         * target-delegates.c: Re-generate.
11763         * top.c (struct qt_args) <args>: Remove field.
11764         (kill_or_detach): Don't pass args.
11765         (quit_force): Don't set args.
11766         * windows-nat.c (windows_detach): Remove args parameter.
11767
11768 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11769
11770         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11771         (arm_linux_init_abi): Install it.
11772
11773 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11774
11775         * osabi.c (gdb_osabi_names): Extend the regexp for
11776         arm-linux-gnueabihf.
11777
11778 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11779
11780         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11781         m_abbrevs.
11782         (abbrev_table::add_abbrev): Update.
11783         (abbrev_table::lookup_abbrev): Update.
11784
11785 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11786
11787         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11788
11789 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11790
11791         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11792         to "std::string".
11793
11794 2018-01-17  Tom Tromey  <tom@tromey.com>
11795
11796         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11797
11798 2018-01-17  Tom Tromey  <tom@tromey.com>
11799
11800         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11801         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11802         (create_array_type_with_stride): Update.
11803         * dwarf2read.c (set_die_type): Update.
11804
11805 2018-01-17  Tom Tromey  <tom@tromey.com>
11806
11807         * dwarf2read.c (delayed_method_info): Remove typedef.
11808         (dwarf2_cu::method_info): Now a std::vector.
11809         (add_to_method_list): Update.
11810         (free_delayed_list): Remove.
11811         (compute_delayed_physnames): Update.
11812         (process_full_comp_unit, process_full_type_unit): Clear the method
11813         list.  Remove cleanups.
11814         (psymtab_include_file_name): Add name_holder parameter.  Use
11815         unique_xmalloc_ptr.
11816         (dwarf_decode_lines): Update.
11817
11818 2018-01-17  Tom Tromey  <tom@tromey.com>
11819             Simon Marchi  <simon.marchi@ericsson.com>
11820
11821         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11822         (dwarf2_per_objfile::free_cached_comp_units)
11823         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11824         (init_cutu_and_read_dies_no_follow): Update.
11825         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11826         (dwarf2_cu::~dwarf2_cu): New.
11827         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11828         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11829
11830 2018-01-17  Tom Tromey  <tom@tromey.com>
11831             Simon Marchi  <simon.marchi@ericsson.com>
11832
11833         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11834         (struct die_reader_specs) <abbrev_table>: New member.
11835         (struct abbrev_table): Add constructor.
11836         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11837         <abbrev_obstack>: Now an auto_obstack.
11838         (abbrev_table_up): New typedef.
11839         (init_cu_die_reader): Add abbrev_table parameter.
11840         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11841         Add result_dwo_abbrev_table.
11842         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11843         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11844         Update.
11845         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11846         parameter.
11847         (skip_children): Update.
11848         (abbrev_table::alloc_abbrev): Rename from
11849         abbrev_table_alloc_abbrev.
11850         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11851         (abbrev_table::lookup_abbrev): Rename from
11852         abbrev_table_lookup_abbrev.
11853         (abbrev_table_read_table): Return abbrev_table_up.
11854         (abbrev_table_free, abbrev_table_free_cleanup)
11855         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11856         (load_partial_dies): Update.
11857
11858 2018-01-17  Tom Tromey  <tom@tromey.com>
11859
11860         * dwarf2read.c (dwarf2_compute_name): Update comment.
11861         (read_func_scope, read_variable): Update.
11862         (new_symbol): Remove.
11863         (new_symbol_full): Rename to new_symbol.
11864
11865 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11866
11867         PR gdb/16577
11868         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11869         a warning instead of throwing an error, set section size to 0 and return
11870         NULL.
11871         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11872
11873 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11874
11875         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11876         std::string.
11877         (linux_ptrace_attach_fail_reason_string): Likewise.
11878         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11879         Likewise.
11880         (linux_ptrace_attach_fail_reason_string): Likewise.
11881         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11882
11883 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11884
11885         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11886
11887 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
11888
11889         PR gdb/21559
11890         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11891         checking for fs_base/gs_base fields in struct user_regs_struct.
11892         * configure: Regenerate.
11893
11894 2018-01-17  Yao Qi  <yao.qi@linaro.org>
11895
11896         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11897         function.
11898         (aarch64_linux_init_abi): Install it to gdbarch hook
11899         gcc_target_options.
11900
11901 2018-01-15  Pedro Alves  <palves@redhat.com>
11902
11903         * common/signals-state-save-restore.c
11904         (save_original_signals_state): Fix typos.
11905
11906 2017-01-12  Tom Tromey  <tom@tromey.com>
11907             Sergio Durigan Junior  <sergiodj@redhat.com>
11908
11909         * Makefile.in (install-only): Install gdb-add-index.
11910
11911 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
11912
11913         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11914
11915 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11916
11917         * infrun.c (keep_going_pass_signal): Clear step-over info when
11918         insert_breakpoints fails.
11919
11920 2018-01-11  Pedro Alves  <palves@redhat.com>
11921
11922         PR gdb/22583
11923         * infrun.c (resume): Rename to ...
11924         (resume_1): ... this.
11925         (resume): Reimplement as wrapper around resume_1.
11926
11927 2018-01-11  Pedro Alves  <palves@redhat.com>
11928
11929         PR remote/22597
11930         * remote.c (remote_parse_stop_reply): Default to the last-set
11931         general thread instead of to 'magic_null_ptid'.
11932
11933 2018-01-10  Pedro Alves  <palves@redhat.com>
11934
11935         * language.h (language_get_symbol_name_matcher): Rename ...
11936         (get_symbol_name_matcher): ... this.
11937         * language.c (language_get_symbol_name_matcher): Ditto.
11938         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11939         callers adjusted.
11940
11941 2018-01-10  Pedro Alves  <palves@redhat.com>
11942
11943         PR gdb/22670
11944         * dwarf2read.c
11945         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11946         Adjust to use language_get_symbol_name_matcher instead of
11947         language_defn::la_get_symbol_name_matcher.
11948         * language.c (language_get_symbol_name_matcher): If in Ada mode
11949         and the lookup name is a verbatim match, return Ada's matcher.
11950         * language.h (language_get_symbol_name_matcher): Adjust comment.
11951         (ada_lookup_name_info::verbatim_p):: New method.
11952
11953 2018-01-10  Pedro Alves  <palves@redhat.com>
11954
11955         PR gdb/22670
11956         * ada-lang.c (ada_collect_symbol_completion_matches): If the
11957         minsym's language is language_auto or language_cplus, pass down
11958         language_ada instead.
11959         * symtab.c (compare_symbol_name): Don't frob symbol language here.
11960
11961 2018-01-10  Pedro Alves  <palves@redhat.com>
11962
11963         PR gdb/22670
11964         * minsyms.c (linkage_name_str): New function.
11965         (iterate_over_minimal_symbols): Use it.
11966
11967 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11968
11969         * NEWS: Document that 'info proc' now works on FreeBSD.
11970
11971 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11972
11973         * configure.ac: Check for kinfo_getfile in libutil.
11974         * configure: Regenerate.
11975         * config.in: Regenerate.
11976         * fbsd-nat.c: Include "fbsd-tdep.h".
11977         (fbsd_fetch_cmdline): New.
11978         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11979         rather than calling error.
11980         (fbsd_info_proc): New.
11981         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11982         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11983         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11984
11985 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11986
11987         * fbsd-nat.c (struct free_deleter): Remove.
11988         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11989
11990 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11991
11992         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11993         NULL for an empty pathname.
11994
11995 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11996
11997         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11998         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11999         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12000         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12001         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12002         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12003         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12004         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12005         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12006         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12007         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12008         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12009         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12010         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12011         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12012
12013 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12014
12015         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12016         (gnu_xfer_auxv): New function.
12017         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12018         TARGET_OBJECT_AUXV.
12019
12020 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12021             Simon Marchi  <simon.marchi@ericsson.com>
12022
12023         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12024         common/selftest.c.
12025         (COMMON_OBS): Remove selftest.o.
12026         * configure.ac: Append selftest-arch.c and common/selftest.c to
12027         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12028         * configure: Re-generated.
12029         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12030         GDB_SELF_TEST.
12031         (maintenance_info_selftests): Likewise.
12032
12033 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12034
12035         * ada-valprint.c (val_print_packed_array_elements): Use
12036         proper number of elements when printing an array indexed
12037         by an enumeration type.
12038
12039 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12040
12041         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12042         (dw2_get_file_names_reader): Adjust.
12043         (lookup_dwo_signatured_type): Adjust.
12044         (lookup_dwp_signatured_type): Adjust.
12045         (lookup_signatured_type): Adjust.
12046         (create_type_unit_group): Adjust.
12047         (get_type_unit_group): Adjust.
12048         (process_psymtab_comp_unit_reader): Adjust.
12049         (build_type_psymtabs_reader): Adjust.
12050         (scan_partial_symbols): Adjust.
12051         (add_partial_symbol): Adjust.
12052         (add_partial_subprogram): Adjust.
12053         (peek_die_abbrev): Adjust.
12054         (fixup_go_packaging): Adjust.
12055         (process_imported_unit_die): Adjust.
12056         (dwarf2_compute_name): Adjust.
12057         (dwarf2_physname): Adjust.
12058         (read_import_statement): Adjust.
12059         (handle_DW_AT_stmt_list): Adjust.
12060         (read_file_scope): Adjust.
12061         (read_func_scope): Adjust.
12062         (read_lexical_block_scope): Adjust.
12063         (read_call_site_scope): Adjust.
12064         (read_variable): Adjust.
12065         (dwarf2_rnglists_process): Adjust.
12066         (dwarf2_ranges_process): Adjust.
12067         (dwarf2_ranges_read): Adjust.
12068         (dwarf2_get_pc_bounds): Adjust.
12069         (dwarf2_record_block_ranges): Adjust.
12070         (dwarf2_add_field): Adjust.
12071         (dwarf2_add_member_fn): Adjust.
12072         (read_structure_type): Adjust.
12073         (process_structure_scope): Adjust.
12074         (read_enumeration_type): Adjust.
12075         (read_array_type): Adjust.
12076         (mark_common_block_symbol_computed): Adjust.
12077         (read_common_block): Adjust.
12078         (read_namespace_type): Adjust.
12079         (read_namespace): Adjust.
12080         (read_module_type): Adjust.
12081         (read_tag_pointer_type): Adjust.
12082         (read_tag_ptr_to_member_type): Adjust.
12083         (read_tag_string_type): Adjust.
12084         (read_subroutine_type): Adjust.
12085         (read_typedef): Adjust.
12086         (read_base_type): Adjust.
12087         (attr_to_dynamic_prop): Adjust.
12088         (read_subrange_type): Adjust.
12089         (read_unspecified_type): Adjust.
12090         (dwarf2_read_abbrevs): Adjust.
12091         (load_partial_dies): Adjust.
12092         (read_partial_die): Adjust.
12093         (find_partial_die): Adjust.
12094         (guess_partial_die_structure_name): Adjust.
12095         (fixup_partial_die): Adjust.
12096         (read_attribute_value): Adjust.
12097         (read_addr_index): Adjust.
12098         (read_addr_index_from_leb128): Adjust.
12099         (read_str_index): Adjust.
12100         (dwarf2_string_attr): Adjust.
12101         (get_debug_line_section): Adjust.
12102         (dwarf_decode_line_header): Adjust.
12103         (lnp_state_machine::check_line_address): Adjust.
12104         (dwarf_decode_lines_1): Adjust.
12105         (dwarf_decode_lines): Adjust.
12106         (dwarf2_start_symtab): Adjust.
12107         (var_decode_location): Adjust.
12108         (new_symbol_full): Adjust.
12109         (dwarf2_const_value_data): Adjust.
12110         (dwarf2_const_value_attr): Adjust.
12111         (dwarf2_const_value): Adjust.
12112         (die_type): Adjust.
12113         (die_containing_type): Adjust.
12114         (build_error_marker_type): Adjust.
12115         (lookup_die_type): Adjust.
12116         (guess_full_die_structure_name): Adjust.
12117         (anonymous_struct_prefix): Adjust.
12118         (determine_prefix): Adjust.
12119         (dwarf2_name): Adjust.
12120         (follow_die_ref_or_sig): Adjust.
12121         (follow_die_offset): Adjust.
12122         (follow_die_ref): Adjust.
12123         (follow_die_sig_1): Adjust.
12124         (follow_die_sig): Adjust.
12125         (get_signatured_type): Adjust.
12126         (get_DW_AT_signature_type): Adjust.
12127         (decode_locdesc): Adjust.
12128         (dwarf_decode_macros): Adjust.
12129         (cu_debug_loc_section): Adjust.
12130         (fill_in_loclist_baton): Adjust.
12131         (dwarf2_symbol_mark_computed): Adjust.
12132         (init_one_comp_unit): Don't assign
12133         dwarf2_cu::dwarf2_per_objfile.
12134         (set_die_type): Adjust.
12135
12136 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12137
12138         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12139         <dwarf2_per_objfile>: New field.
12140         (dwarf2_per_objfile): Remove global.
12141         (get_dwarf2_per_objfile): New function.
12142         (set_dwarf2_per_objfile): New function.
12143         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12144         dwarf2_per_objfile.
12145         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12146         (read_abbrev_offset): Likewise.
12147         (read_indirect_string): Likewise.
12148         (read_indirect_line_string): Likewise.
12149         (read_indirect_string_at_offset): Likewise.
12150         (read_indirect_string_from_dwz): Likewise.
12151         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12152         dwarf2_per_objfile.
12153         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12154         (create_all_comp_units): Change objfile parameter to
12155         dwarf2_per_objfile.
12156         (create_all_type_units): Likewise.
12157         (process_queue): Add dwarf2_per_objfile parameter.
12158         (read_and_check_comp_unit_head): Likewise.
12159         (lookup_dwo_unit_in_dwp): Likewise.
12160         (get_dwp_file): Likewise.
12161         (process_cu_includes): Likewise.
12162         (struct free_dwo_file_cleanup_data): New struct.
12163         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12164         set_dwarf2_per_objfile.
12165         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12166         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12167         context, adjust calls.
12168         (dw2_instantiate_symtab): Likewise.
12169         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12170         (dw2_get_cu): Likewise.
12171         (create_cu_from_index_list): Change objfile parameter to
12172         dwarf2_per_objfile.
12173         (create_cus_from_index_list): Get dwarf2_per_objfile from
12174         context, adjust calls.
12175         (create_cus_from_index): Likewise.
12176         (create_signatured_type_table_from_index): Change objfile
12177         parameter to dwarf2_per_objfile.
12178         (create_signatured_type_table_from_debug_names): Change objfile
12179         parameter to dwarf2_per_objfile.
12180         (create_addrmap_from_index): Likewise.
12181         (create_addrmap_from_aranges): Likewise.
12182         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12183         (dw2_setup): Remove.
12184         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12185         context.
12186         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12187         get_dwarf2_per_objfile.
12188         (dw2_forget_cached_source_info): Likewise.
12189         (dw2_map_symtabs_matching_filename): Likewise.
12190         (struct dw2_symtab_iterator) <index>: Remove.
12191         <dwarf2_per_objfile>: New field.
12192         (dw2_symtab_iter_init): Replace index parameter with
12193         dwarf2_per_objfile.
12194         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12195         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12196         (dw2_print_stats): Likewise.
12197         (dw2_dump): Likewise.
12198         (dw2_expand_symtabs_for_function): Likewise.
12199         (dw2_expand_all_symtabs): Likewise.
12200         (dw2_expand_symtabs_with_fullname): Likewise.
12201         (dw2_expand_marked_cus): Replace index and objfile parameters
12202         with dwarf2_per_objfile.
12203         (dw_expand_symtabs_matching_file_matcher): Add
12204         dwarf2_per_objfile parameter and adjust calls.
12205         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12206         adjust calls.
12207         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12208         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12209         adjust calls.
12210         (create_cus_from_debug_names_list): Replace objfile parameter
12211         with dwarf2_per_objfile and adjust calls.
12212         (create_cus_from_debug_names): Likewise.
12213         (dwarf2_read_debug_names): Likewise.
12214         (mapped_debug_names::namei_to_name): Adjust call.
12215         (dw2_debug_names_iterator::next): Likewise.
12216         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12217         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12218         (dw2_debug_names_dump): Likewise.
12219         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12220         (dw2_debug_names_expand_symtabs_matching): Likewise.
12221         (dwarf2_initialize_objfile): Likewise.
12222         (dwarf2_build_psymtabs): Likewise.
12223         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12224         this_cu.
12225         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12226         (read_and_check_comp_unit_head): Likewise.
12227         (read_abbrev_offset): Likewise.
12228         (create_debug_type_hash_table): Likewise.
12229         (create_debug_types_hash_table): Likewise.
12230         (create_all_type_units): Replace objfile parameter with
12231         dwarf2_per_objfile.
12232         (add_type_unit): Add dwarf2_per_objfile parameter.
12233         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12234         with dwarf2_per_objfile.
12235         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12236         (lookup_dwp_signatured_type): Likewise.
12237         (lookup_signatured_type): Likewise.
12238         (read_cutu_die_from_dwo): Likewise.
12239         (init_tu_and_read_dwo_dies): Likewise.
12240         (init_cutu_and_read_dies): Likewise.
12241         (init_cutu_and_read_dies_no_follow): Likewise.
12242         (allocate_type_unit_groups_table): Add objfile parameter.
12243         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12244         (get_type_unit_group): Likewise.
12245         (process_psymtab_comp_unit): Update call.
12246         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12247         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12248         (print_tu_stats): Likewise.
12249         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12250         in void* parameter.
12251         (build_type_psymtabs): Change objfile parameter to
12252         dwarf2_per_objfile.
12253         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12254         passed in void* parameter.
12255         (process_skeletonless_type_units): Change objfile parameter to
12256         dwarf2_per_objfile.
12257         (set_partial_user): Likewise.
12258         (dwarf2_build_psymtabs_hard): Likewise.
12259         (read_comp_units_from_section): Likewise.
12260         (create_all_comp_units): Likewise.
12261         (scan_partial_symbols): Update calls.
12262         (add_partial_symbol): Likewise.
12263         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12264         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12265         (process_queue): Add dwarf2_per_objfile parameter.
12266         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12267         (compute_compunit_symtab_includes): Likewise.
12268         (process_cu_includes): Add dwarf2_per_objfile parameter.
12269         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12270         (process_full_type_unit): Likewise.
12271         (process_imported_unit_die): Update call.
12272         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12273         (read_file_scope): Likewise.
12274         (allocate_dwo_file_hash_table): Add objfile parameter.
12275         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12276         (create_cus_hash_table): Likewise.
12277         (create_dwp_hash_table): Likewise.
12278         (create_dwo_unit_in_dwp_v1): Likewise.
12279         (create_dwp_v2_section): Likewise.
12280         (create_dwo_unit_in_dwp_v2): Likewise.
12281         (lookup_dwo_unit_in_dwp): Likewise.
12282         (try_open_dwop_file): Likewise.
12283         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12284         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12285         cleanup to include a reference to dwarf2_per_objfile.
12286         (open_dwp_file): Add dwarf2_per_objfile parameter.
12287         (open_and_init_dwp_file): Likewise.
12288         (get_dwp_file): Likewise.
12289         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12290         (queue_and_load_all_dwo_tus): Update call.
12291         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12292         data.
12293         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12294         (dwarf2_ranges_process): Likewise.
12295         (dwarf2_get_pc_bounds): Likewise.
12296         (mark_common_block_symbol_computed): Likewise.
12297         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12298         (dwarf2_read_abbrevs): Update call.
12299         (read_partial_die): Use dwarf2_per_objfile from cu.
12300         (find_partial_die): Likewise.
12301         (fixup_partial_die): Likewise.
12302         (read_attribute_value): Likewise.
12303         (read_indirect_string_at_offset_from): Add objfile parameter.
12304         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12305         parameter.
12306         (read_indirect_string_from_dwz): Add objfile parameter.
12307         (read_indirect_string): Add objfile parameter.
12308         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12309         (read_addr_index): Use dwarf2_per_objfile from cu.
12310         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12311         call dw2_setup.
12312         (read_str_index): Use dwarf2_per_objfile from cu.
12313         (get_debug_line_section): Likewise.
12314         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12315         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12316         (new_symbol_full): Use dwarf2_per_objfile from cu.
12317         (build_error_marker_type): Likewise.
12318         (lookup_die_type): Likewise.
12319         (determine_prefix): Likewise.
12320         (follow_die_offset): Likewise.
12321         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12322         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12323         (dwarf2_fetch_die_type_sect_off): Likewise.
12324         (dwarf2_get_die_type): Likewise.
12325         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12326         (get_signatured_type): Likewise.
12327         (get_DW_AT_signature_type): Likewise.
12328         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12329         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12330         (cu_debug_loc_section): Likewise.
12331         (fill_in_loclist_baton): Likewise.
12332         (dwarf2_symbol_mark_computed): Likewise.
12333         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12334         dwarf2_per_objfile.
12335         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12336         parameter.
12337         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12338         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12339         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12340         (set_die_type): Use dwarf2_free_objfile from cu.
12341         (get_die_type_at_offset): Likewise.
12342         (dwarf2_per_objfile_free): Don't assign global variable.
12343         (debug_names) <constructor>: Add dwarf2_per_objfile
12344         parameter, update m_debugstrlookup construction.
12345         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12346         parameter.
12347         <m_dwarf2_per_objfile>: New field.
12348         <lookup>: Use m_dwarf2_per_objfile.
12349         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12350         (psyms_seen_size): Likewise.
12351         (write_gdbindex): Replace objfile parameter with
12352         dwarf2_per_objfile.
12353         (write_debug_names): Likewise.
12354         (write_psymtabs_to_index): Likewise.
12355         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12356         calls.
12357
12358 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12359
12360         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12361         <dwarf2_per_objfile>: New field.
12362         (struct dwarf2_per_cu_data) <objfile>: Remove.
12363         <dwarf2_per_objfile>: New field.
12364         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12365         of objfile.
12366         (create_signatured_type_table_from_index): Likewise.
12367         (create_debug_type_hash_table): Likewise.
12368         (fill_in_sig_entry_from_dwo_entry): Likewise.
12369         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12370         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12371         objfile.
12372         (create_partial_symtab): Access objfile through
12373         dwarf2_per_objfile.
12374         (process_psymtab_comp_unit_reader): Likewise.
12375         (read_comp_units_from_section): Likewise.
12376         (scan_partial_symbols): Likewise.
12377         (add_partial_symbol): Likewise.
12378         (add_partial_subprogram): Likewise.
12379         (peek_die_abbrev): Likewise.
12380         (fixup_go_packaging): Likewise.
12381         (process_full_comp_unit): Likewise.
12382         (process_full_type_unit): Likewise.
12383         (process_imported_unit_die): Likewise.
12384         (dwarf2_compute_name): Likewise.
12385         (dwarf2_physname): Likewise.
12386         (read_import_statement): Likewise.
12387         (create_cus_hash_table): Assign dwarf2_physname instead of
12388         objfile.
12389         (read_func_scope): Access objfile through dwarf2_per_objfile.
12390         (read_lexical_block_scope): Likewise.
12391         (read_call_site_scope): Likewise.
12392         (read_variable): Likewise.
12393         (dwarf2_rnglists_process): Likewise.
12394         (dwarf2_ranges_process): Likewise.
12395         (dwarf2_ranges_read): Likewise.
12396         (dwarf2_record_block_ranges): Likewise.
12397         (dwarf2_add_field): Likewise.
12398         (dwarf2_add_member_fn): Likewise.
12399         (read_structure_type): Likewise.
12400         (process_structure_scope): Likewise.
12401         (read_enumeration_type): Likewise.
12402         (read_array_type): Likewise.
12403         (read_common_block): Likewise.
12404         (read_namespace_type): Likewise.
12405         (read_namespace): Likewise.
12406         (read_module_type): Likewise.
12407         (read_tag_pointer_type): Likewise.
12408         (read_tag_ptr_to_member_type): Likewise.
12409         (read_tag_string_type): Likewise.
12410         (read_subroutine_type): Likewise.
12411         (read_typedef): Likewise.
12412         (read_base_type): Likewise.
12413         (attr_to_dynamic_prop): Likewise.
12414         (read_subrange_type): Likewise.
12415         (read_unspecified_type): Likewise.
12416         (load_partial_dies): Likewise.
12417         (read_partial_die): Likewise.
12418         (find_partial_die): Likewise.
12419         (guess_partial_die_structure_name): Likewise.
12420         (fixup_partial_die): Likewise.
12421         (read_attribute_value): Likewise.
12422         (read_addr_index_from_leb128): Likewise.
12423         (dwarf2_read_addr_index): Likewise.
12424         (dwarf2_string_attr): Likewise.
12425         (lnp_state_machine::check_line_address): Likewise.
12426         (dwarf_decode_lines_1): Likewise.
12427         (dwarf_decode_lines): Likewise.
12428         (dwarf2_start_symtab): Likewise.
12429         (var_decode_location): Likewise.
12430         (new_symbol_full): Likewise.
12431         (dwarf2_const_value_data): Likewise.
12432         (dwarf2_const_value_attr): Likewise.
12433         (dwarf2_const_value): Likewise.
12434         (die_type): Likewise.
12435         (die_containing_type): Likewise.
12436         (lookup_die_type): Likewise.
12437         (guess_full_die_structure_name): Likewise.
12438         (anonymous_struct_prefix): Likewise.
12439         (dwarf2_name): Likewise.
12440         (follow_die_ref_or_sig): Likewise.
12441         (follow_die_offset): Likewise.
12442         (follow_die_ref): Likewise.
12443         (dwarf2_fetch_die_loc_sect_off): Likewise.
12444         (dwarf2_fetch_constant_bytes): Likewise.
12445         (dwarf2_fetch_die_type_sect_off): Likewise.
12446         (dwarf2_get_die_type): Likewise.
12447         (follow_die_sig): Likewise.
12448         (decode_locdesc): Likewise.
12449         (dwarf2_per_cu_objfile): Likewise.
12450         (dwarf2_per_cu_text_offset): Likewise.
12451         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12452         objfile.
12453         (set_die_type): Access objfile through
12454         dwarf2_per_objfile.
12455
12456 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12457
12458         * valprint.c (converted_character_d): Remove typedef.
12459         (DEF_VEC_O (converted_character_d)): Remove.
12460         (count_next_character): Use std::vector.
12461         (print_converted_chars_to_obstack): Likewise.
12462         (generic_printstr): Likewise.
12463
12464 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12465
12466         * xml-support.h (struct gdb_xml_value): Add constructor.
12467         <value>: Change type to unique_xmalloc_ptr.
12468         (gdb_xml_value_s): Remove typedef.
12469         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12470         (gdb_xml_element_start_handler): Change parameter type to
12471         std::vector.
12472         (xml_find_attribute): Likewise.
12473         * xml-support.c (xml_find_attribute): Change parameter type to
12474         std::vector and adjust.
12475         (gdb_xml_values_cleanup): Remove.
12476         (gdb_xml_parser::start_element): Adjust to std::vector.
12477         (xinclude_start_include): Change paraeter type to std::vector
12478         and adjust.
12479         * btrace.c (check_xml_btrace_version): Likewise.
12480         (parse_xml_btrace_block): Likewise.
12481         (parse_xml_btrace_pt_config_cpu): Likewise.
12482         (parse_xml_btrace_pt): Likewise.
12483         (parse_xml_btrace_conf_bts): Likewise.
12484         (parse_xml_btrace_conf_pt): Likewise.
12485         * memory-map.c (memory_map_start_memory): Likewise.
12486         (memory_map_start_property): Likewise.
12487         * osdata.c (osdata_start_osdata): Likewise.
12488         (osdata_start_item): Likewise.
12489         (osdata_start_column): Likewise.
12490         * remote.c (start_thread): Likewise.
12491         * solib-aix.c (library_list_start_library): Likewise.
12492         (library_list_start_list): Likewise.
12493         * solib-svr4.c (library_list_start_library): Likewise.
12494         (svr4_library_list_start_list): Likewise.
12495         * solib-target.c (library_list_start_segment): Likewise.
12496         (library_list_start_section): Likewise.
12497         (library_list_start_library): Likewise.
12498         (library_list_start_list): Likewise.
12499         * tracepoint.c (traceframe_info_start_memory): Likewise.
12500         (traceframe_info_start_tvar): Likewise.
12501         * xml-syscall.c (syscall_start_syscall): Likewise.
12502         * xml-tdesc.c (tdesc_start_target): Likewise.
12503         (tdesc_start_feature): Likewise.
12504         (tdesc_start_reg): Likewise.
12505         (tdesc_start_union): Likewise.
12506         (tdesc_start_struct): Likewise.
12507         (tdesc_start_flags): Likewise.
12508         (tdesc_start_enum): Likewise.
12509         (tdesc_start_field): Likewise.
12510         (tdesc_start_enum_value): Likewise.
12511         (tdesc_start_vector): Likewise.
12512
12513 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12514
12515         * extension.h (struct xmethod_worker) <clone>: Remove.
12516         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12517         Remove.
12518         (python_xmethod_worker::clone): Remove.
12519         * valops.c (find_overload_match): Use std::move instead of
12520         clone.
12521
12522 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12523
12524         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12525         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12526         <free_xmethod_worker_data>: Remove.
12527         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12528         <get_xmethod_arg_types>: Remove.
12529         <get_xmethod_result_type>: Remove.
12530         <invoke_xmethod>: Remove.
12531         * extension.c (new_xmethod_worker): Remove.
12532         (clone_xmethod_worker): Remove.
12533         (get_matching_xmethod_workers): Return void, pass std::vector by
12534         pointer.
12535         (get_xmethod_arg_types): Rename to...
12536         (xmethod_worker::get_arg_types): ... this, and adjust.
12537         (get_xmethod_result_type): Rename to...
12538         (xmethod_worker::get_result_type): ... this, and adjust.
12539         (invoke_xmethod): Remove.
12540         (free_xmethod_worker): Remove.
12541         (free_xmethod_worker_vec): Remove.
12542         * extension.h (enum ext_lang_rc): Move here from
12543         extension-priv.h.
12544         (struct xmethod_worker): Add constructor and destructor.
12545         <data>: Remove.
12546         <value>: Remove.
12547         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12548         virtual pure methods.
12549         <get_arg_types, get_result_type>: New methods.
12550         (xmethod_worker_ptr): Remove typedef.
12551         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12552         (xmethod_worker_vec): Remove typedef.
12553         (xmethod_worker_up): New typedef.
12554         (invoke_xmethod): Remove.
12555         (clone_xmethod_worker): Remove.
12556         (free_xmethod_worker): Remove.
12557         (free_xmethod_worker_vec): Remove.
12558         (get_xmethod_arg_types): Remove.
12559         (get_xmethod_result_type): Remove.
12560         * valops.c (find_method_list): Use std::vector, don't use
12561         intermediate vector.
12562         (value_find_oload_method_list): Use std::vector.
12563         (find_overload_match): Use std::vector.
12564         (find_oload_champ): Use std::vector.
12565         * value.c (value_free): Use operator delete.
12566         (value_of_xmethod): Rename to...
12567         (value_from_xmethod): ... this.  Don't assign
12568         xmethod_worker::value, take rvalue-reference.
12569         (result_type_of_xmethod): Adjust.
12570         (call_xmethod): Adjust.
12571         * value.h: Include extension.h.
12572         (struct xmethod_worker): Don't forward-declare.
12573         (value_of_xmethod): Rename to...
12574         (value_from_xmethod): ... this, take rvalue-reference.
12575         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12576         (struct python_xmethod_worker): ... this, add constructor and
12577         destructor.
12578         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12579         (gdbpy_free_xmethod_worker_data): Rename to...
12580         (python_xmethod_worker::~python_xmethod_worker): ... this and
12581         adjust.
12582         (gdbpy_clone_xmethod_worker_data): Rename to...
12583         (python_xmethod_worker::clone): ... this and adjust.
12584         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12585         temporary vector.
12586         (gdbpy_get_xmethod_arg_types): Rename to...
12587         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12588         (gdbpy_get_xmethod_result_type): Rename to...
12589         (python_xmethod_worker::do_get_result_type): ... this and
12590         adjust.
12591         (gdbpy_invoke_xmethod): Rename to...
12592         (python_xmethod_worker::invoke): ... this and adjust.
12593         (new_python_xmethod_worker): Rename to...
12594         (python_xmethod_worker::python_xmethod_worker): ... this and
12595         adjust.
12596         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12597         Remove.
12598         (gdbpy_free_xmethod_worker_data): Remove.
12599         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12600         (gdbpy_get_xmethod_arg_types): Remove.
12601         (gdbpy_get_xmethod_result_type): Remove.
12602         (gdbpy_invoke_xmethod): Remove.
12603         * python/python.c (python_extension_ops): Remove obsolete
12604         callbacks.
12605
12606 2018-01-05  Pedro Alves  <palves@redhat.com>
12607
12608         PR gdb/18653
12609         * common/signals-state-save-restore.c
12610         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12611         find a custom handler preinstalled, instead of internal erroring.
12612         But only warn if !quiet.
12613         * common/signals-state-save-restore.h
12614         (save_original_signals_state): New parameter 'quiet'.
12615         * main.c (captured_main_1): Move save_original_signals_state call
12616         after option handling, and pass QUIET.
12617
12618 2018-01-05  Pedro Alves  <palves@redhat.com>
12619
12620         * spu-tdep.c (spu_catch_start): Pass
12621         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12622
12623 2018-01-05  Pedro Alves  <palves@redhat.com>
12624
12625         PR gdb/22670
12626         * ada-lang.c (literal_symbol_name_matcher): New function.
12627         (ada_get_symbol_name_matcher): Use it for
12628         symbol_name_match_type::SEARCH_NAME.
12629         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12630         it down instead of assuming symbol_name_match_type::FULL.
12631         * block.h (block_lookup_symbol): New parameter 'match_type'.
12632         * c-valprint.c (print_unpacked_pointer): Use
12633         lookup_symbol_search_name instead of lookup_symbol.
12634         * compile/compile-object-load.c (get_out_value_type): Pass down
12635         symbol_name_match_type::SEARCH_NAME.
12636         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12637         symbol_name_match_type::FULL.
12638         * cp-support.c (cp_get_symbol_name_matcher): Handle
12639         symbol_name_match_type::SEARCH_NAME.
12640         * infrun.c (insert_exception_resume_breakpoint): Use
12641         lookup_symbol_search_name.
12642         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12643         * psymtab.c (maintenance_check_psymtabs): Use
12644         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12645         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12646         SYMBOL_SEARCH_NAME.
12647         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12648         if symbol_name_match_type::SEARCH_NAME.
12649         (lookup_symbol_in_language): Pass down
12650         symbol_name_match_type::FULL.
12651         (lookup_symbol_search_name): New.
12652         (lookup_language_this): Pass down
12653         symbol_name_match_type::SEARCH_NAME.
12654         (lookup_symbol_aux, lookup_local_symbol): New parameter
12655         'match_type'.  Pass it down.
12656         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12657         (lookup_symbol_search_name): New declaration.
12658         (lookup_symbol_in_block): New 'match_type' parameter.
12659
12660 2018-01-05  Pedro Alves  <palves@redhat.com>
12661
12662         PR gdb/22670
12663         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12664         ada_lookup_symbol.
12665         (ada_lookup_symbol): Reimplement in terms of
12666         ada_lookup_symbol_list, bits factored out from
12667         ada_lookup_encoded_symbol.
12668
12669 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12670
12671         * ada-exp.y (write_object_renaming): When subscripting an array
12672         using a symbol as the index, pass the block in call to
12673         ada_lookup_encoded_symbol when looking that symbol up.
12674
12675 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12676
12677         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12678         TYPE_INDEX_TYPE.
12679
12680 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12681
12682         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12683         the case where VALUE_LVAL (val0) is not lval_memory.
12684
12685 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12686
12687         * ada-valprint.c (print_optional_low_bound): Handle
12688         character-indexed array printing like boolean-indexed array
12689         printing.
12690
12691 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12692
12693         * NEWS: Create a new section for the next release branch.
12694         Rename the section of the current branch, now that it has
12695         been cut.
12696
12697 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12698
12699         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12700         * version.in: Bump version to 8.1.50.DATE-git.
12701
12702 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12703
12704         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12705         Add field.
12706         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12707         Add field.
12708         (default_exception_support_info) <catch_handlers_sym>: Add field.
12709         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12710         (ada_exception_name_addr_1): Add "catch handlers" handling.
12711         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12712         Update all callers.
12713         (create_excep_cond_exprs) <ex>: Add parameter.
12714         (re_set_exception): Update create_excep_cond_exprs call.
12715         (print_it_exception, print_one_exception, print_mention_exception)
12716         (print_recreate_exception): Add "catch handler" handling.
12717         (allocate_location_catch_handlers, re_set_catch_handlers)
12718         (check_status_catch_handlers, print_it_catch_handlers)
12719         (print_one_catch_handlers, print_mention_catch_handlers)
12720         (print_recreate_catch_handlers): New function.
12721         (catch_handlers_breakpoint_ops): New variable.
12722         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12723         Add parameter.  Add "catch handler" handling.
12724         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12725         Add "catch handler" handling.
12726         (ada_exception_catchpoint_cond_string): Add "catch handler"
12727         handling.
12728         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12729         call.
12730         (catch_ada_handlers_command): New function.
12731         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12732         operations structure.
12733         (_initialize_ada_language): Add "catch handlers" command entry.
12734         * NEWS: Document "catch handlers" feature.
12735
12736 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12737
12738         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12739         account when creating the array type of the slice.
12740         (ada_value_slice): Likewise.
12741
12742 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12743
12744         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12745         New enum value.
12746         (create_array_type_with_stride): Add byte_stride_prop parameter.
12747         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12748         New parameter.  Update all callers in this file.
12749         (array_type_has_dynamic_stride): New function.
12750         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12751         of arrays with dynamic byte strides.
12752         * dwarf2read.c (read_array_type): Add support for dynamic
12753         DW_AT_byte_stride attributes.
12754
12755 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12756
12757         * dwarf2read.c (read_unspecified_type): Treat
12758         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12759
12760 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12761
12762         Update copyright year range in all GDB files.
12763
12764 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12765
12766         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12767         and gdb/testsuite/gdb.base/step-line.c.
12768
12769 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12770
12771         * copyright.py (main): Dump the contents of
12772         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12773         even if BY_HAND is empty.
12774
12775 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12776
12777         * top.c (print_gdb_version): Update Copyright year in version
12778         message.
12779
12780 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12781
12782         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12783
12784 For older changes see ChangeLog-2017.
12785 \f
12786 Local Variables:
12787 mode: change-log
12788 left-margin: 8
12789 fill-column: 74
12790 version-control: never
12791 coding: utf-8
12792 End: