c5d5555bcd7d20de6dca7f6b4fa47cbf3703c01d
[external/binutils.git] / gdb / ChangeLog
1 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2
3         GDB 8.2 released.
4
5 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
6             Pedro Alves  <palves@redhat.com>
7
8         * gnulib/Makefile.in (aclocal_m4_deps): Move to
9         "aclocal-m4-deps.mk".  Include file here.
10         $(srcdir)/aclocal.m4: Add "configure.ac".
11         * gnulib/aclocal-m4-deps.mk: New file.
12         * gnulib/update-gnulib.sh: Automatically update
13         "aclocal-m4-deps.mk".
14
15 2018-09-04  Tom Tromey  <tom@tromey.com>
16
17         * configure: Rebuild.
18         * configure.ac: Remove multi-ice code.
19
20 2018-09-04  Tom Tromey  <tom@tromey.com>
21
22         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
23         (ada-exp.o): Update.
24
25 2018-09-04  Tom Tromey  <tom@tromey.com>
26
27         * Makefile.in (printcmd.o, target-float.o): Remove.
28         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
29
30 2018-09-04  Tom Tromey  <tom@tromey.com>
31
32         * gnulib/Makefile.in: Remove obsolete comment.
33         * Makefile.in: Remove obsolete comment.
34
35 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
36
37         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
38         line with '+'.
39
40 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
41
42         * riscv-tdep.c: Add 'prologue-value.h' include.
43         (struct riscv_unwind_cache): New struct.
44         (riscv_debug_unwinder): New global.
45         (riscv_scan_prologue): Update arguments, capture register details
46         from prologue scan.
47         (riscv_skip_prologue): Reformat arguments line, move end of
48         prologue calculation into riscv_scan_prologue.
49         (riscv_frame_cache): Update return type, create
50         riscv_unwind_cache, scan the prologue, and fill in remaining cache
51         details.
52         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
53         (riscv_frame_prev_register): Use the trad_frame within the
54         riscv_unwind_cache.
55         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
56         flag.
57
58 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
59
60         * trad-frame.h (trad_frame_set_realreg): Declare.
61         (trad_frame_set_addr): Declare.
62         * trad-frame.c (trad_frame_set_realreg): Define new function.
63         (trad_frame_set_addr): Define new function.
64         (trad_frame_set_reg_realreg): Use new function.
65         (trad_frame_set_reg_addr): Use new function.
66
67 2018-09-01  Keith Seitz  <keiths@redhat.com>
68
69         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
70         pulongest instead of "%lld".
71         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
72         ATTRIBUTE_UNUSED.
73
74 2018-08-31  Tom Tromey  <tom@tromey.com>
75
76         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
77         variant part type.
78
79 2018-08-31  Pedro Alves  <palves@redhat.com>
80
81         * gdbarch.h: Regenerate.
82
83 2018-08-31  Pedro Alves  <palves@redhat.com>
84
85         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
86         * target.h (Hardware watchpoint interfaces): Describe
87         continuable/steppable/non-steppable watchpoints.
88         * gdbarch.h, gdbarch.c: Regenerate.
89
90 2018-08-31  Pedro Alves  <palves@redhat.com>
91
92         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
93         Delete.
94         * s390-linux-nat.c
95         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
96         * target.h (target_ops::have_continuable_watchpoint): Delete.
97         (target_have_continuable_watchpoint): Delete.
98         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
99         * target-delegates.c: Regenerate.
100
101 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
102
103         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
104         the files present in "gnulib/import/m4/".
105
106 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
107
108         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
109         c.sw, c.swsp, and c.sdsp.
110
111 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
112
113         * riscv-tdep.c (struct riscv_inferior_data): Delete.
114         (riscv_read_misa_reg): Don't cache value read into inferior data.
115         (riscv_new_inferior_data): Delete.
116         (riscv_inferior_data_cleanup): Delete.
117         (riscv_inferior_data): Delete.
118         (riscv_invalidate_inferior_data): Delete.
119         (_initialize_riscv_tdep): Remove initialisation of inferior data.
120
121 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
122
123         * compile/compile-cplus-types.c
124         (compile_cplus_instance::leave_scope): Take the address of scope
125         object.
126         (compile_cplus_instance::convert_qualified_base): Compare quals
127         to 0.
128
129 2018-08-30  Keith Seitz  <keiths@redhat.com>
130
131         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
132         Use "%s" and host_address_to_string instead of "%p" in printf.
133
134 2018-08-29  Keith Seitz  <keiths@redhat.com>
135
136         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
137         and compile-cplus-types.c.
138         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
139         * c-lang.c (cplus_language_defn): Set C++ compile functions.
140         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
141         Declare.
142         * compile/compile-c-support.c: Include compile-cplus.h.
143         (load_libcompile): Templatize.
144         (get_compile_context): "New" function.
145         (c_get_compile_context): Use get_compile_context.
146         (cplus_get_compile_context): New function.
147         (cplus_push_user_expression, cplus_pop_user_expression)
148         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
149         (cplus_compute_program): Define new structs/functions.
150         * compile/compile-cplus-symmbols.c: New file.
151         * compile/compile-cplus-types.c: New file.
152         * compile/compile-cplus.h: New file.
153         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
154         Declare.
155         * compile/compile-object-load.c (get_out_value_type): Use
156         strncmp_iw when comparing symbol names.
157         (compile_object_load): Add mst_bss and mst_data.
158         * compile/compile.c (_initialize_compile): Remove
159         -Wno-implicit-function-declaration from `compile_args'.
160         * compile/gcc-cp-plugin.h: New file.
161         * NEWS: Mention C++ compile support and new debug options.
162
163 2018-08-29  Keith Seitz  <keiths@redhat.com>
164
165         * linespec.c (collect_info::add_symbol): Make virtual.
166         (struct symbol_searcher_collect_info): New struct.
167         (symbol_searcher::find_all_symbols): New method.
168         * symtab.h (class symbol_searcher): New class.
169
170 2018-08-29  Keith Seitz  <keiths@redhat.com>
171
172         * linespec.c (struct linespec) <function_symbols, label_symbols>:
173         Change to vector of block_symbol.  Update all users.
174         (struct collect_info) <symbols>: Likewise.
175         (collect_info::add_symbol): Take block_symbol as argument.
176         Update all callers.
177         (decode_compound_collector) <m_symbols>: Change type to vector
178         of block_symbol.  Update all users.
179         (decode_compound_collector::operator ()): Change parameter type
180         to block_symbol.
181         (find_method, find_function_symbols, find_linespec_symbols)
182         (find_label_symbols_in_block, find_label_symbols): Change symbol
183         vectors to block_symbol vectors.
184         * symtab.h (symbol_found_callback_ftype): Change parameter type to
185         block_symbol.
186
187 2018-08-29  Keith Seitz  <keiths@redhat.com>
188
189         * linespec.c (symbolp): Remove typedef and VEC definitions.
190         (bound_minimal_symbol_d): Likewise.
191
192 2018-08-29  Keith Seitz  <keiths@redhat.com>
193
194         * linespec.c (decode_compound_collector::decode_compound_collector):
195         Remove initialization for `m_symtabs'.
196         (decode_compound_collector::release_symbols): Change return type
197         to std::vector.  Update all callers.
198         (class decode_compound_collector) <m_symbols>: Change type to
199         std::vector.
200         (lookup_prefix_sym): Change return type to std::vector.  Update all
201         callers.
202         (compare_symbols): Remove.
203         (std_compare_symbols): Rename to `compare_symbols'.
204         (find_method): Change `sym_classes' parameter to std::vector.
205         Update all callers.  Use std::sort to sort sym_classes.
206         (find_linespec_symbols): Remove cleanup.
207
208 2018-08-29  Keith Seitz  <keiths@redhat.com>
209
210         * linespec.c (struct linespec) <minimal_symbols>: Change type to
211         std::vector.  Update all users.
212         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
213         (struct collect_info) <minimal_symbols>: Likewise.
214         (compare_msymbols): Return bool.  Change parameters to const
215         bound_minimal_symbol references.
216         (find_method, find_function_symbols, find_linespec_symbols): Change
217         `minsyms' parameter to std::vector.  Update all callers.
218
219 2018-08-29  Keith Seitz  <keiths@redhat.com>
220
221         * linespec.c (struct linespec) <label_symbols>: Change type to
222         std::vector.  Update all users.
223         (find_label_symbols_in_block): Change `result' parameter to
224         std::vector.  Update all callers.
225         (find_label_symbols): Return std::vector.  Update all callers.
226
227 2018-08-29  Keith Seitz  <keiths@redhat.com>
228
229         * linespec.c (struct linespec) <function_symbols>: Change type to
230         std::vector.  Update all users.
231         (struct collect_info) <function_symbols>: Likewise.
232         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
233         (std_compare_symbols): New function.
234         (find_method, find_function_symbols, find_linespec_symbols)
235         (find_label_symbols_in_block): Change `symbols' parameter to
236         std::vector.  Update all callers.
237         (find_label_symbols): Likewise for `function_symbols' and
238         `label_funcs_ret'.
239
240 2018-08-29  Keith Seitz  <keiths@redhat.com>
241
242         * linespec.c (symtab_vector_up): Define.
243         (struct linespec) <file_symtabs>: Change type to std::vector *.
244         Update all uses.
245         (struct collect_info) <file_symtabs>: Likewise.
246         (collect_symtabs_from_filename): Return symtab_vector_up.
247         Update all callers.
248         (decode_objc): Remove cleanup.
249         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
250         (symtab_collector::release_symtabs): Return symtab_vector_up.
251         Update all callers.
252         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
253         Update all users.
254         (collect_symtabs_from_filename, symtabs_from_filename): Return
255         symtab_vector_up.  Update all callers.
256
257 2018-08-29  Tom Tromey  <tom@tromey.com>
258
259         * csky-tdep.c (csky_analyze_prologue): Use
260         core_addr_to_string_nz.
261
262 2018-08-29  Tom Tromey  <tom@tromey.com>
263
264         * windows-nat.c (struct xlate_exception) <them>: Change type to
265         DWORD.
266         (xlate): Fix formatting.  Remove last entry.
267         (struct xlate_exception, xlate): Comment out.
268         (windows_nat_target::resume): Use ranged for.
269
270 2018-08-29  Jim Wilson  <jimw@sifive.com>
271
272         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
273         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
274         of NT_PRFPREG.
275         (riscv_linux_nat_target::store_registers): Likewise.
276
277 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
278
279         PR gdb/23555
280         PR gdb/23558
281         * gnulib/aclocal.m4: Regenerate.
282         * gnulib/config.in: Regenerate.
283         * gnulib/configure: Regenerate.
284         * gnulib/import/Makefile.am: Update.
285         * gnulib/import/Makefile.in: Update.
286         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
287         * gnulib/import/_Noreturn.h: ... this.
288         * gnulib/import/alloca.in.h: Update.
289         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
290         * gnulib/import/arg-nonnull.h: ... this.
291         * gnulib/import/assure.h: Update.
292         * gnulib/import/at-func.c: Update.
293         * gnulib/import/basename-lgpl.c: Update.
294         * gnulib/import/extra/snippet/c++defs.h: Rename to...
295         * gnulib/import/c++defs.h: ... this.
296         * gnulib/import/canonicalize-lgpl.c: Update.
297         * gnulib/import/cdefs.h: Update.
298         * gnulib/import/chdir-long.c: Update.
299         * gnulib/import/chdir-long.h: Update.
300         * gnulib/import/cloexec.c: Update.
301         * gnulib/import/cloexec.h: Update.
302         * gnulib/import/close.c: Update.
303         * gnulib/import/closedir.c: Update.
304         * gnulib/import/config.charset: Update.
305         * gnulib/import/dirent-private.h: Update.
306         * gnulib/import/dirent.in.h: Update.
307         * gnulib/import/dirfd.c: Update.
308         * gnulib/import/dirname-lgpl.c: Update.
309         * gnulib/import/dirname.h: Update.
310         * gnulib/import/dosname.h: Update.
311         * gnulib/import/dup-safer-flag.c: Update.
312         * gnulib/import/dup-safer.c: Update.
313         * gnulib/import/dup.c: Update.
314         * gnulib/import/dup2.c: Update.
315         * gnulib/import/errno.in.h: Update.
316         * gnulib/import/error.c: Update.
317         * gnulib/import/error.h: Update.
318         * gnulib/import/exitfail.c: Update.
319         * gnulib/import/exitfail.h: Update.
320         * gnulib/import/extra/update-copyright: Update.
321         * gnulib/import/fchdir.c: Update.
322         * gnulib/import/fcntl.c: Update.
323         * gnulib/import/fcntl.in.h: Update.
324         * gnulib/import/fd-hook.c: Update.
325         * gnulib/import/fd-hook.h: Update.
326         * gnulib/import/fd-safer-flag.c: Update.
327         * gnulib/import/fd-safer.c: Update.
328         * gnulib/import/fdopendir.c: Update.
329         * gnulib/import/filename.h: Update.
330         * gnulib/import/filenamecat-lgpl.c: Update.
331         * gnulib/import/filenamecat.h: Update.
332         * gnulib/import/flexmember.h: Update.
333         * gnulib/import/float+.h: Update.
334         * gnulib/import/float.c: Update.
335         * gnulib/import/float.in.h: Update.
336         * gnulib/import/fnmatch.c: Update.
337         * gnulib/import/fnmatch.in.h: Update.
338         * gnulib/import/fnmatch_loop.c: Update.
339         * gnulib/import/fpucw.h: Update.
340         * gnulib/import/frexp.c: Update.
341         * gnulib/import/frexpl.c: Update.
342         * gnulib/import/fstat.c: Update.
343         * gnulib/import/fstatat.c: Update.
344         * gnulib/import/getcwd-lgpl.c: Update.
345         * gnulib/import/getcwd.c: Update.
346         * gnulib/import/getdtablesize.c: Update.
347         * gnulib/import/getlogin_r.c: Update.
348         * gnulib/import/getprogname.c: Update.
349         * gnulib/import/getprogname.h: Update.
350         * gnulib/import/gettext.h: Update.
351         * gnulib/import/gettimeofday.c: Update.
352         * gnulib/import/glob-libc.h: Update.
353         * gnulib/import/glob.c: Update.
354         * gnulib/import/glob.in.h: Update.
355         * gnulib/import/glob_internal.h: Update.
356         * gnulib/import/glob_pattern_p.c: Update.
357         * gnulib/import/globfree.c: Update.
358         * gnulib/import/hard-locale.c: Update.
359         * gnulib/import/hard-locale.h: Update.
360         * gnulib/import/intprops.h: Update.
361         * gnulib/import/inttypes.in.h: Update.
362         * gnulib/import/isnan.c: Update.
363         * gnulib/import/isnand-nolibm.h: Update.
364         * gnulib/import/isnand.c: Update.
365         * gnulib/import/isnanl-nolibm.h: Update.
366         * gnulib/import/isnanl.c: Update.
367         * gnulib/import/itold.c: Update.
368         * gnulib/import/libc-config.h: Update.
369         * gnulib/import/limits.in.h: Update.
370         * gnulib/import/localcharset.c: Update.
371         * gnulib/import/localcharset.h: Update.
372         * gnulib/import/localtime-buffer.c: Update.
373         * gnulib/import/localtime-buffer.h: Update.
374         * gnulib/import/lstat.c: Update.
375         * gnulib/import/m4/00gnulib.m4: Update.
376         * gnulib/import/m4/__inline.m4: Update.
377         * gnulib/import/m4/absolute-header.m4: Update.
378         * gnulib/import/m4/alloca.m4: Update.
379         * gnulib/import/m4/builtin-expect.m4: Update.
380         * gnulib/import/m4/canonicalize.m4: Update.
381         * gnulib/import/m4/chdir-long.m4: Update.
382         * gnulib/import/m4/close.m4: Update.
383         * gnulib/import/m4/closedir.m4: Update.
384         * gnulib/import/m4/configmake.m4: Update.
385         * gnulib/import/m4/d-ino.m4: Update.
386         * gnulib/import/m4/d-type.m4: Update.
387         * gnulib/import/m4/dirent_h.m4: Update.
388         * gnulib/import/m4/dirfd.m4: Update.
389         * gnulib/import/m4/dirname.m4: Update.
390         * gnulib/import/m4/double-slash-root.m4: Update.
391         * gnulib/import/m4/dup.m4: Update.
392         * gnulib/import/m4/dup2.m4: Update.
393         * gnulib/import/m4/eealloc.m4: Update.
394         * gnulib/import/m4/environ.m4: Update.
395         * gnulib/import/m4/errno_h.m4: Update.
396         * gnulib/import/m4/error.m4: Update.
397         * gnulib/import/m4/exponentd.m4: Update.
398         * gnulib/import/m4/exponentl.m4: Update.
399         * gnulib/import/m4/extensions.m4: Update.
400         * gnulib/import/m4/extern-inline.m4: Update.
401         * gnulib/import/m4/fchdir.m4: Update.
402         * gnulib/import/m4/fcntl-o.m4: Update.
403         * gnulib/import/m4/fcntl.m4: Update.
404         * gnulib/import/m4/fcntl_h.m4: Update.
405         * gnulib/import/m4/fdopendir.m4: Update.
406         * gnulib/import/m4/filenamecat.m4: Update.
407         * gnulib/import/m4/flexmember.m4: Update.
408         * gnulib/import/m4/float_h.m4: Update.
409         * gnulib/import/m4/fnmatch.m4: Update.
410         * gnulib/import/m4/fnmatch_h.m4: Update.
411         * gnulib/import/m4/fpieee.m4: Update.
412         * gnulib/import/m4/frexp.m4: Update.
413         * gnulib/import/m4/frexpl.m4: Update.
414         * gnulib/import/m4/fstat.m4: Update.
415         * gnulib/import/m4/fstatat.m4: Update.
416         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
417         * gnulib/import/m4/getcwd-path-max.m4: Update.
418         * gnulib/import/m4/getcwd.m4: Update.
419         * gnulib/import/m4/getdtablesize.m4: Update.
420         * gnulib/import/m4/getlogin.m4: Update.
421         * gnulib/import/m4/getlogin_r.m4: Update.
422         * gnulib/import/m4/getpagesize.m4: Update.
423         * gnulib/import/m4/getprogname.m4: Update.
424         * gnulib/import/m4/gettimeofday.m4: Update.
425         * gnulib/import/m4/glibc21.m4: Update.
426         * gnulib/import/m4/glob.m4: Update.
427         * gnulib/import/m4/glob_h.m4: Update.
428         * gnulib/import/m4/gnulib-cache.m4: Update.
429         * gnulib/import/m4/gnulib-common.m4: Update.
430         * gnulib/import/m4/gnulib-comp.m4: Update.
431         * gnulib/import/m4/gnulib-tool.m4: Update.
432         * gnulib/import/m4/hard-locale.m4: Update.
433         * gnulib/import/m4/include_next.m4: Update.
434         * gnulib/import/m4/inttypes-pri.m4: Update.
435         * gnulib/import/m4/inttypes.m4: Update.
436         * gnulib/import/m4/isnand.m4: Update.
437         * gnulib/import/m4/isnanl.m4: Update.
438         * gnulib/import/m4/largefile.m4: Update.
439         * gnulib/import/m4/limits-h.m4: Update.
440         * gnulib/import/m4/localcharset.m4: Update.
441         * gnulib/import/m4/locale-fr.m4: Update.
442         * gnulib/import/m4/locale-ja.m4: Update.
443         * gnulib/import/m4/locale-zh.m4: Update.
444         * gnulib/import/m4/localtime-buffer.m4: Update.
445         * gnulib/import/m4/longlong.m4: Update.
446         * gnulib/import/m4/lstat.m4: Update.
447         * gnulib/import/m4/malloc.m4: Update.
448         * gnulib/import/m4/malloca.m4: Update.
449         * gnulib/import/m4/math_h.m4: Update.
450         * gnulib/import/m4/mbrtowc.m4: Update.
451         * gnulib/import/m4/mbsinit.m4: Update.
452         * gnulib/import/m4/mbsrtowcs.m4: Update.
453         * gnulib/import/m4/mbstate_t.m4: Update.
454         * gnulib/import/m4/memchr.m4: Update.
455         * gnulib/import/m4/memmem.m4: Update.
456         * gnulib/import/m4/mempcpy.m4: Update.
457         * gnulib/import/m4/memrchr.m4: Update.
458         * gnulib/import/m4/mkdir.m4: Update.
459         * gnulib/import/m4/mkstemp.m4: Update.
460         * gnulib/import/m4/mmap-anon.m4: Update.
461         * gnulib/import/m4/mode_t.m4: Update.
462         * gnulib/import/m4/msvc-inval.m4: Update.
463         * gnulib/import/m4/msvc-nothrow.m4: Update.
464         * gnulib/import/m4/multiarch.m4: Update.
465         * gnulib/import/m4/nocrash.m4: Update.
466         * gnulib/import/m4/off_t.m4: Update.
467         * gnulib/import/m4/onceonly.m4: Update.
468         * gnulib/import/m4/open-cloexec.m4: Update.
469         * gnulib/import/m4/open.m4: Update.
470         * gnulib/import/m4/openat.m4: Update.
471         * gnulib/import/m4/opendir.m4: Update.
472         * gnulib/import/m4/pathmax.m4: Update.
473         * gnulib/import/m4/rawmemchr.m4: Update.
474         * gnulib/import/m4/readdir.m4: Update.
475         * gnulib/import/m4/readlink.m4: Update.
476         * gnulib/import/m4/realloc.m4: Update.
477         * gnulib/import/m4/rename.m4: Update.
478         * gnulib/import/m4/rewinddir.m4: Update.
479         * gnulib/import/m4/rmdir.m4: Update.
480         * gnulib/import/m4/save-cwd.m4: Update.
481         * gnulib/import/m4/secure_getenv.m4: Update.
482         * gnulib/import/m4/setenv.m4: Update.
483         * gnulib/import/m4/signal_h.m4: Update.
484         * gnulib/import/m4/ssize_t.m4: Update.
485         * gnulib/import/m4/stat-time.m4: Update.
486         * gnulib/import/m4/stat.m4: Update.
487         * gnulib/import/m4/std-gnu11.m4: Update.
488         * gnulib/import/m4/stdbool.m4: Update.
489         * gnulib/import/m4/stddef_h.m4: Update.
490         * gnulib/import/m4/stdint.m4: Update.
491         * gnulib/import/m4/stdio_h.m4: Update.
492         * gnulib/import/m4/stdlib_h.m4: Update.
493         * gnulib/import/m4/strchrnul.m4: Update.
494         * gnulib/import/m4/strdup.m4: Update.
495         * gnulib/import/m4/strerror.m4: Update.
496         * gnulib/import/m4/string_h.m4: Update.
497         * gnulib/import/m4/strstr.m4: Update.
498         * gnulib/import/m4/strtok_r.m4: Update.
499         * gnulib/import/m4/sys_socket_h.m4: Update.
500         * gnulib/import/m4/sys_stat_h.m4: Update.
501         * gnulib/import/m4/sys_time_h.m4: Update.
502         * gnulib/import/m4/sys_types_h.m4: Update.
503         * gnulib/import/m4/tempname.m4: Update.
504         * gnulib/import/m4/time_h.m4: Update.
505         * gnulib/import/m4/unistd-safer.m4: Update.
506         * gnulib/import/m4/unistd_h.m4: Update.
507         * gnulib/import/m4/warn-on-use.m4: Update.
508         * gnulib/import/m4/wchar_h.m4: Update.
509         * gnulib/import/m4/wchar_t.m4: Update.
510         * gnulib/import/m4/wctype_h.m4: Update.
511         * gnulib/import/m4/wint_t.m4: Update.
512         * gnulib/import/malloc.c: Update.
513         * gnulib/import/malloc/scratch_buffer.h: Update.
514         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
515         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
516         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
517         * gnulib/import/malloca.c: Update.
518         * gnulib/import/malloca.h: Update.
519         * gnulib/import/malloca.valgrind: Update.
520         * gnulib/import/math.in.h: Update.
521         * gnulib/import/mbrtowc.c: Update.
522         * gnulib/import/mbsinit.c: Update.
523         * gnulib/import/mbsrtowcs-impl.h: Update.
524         * gnulib/import/mbsrtowcs-state.c: Update.
525         * gnulib/import/mbsrtowcs.c: Update.
526         * gnulib/import/memchr.c: Update.
527         * gnulib/import/memmem.c: Update.
528         * gnulib/import/mempcpy.c: Update.
529         * gnulib/import/memrchr.c: Update.
530         * gnulib/import/mkdir.c: Update.
531         * gnulib/import/mkstemp.c: Update.
532         * gnulib/import/msvc-inval.c: Update.
533         * gnulib/import/msvc-inval.h: Update.
534         * gnulib/import/msvc-nothrow.c: Update.
535         * gnulib/import/msvc-nothrow.h: Update.
536         * gnulib/import/open.c: Update.
537         * gnulib/import/openat-die.c: Update.
538         * gnulib/import/openat-priv.h: Update.
539         * gnulib/import/openat-proc.c: Update.
540         * gnulib/import/openat.c: Update.
541         * gnulib/import/openat.h: Update.
542         * gnulib/import/opendir.c: Update.
543         * gnulib/import/pathmax.h: Update.
544         * gnulib/import/pipe-safer.c: Update.
545         * gnulib/import/rawmemchr.c: Update.
546         * gnulib/import/readdir.c: Update.
547         * gnulib/import/readlink.c: Update.
548         * gnulib/import/realloc.c: Update.
549         * gnulib/import/ref-add.sin: Update.
550         * gnulib/import/ref-del.sin: Update.
551         * gnulib/import/rename.c: Update.
552         * gnulib/import/rewinddir.c: Update.
553         * gnulib/import/rmdir.c: Update.
554         * gnulib/import/same-inode.h: Update.
555         * gnulib/import/save-cwd.c: Update.
556         * gnulib/import/save-cwd.h: Update.
557         * gnulib/import/scratch_buffer.h: Update.
558         * gnulib/import/secure_getenv.c: Update.
559         * gnulib/import/setenv.c: Update.
560         * gnulib/import/signal.in.h: Update.
561         * gnulib/import/stat-time.c: Update.
562         * gnulib/import/stat-time.h: Update.
563         * gnulib/import/stat-w32.c: Update.
564         * gnulib/import/stat-w32.h: Update.
565         * gnulib/import/stat.c: Update.
566         * gnulib/import/stdbool.in.h: Update.
567         * gnulib/import/stddef.in.h: Update.
568         * gnulib/import/stdint.in.h: Update.
569         * gnulib/import/stdio.in.h: Update.
570         * gnulib/import/stdlib.in.h: Update.
571         * gnulib/import/str-two-way.h: Update.
572         * gnulib/import/strchrnul.c: Update.
573         * gnulib/import/strdup.c: Update.
574         * gnulib/import/streq.h: Update.
575         * gnulib/import/strerror-override.c: Update.
576         * gnulib/import/strerror-override.h: Update.
577         * gnulib/import/strerror.c: Update.
578         * gnulib/import/string.in.h: Update.
579         * gnulib/import/stripslash.c: Update.
580         * gnulib/import/strnlen1.c: Update.
581         * gnulib/import/strnlen1.h: Update.
582         * gnulib/import/strstr.c: Update.
583         * gnulib/import/strtok_r.c: Update.
584         * gnulib/import/sys_stat.in.h: Update.
585         * gnulib/import/sys_time.in.h: Update.
586         * gnulib/import/sys_types.in.h: Update.
587         * gnulib/import/tempname.c: Update.
588         * gnulib/import/tempname.h: Update.
589         * gnulib/import/time.in.h: Update.
590         * gnulib/import/unistd--.h: Update.
591         * gnulib/import/unistd-safer.h: Update.
592         * gnulib/import/unistd.in.h: Update.
593         * gnulib/import/unsetenv.c: Update.
594         * gnulib/import/verify.h: Update.
595         * gnulib/import/extra/snippet/warn-on-use.h: Update.
596         * gnulib/import/wchar.in.h: Update.
597         * gnulib/import/wctype.in.h: Update.
598         * gnulib/import/xalloc-oversized.h: Update.
599         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
600         "53e2c179f26a890fa6685af4b6c1397ee370433b".
601
602 2018-08-16  Gary Benson <gbenson@redhat.com>
603
604         PR gdb/13000:
605         * gdb/main.c (captured_main_1): Exit with nonzero status
606         in batch mode if the last command to be executed failed.
607         * NEWS: Mention the above.
608
609 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
610
611         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
612         end of warning message.
613
614 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
615
616         PR gdb/22943:
617         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
618         (aarch64_extract_return_value): Use
619         aapcs_is_vfp_call_or_return_candidate.
620         (aarch64_return_in_memory): Likewise.
621         (aarch64_store_return_value): Likewise.
622
623 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
624
625         * aarch64-tdep.c
626         (aapcs_is_vfp_call_or_return_candidate): Make static
627         (pass_in_v_or_stack): Remove function.
628         (pass_in_v_vfp_candidate): New function.
629         (aarch64_push_dummy_call): Check for float register candidates.
630
631 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
632
633         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
634         (aapcs_is_vfp_call_or_return_candidate_1): New function.
635         (aapcs_is_vfp_call_or_return_candidate): Likewise.
636
637 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
638
639         PR build/23399
640         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
641         (struct ipa_sym_addresses): Rename to...
642         (struct ipa_sym_addresses_common): ... this.
643         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
644
645 2018-08-28  Tom Tromey  <tom@tromey.com>
646
647         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
648         (token_fifo): Now a std::vector.
649         (yylex, c_parse): Update.
650         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
651         (token_fifo): Now a std::vector.
652         (yylex, d_parse): Update.
653         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
654         (token_fifo): Now a std::vector.
655         (yylex, go_parse): Update.
656
657 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
658
659         * parser-defs.h (struct type_stack) <elements>: Change type to
660         std::vector<union type_stack_elt>.
661         <depth, size>: Remove.
662         * parse.c (parse_exp_in_context_1): Adjust.
663         (type_stack_reserve): Remove.
664         (check_type_stack_depth): Remove.
665         (insert_into_type_stack): Adjust to std::vector.
666         (insert_type): Likewise.
667         (push_type): Likewise.
668         (push_type_int): Likewise.
669         (insert_type_address_space): Likewise.
670         (pop_type): Likewise.
671         (pop_type_int): Likewise.
672         (pop_typelist): Likewise.
673         (pop_type_stack): Likewise.
674         (append_type_stack): Likewise.
675         (push_type_stack): Likewise.
676         (get_type_stack): Likewise.
677         (type_stack_cleanup): Likewise.
678         (push_typelist): Likewise.
679         (follow_types): Likewise.
680         (_initialize_parse): Likewise.
681
682 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
683
684         * NEWS: Mention csky target.
685
686 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
687             Hafiz Abid Qadeer  <abidh@codesourcery.com>
688             Don Breazeal  <donb@codesourcery.com>
689
690         * csky-linux-tdep.c: New file.
691         * csky-tdep.c: Likewise.
692         * csky-tdep.h: Likewise.
693         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
694         csky-tdep.o.
695         (HFILES_NO_SRCDIR): Add csky-tdep.h.
696         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
697         * configure.tgt: Add csky support.
698
699 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
700
701         * python/py-framefilter.c (py_print_frame): Print frame architecture
702         when printing on an MI output.
703
704 2018-08-27  Tom Tromey  <tom@tromey.com>
705
706         PR build/23087:
707         * configure: Rebuild.
708         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
709
710 2018-08-27  Tom Tromey  <tom@tromey.com>
711
712         * aarch64-linux-tdep.c
713         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
714         casts to int.
715
716 2018-08-27  Tom Tromey  <tom@tromey.com>
717
718         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
719         unsigned.
720         (ppc64_standard_linkage1, ppc64_standard_linkage2)
721         (ppc64_standard_linkage3, ppc64_standard_linkage4)
722         (ppc64_standard_linkage5, ppc64_standard_linkage6)
723         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
724         unsigned.
725
726 2018-08-27  Tom Tromey  <tom@tromey.com>
727
728         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
729         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
730
731 2018-08-27  Tom Tromey  <tom@tromey.com>
732
733         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
734         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
735         ULONGEST_MAX.
736         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
737         ULONGEST_MAX.
738         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
739         ULONGEST_MAX.
740         * sparc-linux-tdep.c (sparc32_linux_sigframe)
741         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
742         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
743         ULONGEST_MAX.
744         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
745         (ppc64_linux_sigaction_tramp_frame)
746         (ppc32_linux_sighandler_tramp_frame)
747         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
748         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
749         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
750         * mn10300-linux-tdep.c (am33_linux_sigframe)
751         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
752         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
753         * mips-linux-tdep.c (mips_linux_o32_sigframe)
754         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
755         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
756         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
757         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
758         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
759         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
760         * microblaze-linux-tdep.c
761         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
762         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
763         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
764         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
765         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
766         * common/common-types.h (ULONGEST_MAX): New define.
767         (CORE_ADDR_MAX): Fix formatting.
768         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
769         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
770         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
771         (arm_linux_rt_sigreturn_tramp_frame)
772         (arm_eabi_linux_sigreturn_tramp_frame)
773         (arm_eabi_linux_rt_sigreturn_tramp_frame)
774         (thumb2_eabi_linux_sigreturn_tramp_frame)
775         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
776         (arm_linux_restart_syscall_tramp_frame)
777         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
778         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
779         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
780         ULONGEST_MAX.
781         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
782
783 2018-08-27  Tom Tromey  <tom@tromey.com>
784
785         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
786         CORE_ADDR_MAX.
787         * mips-tdep.c (mips_deal_with_atomic_sequence)
788         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
789         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
790         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
791         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
792         CORE_ADDR_MAX.
793         * aarch64-tdep.c (aarch64_software_single_step): Use
794         CORE_ADDR_MAX.
795
796 2018-08-27  Tom Tromey  <tom@tromey.com>
797
798         * linespec.c (complete_linespec_component): Add cast to "char".
799         * completer.c (completion_tracker::build_completion_result): Add
800         cast to "char".
801
802 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
803
804         * solist.h (struct solist, struct target_so_ops): Fix
805         indentation.
806
807 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
808
809         * ada-tasks.c (ada_task_info_s): Remove typedef.
810         (DEF_VEC_O(ada_task_info_s)): Remove.
811         (struct ada_tasks_inferior_data): Initialize fields.
812         <task_list>: Make an std::vector.
813         (get_ada_tasks_inferior_data): Allocate with new.
814         (ada_get_task_number): Adjust.
815         (get_task_number_from_id): Likewise.
816         (valid_task_id): Likewise.
817         (ada_get_task_info_from_ptid): Likewise.
818         (iterate_over_live_ada_tasks): Likewise.
819         (add_ada_task): Likewise.
820         (read_known_tasks): Likewise.
821         (ada_build_task_list): Likewise.
822         (print_ada_task_info): Likewise.
823         (info_task): Likewise.
824         (task_command_1): Likewise.
825
826 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
827
828         * ada-lang.c (add_angle_brackets): Return std::string.
829
830 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
831
832         * python/py-threadevent.c (py_get_event_thread): Initialize
833         pythread.
834
835 2018-08-24  Pedro Alves  <palves@redhat.com>
836
837         * python/py-bpevent.c (create_breakpoint_event_object): Use
838         copy-initialization.
839         * python/py-continueevent.c (emit_continue_event): Use
840         copy-initialization.
841         * python/py-exitedevent.c (create_exited_event_object): Return a
842         gdbpy_ref<>.
843         (emit_exited_event): Use copy-initialization.
844         * python/py-inferior.c (python_new_inferior)
845         (python_inferior_deleted, add_thread_object): Use
846         copy-initialization.
847         * python/py-infevents.c (create_inferior_call_event_object)
848         (create_register_changed_event_object)
849         (create_memory_changed_event_object): Return a gdbpy_ref<>.
850         (emit_inferior_call_event, emit_memory_changed_event)
851         (emit_register_changed_event): Use copy-initialization.
852         * python/py-newobjfileevent.c (create_new_objfile_event_object):
853         Return a gdbpy_ref<>.
854         (emit_new_objfile_event): Use copy-initialization.
855         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
856         (emit_clear_objfiles_event): Use copy-initialization.
857         * python/py-signalevent.c (create_signal_event_object): Use
858         copy-initialization.
859         * python/py-threadevent.c (create_thread_event_object): Use
860         copy-initialization.
861
862 2018-08-24  Pedro Alves  <palves@redhat.com>
863             Simon Marchi  <simon.marchi@ericsson.com>
864
865         PR gdb/23379
866         * python/py-continueevent.c: Include "gdbthread.h".
867         (create_continue_event_object): Add intro comment.  Add 'ptid'
868         parameter.  Use it to find thread to pass to
869         create_thread_event_object.
870         (emit_continue_event): Pass PTID down to
871         create_continue_event_object.
872         * python/py-event.h (py_get_event_thread): Declare.
873         (create_thread_event_object): Remove default from 'thread'
874         parameter.
875         * python/py-stopevent.c (create_stop_event_object): Use
876         py_get_event_thread.
877         * python/py-threadevent.c (get_event_thread): Rename to ...
878         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
879         and use it to find the thread.
880         (create_thread_event_object): Assert that THREAD isn't null.
881         Don't find the event thread here.
882
883 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
884
885         * block.h (blockrange, blockranges): New struct declarations.
886         (struct block): Add new field named `ranges'.
887         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
888         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
889         macros for accessing ranges in struct block.
890         (make_blockranges): New declaration.
891         block.c (make_blockranges): New function.
892         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
893         for block.
894         * symtab.h (find_pc_partial_function): Add new parameter `block'.
895         * blockframe.c (cache_pc_function_block): New static global.
896         (clear_pc_function_cache): Clear cache_pc_function_block.
897         (find_pc_partial_function): Move comment to symtab.h.  Add
898         support for non-contiguous blocks.
899         * cli/cli-cmds.c (block.h): Include.
900         (print_disassembly): Handle printing of non-contiguous blocks.
901         (disassemble_current_function): Likewise.
902         (disassemble_command): Likewise.
903
904         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
905         BLOCK_START.
906         * blockframe.c (get_pc_function_start): Likewise.
907         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
908         (gcc_symbol_address): Likewise.
909         * compile/compile-object-run.c (compile_object_run): Likewise.
910         * compile/compile.c (get_expr_block_and_pc): Likewise.
911         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
912         (func_addr_to_tail_call_list): Likewise.
913         * findvar.c (default_read_var_value): Likewise.
914         * inline-frame.c (inline_frame_this_id): Likewise.
915         (skip-inline_frames): Likewise.
916         * infcmd.c (until_next_command): Likewise.
917         * linespec.c (convert_linespec_to_sals): Likewise.
918         * parse.c (parse_exp_in_context_1): Likewise.
919         * printcmd.c (build_address_symbolic): likewise.
920         (info_address_command): Likewise.
921         symtab.c (find_function_start_sal): Likewise.
922         (skip_prologue_sal): Likewise.
923         (find_function_alias_target): Likewise.
924         (find_gnu_ifunc): Likewise.
925         * stack.c (find_frame_funname): Likewise.
926         * symtab.c (fixup_symbol_section): Likewise.
927         (find_function_start_sal): Likewise.
928         (skip_prologue_sal): Likewsie.
929         (find_function_alias_target): Likewise.
930         (find_gnu_ifunc): Likewise.
931         * tracepoint.c (info_scope_command): Likewise.
932         * value.c (value_fn_field): Likewise.
933
934         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
935         in place of find_pc_partial_function.
936         * blockframe.c (find_function_entry_range_from_pc): New function.
937         * symtab.h (find_function_entry_range_from_pc): Declare and document.
938         * objfiles.c (objfile_relocate1): Relocate start and end addresses
939         for each range in a block.
940
941
942 2018-08-23  Xavier Roirand  <roirand@adacore.com>
943
944         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
945         incrementation.
946
947 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
948
949         * solib-svr4.c (read_program_headers_from_bfd): Return
950         gdb::optional<gdb::byte_vector>.
951         (svr4_exec_displacement): Adjust.
952
953 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
954
955         * solib-svr4.c (read_program_header): Return
956         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
957         (find_program_interpreter): Return
958         gdb::optional<gdb::byte_vector>.
959         (scan_dyntag_auxv): Adjust.
960         (enable_break): Adjust.
961         (svr4_exec_displacement): Adjust.
962
963 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
964
965         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
966         * inf-child.c (inf_child_target::terminal_save_inferior): New.
967
968 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
969
970         * guile/scm-string.c (gdbscm_scm_from_printf): Use
971         string_vprintf.
972         * guile/scm-utils.c (gdbscm_printf): Likewise.
973         * serial.c (serial_printf): Likewise.
974         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
975
976 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
977
978         * stack.c (print_frame): Print frame architecture when printing on
979         an MI output.
980         * NEWS: Mention new "arch" attribute in frame output.
981
982 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
983
984         * arch/aarch64.h (aarch64_regnum): Update comment.
985
986 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
987
988         * NEWS: Add SVE to 8.2 section.
989
990 2018-08-21  Pedro Alves  <palves@redhat.com>
991
992         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
993         out from gdbscm_parse_function_args.
994         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
995         gdbscm_parse_function_args_1.
996
997 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
998
999         PR gdb/17816
1000         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1001         operator.
1002
1003 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1004
1005         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1006
1007 2018-08-19  Michael Spang  <spang@google.com>
1008
1009         PR gdb/11786
1010         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1011         for PT_TLS segments.
1012
1013 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1014
1015         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1016         dwarf_variable_value.
1017         * dwarf2-frame.c (class dwarf_expr_executor):
1018         Add override for dwarf_variable_value.
1019         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1020         (class symbol_needs_eval_context): Likewise.
1021         (indirect_synthetic_pointer): Add forward declaration.
1022         (sect_variable_value): New function.
1023         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1024         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1025         for DW_OP_GNU_variable_value.
1026
1027 2018-08-16  Tom Tromey  <tom@tromey.com>
1028
1029         * top.c (read_command_file): Update.
1030         (command_line_input): Remove "repeat" argument.
1031         * ada-lang.c (get_selections): Update.
1032         * linespec.c (decode_line_2): Update.
1033         * defs.h (command_line_input): Remove argument.
1034         * cli/cli-script.c (read_next_line): Update.
1035         * python/py-gdb-readline.c: Update.
1036
1037 2018-08-17  Tom Tromey  <tom@tromey.com>
1038
1039         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1040         command_line_input.
1041
1042 2018-08-15  Tom Tromey  <tom@tromey.com>
1043
1044         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1045
1046 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1047
1048         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1049         If used, use find_pc_partial_function to find address range
1050         to disassemble.
1051         * mi/mi-main.c (mi_cmd_list_features): Report
1052         "data-disassemble-a-option" feature.
1053         * NEWS: Mention new -data-disassemble option -a.
1054
1055 2018-08-13  Tom Tromey  <tom@tromey.com>
1056
1057         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1058
1059 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1060
1061         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1062         (aarch64_linux_collect_sve_regset): Likewise.
1063         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1064         * regcache.h (regcache_map_entry_size): New function.
1065
1066 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1067
1068         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1069         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1070         (SVE_HEADER_VL_LENGTH): Likewise.
1071         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1072         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1073         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1074         (SVE_HEADER_SIZE_OFFSET): Likewise.
1075         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1076         (SVE_HEADER_VL_OFFSET): Likewise.
1077         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1078         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1079         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1080         (SVE_HEADER_SIZE): Likewise.
1081         (aarch64_linux_core_read_vq): Add function.
1082         (aarch64_linux_core_read_description): Check for SVE section.
1083
1084 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1085
1086         * aarch64-fbsd-tdep.c
1087         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1088         collect_size.
1089         * aarch64-linux-tdep.c
1090         (aarch64_linux_iterate_over_regset_sections): Likewise.
1091         * alpha-linux-tdep.c
1092         (alpha_linux_iterate_over_regset_sections):
1093         * alpha-nbsd-tdep.c
1094         (alphanbsd_iterate_over_regset_sections): Likewise.
1095         * amd64-fbsd-tdep.c
1096         (amd64fbsd_iterate_over_regset_sections): Likewise.
1097         * amd64-linux-tdep.c
1098         (amd64_linux_iterate_over_regset_sections): Likewise.
1099         * arm-bsd-tdep.c
1100         (armbsd_iterate_over_regset_sections): Likewise.
1101         * arm-fbsd-tdep.c
1102         (arm_fbsd_iterate_over_regset_sections): Likewise.
1103         * arm-linux-tdep.c
1104         (arm_linux_iterate_over_regset_sections): Likewise.
1105         * corelow.c (get_core_registers_cb): Likewise.
1106         (core_target::fetch_registers): Likewise.
1107         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1108         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1109         * gdbarch.h (void): Regenerate.
1110         * gdbarch.sh: Add supply_size and collect_size.
1111         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1112         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1113         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1114         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1115         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1116         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1117         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1118         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1119         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1120         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1121         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1122         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1123         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1124         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1125         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1126         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1127         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1128         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1129         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1130         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1131         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1132         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1133         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1134         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1135         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1136         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1137         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1138         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1139         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1140         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1141
1142 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1143
1144         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1145         with string_printf.
1146
1147 2018-08-10  Keith Seitz  <keiths@redhat.com>
1148
1149         * compile/compile-c-support.c (add_code_header, add_code_footer):
1150         Move into policy class.
1151         (c_push_user_expression, pop_user_expression_nop)
1152         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1153         (compile_program): New host class.
1154         (c_compile_program): New typedef.
1155         (c_compute_porgram): Use c_compile_program.
1156
1157 2018-08-10  Keith Seitz  <keiths@redhat.com>
1158
1159         * compile/compile-internal.h (compile_instance::~compile_instance):
1160         Remove calls to htab_delete.
1161         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1162         * compile.c (compile_instance::compile_instance): Initialize
1163         htab unique pointers.
1164         (compile_instance::get_cached_type, compile_instance::insert_type)
1165         (compile_instance::error_symbol_once): Update for unique_ptr.
1166
1167 2018-08-10  Keith Seitz  <keiths@redhat.com>
1168
1169         * compile/compile-c-symbols.c (struct symbol_error)
1170         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1171         (compile_instance::insert_symbol_error)
1172         (compile_instance::error_symbol_once): Move to ...
1173         * compile/compile.c: ... here.
1174
1175 2018-08-10  Keith Seitz  <keiths@redhat.com>
1176
1177         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1178         instead of `new_compile_instance'.
1179         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1180         Update description.
1181         If the symbol error map is not initialized, create it.
1182         (generate_c_for_for_one_symbol): Do not check/initialize
1183         the symbol error map.
1184         * compile/compile-c-types.c (compile_c_instance): Make a class.
1185         Update all callers.
1186         (compile_instance::compile_instance): Initialize the type cache.
1187         (get_cached_type): New function.
1188         (insert_type): Update description.
1189         (compile_c_instance::m_default_cflags): Define.
1190         (convert_type): Update description.  Use get_cached_type.
1191         (delete_instance): Moved to destructor.
1192         (new_compile_instance): Moved to constructor.
1193         * compile/compile-c.h (compile_c_instance): Make class inheriting
1194         from compile_instance.
1195         <base>: Remove field.
1196         <type_map, symbol_err_map>: Move to base class.
1197         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1198         * compile/compile-internal.h (compile_instance): Make class.
1199         <type_map_t, symbol_err_map_t>: Define.
1200         <fe>: Rename to `m_gcc_fe'.
1201         <scope, block, gcc_target_options>: Add `m_' prefix.
1202         <m_type_map, m_symbol_err_map>: New fields, moved from
1203         compile_c_instance.
1204         <destroy>: Remove.
1205         (convert_type, new_compile_instance): Remove.
1206         * compile/compile.c (cleanup_compile_instance): Remove.
1207         (compile_to_object): Use unique_ptr to eliminate cleanups.
1208         (compile_instance::set_print_callback, compile_instance::version)
1209         (compile_instance::set_verbose)
1210         (compile_instance::set_driver_filename)
1211         (compile_instance::set_triplet_regexp)
1212         (compile_instance::set_arguments)
1213         (compile_instance::set_source_file)
1214         (compile_instance::compile): Define.
1215
1216 2018-08-10  Keith Seitz  <keiths@redhat.com>
1217
1218         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1219         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1220         gcc-c-fe.def to define C plugin.
1221         (delete_instance): Delete `c_plugin'.
1222         (new_compile_instance): Initialize `c_plugin'.
1223         * compile/compile-c.h: Include gcc_c_plugin.h.
1224         (struct compile_c_instance) <c_plugin>: New member.
1225         * gcc-c-plugin.h: New file.
1226         Update all callers with API change.
1227
1228 2018-08-10  Keith Seitz  <keiths@redhat.com>
1229
1230         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1231         (HFILES_NO_SRCDIR): ... to here.
1232         Add compile-internal.h and compile-c.h.
1233         * compile/compile-c-support.c: Include compile-c.h.
1234         * compile/compile-c-symbols.c: Include compile-c.h.
1235         (generate_c_for_variable_locations): Update comment.
1236         * compile/compile-c-types.c: Include compile-c.h.
1237         * compile/compile-c.h: New file -- moved C language declarations
1238         from other files here.
1239         * compile/compile-internal.h: Do not include hashtab.h or
1240         common/enum-flags.h.
1241         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1242         (gcc_convert_symbol, gcc_symbol_address)
1243         (generate_c_for_variable_locations, c_get_mode_for_size)
1244         (c_get_range_decl_name): Definitions moved to compile-c.h.
1245         * compile/compile-loc2c.c: Include compile-c.h.
1246
1247 2018-08-10  Keith Seitz  <keiths@redhat.com>
1248
1249         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1250         (c_symbol_substitution_name): ... this.
1251         Update all callers.
1252
1253 2018-08-10  Keith Seitz  <keiths@redhat.com>
1254
1255         * compile/compile-c-support.c (c_compute_program): Use
1256         unique_xmalloc_ptr to eliminate cleanup.
1257         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1258         Return a unique_xmalloc_ptr and eliminate cleanup.
1259         * compile/compile-internal.h (generate_c_for_variable_locations):
1260         Return unique_xmalloc_ptr and update description.
1261
1262 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1263
1264         * corelow.c (core_target::get_core_register_section): Rename
1265         min_size to section_min_size.
1266
1267 2018-08-09  Jim Wilson  <jimw@sifive.com>
1268
1269         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1270         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1271         * NEWS: Mention new GNU/Linux RISC-V target.
1272         * configure.host: Add riscv*-*-linux*.
1273         * configure.nat: Add riscv*.
1274         * configure.tgt: Add riscv*-*-linux*.
1275         * riscv-linux-nat.c: New file.
1276         * riscv-linux-tdep.c: New file.
1277
1278 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1279
1280         * infrun.c (resume): Make static, add forward declaration.
1281         (proceed): Update header comment.
1282         * infrun.h (resume): Delete declaration.
1283
1284 2018-08-09  Tom Tromey  <tom@tromey.com>
1285
1286         * riscv-tdep.h: Minor formatting fixes.
1287
1288 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1289
1290         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1291         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1292         (test_mkdir_recursive): Likewise.
1293         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1294
1295 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1296
1297         * valarith.c (value_subscripted_rvalue): If an array is not in
1298         memory, and we don't know the upper bound, then we can't know that
1299         the requested element exists or not.
1300
1301 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1302
1303         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1304         (target_options_to_string): Add comment.
1305
1306 2018-08-08  Tom Tromey  <tom@tromey.com>
1307
1308         * unittests/scoped_mmap-selftests.c: Check result of "write".
1309
1310 2018-08-08  Jim Wilson  <jimw@sifive.com>
1311
1312         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1313         (decode_register_index_short): New.
1314         (decode_j_type_insn, decode_cj_type_insn): New.
1315         (decode_b_type_insn, decode_cb_type_insn): New.
1316         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1317         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1318         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1319         is_c_sw_insn instead of is_sw_insn.
1320         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1321         (riscv_software_single_step): New.
1322         * riscv-tdep.h (riscv_software_single_step): Declare.
1323
1324         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1325         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1326
1327 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1328
1329         PR gdb/18050:
1330         * target.c (dispose_inferior): Don't dispose of inferiors that are
1331         already killed.
1332
1333 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1334
1335         * remote.c (remote_target::download_tracepoint): Change char* to
1336         const char*.
1337
1338 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1339
1340         * target.h (target_options_to_string): Return an std::string.
1341         * target.c (str_comma_list_concat_elem): Return void, use
1342         std::string.
1343         (do_option): Likewise.
1344         (target_options_to_string): Return an std::string.
1345         * linux-nat.c (linux_nat_target::wait): Adjust.
1346         * target-debug.h (target_debug_print_options): Adjust.
1347
1348 2018-08-07  Tom Tromey  <tom@tromey.com>
1349
1350         * Makefile.in (CPPFLAGS): New variable.
1351         (INTERNAL_CPPFLAGS): Use it.
1352
1353 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1354
1355         * NEWS: Mention the index cache.
1356
1357 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1358
1359         * common/pathstuff.h (get_standard_cache_dir): New.
1360         * common/pathstuff.c (get_standard_cache_dir): New.
1361         * build-id.h (build_id_to_string): New.
1362         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1363         DEBUG_STR_SUFFIX): Move to here.
1364         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1365         DEBUG_STR_SUFFIX): Move from there.
1366         (write_psymtabs_to_index): Make non-static, add basename
1367         parameter.  Write to temporary files, rename when done.
1368         (save_gdb_index_command): Adjust call to
1369         write_psymtabs_to_index.
1370         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1371         field.
1372         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1373         (get_gdb_index_contents_from_cache): New.
1374         (get_gdb_index_contents_from_cache_dwz): New.
1375         (dwarf2_initialize_objfile): Read index from cache.
1376         (dwarf2_build_psymtabs): Save to index.
1377         * dwarf-index-cache.h: New file.
1378         * dwarf-index-cache.c: New file.
1379         * dwarf-index-write.h: New file.
1380
1381 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1382
1383         * gnulib/aclocal.m4: Re-generate.
1384         * gnulib/config.in: Re-generate.
1385         * gnulib/configure: Re-generate.
1386         * gnulib/import/Makefile.am: Re-generate.
1387         * gnulib/import/Makefile.in: Re-generate.
1388         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1389         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1390         * gnulib/import/m4/mkdir.m4: New file.
1391         * gnulib/import/mkdir.c: New file.
1392         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1393         module.
1394
1395 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1396
1397         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1398         * common/scoped_mmap.c: New file.
1399         * common/scoped_mmap.h (destroy): New method.
1400         (~scoped_mmap, reset): Use destroy.
1401         (scoped_mmap): New move constructor.
1402         (mmap_file): New declaration.
1403         * unittests/scoped_mmap-selftests.c (test_normal,
1404         test_invalid_filename, run_tests): New functions.
1405         (_initialize_scoped_mmap_selftests): Register selftest.
1406
1407 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1408
1409         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1410         (read_gdb_index_from_buffer): ... this.  Remove section
1411         parameter, add buffer parameter.
1412         (get_gdb_index_contents_ftype,
1413         get_gdb_index_contents_dwz_ftype): New typedefs.
1414         (dwarf2_read_gdb_index): Add callback parameters to get the
1415         index contents.
1416         (get_gdb_index_contents_from_section): New.
1417         (dwarf2_initialize_objfile): Update call to
1418         dwarf2_read_gdb_index.
1419
1420 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1421
1422         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1423         (gdb_open_cloexec): Likewise.
1424         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1425         (commandline_from_pid): Likewise.
1426         (linux_xfer_osdata_threads): Likewise.
1427         (linux_xfer_osdata_fds): Likewise.
1428         * ada-lang.c (is_package_name): Likewise.
1429         * auxv.c (procfs_xfer_auxv): Likewise.
1430         * breakpoint.c (print_one_breakpoint_location): Use
1431         uiout::field_fmt.
1432         (print_one_catch_solib): Use string_printf.
1433         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1434         (add_pe_forwarded_sym): Likewise.
1435         * dwarf2read.c (create_type_unit_group): Likewise.
1436         (build_error_marker_type): Likewise.
1437         * infcall.c (get_function_name): Likewise.
1438         * valprint.c (print_converted_chars_to_obstack): Likewise.
1439         * xtensa-tdep.c (xtensa_register_type): Likewise.
1440
1441 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1442
1443         * remote.c (remote_target::download_tracepoint): Fix format
1444         string errors.
1445
1446 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1447
1448         * tracefile.c: Include common/byte-vector.h.
1449         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1450         with trace_regblock_size if needed.  Update uses of buf.
1451
1452 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1453
1454         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1455         std::vector<unsigned char>.
1456         * tracepoint.c (collection_list::collection_list): Remove
1457         m_regs_mask initializer from initializer list.  Resize
1458         m_regs_mask using the largest remote register number.
1459         (collection_list::add_remote_register): Remove size check on
1460         m_regs_mask.  Use at to access element.
1461         (collection_list::stringify): Change type of temp_buf to
1462         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1463         stringify the register mask.  Use pack_hex_byte for the register
1464         mask.
1465
1466 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1467
1468         * tracepoint.h (class collection_list) <add_register>: Remove.
1469         <add_remote_register, add_ax_registers, add_local_register>:
1470         Declare.
1471         <add_memrange>: Add scope parameter.
1472         * tracepoint.c (encode_actions_1): Likewise.
1473         (collection_list::add_register): Rename to ...
1474         (collection_list::add_remote_register): ... this.  Update
1475         comment.
1476         (collection_list::add_ax_registers, add_local_register): New
1477         methods.
1478         (collection_list::add_memrange): Add scope parameter.  Call
1479         add_local_register instead of add_register.
1480         (finalize_tracepoint_aexpr): New function.
1481         (collection_list::collect_symbol): Update calls to add_memrange.
1482         Call add_local_register instead of add_register.  Call
1483         add_ax_registers.  Call finalize_tracepoint_aexpr.
1484         (encode_actions_1): Get remote regnos for $reg action.  Call
1485         add_remote_register, add_ax_registers, and add_local_register.
1486         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1487         (validate_actionline): Call finalize_tracepoint_aexpr.
1488
1489 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1490
1491         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1492         Replace array buf with gdb::char_vector buf, of size
1493         get_remote_packet_size ().  Replace references to buf and
1494         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1495         and xsnprintf with snprintf.  Raise errors if the buffer is too
1496         small.
1497
1498 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1499
1500         * remote.c (remote_target::download_tracepoint): Fix the has_more
1501         predicate in the QTDP action list iteration.
1502
1503 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1504
1505         * remote.c (remote_target::download_tracepoint): Fix indentation
1506         in for block.
1507
1508 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1509
1510         * proc-api.c (_initialize_proc_api): Remove c, unused.
1511         * procfs.c (procfs_init_inferior): Remove signals, unused.
1512         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1513         unused.
1514
1515 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1516             Andrew Burgess  <andrew.burgess@embecosm.com>
1517
1518         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1519         'W_STOPCODE (0)' as this could be ambiguous.
1520
1521 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1522
1523         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1524         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1525         "ai_socktype").
1526
1527 2018-08-02  Tom Tromey  <tom@tromey.com>
1528
1529         PR symtab/16842.
1530         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1531         symbols.
1532         (process_structure_scope): Likewise.
1533
1534 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1535
1536         PR gdb/22629:
1537         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1538         kill inferior.
1539
1540 2018-08-02  Tom Tromey  <tom@tromey.com>
1541
1542         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1543         (darwin_suspend_inferior, darwin_resume_inferior)
1544         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1545         (darwin_check_new_threads): Check result of get_darwin_inferior.
1546
1547 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1548
1549         GDB 8.1.1 released.
1550
1551 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1552
1553         * varobj.c (varobj_get_path_expr_parent): Report an error if
1554         parent is a dynamic varobj.
1555
1556 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1557
1558         * gnulib/aclocal.m4: Re-generate.
1559         * gnulib/config.in: Re-generate.
1560         * gnulib/configure: Re-generate.
1561         * gnulib/import/Makefile.in: Re-generate.
1562         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1563         * gnulib/import/m4/onceonly.m4: Re-generate.
1564
1565 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1566
1567         * target-descriptions.c (struct xml_test_tdesc): New.
1568         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1569         (record_xml_tdesc): Update.
1570         (maintenance_check_xml_descriptions): Update.
1571         * target-descriptions.h (record_xml_tdesc): Update comment.
1572
1573 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1574
1575         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1576         checking array bounds are defined.
1577
1578 2018-07-30  Tom Tromey  <tom@tromey.com>
1579
1580         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1581         irreflexivity violation.
1582
1583 2018-07-30  Tom Tromey  <tom@tromey.com>
1584
1585         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1586         * value.c (unpack_long): Remove lint code.
1587         * valops.c (value_ind): Remove lint code.
1588         * valarith.c (value_x_binop, value_x_unop, value_equal)
1589         (value_pos): Remove lint code.
1590
1591 2018-07-28  Tom de Vries  <tdevries@suse.de>
1592
1593         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1594         with undefined upper bound as <optimized out>.
1595
1596 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1597
1598         * gcore.in: Rename variable "name" to "prefix".  Expand
1599         "usage" text.
1600
1601 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1602
1603         * windows-nat.c (windows_nat_target::create_inferior): Update to
1604         call close() in global namespace.
1605
1606 2018-07-26  Tom Tromey  <tom@tromey.com>
1607
1608         * dwarf-index-write.c (add_address_entry): Don't add objfile
1609         offsets.
1610         * dbxread.c (find_stab_function): Rename from
1611         find_stab_function_addr.  Return a bound_minimal_symbol.
1612         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1613         Don't add objfile offsets.
1614         (end_psymtab): Use raw_text_low, raw_text_high,
1615         MSYMBOL_VALUE_RAW_ADDRESS.
1616         (read_ofile_symtab): Update.
1617         (process_one_symbol): Update.
1618         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1619         offsets.
1620         (dw2_relocate): Remove.
1621         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1622         searching addrmap.
1623         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1624         Update.
1625         (process_psymtab_comp_unit_reader, add_partial_symbol)
1626         (add_partial_subprogram, dwarf2_ranges_read): Update.
1627         (load_partial_dies): Update.
1628         (add_address_entry): Don't add objfile offsets.
1629         (dwarf2_build_include_psymtabs): Update.
1630         (create_addrmap_from_aranges): Don't add objfile offsets.
1631         (dw2_find_pc_sect_compunit_symtab): Update.
1632         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1633         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1634         Update.
1635         (parse_partial_symbols): Don't add objfile offsets.  Use
1636         raw_text_low, raw_text_high.  Update.
1637         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1638         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1639         or call 'relocate' quick function.  Clear psymbol_map.
1640         * psympriv.h (struct partial_symbol) <address>: Add section
1641         offset.
1642         <set_unrelocated_address>: Rename from set_address.
1643         <raw_text_low, raw_text_high>: New methods.
1644         <text_low, text_high>: Add objfile parameter.
1645         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1646         set_unrelocated_address.
1647         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1648         (find_pc_psymbol): Update.
1649         (fixup_psymbol_section, relocate_psymtabs): Remove.
1650         (dump_psymtab, psym_functions): Update.
1651         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1652         parameter.
1653         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1654         (start_psymtab_common): Update.
1655         * symfile-debug.c (debug_qf_relocate): Remove.
1656         (debug_sym_quick_functions): Update.
1657         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1658         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1659         Update.
1660
1661 2018-07-26  Tom Tromey  <tromey@redhat.com>
1662
1663         * dbxread.c (end_psymtab): Use text_high_valid and
1664         text_low_valid.
1665         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1666         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1667         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1668         Update comment.
1669         <text_low_valid, text_high_valid>: New fields.
1670         <set_text_low, set_text_high>: Update.
1671         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1672
1673 2018-07-26  Tom Tromey  <tom@tromey.com>
1674
1675         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1676         Update.
1677         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1678         textlow and texthigh fields.
1679         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1680         Update.
1681         * mdebugread.c (parse_lines, parse_partial_symbols)
1682         (psymtab_to_symtab_1): Update.
1683         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1684         Rename fields.  Update comment.  Now private.
1685         <text_low, text_high, set_text_low, set_text_high>: New methods.
1686         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1687         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1688         (start_psymtab_common, maintenance_info_psymtabs)
1689         (maintenance_check_psymtabs): Update.
1690         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1691         texthigh fields.
1692         (scan_xcoff_symtab): Update.
1693
1694 2018-07-26  Tom Tromey  <tromey@redhat.com>
1695
1696         * psympriv.h (struct partial_symbol) <unrelocated_address,
1697         address, set_address>: New methods.
1698         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1699         (fixup_psymbol_section, relocate_psymtabs): Update.
1700         (print_partial_symbols): Add 'objfile' parameter.  Update.
1701         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1702         Update.
1703
1704 2018-07-26  Tom Tromey  <tom@tromey.com>
1705
1706         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1707         (debug_names::write_psymbols): Update.
1708         * psympriv.h (struct partial_symbol): Derive from
1709         general_symbol_info.
1710         <obj_section>: New method.
1711         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1712         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1713         (find_pc_sect_psymbol, fixup_psymbol_section)
1714         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1715         (print_partial_symbols, recursively_search_psymtabs)
1716         (compare_psymbols, psymbol_hash, psymbol_compare)
1717         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1718         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1719
1720 2018-07-26  Tom Tromey  <tromey@redhat.com>
1721
1722         * dbxread.c (end_psymtab): Remove dead code.
1723
1724 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1725
1726         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1727         DWARF unwinders are disabled.
1728         * dwarf2-frame.c: Add dwarf2read.h include.
1729         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1730         disabled.
1731         (dwarf2_frame_unwinders_enabled_p): Define.
1732         (show_dwarf_unwinders_enabled_p): New function.
1733         (_initialize_dwarf2_frame): Register switch to control DWARF
1734         unwinder use.
1735         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1736         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1737         (show_dwarf_cmdlist): Remove static keyword.
1738         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1739         (show_dwarf_cmdlist): Declare.
1740         * NEWS: Document new feature.
1741
1742 2018-07-26  Tom de Vries  <tdevries@suse.de>
1743
1744         PR breakpoints/23366
1745         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1746
1747 2018-07-26  Tom de Vries  <tdevries@suse.de>
1748
1749         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1750         DW_AT_count can't be translated to a dynamic prop.
1751
1752 2018-07-25  Tom de Vries  <tdevries@suse.de>
1753
1754         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1755         try/catch.
1756
1757 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1758
1759         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1760
1761 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1762
1763         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1764
1765 2018-07-24  Keith Seitz  <keiths@redhat.comt
1766
1767         PR symtab/23010
1768         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1769         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1770         instead of add_symbol_to_list.
1771         (read_file_scope): Call prepare_one_comp_unit before reading
1772         any other DIEs.
1773
1774 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1775
1776         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1777
1778 2018-07-24  Tom Tromey  <tom@tromey.com>
1779
1780         * utils.c (malloc, realloc, free): Don't declare.
1781         * configure, config.in: Rebuild.
1782         * configure.ac: Don't check for declarations of free, malloc, or
1783         realloc.
1784
1785 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1786
1787         * aarch64-linux-nat.c
1788         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1789         variable.
1790         * arm-linux-nat.c (fetch_regs): Likewise.
1791         (store_regs): Likewise.
1792         (fetch_vfp_regs): Likewise.
1793         (store_vfp_regs): Likewise.
1794         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1795         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1796         (arm_linux_nat_target::insert_watchpoint): Likewise.
1797         (arm_linux_nat_target::remove_watchpoint): Likewise.
1798         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1799         Likewise.
1800         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1801         Likewise.
1802         * ppc-linux-nat.c (fetch_register): Likewise.
1803         (fetch_all_gp_regs): Likewise.
1804         (fetch_ppc_registers): Likewise.
1805         (store_all_gp_regs): Likewise.
1806         (store_ppc_registers): Likewise.
1807         (hwdebug_insert_point): Likewise.
1808         (can_use_watchpoint_cond_accel): Likewise.
1809         * remote-sim.c (gdb_os_write_stdout): Likewise.
1810
1811 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1812             Tom Tromey  <tom@tromey.com>
1813
1814         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1815         test for it.
1816         * configure: Rebuild.
1817
1818 2018-07-22  Tom Tromey  <tom@tromey.com>
1819
1820         * regformats/regdat.sh: Define xmltarget_${name} inside
1821         #ifndef IN_PROCESS_AGENT.
1822
1823 2018-07-22  Tom Tromey  <tom@tromey.com>
1824
1825         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1826
1827 2018-07-22  Tom Tromey  <tom@tromey.com>
1828
1829         * symfile.c (reread_symbols): Notify iter, not objfile.
1830
1831 2018-07-22  Tom Tromey  <tom@tromey.com>
1832
1833         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1834         Use arch_ops.
1835         (ravenscar_thread_target::prepare_to_store): Likewise.
1836
1837 2018-07-22  Tom Tromey  <tom@tromey.com>
1838
1839         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1840         unused variable.  Call value_fetch_lazy when needed.
1841         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1842         Remove unused variable.  Call value_fetch_lazy when needed.
1843
1844 2018-07-22  Tom Tromey  <tom@tromey.com>
1845
1846         * m32c-tdep.c (mark_dma): Return void.
1847         (make_regs): Remove unused declarations.
1848
1849 2018-07-22  Tom Tromey  <tom@tromey.com>
1850
1851         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1852         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1853         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1854         bkscm_get_valid_block_smob_arg_unsafe for effect.
1855
1856 2018-07-22  Tom Tromey  <tom@tromey.com>
1857
1858         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1859         value_type.
1860
1861 2018-07-22  Tom Tromey  <tom@tromey.com>
1862
1863         * windows-nat.c (saved_context): Conditionally define.
1864         * remote.c (remote_target::remote_btrace_maybe_reopen):
1865         Conditionally declare "warned".
1866         * inflow.c (sigquit_ours): Conditionally define.
1867         (new_tty): Move "tty" declaration inside #if.
1868         * guile/guile.c (guile_datadir): Conditionally define.
1869         * charset.c (set_be_le_names): Move some declarations inside #if.
1870         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1871         #if.
1872         (parse_xml_btrace_conf): Likewise.
1873
1874 2018-07-22  Tom Tromey  <tom@tromey.com>
1875
1876         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1877
1878 2018-07-22  Tom Tromey  <tom@tromey.com>
1879
1880         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1881         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1882         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1883         * buildsym-legacy.c (get_macro_table): Remove unused variable.
1884         * stack.c (frame_apply_level_command): Remove unused variable.
1885         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1886         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1887         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1888         unused variable.
1889         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1890         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1891         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1892         variable.
1893         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1894         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1895         variable.
1896         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1897         Remove unused variable.
1898         * cli/cli-script.c (recurse_read_control_structure): Remove unused
1899         variable.
1900         * common/tdesc.c (print_xml_feature::visit): Remove unused
1901         variable.
1902         * compile/compile-object-load.c (store_regs): Remove unused
1903         variables.
1904         * complaints.c (clear_complaints): Remove unused variable.
1905         * corelow.c (core_target_open): Remove unused variable.
1906         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1907         variable.
1908         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1909         variable.
1910         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1911         variable.
1912         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1913         variable.
1914         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1915         variable.
1916         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1917         variable.
1918         * ia64-tdep.c (examine_prologue): Remove unused variable.
1919         * infcall.c (run_inferior_call): Remove unused variable.
1920         * inferior.c (exit_inferior): Remove unused variable.
1921         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1922         * linespec.c (decode_line_2): Remove unused variable.
1923         * linux-nat.c (super_close): Remove.
1924         * linux-tdep.c (linux_info_proc): Remove unused variable.
1925         * mi/mi-main.c (mi_execute_command): Remove unused variable.
1926         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1927         Remove unused variable.
1928         * parse.c (find_minsym_type_and_address): Remove unused variable.
1929         * printcmd.c (info_symbol_command, printf_floating): Remove unused
1930         variable.
1931         * python/py-breakpoint.c (bppy_set_commands): Remove unused
1932         variable.
1933         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1934         variables.
1935         * record-btrace.c (record_btrace_target::store_registers): Remove
1936         unused variable.
1937         (cmd_show_record_btrace_cpu): Remove unused variable.
1938         * riscv-tdep.c (riscv_register_reggroup_p)
1939         (riscv_push_dummy_call, riscv_return_value): Remove unused
1940         variable.
1941         * rust-exp.y (literal): Remove unused variable.
1942         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1943         unused variable.
1944         <STRUCTOP_ANONYMOUS>: Likewise.
1945         * s390-linux-tdep.c (s390_linux_init_abi_31)
1946         (s390_linux_init_abi_64): Remove unused variable.
1947         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1948         (file_select_thread, net_windows_open, _initialize_ser_windows):
1949         Remove unused variables.
1950         * symtab.c (find_pc_sect_line): Remove unused variable.
1951         * target-memory.c (compute_garbled_blocks): Remove unused
1952         variable.
1953         (target_write_memory_blocks): Remove unused variable.
1954         * target.c (target_stack::unpush): Remove unused variables.
1955         * tracepoint.c (start_tracing, all_tracepoint_actions)
1956         (merge_uploaded_trace_state_variables)
1957         (print_one_static_tracepoint_marker): Remove unused variable.
1958         * unittests/basic_string_view/element_access/char/1.cc (test01):
1959         Remove unused variable.
1960         * windows-nat.c (windows_continue, windows_add_all_dlls)
1961         (do_initial_windows_stuff, windows_nat_target::create_inferior):
1962         Remove unused variables.
1963
1964 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
1965
1966         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1967         attr_profile in HAVE_ELF.
1968         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1969         HAVE_ELF.
1970
1971 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
1972
1973         * frame.c (frame_register_unwind): Change parameter name.
1974         (frame_unwind_register): Likewise.
1975         (frame_unwind_register_value): Likewise.
1976         (frame_unwind_register_signed): Likewise.
1977         (frame_unwind_register_unsigned): Likewise.
1978         * frame.h (frame_register_unwind): Likewise.
1979         (frame_unwind_register): Likewise.
1980         (frame_unwind_register_value): Likewise.
1981         (frame_unwind_register_signed): Likewise.
1982         (frame_unwind_register_unsigned): Likewise.
1983         (frame_unwind_arch): Likewise.
1984
1985 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1986
1987         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1988         ISA maintenance.
1989
1990 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1991
1992         * mips-linux-nat.c (mips_linux_nat_target::read_description):
1993         Call `get_ptrace_pid' rather than extracting the ptrace PID by
1994         hand.
1995
1996 2018-07-20  Keith Seitz  <keiths@redhat.com>
1997
1998         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1999         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2000         m_compunit_symtab, m_language>: Add "m_" prefix.
2001         Update all uses.
2002         * buildsym.c: Update all uses.
2003
2004 2018-07-20  Tom Tromey  <tom@tromey.com>
2005
2006         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2007         * buildsym.h (record_line_ftype): Remove typedef.
2008
2009 2018-07-20  Tom Tromey  <tom@tromey.com>
2010
2011         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2012         (end_expandable_symtab): Likewise.
2013         (end_symtab_get_static_block): Likewise.
2014         (end_symtab_from_static_block): Likewise.
2015         * buildsym-legacy.c (augment_type_symtab): Remove.
2016         (end_expandable_symtab): Remove.
2017         (end_symtab_get_static_block): Remove.
2018         (end_symtab_from_static_block): Remove.
2019
2020 2018-07-20  Tom Tromey  <tom@tromey.com>
2021
2022         * dwarf2read.c: Include buildsym.h.
2023         (struct dwarf2_cu) <builder>: New method.
2024         (fixup_go_packaging): Update.
2025         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2026         use scoped_free_pendings.
2027         (using_directives): Add "cu" parameter, remove "language".
2028         (read_import_statement, setup_type_unit_groups, )
2029         (read_func_scope, read_lexical_block_scope)
2030         (dwarf2_record_block_ranges, read_namespace): Update.
2031         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2032         (lnp_state_machine::handle_end_sequence): Update.
2033         (class lnp_state_machine) <m_cu>: New member.
2034         <m_record_line_callback>: Remove.
2035         <m_currently_recording_lines>: New member.
2036         (lnp_state_machine::handle_set_file): Update.
2037         (noop_record_line): Remove.
2038         (dwarf_record_line_p): Add cu parameter.
2039         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2040         (lnp_state_machine::record_line)
2041         (lnp_state_machine::lnp_state_machine)
2042         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2043         (dwarf_decode_lines): Update.
2044         (dwarf2_start_subfile): Add cu parameter.
2045         (dwarf2_start_symtab, new_symbol): Update.
2046         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2047         Remove dwarf2_per_objfile parameter.
2048         (dwarf_decode_macros): Update.
2049
2050 2018-07-20  Tom Tromey  <tom@tromey.com>
2051
2052         * stabsread.c (define_symbol): Update.
2053         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2054         * dwarf2read.c (new_symbol): Update.
2055         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2056         * cp-namespace.c: Include buildsym.h.
2057         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2058         * buildsym-legacy.c (get_buildsym_compunit): New function.
2059
2060 2018-07-20  Tom Tromey  <tom@tromey.com>
2061
2062         * xcoffread.c: Include buildsym-legacy.h.
2063         * windows-nat.c: Include buildsym-legacy.h.
2064         * stabsread.c: Include buildsym-legacy.h.
2065         * mdebugread.c: Include buildsym-legacy.h.
2066         * buildsym-legacy.h: New file.
2067         * buildsym-legacy.c: New file, from buildsym.c.
2068         * go32-nat.c: Include buildsym-legacy.h.
2069         * dwarf2read.c: Include buildsym-legacy.h.
2070         * dbxread.c: Include buildsym-legacy.h.
2071         * cp-namespace.c: Include buildsym-legacy.h.
2072         * coffread.c: Include buildsym-legacy.h.
2073         * buildsym.h: Move some contents to buildsym-legacy.h.
2074         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2075         buildsym-legacy.c.
2076         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2077
2078 2018-07-20  Tom Tromey  <tom@tromey.com>
2079
2080         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2081         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2082         (buildsym_compunit::buildsym_compunit)
2083         (buildsym_compunit::~buildsym_compunit)
2084         (buildsym_compunit::get_macro_table): Define.
2085
2086 2018-07-20  Tom Tromey  <tom@tromey.com>
2087
2088         * buildsym.c (reset_symtab_globals): Remove.
2089         (buildsym_compunit::end_symtab_from_static_block): Update.
2090         (buildsym_compunit::augment_type_symtab): Update.
2091         (end_symtab_from_static_block): Call free_buildsym_compunit.
2092         (augment_type_symtab, end_symtab, end_expandable_symtab):
2093         Likewise.
2094
2095 2018-07-20  Tom Tromey  <tom@tromey.com>
2096
2097         * arch-utils.c: Do not include buildsym.h.
2098         * mipsread.c: Do not include buildsym.h.
2099         * machoread.c: Do not include buildsym.h.
2100         * elfread.c: Do not include buildsym.h.
2101
2102 2018-07-20  Tom Tromey  <tom@tromey.com>
2103
2104         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2105         initialization.
2106         (buildsym_compunit): Add new constructor.
2107         (struct buildsym_compunit) <get_last_source_file, finish_block,
2108         record_block_range, start_subfile, patch_subfile_names,
2109         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2110         set_last_source_start_addr, get_last_source_start_addr,
2111         get_local_using_directives, set_local_using_directives,
2112         get_global_using_directives, outermost_context_p,
2113         get_current_context_stack, get_context_stack_depth,
2114         get_current_subfile, get_local_symbols, get_file_symbols,
2115         get_global_symbols, record_debugformat, record_producer,
2116         push_context, pop_context, end_symtab_get_static_block,
2117         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2118         New public methods.
2119         <record_pending_block, finish_block_internal, make_blockvector,
2120         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2121         private methods.
2122         Update all users.
2123
2124 2018-05-22  Tom Tromey  <tom@tromey.com>
2125
2126         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2127         parameter.
2128         (finish_block_internal): Update.
2129
2130 2018-07-20  Tom Tromey  <tom@tromey.com>
2131
2132         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2133         parameter.
2134         (finish_block_internal): Update.
2135
2136 2018-07-20  Tom Tromey  <tom@tromey.com>
2137
2138         * buildsym.h (EXTERN): Don't define or undef.
2139         * buildsym.c (EXTERN): Don't define.
2140
2141 2018-07-20  Tom Tromey  <tom@tromey.com>
2142
2143         * buildsym.c: Remove TODO comment.
2144
2145 2018-07-20  Tom Tromey  <tom@tromey.com>
2146
2147         * coffread.c (coff_symtab_read): Update.
2148         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2149         (xcoff_new_init): Update.
2150         * mipsread.c (mipscoff_new_init): Update.
2151         * mdebugread.c (mdebug_build_psymtabs): Update.
2152         * elfread.c (elf_new_init): Update.
2153         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2154         Update.
2155         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2156         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2157         (stabsect_build_psymtabs): Update.
2158         * buildsym.h (buildsym_init): Don't declare.
2159         * buildsym.c: Update comment.
2160         (prepare_for_building): Remove.
2161         (start_symtab, restart_symtab): Update.
2162         (reset_symtab_globals): Update comment.
2163         (buildsym_init): Remove.
2164
2165 2018-07-20  Tom Tromey  <tom@tromey.com>
2166
2167         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2168         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2169         (read_enum_type, common_block_start, common_block_end)
2170         (cleanup_undefined_types_1, finish_global_stabs): Update.
2171         * mdebugread.c (psymtab_to_symtab_1): Update.
2172         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2173         (read_lexical_block_scope, new_symbol): Update.
2174         * dbxread.c (process_one_symbol): Update.
2175         * coffread.c (coff_symtab_read, process_coff_symbol)
2176         (coff_read_enum_type): Update.
2177         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2178         declare.
2179         (get_local_symbols, get_file_symbols, get_global_symbols): New
2180         functions.
2181         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2182         m_global_symbols.
2183         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2184         (~scoped_free_pendings): Update.
2185         (finish_block, prepare_for_building, reset_symtab_globals)
2186         (end_symtab_get_static_block, end_symtab_with_blockvector)
2187         (augment_type_symtab, push_context): Update.
2188         (get_local_symbols, get_file_symbols, get_global_symbols): New
2189         functions.
2190         (buildsym_init): Update.
2191
2192 2018-07-20  Tom Tromey  <tom@tromey.com>
2193
2194         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2195         (process_full_type_unit): Likewise.
2196         (dwarf2_start_symtab): Set list_in_scope.
2197
2198 2018-07-20  Tom Tromey  <tom@tromey.com>
2199
2200         * dwarf2read.c (process_psymtab_comp_unit_reader)
2201         (build_type_psymtabs_reader): Do not set list_in_scope.
2202
2203 2018-07-20  Tom Tromey  <tom@tromey.com>
2204
2205         * buildsym.c (free_pendings): Remove.
2206         (add_symbol_to_list, scoped_free_pendings)
2207         (finish_block_internal, buildsym_init): Update.
2208
2209 2018-07-20  Tom Tromey  <tom@tromey.com>
2210
2211         * xcoffread.c (read_xcoff_symtab): Update.
2212         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2213         Update.
2214         * dbxread.c (process_one_symbol): Update.
2215         * coffread.c (coff_symtab_read): Update.
2216         * buildsym.h (finish_block): Update.
2217         * buildsym.c (finish_block): Remove "listhead" argument.
2218         (end_symtab_get_static_block): Update.
2219
2220 2018-07-20  Tom Tromey  <tom@tromey.com>
2221
2222         * buildsym.h (class scoped_free_pendings): Remove constructor.
2223         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2224         method.
2225         <m_pending_block_obstack, m_pending_blocks>: New members.
2226         (pending_block_obstack, pending_blocks): Remove.
2227         (scoped_free_pendings::scoped_free_pendings): Default.
2228         (~scoped_free_pendings): Update.
2229         (free_pending_blocks): Remove.
2230         (finish_block_internal, record_pending_block, make_blockvector)
2231         (end_symtab_get_static_block, augment_type_symtab, push_context)
2232         (buildsym_init): Update.
2233
2234 2018-07-20  Tom Tromey  <tom@tromey.com>
2235
2236         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2237         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2238         members.
2239         (pending_addrmap, pending_addrmap_obstack)
2240         (pending_addrmap_interesting): Remove.
2241         (scoped_free_pendings, record_block_range, make_blockvector)
2242         (prepare_for_building, reset_symtab_globals, buildsym_init):
2243         Update.
2244
2245 2018-07-20  Tom Tromey  <tom@tromey.com>
2246
2247         * xcoffread.c (process_linenos): Update.
2248         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2249         * mdebugread.c (psymtab_to_symtab_1): Update.
2250         * dwarf2read.c (setup_type_unit_groups)
2251         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2252         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2253         * dbxread.c (process_one_symbol): Update.
2254         * coffread.c (coff_symtab_read, enter_linenos)
2255         (process_coff_symbol): Update.
2256         * buildsym.h (current_subfile): Don't declare.
2257         (get_current_subfile): Declare.
2258         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2259         member.
2260         (start_subfile, free_buildsym_compunit, push_subfile)
2261         (prepare_for_building, start_symtab): Update.
2262         (get_current_subfile): New function.
2263
2264 2018-07-20  Tom Tromey  <tom@tromey.com>
2265
2266         * coffread.c (coff_symtab_read): Update.
2267         * xcoffread.c (read_xcoff_symtab): Update.
2268         * dwarf2read.c (new_symbol): Update.
2269         (read_func_scope, read_lexical_block_scope): Update.
2270         * dbxread.c (process_one_symbol): Update.
2271         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2272         (outermost_context_p): Remove macro.
2273         (outermost_context_p, get_current_context_stack)
2274         (get_context_stack_depth): Declare.
2275         (pop_context): Return struct context_stack.
2276         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2277         member.
2278         (context_stack_size): Remove.
2279         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2280         (prepare_for_building, end_symtab_get_static_block)
2281         (augment_type_symtab, push_context): Update.
2282         (pop_context): Return struct context_stack.
2283         (outermost_context_p, get_current_context_stack)
2284         (get_context_stack_depth): New functions.
2285         (buildsym_init): Update.
2286
2287 2018-07-20  Tom Tromey  <tom@tromey.com>
2288
2289         * rust-exp.y: Now a pure parser.  Update all rules.
2290         (%union): Move earlier.
2291         (current_parser, work_obstack): Remove globals.
2292         (rust_parser, ~rust_parser): Update.
2293         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2294         lex_character, lex_number, lex_string, lex_identifier,
2295         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2296         convert_name, convert_params_to_expression,
2297         convert_ast_to_expression, ast_basic_type, ast_operation,
2298         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2299         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2300         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2301         ast_array_type, ast_slice_type, ast_reference_type,
2302         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2303         (rust_parse): Update.
2304         (rustyyerror, rustyylex): Add parser parameter.
2305         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2306         (rust_lex_stringish_test, rust_lex_test_sequence)
2307         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2308         (rust_lex_test_push_back, rust_lex_tests): Update.
2309
2310 2018-07-19  Pedro Alves  <palves@redhat.com>
2311
2312         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2313         gdb::unique_xmalloc_ptr.
2314         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2315         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2316         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2317         copy-initialization.
2318         * guile/scm-pretty-print.c (ppscm_print_children): Use
2319         gdb::unique_xmalloc_ptr instead of cleanups.
2320         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2321         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2322         gdb::unique_xmalloc_ptr.
2323         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2324         Adjust to use gdb::unique_xmalloc_ptr.
2325         * guile/scm-utils.c (extract_arg): Adjust.
2326         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2327         gdb::unique_xmalloc_ptr instead of a cleanup.
2328
2329 2018-07-19  Tom Tromey  <tom@tromey.com>
2330
2331         * utils.c (do_value_free_to_mark)
2332         (make_cleanup_value_free_to_mark): Remove.
2333         * utils.h (make_cleanup_value_free_to_mark): Remove.
2334
2335 2018-07-19  Pedro Alves  <palves@redhat.com>
2336
2337         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2338         forwarding reference.
2339
2340 2018-07-18  Pedro Alves  <palves@redhat.com>
2341
2342         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2343         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2344         cleanup.
2345
2346 2018-07-18  Pedro Alves  <palves@redhat.com>
2347
2348         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2349         exceptions.
2350         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2351         (gdbscm_wrap): New.
2352         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2353         directly instead of a cleanup.
2354         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2355         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2356         (vlscm_binop_gdbthrow): New, factored out from ...
2357         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2358         (vlscm_rich_compare): Use gdbscm_wrap.
2359         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2360         instead of a cleanup.
2361         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2362         cleanup.
2363         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2364         Use xfree directly instead of a cleanup.
2365         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2366         Adjust to use gdbscm_wrap and scoped_value_mark.
2367         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2368         (gdbscm_value_address, gdbscm_value_dereference)
2369         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2370         scoped_value_mark.
2371         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2372         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2373         scoped_value_mark.
2374         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2375         gdbscm_wrap and scoped_value_mark.
2376         (gdbscm_value_to_string): Use xfree directly instead of a
2377         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2378         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2379         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2380         scoped_value_mark.
2381         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2382         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2383         scoped_value_mark.
2384         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2385         gdbscm_wrap.
2386
2387 2018-07-18  Tom de Vries  <tdevries@suse.de>
2388
2389         * findvar.c (default_read_var_value): Also resolve dynamic type for
2390         LOC_OPTIMIZED_OUT vars.
2391
2392 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2393
2394         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2395         decoding.
2396
2397 2018-07-17  Tom Tromey  <tom@tromey.com>
2398
2399         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2400         (compute_enum_list, pascm_set_param_value_x)
2401         (gdbscm_parameter_value): Update.
2402         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2403         (gdbscm_scm_to_host_string): Update.
2404         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2405         Update.
2406         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2407         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2408         * guile/scm-string.c (gdbscm_scm_to_string): Return
2409         unique_xmalloc_ptr.
2410         (gdbscm_scm_to_host_string): Likewise.
2411
2412 2018-07-17  Tom Tromey  <tom@tromey.com>
2413
2414         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2415         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2416         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2417         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2418         unique_xmalloc_ptr.
2419
2420 2018-07-17  Tom Tromey  <tom@tromey.com>
2421
2422         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2423         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2424         Update.
2425         * guile/scm-cmd.c (cmdscm_function): Update.
2426         * guile/scm-pretty-print.c
2427         (ppscm_print_exception_unless_memory_error): Update.
2428         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2429         Return unique_xmalloc_ptr.
2430
2431 2018-07-17  Tom Tromey  <tom@tromey.com>
2432
2433         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2434         Use string_printf.
2435
2436 2018-07-17  Jim Wilson  <jimw@sifive.com>
2437
2438         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2439         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2440         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2441         unecessary braces after EF_RISCV_RVC test.  Delete call to
2442         set_gdbarch_decr_pc_after_break.
2443
2444         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2445         RISCV_LAST_FP_REGNUM + 1.
2446         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2447
2448 2018-07-17  Tom Tromey  <tom@tromey.com>
2449
2450         * configure.ac: Remove --disable-gdbcli.
2451         * configure: Rebuild.
2452         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2453         (SUBDIR_CLI_CFLAGS): Remove.
2454         (SFILES): Use SUBDIR_CLI_SRCS.
2455         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2456
2457 2018-07-17  Tom Tromey  <tom@tromey.com>
2458
2459         PR gdb/18624:
2460         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2461
2462 2018-07-16  Jim Wilson  <jimw@sifive.com>
2463
2464         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2465
2466 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2467
2468         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2469         variable.
2470         (libunwind_frame_sniffer): Likewise.
2471         (libunwind_frame_prev_register): Likewise.
2472         (libunwind_sigtramp_frame_sniffer): Likewise.
2473         * ia64-tdep.c (ia64_access_reg): Likewise.
2474         (ia64_access_rse_reg): Likewise.
2475         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2476         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2477
2478 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2479
2480         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2481
2482 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2483
2484         * remote-sim.c (gdbsim_target::close,
2485         gdbsim_target::mourn_inferior): Remove unused variables.
2486
2487 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2488
2489         * ia64-tdep.c (ktab_buf): New global.
2490         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2491         (get_kernel_table): Adjust.
2492
2493 2018-07-16  Tom Tromey  <tom@tromey.com>
2494
2495         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2496         * dwarf2read.c (using_directives, new_symbol): Use
2497         outermost_context_p.
2498         * dbxread.c (process_one_symbol): Use outermost_context_p.
2499         * coffread.c (coff_symtab_read): Use outermost_context_p.
2500
2501 2018-07-16  Tom Tromey  <tom@tromey.com>
2502
2503         * dwarf2read.c (using_directives, read_func_scope)
2504         (read_lexical_block_scope): Update.
2505         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2506         * buildsym.h (local_using_directives, global_using_directives):
2507         Don't declare.
2508         (get_local_using_directives, set_local_using_directives)
2509         (get_global_using_directives): Declare.
2510         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2511         m_global_using_directives>: New members.
2512         (finish_block_internal, prepare_for_building)
2513         (reset_symtab_globals, end_symtab_get_static_block)
2514         (push_context): Update.
2515         (get_local_using_directives, set_local_using_directives)
2516         (get_global_using_directives): New functions.
2517         (buildsym_init): Update.
2518
2519 2018-07-16  Tom Tromey  <tom@tromey.com>
2520
2521         * xcoffread.c (xcoff_initial_scan): Don't call
2522         free_pending_blocks.
2523         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2524         * buildsym.h (class scoped_free_pendings): Add constructor.
2525         (free_pending_blocks): Don't declare.
2526         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2527         (free_pending_blocks): Now static.
2528
2529 2018-07-16  Tom Tromey  <tom@tromey.com>
2530
2531         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2532         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2533         member.
2534         (struct subfile_stack): Remove.
2535         (subfile_stack): Remove.
2536         (push_subfile, pop_subfile, buildsym_init): Update.
2537
2538 2018-07-16  Tom Tromey  <tom@tromey.com>
2539
2540         * buildsym.c (push_subfile): Use gdb_assert.
2541         (pop_subfile): Use gdb_assert.
2542
2543 2018-07-16  Tom Tromey  <tom@tromey.com>
2544
2545         * buildsym.h (merge_symbol_lists): Remove.
2546         * buildsym.c (merge_symbol_lists): Remove.
2547
2548 2018-07-16  Tom Tromey  <tom@tromey.com>
2549
2550         * stabsread.c (scan_file_globals): Update comment.
2551         * stabsread.h (scan_file_globals): Move from buildsym.h.
2552         * buildsym.h (scan_file_globals): Move to stabsread.h.
2553
2554 2018-07-16  Tom Tromey  <tom@tromey.com>
2555
2556         * xcoffread.c (xcoff_new_init): Update.
2557         * mipsread.c (mipscoff_new_init): Update.
2558         * mdebugread.c (mdebug_build_psymtabs): Update.
2559         * elfread.c (elf_new_init): Update.
2560         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2561         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2562         * buildsym.h (buildsym_new_init): Don't declare.
2563         * buildsym.c (buildsym_new_init): Remove.
2564
2565 2018-07-16  Tom Tromey  <tom@tromey.com>
2566
2567         * stabsread.h (within_function): Move from buildsym.h.
2568         * stabsread.c (start_stabs): Clear within_function.
2569         * coffread.c (coff_start_symtab): Clear within_function.
2570         * buildsym.h (within_function): Move to stabsread.h.
2571         * buildsym.c (prepare_for_building): Update.
2572
2573 2018-07-16  Tom Tromey  <tom@tromey.com>
2574
2575         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2576         * dwarf2read.c (dwarf2_start_symtab): Don't set
2577         processing_gcc_compilation.
2578         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2579
2580 2018-07-16  Tom Tromey  <tom@tromey.com>
2581
2582         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2583         (next_symbol_text_func): Move from buildsym.h.
2584         * stabsread.c (hashname): Move from buildsym.c.
2585         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2586         (next_symbol_text_func, hashname): Move to stabsread.h.
2587         * buildsym.c: Don't include bcache.h
2588         (hashname): Move to stasbread.c.
2589
2590 2018-07-16  Tom Tromey  <tom@tromey.com>
2591
2592         * buildsym.h (context_stack_size): Don't declare.
2593         * buildsym.c (context_stack_size): New global.
2594
2595 2018-07-16  Tom Tromey  <tom@tromey.com>
2596
2597         * dbxread.c (processing_acc_compilation): New global.
2598         * buildsym.h (processing_acc_compilation): Don't declare.
2599
2600 2018-07-16  Tom Tromey  <tom@tromey.com>
2601
2602         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2603         * dbxread.c (read_ofile_symtab): Update.
2604         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2605         * buildsym.h (last_source_start_addr): Remove.
2606         (set_last_source_start_addr, get_last_source_start_addr):
2607         Declare.
2608         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2609         parameter.
2610         (struct buildsym_compunit) <m_last_source_start_addr>: New
2611         member.
2612         (prepare_for_building): Remove start_addr parameter.
2613         (start_symtab, restart_symtab, end_symtab_get_static_block)
2614         (end_symtab_with_blockvector): Update.
2615         (set_last_source_start_addr, get_last_source_start_addr): New
2616         functions.
2617
2618 2018-07-16  Tom Tromey  <tom@tromey.com>
2619
2620         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2621         member.
2622         (have_line_numbers): Remove.
2623         (record_line, prepare_for_building, end_symtab_get_static_block)
2624         (augment_type_symtab): Update.
2625
2626 2018-07-16  Tom Tromey  <tom@tromey.com>
2627
2628         * buildsym.c (~buildsym_compunit): Free the macro table.
2629         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2630         methods.
2631         <m_pending_macros>: New member.
2632         (pending_macros): Remove.
2633         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2634         (reset_symtab_globals, end_symtab_get_static_block)
2635         (end_symtab_with_blockvector, augment_type_symtab)
2636         (buildsym_init): Update.
2637
2638 2018-07-16  Tom Tromey  <tom@tromey.com>
2639
2640         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2641         parameter.
2642         (buildsym_compunit::set_last_source_file): New method.
2643         <m_last_source_file>: New member.
2644         (prepare_for_building): Remove "name" parameter.
2645         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2646         (last_source_file): Remove.
2647         (set_last_source_file, get_last_source_file): Update.
2648
2649 2018-07-16  Tom Tromey  <tom@tromey.com>
2650
2651         * buildsym.c (prepare_for_building): Add assert.
2652
2653 2018-07-16  Tom Tromey  <tom@tromey.com>
2654
2655         * buildsym.c (~buildsym_compunit): Update.
2656         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2657         (start_subfile, patch_subfile_names)
2658         (end_symtab_with_blockvector): Update.
2659
2660 2018-07-16  Tom Tromey  <tom@tromey.com>
2661
2662         * buildsym.c (struct buildsym_compunit): Add constructor,
2663         destructor, initializers.
2664         (start_buildsym_compunit): Remove.
2665         (free_buildsym_compunit): Use "delete".
2666         (start_symtab, restart_symtab): Use "new".
2667
2668 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2669
2670         * symfile.c (set_objfile_default_section_offset): Remove struct
2671         keyword.
2672
2673 2018-07-14  Stafford Horne  <shorne@gmail.com>
2674
2675         * (Responsible Maintainers): Add myself as or1k maintainer.
2676
2677 2018-07-13  Tom Tromey  <tom@tromey.com>
2678
2679         * symfile.c (set_objfile_default_section_offset): Use extra braces
2680         around initializer.
2681
2682 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2683
2684         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2685         non-branching basr.
2686
2687 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2688
2689         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2690         unittests/cli-utils-selftests.c
2691         * unittests/cli-utils-selftests.c: New file.
2692
2693 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2694
2695         * NEWS: Mention new commands. Mention change to 'thread apply'.
2696
2697 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2698
2699         * thread.c (thr_try_catch_cmd): New function.
2700         (thread_apply_all_command): Handle qcs flags.
2701         (thread_apply_command): Handle qcs flags.
2702         (taas_command): New function.
2703         (tfaas_command): New function.
2704         (_initialize_thread): Update to setup the new commands 'taas
2705         and 'tfaas'. Change doc string for 'thread apply'.
2706
2707 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2708
2709         * stack.c: (trailing_outermost_frame): New function, mostly
2710         extracted from backtrace_command_1.
2711         (leading_innermost_frame): New function.
2712         (backtrace_command_1): Update to call trailing_outermost_frame.
2713         (frame_apply_command_count): New function.
2714         (frame_apply_level_command): New function.
2715         (frame_apply_all_command): New function.
2716         (frame_apply_command): New function.
2717         (faas_command): New function.
2718         (frame_cmd_list): New variable.
2719         (_initialize_stack): Update to setup the new commands 'frame apply'
2720         and 'faas'.
2721
2722 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2723
2724         * cli-utils.c (number_or_range_parser::get_number): Only handle
2725         numbers or convenience var as numbers.
2726         (parse_flags): New function.
2727         (parse_flags_qcs): New function.
2728         (number_or_range_parser::finished): Ensure parsing end is detected
2729         before end of string.
2730         * cli-utils.h (parse_flags): New function.
2731         (parse_flags_qcs): New function.
2732         (number_or_range_parser): Remove m_finished bool.
2733         (number_or_range_parser::skip_range): Set m_in_range to false.
2734
2735 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2736
2737         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2738         on Windows.
2739
2740 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2741             Jan Kratochvil  <jan.kratochvil@redhat.com>
2742             Paul Fertser  <fercerpav@gmail.com>
2743             Tsutomu Seki  <sekiriki@gmail.com>
2744             Pedro Alves  <palves@redhat.com>
2745
2746         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2747         'unittests/parse-connection-spec-selftests.c'.
2748         (COMMON_SFILES): Add 'common/netstuff.c'.
2749         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2750         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2751         * common/netstuff.c: New file.
2752         * common/netstuff.h: New file.
2753         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2754         (wait_for_connect): Update comment.  New parameter
2755         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2756         Use 'sock' directly instead of 'scb->fd'.
2757         (try_connect): New function, with code from 'net_open'.
2758         (net_open): Rewrite main loop to deal with multiple
2759         sockets/addresses.  Handle IPv6-style hostnames; implement
2760         support for IPv6 connections.
2761         * unittests/parse-connection-spec-selftests.c: New file.
2762
2763 2018-07-11  Pedro Alves  <palves@redhat.com>
2764
2765         PR gdb/23377
2766         * remote.c (remote_target::remote_detach_pid): Call
2767         set_current_process.
2768
2769 2018-07-11  Pedro Alves  <palves@redhat.com>
2770
2771         * h8300-tdep.c (h8300_gdbarch_init): Remove
2772         set_gdbarch_ecoff_reg_to_regnum calls.
2773
2774 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2775
2776         PR c++/23373
2777         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2778         offsets/sizes for static members of a class/struct.
2779
2780 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2781
2782         * target-descriptions.c (tdesc_register_bitsize): Rename.
2783         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2784         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2785         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2786
2787 2018-07-10  Tom Tromey  <tom@tromey.com>
2788
2789         * breakpoint.c (moribund_locations): Now static and a
2790         std::vector.
2791         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2792         (build_bpstat_chain, update_global_location_list)
2793         (breakpoint_retire_moribund): Update.
2794         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2795         VEC.
2796
2797 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2798
2799         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2800         (riscv_register_reggroup_p): Use new function, remove unneeded
2801         parenthesis.
2802         (riscv_push_dummy_call): Extend assert to compare against xlen or
2803         flen based on register type.
2804
2805 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2806
2807         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2808
2809 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2810
2811         * remote.c (show_hardware_watchpoint_limit): New function.
2812         (show_hardware_watchpoint_length_limit): New function.
2813         (show_hardware_breakpoint_limit): New function.
2814         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2815         where appropriate, update help text.
2816
2817 2018-07-09  Tom Tromey  <tom@tromey.com>
2818
2819         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2820         (CLIBS): Don't mention NAT_CLIBS.
2821
2822 2018-07-09  Tom Tromey  <tom@tromey.com>
2823
2824         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2825         (LIBGDB_OBS, clean mostlyclean): Update.
2826         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2827
2828 2018-07-09  Tom Tromey  <tom@tromey.com>
2829
2830         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2831         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2832         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2833
2834 2018-07-09  Tom Tromey  <tom@tromey.com>
2835
2836         * Makefile.in (ALLDEPFILES): Remove exec.c.
2837         (COMMON_OBS): Remove exec.o.
2838         (COMMON_SFILES): Add exec.c.
2839
2840 2018-07-09  Tom Tromey  <tom@tromey.com>
2841
2842         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2843
2844 2018-07-09  Tom Tromey  <tom@tromey.com>
2845
2846         * Makefile.in (clean mostlyclean): Remove stamp-version.
2847         (version.c): Depend on stamp-version.
2848         (stamp-version): New rule, from version.c rule.
2849
2850 2018-07-09  Tom Tromey  <tom@tromey.com>
2851
2852         * Makefile.in (init.c): Depend on stamp-init.
2853         (stamp-init): New rule, from init.c rule.
2854         (clean mostlyclean): Remove stamp-init.
2855
2856 2018-07-09  Tom Tromey  <tom@tromey.com>
2857
2858         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2859         SUBDIR_GCC_COMPILE_SRCS.
2860
2861 2018-07-09  Tom Tromey  <tom@tromey.com>
2862
2863         * Makefile.in (init.c): Remove some unused sed rules.
2864
2865 2018-07-09  Tom Tromey  <tom@tromey.com>
2866
2867         * Makefile.in (TSOBS): Remove.
2868         (INIT_FILES): Update.
2869         (LIBGDB_OBS): Update.
2870         (COMMON_SFILES): Add inflow.c.
2871         (SFILES): Remove inflow.c.
2872
2873 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2874
2875         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2876
2877 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
2878
2879         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2880         get_saveloc_name, is_signal_frame_name, step_name,
2881         init_remote_name, create_addr_space_name,
2882         destroy_addr_space_name, search_unwind_table_name,
2883         find_dyn_list_name): Constify.
2884
2885 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
2886
2887         * darwin-nat.c (darwin_pthread_kill): New function.
2888         (darwin_resume_thread): Use darwin_pthread_kill.
2889
2890 2018-07-05  Tom de Vries  <tdevries@suse.de>
2891
2892         * macroexp.c (macro_buffer) <operator=>: New member function.
2893
2894 2018-07-04  Tom Tromey  <tom@tromey.com>
2895
2896         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2897
2898 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
2899
2900         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2901         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2902         * maint.c: Likewise.
2903         * top.c: Likewise.
2904
2905 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2906
2907         * NEWS: Create a new section for the next release branch.
2908         Rename the section of the current branch, now that it has
2909         been cut.
2910
2911 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2912
2913         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2914         * version.in: Bump version to 8.2.50.DATE-git.
2915
2916 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
2917             Pedro Alves  <palves@redhat.com>
2918
2919         * linux-nat.c (linux_init_ptrace): Rename to ...
2920         (linux_init_ptrace_procfs): ... this.  Call
2921         linux_proc_init_warnings.
2922         (linux_nat_target::post_attach)
2923         (linux_nat_target::post_startup_inferior): Adjust.
2924         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2925         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2926
2927 2018-07-04  Tom de Vries  <tdevries@suse.de>
2928
2929         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2930         check ...
2931         (read_comp_unit_head): ... here.
2932
2933 2018-07-03  Tom Tromey  <tom@tromey.com>
2934
2935         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2936         (stop_tracing, tstatus_command)
2937         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2938         (print_one_static_tracepoint_marker): Update.
2939         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2940         std::vector.
2941         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
2942         VEC.
2943         (all_tracepoints, static_tracepoints_here): Return std::vector.
2944
2945 2018-07-03  Tom Tromey  <tom@tromey.com>
2946
2947         * common/ptid.c (ptid_equal): Remove.
2948         * common/ptid.h (ptid_equal): Don't declare.
2949         * ada-tasks.c: Update.
2950         * breakpoint.c: Update.
2951         * common/agent.c: Update.
2952         * corelow.c: Update.
2953         * darwin-nat-info.c: Update.
2954         * darwin-nat.c: Update.
2955         * dcache.c: Update.
2956         * dtrace-probe.c: Update.
2957         * dummy-frame.c: Update.
2958         * fbsd-nat.c: Update.
2959         * frame.c: Update.
2960         * gdbthread.h: Update.
2961         * gnu-nat.c: Update.
2962         * go32-nat.c: Update.
2963         * inf-loop.c: Update.
2964         * inf-ptrace.c: Update.
2965         * infcall.c: Update.
2966         * infcmd.c: Update.
2967         * inflow.c: Update.
2968         * infrun.c: Update.
2969         * linux-fork.c: Update.
2970         * linux-nat.c: Update.
2971         * linux-thread-db.c: Update.
2972         * mi/mi-cmd-var.c: Update.
2973         * mi/mi-interp.c: Update.
2974         * mi/mi-main.c: Update.
2975         * nto-procfs.c: Update.
2976         * ppc-linux-tdep.c: Update.
2977         * procfs.c: Update.
2978         * python/py-inferior.c: Update.
2979         * python/py-record-btrace.c: Update.
2980         * python/py-record.c: Update.
2981         * ravenscar-thread.c: Update.
2982         * regcache.c: Update.
2983         * remote-sim.c: Update.
2984         * remote.c: Update.
2985         * sol-thread.c: Update.
2986         * solib.c: Update.
2987         * target.c: Update.
2988         * tui/tui-stack.c: Update.
2989         * varobj.c: Update.
2990         * windows-nat.c: Update.
2991         * windows-tdep.c: Update.
2992
2993 2018-07-03  Tom Tromey  <tom@tromey.com>
2994
2995         * common/ptid.c (ptid_match): Remove.
2996         * common/ptid.h (ptid_match): Don't declare.
2997         * fbsd-nat.c: Update.
2998         * infcmd.c: Update.
2999         * infrun.c: Update.
3000         * linux-nat.c: Update.
3001         * record-btrace.c: Update.
3002         * regcache.c: Update.
3003         * remote.c: Update.
3004
3005 2018-07-03  Tom Tromey  <tom@tromey.com>
3006
3007         * common/ptid.c (ptid_tid_p): Remove.
3008         * common/ptid.h (ptid_tid_p): Don't declare.
3009         * sol-thread.c: Update.
3010
3011 2018-07-03  Tom Tromey  <tom@tromey.com>
3012
3013         * common/ptid.c (ptid_lwp_p): Remove.
3014         * common/ptid.h (ptid_lwp_p): Don't declare.
3015         * fbsd-nat.c: Update.
3016         * linux-nat.c: Update.
3017         * nat/linux-procfs.c: Update.
3018         * nat/x86-linux-dregs.c: Update.
3019         * sol-thread.c: Update.
3020
3021 2018-07-03  Tom Tromey  <tom@tromey.com>
3022
3023         * common/ptid.c (ptid_is_pid): Remove.
3024         * common/ptid.h (ptid_is_pid): Don't declare.
3025         * infrun.c: Update.
3026         * linux-nat.c: Update.
3027         * mi/mi-interp.c: Update.
3028         * remote.c: Update.
3029         * thread.c: Update.
3030
3031 2018-07-03  Tom Tromey  <tom@tromey.com>
3032
3033         * common/ptid.c (ptid_get_tid): Remove.
3034         * common/ptid.h (ptid_get_tid): Don't declare.
3035         * ada-tasks.c: Update.
3036         * aix-thread.c: Update.
3037         * bsd-uthread.c: Update.
3038         * darwin-nat.c: Update.
3039         * fbsd-nat.c: Update.
3040         * i386-darwin-nat.c: Update.
3041         * infrun.c: Update.
3042         * linux-tdep.c: Update.
3043         * nto-procfs.c: Update.
3044         * ppc-ravenscar-thread.c: Update.
3045         * python/py-infthread.c: Update.
3046         * ravenscar-thread.c: Update.
3047         * sol-thread.c: Update.
3048         * sparc-ravenscar-thread.c: Update.
3049         * windows-nat.c: Update.
3050
3051 2018-07-03  Tom Tromey  <tom@tromey.com>
3052
3053         * common/ptid.c (ptid_get_lwp): Remove.
3054         * common/ptid.h (ptid_get_lwp): Don't declare.
3055         * aarch64-linux-nat.c: Update.
3056         * ada-tasks.c: Update.
3057         * aix-thread.c: Update.
3058         * amd64-linux-nat.c: Update.
3059         * arm-linux-nat.c: Update.
3060         * corelow.c: Update.
3061         * fbsd-nat.c: Update.
3062         * fbsd-tdep.c: Update.
3063         * gnu-nat.c: Update.
3064         * i386-cygwin-tdep.c: Update.
3065         * i386-gnu-nat.c: Update.
3066         * i386-linux-nat.c: Update.
3067         * ia64-linux-nat.c: Update.
3068         * inf-ptrace.c: Update.
3069         * infrun.c: Update.
3070         * linux-fork.c: Update.
3071         * linux-nat.c: Update.
3072         * linux-tdep.c: Update.
3073         * linux-thread-db.c: Update.
3074         * mips-linux-nat.c: Update.
3075         * nat/aarch64-linux-hw-point.c: Update.
3076         * nat/aarch64-linux.c: Update.
3077         * nat/linux-btrace.c: Update.
3078         * nat/linux-osdata.c: Update.
3079         * nat/linux-procfs.c: Update.
3080         * nat/x86-linux-dregs.c: Update.
3081         * obsd-nat.c: Update.
3082         * ppc-fbsd-nat.c: Update.
3083         * ppc-linux-nat.c: Update.
3084         * procfs.c: Update.
3085         * python/py-infthread.c: Update.
3086         * ravenscar-thread.c: Update.
3087         * remote.c: Update.
3088         * s390-linux-nat.c: Update.
3089         * sol-thread.c: Update.
3090         * sol2-tdep.c: Update.
3091         * spu-linux-nat.c: Update.
3092         * x86-linux-nat.c: Update.
3093         * xtensa-linux-nat.c: Update.
3094
3095 2018-07-03  Tom Tromey  <tom@tromey.com>
3096
3097         * common/ptid.c (ptid_get_pid): Remove.
3098         * common/ptid.h (ptid_get_pid): Don't declare.
3099         * aarch64-linux-nat.c: Update.
3100         * ada-lang.c: Update.
3101         * aix-thread.c: Update.
3102         * alpha-bsd-nat.c: Update.
3103         * amd64-fbsd-nat.c: Update.
3104         * amd64-linux-nat.c: Update.
3105         * arm-linux-nat.c: Update.
3106         * arm-nbsd-nat.c: Update.
3107         * auxv.c: Update.
3108         * break-catch-syscall.c: Update.
3109         * breakpoint.c: Update.
3110         * bsd-uthread.c: Update.
3111         * corelow.c: Update.
3112         * ctf.c: Update.
3113         * darwin-nat.c: Update.
3114         * fbsd-nat.c: Update.
3115         * fbsd-tdep.c: Update.
3116         * gcore.c: Update.
3117         * gnu-nat.c: Update.
3118         * hppa-nbsd-nat.c: Update.
3119         * hppa-obsd-nat.c: Update.
3120         * i386-fbsd-nat.c: Update.
3121         * ia64-linux-nat.c: Update.
3122         * inf-ptrace.c: Update.
3123         * infcmd.c: Update.
3124         * inferior.c: Update.
3125         * inferior.h: Update.
3126         * inflow.c: Update.
3127         * infrun.c: Update.
3128         * linux-fork.c: Update.
3129         * linux-nat.c: Update.
3130         * linux-tdep.c: Update.
3131         * linux-thread-db.c: Update.
3132         * m68k-bsd-nat.c: Update.
3133         * mi/mi-interp.c: Update.
3134         * mi/mi-main.c: Update.
3135         * mips-linux-nat.c: Update.
3136         * mips-nbsd-nat.c: Update.
3137         * mips64-obsd-nat.c: Update.
3138         * nat/aarch64-linux-hw-point.c: Update.
3139         * nat/aarch64-linux.c: Update.
3140         * nat/linux-btrace.c: Update.
3141         * nat/linux-osdata.c: Update.
3142         * nat/linux-procfs.c: Update.
3143         * nat/x86-linux-dregs.c: Update.
3144         * nto-procfs.c: Update.
3145         * obsd-nat.c: Update.
3146         * ppc-linux-nat.c: Update.
3147         * ppc-nbsd-nat.c: Update.
3148         * ppc-obsd-nat.c: Update.
3149         * proc-service.c: Update.
3150         * procfs.c: Update.
3151         * python/py-inferior.c: Update.
3152         * python/py-infthread.c: Update.
3153         * ravenscar-thread.c: Update.
3154         * record.c: Update.
3155         * remote-sim.c: Update.
3156         * remote.c: Update.
3157         * rs6000-nat.c: Update.
3158         * s390-linux-nat.c: Update.
3159         * sh-nbsd-nat.c: Update.
3160         * sol-thread.c: Update.
3161         * sparc-nat.c: Update.
3162         * sparc64-tdep.c: Update.
3163         * spu-linux-nat.c: Update.
3164         * spu-tdep.c: Update.
3165         * target-debug.h: Update.
3166         * target.c: Update.
3167         * thread.c: Update.
3168         * tid-parse.c: Update.
3169         * tracefile-tfile.c: Update.
3170         * vax-bsd-nat.c: Update.
3171         * windows-nat.c: Update.
3172         * x86-linux-nat.c: Update.
3173         * x86-nat.c: Update.
3174
3175 2018-07-03  Tom Tromey  <tom@tromey.com>
3176
3177         * common/ptid.c (pid_to_ptid): Remove.
3178         * common/ptid.h (pid_to_ptid): Don't declare.
3179         * aix-thread.c: Update.
3180         * arm-linux-nat.c: Update.
3181         * common/ptid.c: Update.
3182         * common/ptid.h: Update.
3183         * corelow.c: Update.
3184         * ctf.c: Update.
3185         * darwin-nat.c: Update.
3186         * fbsd-nat.c: Update.
3187         * fork-child.c: Update.
3188         * gnu-nat.c: Update.
3189         * go32-nat.c: Update.
3190         * inf-ptrace.c: Update.
3191         * infcmd.c: Update.
3192         * inferior.c: Update.
3193         * infrun.c: Update.
3194         * linux-fork.c: Update.
3195         * linux-nat.c: Update.
3196         * nat/aarch64-linux-hw-point.c: Update.
3197         * nat/fork-inferior.c: Update.
3198         * nat/x86-linux-dregs.c: Update.
3199         * nto-procfs.c: Update.
3200         * obsd-nat.c: Update.
3201         * procfs.c: Update.
3202         * progspace.c: Update.
3203         * remote.c: Update.
3204         * rs6000-nat.c: Update.
3205         * s390-linux-nat.c: Update.
3206         * sol-thread.c: Update.
3207         * spu-linux-nat.c: Update.
3208         * target.c: Update.
3209         * top.c: Update.
3210         * tracefile-tfile.c: Update.
3211         * windows-nat.c: Update.
3212
3213 2018-07-03  Tom Tromey  <tom@tromey.com>
3214
3215         * common/ptid.h (ptid_build): Don't declare.
3216         * common/ptid.c (ptid_build): Remove.
3217         * aix-thread.c: Update.
3218         * bsd-kvm.c: Update.
3219         * bsd-uthread.c: Update.
3220         * common/agent.c: Update.
3221         * common/ptid.c: Update.
3222         * common/ptid.h: Update.
3223         * corelow.c: Update.
3224         * darwin-nat.c: Update.
3225         * fbsd-nat.c: Update.
3226         * gnu-nat.c: Update.
3227         * linux-fork.c: Update.
3228         * linux-nat.c: Update.
3229         * linux-thread-db.c: Update.
3230         * nat/linux-osdata.c: Update.
3231         * nat/linux-procfs.c: Update.
3232         * nto-procfs.c: Update.
3233         * obsd-nat.c: Update.
3234         * proc-service.c: Update.
3235         * procfs.c: Update.
3236         * ravenscar-thread.c: Update.
3237         * remote-sim.c: Update.
3238         * remote.c: Update.
3239         * sol-thread.c: Update.
3240         * target.c: Update.
3241         * windows-nat.c: Update.
3242
3243 2018-07-03  Tom Tromey  <tom@tromey.com>
3244
3245         * infrun.c (follow_exec): Use exit_inferior_silent.
3246         * inferior.c (exit_inferior_num_silent): Remove.
3247         * inferior.h (exit_inferior_num_silent): Don't declare.
3248
3249 2018-07-03  Tom Tromey  <tom@tromey.com>
3250
3251         PR cli/23340:
3252         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3253         inferior_ptid on error.
3254
3255 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3256             Simon Marchi  <simon.marchi@polymtl.ca>
3257
3258         PR tdep/8282
3259         * disasm.h (gdb_disassembler): Add
3260         `m_disassembler_options_holder'. member
3261         * disasm.c (get_all_disassembler_options): New function.
3262         (gdb_disassembler::gdb_disassembler): Use it.
3263         (gdb_buffered_insn_length_init_dis): Likewise.
3264         (gdb_buffered_insn_length): Adjust accordingly.
3265         (set_disassembler_options): Handle options with arguments.
3266         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3267         line if showing options with descriptions.
3268         (disassembler_options_completer): Adapt to using the
3269         `disasm_options_and_args_t' structure.
3270         * mips-tdep.c (mips_disassembler_options): New variable.
3271         (mips_disassembler_options_o32): Likewise.
3272         (mips_disassembler_options_n32): Likewise.
3273         (mips_disassembler_options_n64): Likewise.
3274         (gdb_print_insn_mips): Don't set `disassembler_options'.
3275         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3276         functions.
3277         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3278         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3279         `gdbarch_disassembler_options_implicit' and
3280         `gdbarch_valid_disassembler_options'.
3281         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3282         `disasm_options_and_args_t' structure.
3283         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3284         method.
3285         (valid_disassembler_options): Switch from `disasm_options_t' to
3286         the `disasm_options_and_args_t' structure.
3287         * NEWS: Document `set disassembler-options' support for the MIPS
3288         target.
3289         * gdbarch.h: Regenerate.
3290         * gdbarch.c: Regenerate.
3291
3292 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3293
3294         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3295
3296 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3297
3298         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3299         parameter in call to amd64_target_description.
3300         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3301         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3302         (amd64fbsd_init_abi): Likewise.
3303         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3304         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3305         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3306         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3307
3308 2018-06-29  Pedro Alves  <palves@redhat.com>
3309
3310         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3311         "segments" parameter.
3312         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3313         (_initialize_amd64_tdep): Update call to
3314         amd64_create_target_description.
3315         (amd64_target_description): Add "segments" parameter.  Adjust
3316         the implementation to use it.
3317         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3318         call to amd64_create_target_description.
3319         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3320         * gdb/arch/amd64.h (amd64_create_target_description): Add
3321         "segments" register.
3322         * gdb/arch/amd64.c (amd64_create_target_description): Add
3323         "segments" parameter.  Call create_feature_i386_64bit_segments
3324         only if SEGMENTS is true.
3325         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3326         call to amd64_create_target_description.
3327
3328 2018-06-29  Pedro Alves  <palves@redhat.com>
3329
3330         * thread.c (thread_target_id_str): New, factored out from ...
3331         (print_thread_info_1): ... here.  Use it to compute the max
3332         "Target Id" column width.
3333
3334 2018-06-29  Pedro Alves  <palves@redhat.com>
3335
3336         * remote.c (remote_target::extra_thread_info): Delete
3337         'display_buf' and 'n' locals.  from the cache, regardless of
3338         packet mechanims is in use.  Use cache for qThreadExtra and qP
3339         methods too.
3340
3341 2018-06-29  Pedro Alves  <palves@redhat.com>
3342
3343         * blockframe.c (find_pc_sect_containing_function): New function.
3344         * breakpoint.c (print_breakpoint_location): Don't call
3345         find_pc_sect_function.
3346         * linespec.c (create_sals_line_offset): Record the location's
3347         symbol in the sal.
3348         * linespec.c (convert_address_location_to_sals): Fill in sal's
3349         symbol with find_pc_sect_containing_function.
3350         * symtab.c (find_function_start_sal): Rename to ...
3351         (find_function_start_sal_1): ... this.
3352         (find_function_start_sal): Reimplement as wrapper around
3353         find_function_start_sal_1, and use
3354         find_pc_sect_containing_function to fill in the sal's symbol.
3355         (find_function_start_sal(symbol*, bool)): Adjust.
3356         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3357         comments.
3358         (find_pc_sect_containing_function): Declare.
3359
3360 2018-06-29  Pedro Alves  <palves@redhat.com>
3361
3362         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3363         true if the the location has no symbol.
3364
3365 2018-06-28  Tom Tromey  <tom@tromey.com>
3366
3367         * NEWS: Mention --enable-codesign.
3368         * silent-rules.mk (ECHO_SIGN): New variable.
3369         * configure.ac: Add --enable-codesign.
3370         * configure: Rebuild.
3371         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3372         (gdb$(EXEEXT)): Optionally invoke codesign.
3373
3374 2018-06-28  Pedro Alves  <palves@redhat.com>
3375
3376         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3377         comments.
3378         (switch_to_thread_no_regs): Adjust comment.
3379         * infcmd.c (stop_pc): Delete.
3380         (post_create_inferior, info_program_command): Replace references
3381         to stop_pc with references to thread_info->suspend.stop_pc.
3382         * inferior.h (stop_pc): Delete declaration.
3383         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3384         (handle_inferior_event_1, handle_signal_stop)
3385         (process_event_stop_test, keep_going_stepped_thread)
3386         (handle_step_into_function, handle_step_into_function_backward)
3387         (print_stop_location): Replace references to stop_pc with
3388         references to thread_info->suspend.stop_pc.
3389         (struct infcall_suspend_state) <stop_pc>: Delete field.
3390         (save_infcall_suspend_state, restore_infcall_suspend_state):
3391         Remove references to inf_stat->stop_pc.
3392         * linux-fork.c (fork_load_infrun_state): Likewise.
3393         * record-btrace.c (record_btrace_set_replay): Likewise.
3394         * record-full.c (record_full_goto_entry): Likewise.
3395         * remote.c (print_one_stopped_thread): Likewise.
3396         * target.c (target_resume): Extend comment.
3397         * thread.c (set_executing_thread): New.
3398         (set_executing): Use it.
3399         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3400         Remove references to stop_pc.
3401
3402 2018-06-28  Pedro Alves  <palves@redhat.com>
3403
3404         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3405         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3406
3407 2018-06-28  Tom Tromey  <tom@tromey.com>
3408
3409         * coffread.c (coff_symfile_finish): Update.
3410         * xcoffread.c (xcoff_symfile_finish): Update.
3411         * elfread.c (elf_symfile_finish): Update.
3412         * symfile.h (dwarf2_free_objfile): Don't declare.
3413         * dwarf2read.c (_initialize_dwarf2_read): Use
3414         register_objfile_data_with_cleanup.
3415         (dwarf2_free_objfile): Now static.  Change signature.
3416
3417 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3418
3419         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3420         option "-o" to add-symbol-file-load to add an offset to each
3421         section's load address.
3422         * symfile.c (set_objfile_default_section_offset): New function.
3423
3424 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3425
3426         * symfile.c (add_symbol_file_command): Make sure that sections
3427         with the same name are sorted in the same order.
3428
3429 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3430
3431         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3432         require the second argument.  If omitted, load sections at the
3433         addresses specified in the file.
3434
3435 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3436
3437         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3438         (_initialize_symfile): Add option "-o" to symbol-file to add an
3439         offset to each section of the symbol file.
3440
3441 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3442
3443         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3444
3445 2018-06-27  Tom Tromey  <tom@tromey.com>
3446
3447         * stack.c (_initialize_stack): Update "func" help text.
3448
3449 2018-06-27  Tom Tromey  <tom@tromey.com>
3450
3451         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3452         std::vector.
3453         (unwind_infopy_str, pyuw_create_unwind_info)
3454         (unwind_infopy_add_saved_register, pyuw_sniffer)
3455         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3456         Update.
3457         (struct saved_reg): Add constructor.
3458         <value>: Now a gdbpy_ref<>.
3459
3460 2018-06-27  Tom Tromey  <tom@tromey.com>
3461
3462         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3463
3464 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3465
3466         * gdb-gdb.py.in: Format using autopep8.
3467
3468 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3469
3470         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3471         (type_lookup_function): Recognize CORE_ADDR values.
3472
3473 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3474
3475         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3476         print tag_name.
3477
3478 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3479
3480         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3481         <__lt__>: Add.
3482
3483 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3484
3485         * gdb-gdb.py: Move to...
3486         * gdb-gdb.py.in: ... here.
3487         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3488         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3489         dependencies.
3490         (distclean): Remove gdb-gdb.py when cleaning.
3491         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3492         * configure: Re-generate.
3493
3494 2018-06-27  Pedro Alves  <palves@redhat.com>
3495
3496         * proc-service.c (get_ps_regcache): New.
3497         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3498         (ps_lsetfpregs): Use it.
3499
3500 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3501
3502         PR gdb/21695
3503         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3504         (dwarf_decode_lines_1): Adjust.
3505
3506 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3507
3508         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3509         override.
3510         <info_proc>: Likewise.
3511
3512 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3513
3514         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3515         to windows_fetch_one_register, and only handle the case of
3516         fetching one register.  Move the code that reloads the context
3517         and iterates over all registers if R is negative to...
3518         (windows_nat_target::fetch_registers): ... here.
3519         (do_windows_store_inferior_registers): Rename to
3520         windows_store_one_register, and only handle the case of storing
3521         one register.  Move the code that handles the case where r is
3522         negative to...
3523         (windows_nat_target::store_registers) ... here.
3524
3525 2018-06-26  Tom Tromey  <tom@tromey.com>
3526
3527         PR rust/22574:
3528         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3529         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3530         Update.
3531         (rust_internal_print_type): Add podata parameter.
3532         (rust_print_type): Update.
3533
3534 2018-06-26  Tom Tromey  <tom@tromey.com>
3535
3536         * typeprint.h (struct print_offset_data) <update, finish,
3537         maybe_print_hole>: New methods.
3538         <indentation>: New constant.
3539         * typeprint.c (print_offset_data::indentation): Define.
3540         (print_offset_data::maybe_print_hole, print_offset_data::update)
3541         (print_offset_data::finish): Move from c-typeprint.c and rename.
3542         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3543         (print_spaces_filtered_with_print_options): Update.
3544         (c_print_type_union_field_offset, maybe_print_hole)
3545         (c_print_type_struct_field_offset): Move to typeprint.c and
3546         rename.
3547         (c_type_print_base_struct_union): Update.
3548
3549 2018-06-25  Pedro Alves  <palves@redhat.com>
3550
3551         * gdbthread.h (thread_info_ref, delete_thread)
3552         (delete_thread_silent, first_thread_of_inferior)
3553         (any_thread_of_inferior, switch_to_thread)
3554         (enable_thread_stack_temporaries)
3555         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3556         (get_last_thread_stack_temporary)
3557         (value_in_thread_stack_temporaries, can_access_registers_thread):
3558         Spell out "struct thread_info" instead of just "thread_info".
3559         * inferior.h (notice_new_inferior): Likewise.
3560
3561 2018-06-25  Pedro Alves  <palves@redhat.com>
3562
3563         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3564         pass thread_info pointer to delete_thread.
3565         (windows_nat_target::detach): Pass inferior pointer to
3566         detach_inferior.
3567         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3568         delete_thread.
3569         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3570         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3571         and pass a thread_info pointer to delete_thread.
3572         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3573         pass thread_info pointer to delete_thread.
3574         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3575         delete_thread_silent call.
3576         * procfs.c (procfs_target::detach): Pass inferior pointer to
3577         detach_inferior.
3578         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3579         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3580         delete_thread_silent call.
3581         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3582         pass thread_info pointer to delete_thread.
3583         (windows_nat_target::detach): Pass inferior pointer to
3584         delete_inferior.
3585
3586 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3587
3588         * regcache.c (readable_regcache::read_part): Fix asserts.
3589         (reg_buffer::raw_collect_part): New function.
3590         (regcache::write_part): Fix asserts.
3591         (reg_buffer::raw_supply_part): New function.
3592         (regcache::transfer_regset_register): New helper function.
3593         (regcache::transfer_regset): Call new functions.
3594         (regcache_supply_regset): Use gdb_byte*.
3595         (regcache::supply_regset): Likewise.
3596         (regcache_collect_regset): Likewise.
3597         (regcache::collect_regset): Likewise.
3598         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3599         (reg_buffer::raw_supply_part): Likewise.
3600         (regcache::transfer_regset_register): Likewise.
3601         (regcache::transfer_regset): Use gdb_byte*.
3602
3603 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3604
3605         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3606
3607 2018-06-21  Pedro Alves  <palves@redhat.com>
3608
3609         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3610         instead of a ptid_t.  All callers adjusted.
3611         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3612         adjusted.
3613         (print_ada_task_info, display_current_task_id, task_command_1):
3614         Adjust.
3615         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3616         inferior_thread.
3617         (breakpoint_kind): Adjust.
3618         (remove_breakpoints_pid): Rename to ...
3619         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3620         pointer.  All callers adjusted.
3621         (bpstat_clear_actions): Use inferior_thread.
3622         (get_bpstat_thread): New.
3623         (bpstat_do_actions): Use it.
3624         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3625         to take a thread_info pointer.  All callers adjusted.
3626         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3627         (breakpoint_re_set_thread): Use inferior_thread.
3628         * breakpoint.h (struct inferior): Forward declare.
3629         (bpstat_stop_status): Update.
3630         (remove_breakpoints_pid): Delete.
3631         (remove_breakpoints_inf): New.
3632         * bsd-uthread.c (bsd_uthread_target::wait)
3633         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3634         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3635         (maint_btrace_packet_history_cmd)
3636         (maint_btrace_clear_packet_history_cmd): Adjust.
3637         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3638         inferior_thread.
3639         * cli/cli-interp.c: Include "inferior.h".
3640         * common/refcounted-object.h (struct
3641         refcounted_object_ref_policy): New.
3642         * compile/compile-object-load.c: Include gdbthread.h.
3643         (store_regs): Use inferior_thread.
3644         * corelow.c (core_target::close): Use current_inferior.
3645         (core_target_open): Adjust to use first_thread_of_inferior and use
3646         the current inferior.
3647         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3648         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3649         <thread>: ... this new field.  All references adjusted.
3650         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3651         Take a thread_info pointer instead of a ptid_t.
3652         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3653         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3654         thread_info pointer instead of a ptid_t.
3655         * elfread.c: Include "inferior.h".
3656         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3657         Use inferior_thread.
3658         * eval.c (evaluate_subexp): Likewise.
3659         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3660         inferior_thread.
3661         * gdb_proc_service.h (struct thread_info): Forward declare.
3662         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3663         <thread>: ... this new field.  All references adjusted.
3664         * gdbarch.h, gdbarch.c: Regenerate.
3665         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3666         'thread' parameter.  All implementations and callers adjusted.
3667         * gdbthread.h (thread_info) <set_running>: New method.
3668         (delete_thread, delete_thread_silent): Take a thread_info pointer
3669         instead of a ptid.
3670         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3671         (first_thread_of_process): Delete, replaced by ...
3672         (first_thread_of_inferior): ... this new function.  All callers
3673         adjusted.
3674         (any_live_thread_of_process): Delete, replaced by ...
3675         (any_live_thread_of_inferior): ... this new function.  All callers
3676         adjusted.
3677         (switch_to_thread, switch_to_no_thread): Declare.
3678         (is_executing): Delete.
3679         (enable_thread_stack_temporaries): Update comment.
3680         <enable_thread_stack_temporaries>: Take a thread_info pointer
3681         instead of a ptid_t.  Incref the thread.
3682         <~enable_thread_stack_temporaries>: Decref the thread.
3683         <m_ptid>: Delete
3684         <m_thr>: New.
3685         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3686         (get_last_thread_stack_temporary)
3687         (value_in_thread_stack_temporaries, can_access_registers_thread):
3688         Take a thread_info pointer instead of a ptid_t.  All callers
3689         adjusted.
3690         * infcall.c (get_call_return_value): Use inferior_thread.
3691         (run_inferior_call): Work with thread pointers instead of ptid_t.
3692         (call_function_by_hand_dummy): Work with thread pointers instead
3693         of ptid_t.  Use thread_info_ref.
3694         * infcmd.c (proceed_thread_callback): Access thread's state
3695         directly.
3696         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3697         access thread's state directly.
3698         (continue_command): Use inferior_thread.
3699         (info_program_command): Use find_thread_ptid and access thread
3700         state directly.
3701         (proceed_after_attach_callback): Use thread state directly.
3702         (notice_new_inferior): Take a thread_info pointer instead of a
3703         ptid_t.  All callers adjusted.
3704         (exit_inferior): Take an inferior pointer instead of a pid.  All
3705         callers adjusted.
3706         (exit_inferior_silent): New.
3707         (detach_inferior): Delete.
3708         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3709         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3710         (detach_inferior_command, kill_inferior_command): Use
3711         find_inferior_id instead of valid_gdb_inferior_id and
3712         gdb_inferior_id_to_pid.
3713         (inferior_command): Use inferior and thread pointers.
3714         * inferior.h (struct thread_info): Forward declare.
3715         (notice_new_inferior): Take a thread_info pointer instead of a
3716         ptid_t.  All callers adjusted.
3717         (detach_inferior): Delete declaration.
3718         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3719         instead of a pid.  All callers adjusted.
3720         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3721         (valid_gdb_inferior_id): Delete.
3722         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3723         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3724         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3725         ...
3726         <inf>: ... this new field.
3727         <step_ptid>: Delete, replaced by ...
3728         <step_thread>: ... this new field.
3729         (get_displaced_stepping_state): Take an inferior pointer instead
3730         of a pid.  All callers adjusted.
3731         (displaced_step_in_progress_any_inferior): Adjust.
3732         (displaced_step_in_progress_thread): Take a thread pointer instead
3733         of a ptid_t.  All callers adjusted.
3734         (displaced_step_in_progress, add_displaced_stepping_state): Take
3735         an inferior pointer instead of a pid.  All callers adjusted.
3736         (get_displaced_step_closure_by_addr): Adjust.
3737         (remove_displaced_stepping_state): Take an inferior pointer
3738         instead of a pid.  All callers adjusted.
3739         (displaced_step_prepare_throw, displaced_step_prepare)
3740         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3741         All callers adjusted.
3742         (start_step_over): Adjust.
3743         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3744         displaced step queue.
3745         (do_target_resume): Adjust.
3746         (fetch_inferior_event): Use inferior_thread.
3747         (context_switch, get_inferior_stop_soon): Take an
3748         execution_control_state pointer instead of a ptid_t.  All callers
3749         adjusted.
3750         (switch_to_thread_cleanup): Delete.
3751         (stop_all_threads): Use scoped_restore_current_thread.
3752         * inline-frame.c: Include "gdbthread.h".
3753         (inline_state) <inline_state>: Take a thread pointer instead of a
3754         ptid_t.  All callers adjusted.
3755         <ptid>: Delete, replaced by ...
3756         <thread>: ... this new field.
3757         (find_inline_frame_state): Take a thread pointer instead of a
3758         ptid_t.  All callers adjusted.
3759         (skip_inline_frames, step_into_inline_frame)
3760         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3761         pointer instead of a ptid_t.  All callers adjusted.
3762         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3763         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3764         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3765         pointers directly.
3766         * linux-nat.c (get_detach_signal): Likewise.
3767         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3768         (thread_db_notice_clone): Adjust.
3769         (thread_db_find_new_threads_silently)
3770         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3771         a thread pointer instead of a ptid_t.  All callers adjusted.
3772         * mi/mi-cmd-var.c: Include "inferior.h".
3773         (mi_cmd_var_update_iter): Update to use thread pointers.
3774         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3775         inferior directly.
3776         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3777         out to ...
3778         (mi_output_running): ... this new function.
3779         (mi_on_resume_1): Adjust to use it.
3780         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3781         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3782         directly.
3783         (interrupt_thread_callback): : Adjust to use thread and inferior
3784         pointers.
3785         * proc-service.c: Include "gdbthread.h".
3786         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3787         * progspace-and-thread.c: Include "inferior.h".
3788         * progspace.c: Include "inferior.h".
3789         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3790         hold a reference to an inferior_object.
3791         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3792         inferior_thread.
3793         * python/py-inferior.c (struct inferior_object): Give the type a
3794         tag name instead of a typedef.
3795         (python_on_normal_stop): No need to check if the current thread is
3796         listed.
3797         (inferior_to_inferior_object): Change return type to
3798         inferior_object.  All callers adjusted.
3799         (find_thread_object): Delete, bits factored out to ...
3800         (thread_to_thread_object): ... this new function.
3801         * python/py-infthread.c (create_thread_object): Use
3802         inferior_to_inferior_object.
3803         (thpy_is_stopped): Use thread pointer directly.
3804         (gdbpy_selected_thread): Use inferior_thread.
3805         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3806         field, replaced with ...
3807         <thread>: ... this new field.  All users adjusted.
3808         (btpy_insn_or_gap_new): Drop const.
3809         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3810         callers adjusted.
3811         * python/py-record.c: Include "gdbthread.h".
3812         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3813         a ptid_t.  All callers adjusted.
3814         (gdbpy_current_recording): Use inferior_thread.
3815         * python/py-record.h (recpy_record_object) <ptid>: Delete
3816         field, replaced with ...
3817         <thread>: ... this new field.  All users adjusted.
3818         (recpy_element_object) <ptid>: Delete
3819         field, replaced with ...
3820         <thread>: ... this new field.  All users adjusted.
3821         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3822         a ptid_t.  All callers adjusted.
3823         * python/py-threadevent.c: Include "gdbthread.h".
3824         (get_event_thread): Use thread_to_thread_object.
3825         * python/python-internal.h (struct inferior_object): Forward
3826         declare.
3827         (find_thread_object, find_inferior_object): Delete declarations.
3828         (thread_to_thread_object, inferior_to_inferior_object): New
3829         declarations.
3830         * record-btrace.c: Include "inferior.h".
3831         (require_btrace_thread): Use inferior_thread.
3832         (record_btrace_frame_sniffer)
3833         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3834         (get_thread_current_frame): Use scoped_restore_current_thread and
3835         switch_to_thread.
3836         (get_thread_current_frame): Use thread pointer directly.
3837         (record_btrace_replay_at_breakpoint): Use thread's inferior
3838         pointer directly.
3839         * record-full.c: Include "inferior.h".
3840         * regcache.c: Include "gdbthread.h".
3841         (get_thread_arch_regcache): Use the inferior's address space
3842         directly.
3843         (get_thread_regcache, registers_changed_thread): New.
3844         * regcache.h (get_thread_regcache(thread_info *thread)): New
3845         overload.
3846         (registers_changed_thread): New.
3847         (remote_target) <remote_detach_1>: Swap order of parameters.
3848         (remote_add_thread): <remote_add_thread>: Return the new thread.
3849         (get_remote_thread_info(ptid_t)): New overload.
3850         (remote_target::remote_notice_new_inferior): Use thread pointers
3851         directly.
3852         (remote_target::process_initial_stop_replies): Use
3853         thread_info::set_running.
3854         (remote_target::remote_detach_1, remote_target::detach)
3855         (extended_remote_target::detach): Adjust.
3856         * stack.c (frame_show_address): Use inferior_thread.
3857         * target-debug.h (target_debug_print_thread_info_pp): New.
3858         * target-delegates.c: Regenerate.
3859         * target.c (default_thread_address_space): Delete.
3860         (memory_xfer_partial_1): Use current_inferior.
3861         (target_detach): Use current_inferior.
3862         (target_thread_address_space): Delete.
3863         (generic_mourn_inferior): Use current_inferior.
3864         * target.h (struct target_ops) <thread_address_space>: Delete.
3865         (target_thread_address_space): Delete.
3866         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
3867         pointers directly.
3868         (delete_thread_1, delete_thread, delete_thread_silent): Take a
3869         thread pointer instead of a ptid_t.  Adjust all callers.
3870         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3871         (first_thread_of_process): Delete, replaced by ...
3872         (first_thread_of_inferior): ... this new function.  All callers
3873         adjusted.
3874         (any_thread_of_process): Rename to ...
3875         (any_thread_of_inferior): ... this, and take an inferior pointer.
3876         (any_live_thread_of_process): Rename to ...
3877         (any_live_thread_of_inferior): ... this, and take an inferior
3878         pointer.
3879         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3880         (value_in_thread_stack_temporaries)
3881         (get_last_thread_stack_temporary): Take a thread pointer instead
3882         of a ptid_t.  Adjust all callers.
3883         (thread_info::set_running): New.
3884         (validate_registers_access): Use inferior_thread.
3885         (can_access_registers_ptid): Rename to ...
3886         (can_access_registers_thread): ... this, and take a thread
3887         pointer.
3888         (print_thread_info_1): Adjust to compare thread pointers instead
3889         of ptids.
3890         (switch_to_no_thread, switch_to_thread): Make extern.
3891         (scoped_restore_current_thread::~scoped_restore_current_thread):
3892         Use m_thread pointer directly.
3893         (scoped_restore_current_thread::scoped_restore_current_thread):
3894         Use inferior_thread.
3895         (thread_command): Use thread pointer directly.
3896         (thread_num_make_value_helper): Use inferior_thread.
3897         * top.c (execute_command): Use inferior_thread.
3898         * tui/tui-interp.c: Include "inferior.h".
3899         * varobj.c (varobj_create): Use inferior_thread.
3900         (value_of_root_1): Use find_thread_global_id instead of
3901         global_thread_id_to_ptid.
3902
3903 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
3904
3905         * regcache.c (readable_regcache::read_part): Avoid memcpy when
3906         possible.
3907         (regcache::write_part): Likewise.
3908         (readable_regcache::cooked_read_part): Update comment.
3909         (readable_regcache::cooked_write_part): Likewise.
3910         * regcache.h: (readable_regcache::read_part): Likewise.
3911         (regcache::write_part): Likewise.
3912
3913 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
3914             Dirk Schubert  <dirk.schubert@arm.com>
3915
3916         * aarch64-linux-nat.c (post_attach): New.
3917         (aarch64_linux_nat_target::post_attach): Override post_attach to
3918         record the number of hardware debug registers.
3919
3920 2018-06-20  Tom Tromey  <tom@tromey.com>
3921
3922         * python/py-param.c (add_setshow_generic): Make parameters const.
3923         (parmpy_init): Update.
3924
3925 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3926
3927         * regcache.h (regcache_cooked_read_ftype): Rename to...
3928         (register_read_ftype): ...this, change type to function_view.
3929         (class reg_buffer) <save>: Remove src parameter.
3930         (readonly_detached_regcache) <readonly_detached_regcache>: Make
3931         parameter non-const in first overload.  Remove src parameter in
3932         second overload.
3933         * regcache.c (do_cooked_read): Remove.
3934         (readonly_detached_regcache::readonly_detached_regcache): Make
3935         parameter non-const, adjust call to other constructor.
3936         (reg_buffer::save): Remove src parameter.
3937         * frame.c (do_frame_register_read): Remove.
3938         (frame_save_as_regcache): Use lambda function.
3939         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3940         parameter to ppu2spu_data *.
3941         (ppu2spu_sniffer): Use lambda function.
3942
3943 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3944
3945         * record-full.c (record_full_target::insert_breakpoint): Remove
3946         "struct" keyword, add const.
3947
3948 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
3949
3950         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3951         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3952         * configure.ac: Remove AC_PREREQ, add missing quoting.
3953         * gnulib/configure.ac: Modernize usage of
3954         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
3955         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3956         (AUTOMAKE_VERSION): Bump to 1.15.1.
3957         * configure: Re-generate.
3958         * config.in: Re-generate.
3959         * aclocal.m4: Re-generate.
3960         * gnulib/aclocal.m4: Re-generate.
3961         * gnulib/config.in: Re-generate.
3962         * gnulib/configure: Re-generate.
3963         * gnulib/import/Makefile.in: Re-generate.
3964
3965 2018-06-19  Pedro Alves  <palves@redhat.com>
3966
3967         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3968         (lookup_minimal_symbol_by_pc_section): ... here with
3969         gdb_assert_not_reached added.
3970
3971 2018-06-19  Pedro Alves  <palves@redhat.com>
3972
3973         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3974         parameter with a block parameter.  Compare location's block symbol
3975         with the frame's block instead of addresses.
3976         (skip_inline_frames): Pass the current block instead of the
3977         frame's address.  Break out as soon as we determine the frame
3978         should not be skipped.
3979
3980 2018-06-18  Tom Tromey  <tom@tromey.com>
3981
3982         * solib-aix.c (solib_aix_get_section_offsets): Return
3983         unique_xmalloc_ptr.
3984         (solib_aix_solib_create_inferior_hook): Update.
3985
3986 2018-06-18  Tom Tromey  <tom@tromey.com>
3987
3988         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3989
3990 2018-06-18  Tom Tromey  <tom@tromey.com>
3991
3992         * solib-frv.c (frv_relocate_main_executable): Use
3993         unique_xmalloc_ptr.
3994         * solib-dsbt.c (dsbt_relocate_main_executable): Use
3995         unique_xmalloc_ptr.
3996
3997 2018-06-18  Tom Tromey  <tom@tromey.com>
3998
3999         * objfiles.h (inhibit_section_map_updates): Update.
4000         (resume_section_map_updates, resume_section_map_updates_cleanup):
4001         Remove.
4002         * solib-svr4.c (svr4_handle_solib_event): Update.
4003         * objfiles.c (inhibit_section_map_updates): Return
4004         scoped_restore_tmpl<int>.
4005         (resume_section_map_updates, resume_section_map_updates_cleanup):
4006         Remove.
4007
4008 2018-06-18  Tom Tromey  <tom@tromey.com>
4009
4010         * valprint.h (read_string): Update.
4011         * valprint.c (read_string): Change type of "buffer".
4012         (val_print_string): Update.
4013         * python/py-value.c (valpy_string): Update.
4014         * language.h (struct language_defn) <la_get_string>: Change
4015         type of "buffer".
4016         (default_get_string, c_get_string): Update.
4017         * language.c (default_get_string): Change type of "buffer".
4018         * guile/scm-value.c (gdbscm_value_to_string): Update.
4019         * c-lang.c (c_get_string): Change type of "buffer".
4020
4021 2018-06-18  Tom Tromey  <tom@tromey.com>
4022
4023         * ser-mingw.c (struct pipe_state_destroyer): New.
4024         (pipe_state_up): New typedef.
4025         (cleanup_pipe_state): Remove.
4026         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4027
4028 2018-06-18  Tom Tromey  <tom@tromey.com>
4029
4030         * rust-lang.h (rust_yyerror): Don't declare.
4031         * rust-lang.c (rust_language_defn): Update.
4032         * rust-exp.y (yyerror): Now static.
4033         * parse.c (parse_exp_in_context_1): Update.
4034         * p-lang.h (p_yyerror): Don't declare.
4035         * p-lang.c (p_language_defn): Update.
4036         * p-exp.y (yyerror): Now static.
4037         * opencl-lang.c (opencl_language_defn): Update.
4038         * objc-lang.c (objc_language_defn): Update.
4039         * m2-lang.h (m2_yyerror): Don't declare.
4040         * m2-lang.c (m2_language_defn): Update.
4041         * m2-exp.y (yyerror): Now static.
4042         * language.h (struct language_defn) <la_error>: Remove.
4043         * language.c (unk_lang_error): Remove.
4044         (unknown_language_defn, auto_language_defn): Remove.
4045         * go-lang.h (go_yyerror): Don't declare.
4046         * go-lang.c (go_language_defn): Update.
4047         * go-exp.y (yyerror): Now static.
4048         * f-lang.h (f_yyerror): Don't declare.
4049         * f-lang.c (f_language_defn): Update.
4050         * f-exp.y (yyerror): Now static.
4051         * d-lang.h (d_yyerror): Don't declare.
4052         * d-lang.c (d_language_defn): Update.
4053         * d-exp.y (yyerror): Now static.
4054         * c-lang.h (c_yyerror): Don't declare.
4055         * c-lang.c (c_language_defn, cplus_language_defn)
4056         (asm_language_defn, minimal_language_defn): Update.
4057         * c-exp.y (yyerror): Now static.
4058         * ada-lang.h (ada_yyerror): Don't declare.
4059         * ada-lang.c (ada_language_defn): Update.
4060         * ada-exp.y (yyerror): Now static.
4061
4062 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4063
4064         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4065         (store_sveregs_to_thread): Likewise.
4066         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4067         (aarch64_linux_store_inferior_registers): Likewise.
4068         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4069         function.
4070         (aarch64_sve_regs_copy_to_regcache): Likewise.
4071         (aarch64_sve_regs_copy_from_regcache): Likewise.
4072         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4073         declaration.
4074         (aarch64_sve_regs_copy_to_regcache): Likewise.
4075         (aarch64_sve_regs_copy_from_regcache): Likewise.
4076         (sve_context): Structure from Linux headers.
4077         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4078         (SVE_SIG_ZREG_SIZE): Likewise.
4079         (SVE_SIG_PREG_SIZE): Likewise.
4080         (SVE_SIG_FFR_SIZE): Likewise.
4081         (SVE_SIG_REGS_OFFSET): Likewise.
4082         (SVE_SIG_ZREGS_OFFSET): Likewise.
4083         (SVE_SIG_ZREG_OFFSET): Likewise.
4084         (SVE_SIG_ZREGS_SIZE): Likewise.
4085         (SVE_SIG_PREGS_OFFSET): Likewise.
4086         (SVE_SIG_PREG_OFFSET): Likewise.
4087         (SVE_SIG_PREGS_SIZE): Likewise.
4088         (SVE_SIG_FFR_OFFSET): Likewise.
4089         (SVE_SIG_REGS_SIZE): Likewise.
4090         (SVE_SIG_CONTEXT_SIZE): Likewise.
4091         (SVE_PT_REGS_MASK): Likewise.
4092         (SVE_PT_REGS_FPSIMD): Likewise.
4093         (SVE_PT_REGS_SVE): Likewise.
4094         (SVE_PT_VL_INHERIT): Likewise.
4095         (SVE_PT_VL_ONEXEC): Likewise.
4096         (SVE_PT_REGS_OFFSET): Likewise.
4097         (SVE_PT_FPSIMD_OFFSET): Likewise.
4098         (SVE_PT_FPSIMD_SIZE): Likewise.
4099         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4100         (SVE_PT_SVE_PREG_SIZE): Likewise.
4101         (SVE_PT_SVE_FFR_SIZE): Likewise.
4102         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4103         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4104         (__SVE_SIG_TO_PT): Likewise.
4105         (SVE_PT_SVE_OFFSET): Likewise.
4106         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4107         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4108         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4109         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4110         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4111         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4112         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4113         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4114         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4115         (SVE_PT_SVE_SIZE): Likewise.
4116         (SVE_PT_SIZE): Likewise.
4117         (HAS_SVE_STATE): New define.
4118
4119 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4120
4121         * nat/aarch64-sve-linux-sigcontext.h: New file.
4122         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4123         new files.
4124         (SVE_VQ_MIN): Likewise.
4125         (SVE_VQ_MAX): Likewise.
4126         (SVE_VL_MIN): Likewise.
4127         (SVE_VL_MAX): Likewise.
4128         (SVE_NUM_ZREGS): Likewise.
4129         (SVE_NUM_PREGS): Likewise.
4130         (sve_vl_valid): Likewise.
4131         (struct user_sve_header): Likewise.
4132
4133 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4134             Richard Bunt <Richard.Bunt@arm.com>
4135
4136         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4137         was requested by GDB.
4138
4139 2018-06-15  Tom de Vries  <tdevries@suse.de>
4140
4141         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4142
4143 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4144
4145         * gnulib/update-gnulib.sh: Print expected versions of
4146         autoconf/aclocal.
4147
4148 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4149
4150         * arch-utils.c (default_type_align): Use type_length_units.
4151         * gdbtypes.c (type_align): Use type_length_units.
4152
4153 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4154
4155         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4156         of 'define' command.
4157
4158 2018-06-14  Tom de Vries  <tdevries@suse.de>
4159
4160         PR cli/22573
4161         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4162         get_no_prettyformat_print_options.
4163
4164 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4165
4166         * sparc-nat.h: Include target.h.
4167         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4168         <fetch_registers>: Remove this argument in function call.
4169         <store_registers>: Remove this argument in function call, remove
4170         extra semicolon.
4171         <low_forget_process>: Call sparc64_forget_process instead of
4172         sparc_forget_process.
4173
4174 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4175
4176         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4177         (procfs_target::make_corefile_notes): Adjust to new
4178         target_read_alloc return type.
4179
4180 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4181             Stephen Roberts  <stephen.roberts@arm.com>
4182
4183         PR gdb/22882
4184         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4185         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4186         Move should_notify_stop local into more inner scope.
4187
4188 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4189             Stephen Roberts  <stephen.roberts@arm.com>
4190
4191         PR gdb/22882
4192         * infrun.c (resume_1): Add call to mark_async_event_handler.
4193
4194 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4195
4196         * infrun.c (do_target_wait): Change old version of $pc printed.
4197
4198 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4199
4200         * dwarf2read.c (read_index_from_section): Rename to...
4201         (read_gdb_index_from_section): ... this, update all callers.
4202         (dwarf2_read_index): Rename to...
4203         (dwarf2_read_gdb_index): ... this, update all callers.
4204
4205 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4206
4207         * gdb/hppa-linux-nat.c
4208         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4209         hppa_linux_nat_target::fetch_registers.
4210
4211 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4212
4213         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4214         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4215         (AARCH64_DWARF_SVE_FFR): Likewise.
4216         (AARCH64_DWARF_SVE_P0): Likewise.
4217         (AARCH64_DWARF_SVE_Z0): Likewise.
4218
4219 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4220
4221         * common/common-regcache.h (raw_compare): New function.
4222         * regcache.c (regcache::raw_compare): Likewise.
4223         * regcache.h (regcache::raw_compare): New declaration.
4224
4225 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4226
4227         * common/common-regcache.h (reg_buffer_common): New structure.
4228         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4229         (reg_buffer::raw_supply): Likewise.
4230         (reg_buffer::raw_supply_integer): Likewise.
4231         (reg_buffer::raw_supply_zeroed): Likewise.
4232         (reg_buffer::raw_collect): Likewise.
4233         (reg_buffer::raw_collect_integer): Likewise.
4234         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4235         (reg_buffer::raw_supply): Likewise.
4236         (reg_buffer::raw_supply_integer): Likewise.
4237         (reg_buffer::raw_supply_zeroed): Likewise.
4238         (reg_buffer::raw_collect): Likewise.
4239         (reg_buffer::raw_collect_integer): Likewise.
4240
4241 2018-06-10  Tom Tromey  <tom@tromey.com>
4242
4243         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4244         (class remote_state) <stop_reply_queue>: Now std::vector.
4245         (remote_state::~remote_state)
4246         (remote_target::stop_reply_queue_length): Update.
4247         (struct queue_iter_param, remove_child_of_pending_fork)
4248         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4249         (check_pending_event_prevents_wildcard_vcont_callback)
4250         (remove_stop_reply_for_inferior)
4251         (remove_stop_reply_of_remote_state)
4252         (remote_notif_remove_once_on_match)
4253         (stop_reply_match_ptid_and_ws)
4254         (remote_kill_child_of_pending_fork): Remove.
4255         (remote_target::remove_new_fork_children)
4256         (remote_target::check_pending_events_prevent_wildcard_vcont)
4257         (remote_target::discard_pending_stop_replies)
4258         (remote_target::discard_pending_stop_replies_in_queue)
4259         (remote_target::remote_notif_remove_queued_reply)
4260         (remote_target::queued_stop_reply)
4261         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4262         (remote_target::wait, remote_target::kill_new_fork_children)
4263         (remote_target::async): Update.
4264
4265 2018-06-10  Tom Tromey  <tom@tromey.com>
4266
4267         * record-full.c (record_full_arch_list_cleanups): Remove.
4268         (record_full_message): Use try/catch.
4269         (record_full_wait_cleanups): Remove.
4270         (record_full_wait_1): Use try/catch.
4271         (record_full_restore): Likewise.
4272
4273 2018-06-10  Tom Tromey  <tom@tromey.com>
4274
4275         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4276         declare VEC.  Add constructor.
4277         <in_target_beneath>: Now bool.
4278         (record_full_breakpoints): Now a std::vector, static.
4279         (record_full_sync_record_breakpoints)
4280         (record_full_init_record_breakpoints)
4281         (record_full_target::insert_breakpoint)
4282         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4283
4284 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4285
4286         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4287         * serial.c (serial_interface_lookup): Remove struct keyword.
4288
4289 2018-06-10  Tom Tromey  <tom@tromey.com>
4290
4291         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4292         method.
4293         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4294         a method.
4295         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4296         method.
4297         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4298         "beneath" as a method.
4299         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4300         Use "beneath" as a method.
4301
4302 2018-06-10  Tom Tromey  <tom@tromey.com>
4303
4304         * tracefile.c (struct trace_file_writer_deleter): New.
4305         <operator()>: Rename from trace_file_writer_xfree.
4306         (trace_file_writer_up): New typedef.
4307         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4308
4309 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4310
4311         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4312         <m_registers, m_register_status>: Change type to
4313         std::unique_ptr.
4314         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4315         XCNEWVEC.
4316
4317 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4318
4319         * common/common-regcache.h (enum register_status): Add
4320         underlying type "signed char".
4321         * regcache.h (reg_buffer) <m_register_status>: Change type to
4322         register_status *.
4323         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4324         register_status instead of signed char.
4325         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4326         (reg_buffer::get_register_status): Remove cast.
4327         (readable_regcache::raw_read): Remove cast.
4328         (readable_regcache::cooked_read): Remove cast.
4329
4330 2018-06-09  Tom Tromey  <tom@tromey.com>
4331
4332         * source.c (reverse_search_command, forward_search_command): Use
4333         scoped_fd.
4334
4335 2018-06-09  Tom Tromey  <tom@tromey.com>
4336
4337         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4338         (serial_ops_list): Now static, std::vector.
4339         (serial_interface_lookup, serial_add_interface): Update.
4340
4341 2018-06-09  Tom Tromey  <tom@tromey.com>
4342
4343         * dwarf2read.c (process_cu_includes): Update.
4344         (process_full_comp_unit): Update.
4345         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4346         std::vector.
4347
4348 2018-06-08  Paul Koning  <paul_koning@dell.com>
4349
4350         PR gdb/23252
4351
4352         * python/python.c (do_start_initialization):
4353         Avoid call to internal Python API.
4354         (init__gdb_module): New function.
4355
4356 2018-06-08  Gary Benson <gbenson@redhat.com>
4357
4358         * linux-thread-db.c (valprint.h): New include.
4359         (struct check_thread_db_info): New structure.
4360         (check_thread_db_on_load, tdb_testinfo): New static globals.
4361         (check_thread_db, check_thread_db_callback): New functions.
4362         (try_thread_db_load_1): Run integrity checks if requested.
4363         (maintenance_check_libthread_db): New function.
4364         (_initialize_thread_db): Register "maint check libthread-db"
4365         and "maint set/show check-libthread-db".
4366         * NEWS: Mention the above new commands.
4367
4368 2018-06-08  Tom Tromey  <tom@tromey.com>
4369
4370         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4371         now a method.
4372
4373 2018-06-08  Tom Tromey  <tom@tromey.com>
4374
4375         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4376
4377 2018-06-08  Tom Tromey  <tom@tromey.com>
4378
4379         * common/btrace-common.h (struct btrace_data): Add constructor,
4380         destructor, move assignment operator.
4381         <empty, clear, fini>: New methods.
4382         <format>: Initialize.
4383         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4384         (btrace_data_empty): Don't declare.
4385         * common/btrace-common.c (btrace_data_init): Remove.
4386         (btrace_data::fini): Rename from btrace_data_fini.
4387         (btrace_data::empty): Rename from btrace_data_empty.
4388         (btrace_data::clear): Rename from btrace_data_clear.  Return
4389         bool.
4390         * btrace.h (make_cleanup_btrace_data): Don't declare.
4391         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4392         (parse_xml_btrace): Update.
4393         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4394         (maint_btrace_clear_packet_history_cmd): Update.
4395
4396 2018-06-07  Pedro Alves  <palves@redhat.com>
4397
4398         * target.h (target_ops) <beneath>: Now a method.  All references
4399         updated.
4400         (class target_stack): New.
4401         * target.c (g_target_stack): New.
4402         (g_current_top_target): Delete.
4403         (current_top_target): Get the top target out of g_target_stack.
4404         (target_stack::push, target_stack::unpush): New.
4405         (push_target, unpush_target): Reimplement.
4406         (target_is_pushed): Reimplement in terms of g_target_stack.
4407         (target_ops::beneath, target_stack::find_beneath): New.
4408
4409 2018-06-07  Pedro Alves  <palves@redhat.com>
4410
4411         * target.h (find_target_beneath): Delete declaration.
4412         * target.c (find_target_beneath): Delete definition.
4413         * aix-thread.c: All callers of find_target_beneath adjusted to
4414         call target_ops::beneath instead.
4415         * bsd-uthread.c: Likewise.
4416         * linux-thread-db.c: Likewise.
4417         * ravenscar-thread.c: Likewise.
4418         * sol-thread.c: Likewise.
4419         * spu-multiarch.c: Likewise.
4420
4421 2018-06-07  Pedro Alves  <palves@redhat.com>
4422
4423         * target.h (target_ops) <beneath>: Now a method.  All references
4424         updated.
4425         (target_ops) <m_beneath>: New.
4426         * target.c (target_ops::beneath): New.
4427         * corelow.c: Adjust all references to target_ops::beneath.
4428         * linux-thread-db.c: Likewise.
4429         * make-target-delegates: Likewise.
4430         * record-btrace.c: Likewise.
4431         * record-full.c: Likewise.
4432         * remote.c: Likewise.
4433         * target.c: Likewise.
4434         * target-delegates.c: Regenerate.
4435
4436 2018-06-07  Pedro Alves  <palves@redhat.com>
4437
4438         * target.h (target_stack): Delete.
4439         (current_top_target): Declare function.
4440         * target.c (target_stack): Delete.
4441         (g_current_top_target): New.
4442         (current_top_target): New function.
4443         * auxv.c: Use current_top_target instead of target_stack
4444         throughout.
4445         * avr-tdep.c: Likewise.
4446         * breakpoint.c: Likewise.
4447         * corefile.c: Likewise.
4448         * elfread.c: Likewise.
4449         * eval.c: Likewise.
4450         * exceptions.c: Likewise.
4451         * frame.c: Likewise.
4452         * gdbarch-selftests.c: Likewise.
4453         * gnu-v3-abi.c: Likewise.
4454         * ia64-tdep.c: Likewise.
4455         * ia64-vms-tdep.c: Likewise.
4456         * infcall.c: Likewise.
4457         * infcmd.c: Likewise.
4458         * infrun.c: Likewise.
4459         * linespec.c: Likewise.
4460         * linux-tdep.c: Likewise.
4461         * minsyms.c: Likewise.
4462         * ppc-linux-nat.c: Likewise.
4463         * ppc-linux-tdep.c: Likewise.
4464         * procfs.c: Likewise.
4465         * regcache.c: Likewise.
4466         * remote.c: Likewise.
4467         * rs6000-tdep.c: Likewise.
4468         * s390-linux-nat.c: Likewise.
4469         * s390-tdep.c: Likewise.
4470         * solib-aix.c: Likewise.
4471         * solib-darwin.c: Likewise.
4472         * solib-dsbt.c: Likewise.
4473         * solib-spu.c: Likewise.
4474         * solib-svr4.c: Likewise.
4475         * solib-target.c: Likewise.
4476         * sparc-tdep.c: Likewise.
4477         * sparc64-tdep.c: Likewise.
4478         * spu-tdep.c: Likewise.
4479         * symfile.c: Likewise.
4480         * symtab.c: Likewise.
4481         * target-descriptions.c: Likewise.
4482         * target-memory.c: Likewise.
4483         * target.c: Likewise.
4484         * target.h: Likewise.
4485         * tracefile-tfile.c: Likewise.
4486         * tracepoint.c: Likewise.
4487         * valops.c: Likewise.
4488         * valprint.c: Likewise.
4489         * value.c: Likewise.
4490         * windows-tdep.c: Likewise.
4491         * mi/mi-main.c: Likewise.
4492
4493 2018-06-07  Tom Tromey  <tom@tromey.com>
4494
4495         * valprint.h (build_address_symbolic): Declare.
4496         * printcmd.c (print_address_symbolic): Update.
4497         (build_address_symbolic): Change "name" and "filename" to
4498         std::string.
4499         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4500         Update.
4501         * defs.h (build_address_symbolic): Remove declaration.
4502
4503 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4504
4505         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4506         (aarch64_vnv_type): Add function.
4507         (aarch64_pseudo_register_name): Add V regs for SVE.
4508         (aarch64_pseudo_register_type): Likewise.
4509         (aarch64_pseudo_register_reggroup_p): Likewise.
4510         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4511         (aarch64_pseudo_read_value): Add V regs for SVE.
4512         (aarch64_pseudo_write_2): Use V0 offset for SVE
4513         (aarch64_pseudo_write): Add V regs for SVE.
4514         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4515
4516 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4517
4518         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4519         (sve_vl_from_vq): Likewise.
4520
4521 2018-06-05  Tom Tromey  <tom@tromey.com>
4522
4523         * cli/cli-cmds.c (show_version): Update.
4524         * top.c (print_gdb_version): Add "interactive" parameter.
4525         Update.
4526         * main.c (captured_main_1): Update.
4527         * top.h (print_gdb_version): Add "interactive" parameter and a
4528         comment.
4529
4530 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4531
4532         * common/enum-flags.h: Add trailing semicolon to example in
4533         comment.
4534
4535 2018-06-05  Tom Tromey  <tom@tromey.com>
4536
4537         PR cli/12326:
4538         * NEWS: Add entry about pager.
4539         * utils.c (pagination_disabled_for_command): New global.
4540         (prompt_for_continue): Allow "c" response to prompt.
4541         (reinitialize_more_filter): Clear
4542         pagination_disabled_for_command.
4543         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4544
4545 2018-06-04  Tom Tromey  <tom@tromey.com>
4546
4547         * ada-lang.h (ada_lookup_symbol_list): Update.
4548         * ada-lang.c (resolve_subexp): Update.
4549         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4550         parameter.
4551         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4552         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4553         results parameter to std::vector.
4554         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4555         Update.
4556         * ada-exp.y (block_lookup): Update.
4557         (select_possible_type_sym): Change type of syms.  Remove nsyms
4558         parameter.
4559         (write_var_or_type, write_name_assoc): Update.
4560
4561 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4562
4563         * windows-nat.c (windows_nat_target::xfer_partial): Return
4564         TARGET_XFER_E_IO if we need to delegate to the target beneath
4565         but BENEATH is NULL.
4566
4567 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4568
4569         * Makefile.in (config.status): Add configure.nat as a
4570         dependency.
4571
4572 2018-06-04  Tom Tromey  <tom@tromey.com>
4573
4574         * cp-name-parser.y (cpname_state): Add method declarations.
4575         (HANDLE_QUAL): Update.
4576         (cpname_state::d_grab, cpname_state::fill_comp)
4577         (cpname_state::make_operator, cpname_state::make_dtor)
4578         (cpname_state::make_builtin_type, cpname_state::make_name)
4579         (cpname_state::d_qualify, cpname_state::d_int_type)
4580         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4581         (%union): Move earlier.
4582
4583 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4584
4585         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4586
4587 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4588
4589         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4590         (aarch64_pseudo_write_1): Likewise.
4591         (aarch64_pseudo_read_value): Use helper.
4592         (aarch64_pseudo_write): Likewise.
4593
4594 2018-06-04  Pedro Alves  <palves@redhat.com>
4595
4596         * darwin-nat.c (darwin_ops): Delete.
4597         (darwin_attach_pid): Use get_native_target.
4598
4599 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4600
4601         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4602         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4603
4604 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4605
4606         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4607         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4608         (aarch64_gdbarch_init): Check for SVE.
4609         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4610
4611 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4612
4613         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4614         * aarch64-tdep.h (aarch64_read_description): Likewise.
4615         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4616         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4617         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4618         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4619         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4620
4621 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4622
4623         * value.c (value_fetch_lazy_bitfield): New.
4624         (value_fetch_lazy_memory): New.
4625         (value_fetch_lazy_register): New.
4626         (value_fetch_lazy): Factor out to smaller functions.
4627
4628 2018-06-01  Tom Tromey  <tom@tromey.com>
4629
4630         * cp-name-parser.y (backslashable, represented): Now const.
4631
4632 2018-06-01  Tom Tromey  <tom@tromey.com>
4633
4634         * cp-name-parser.y: Include parser-defs.h.
4635         (parser_fprintf): Remove declaration.
4636
4637 2018-06-01  Tom Tromey  <tom@tromey.com>
4638
4639         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4640         %parse-param.
4641         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4642         (global_result): Remove globals.
4643         (struct cpname_state): New.
4644         (yyparse): Don't declare.
4645         (yylex, yyerror): Move declarations after %union.
4646         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4647         (make_name): Add state parameter.
4648         Update all callers.
4649         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4650         parameter.
4651         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4652         Update.
4653         (yylex): Add lvalp, state parameters.
4654         (yyerror): Add state parameter.
4655         (cp_demangled_name_to_comp): Update.
4656
4657 2018-06-01  Tom Tromey  <tom@tromey.com>
4658
4659         * cp-name-parser.y (parser_fprintf): Declare.
4660         (GDB_YY_REMAP_PREFIX): Define.
4661         Include yy-remap.h.  Don't redefine yy* identifiers.
4662
4663 2018-06-01  Tom Tromey  <tom@tromey.com>
4664
4665         * python/py-type.c (typy_legacy_template_argument): Update.
4666         * cp-support.h (cp_demangled_name_to_comp): Update.
4667         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4668         parameter to be a "std::string *".
4669         (main): Update.
4670
4671 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4672
4673         * ada-lex.l: Include "diagnostics.h" instead of
4674         "common/diagnostics.h".
4675         * unittests/environ-selftests.c: Likewise.
4676         * common/diagnostics.h: Moved to ../include.
4677
4678 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4679
4680         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4681         to language_mode_manual while calling breakpoint_re_set_one.
4682
4683 2018-06-01  Tom Tromey  <tom@tromey.com>
4684
4685         * valops.c (value_cast_structs, destructor_name_p): Update.
4686         * symtab.c (gdb_mangle_name): Update.
4687         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4688         Update.
4689         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4690         (pascal_object_print_value_fields, pascal_object_print_value):
4691         Update.
4692         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4693         * linespec.c (find_methods): Update.
4694         * gdbtypes.h (type_name_no_tag): Remove.
4695         (type_name_or_error): Rename from type_name_no_tag_or_error.
4696         * gdbtypes.c (type_name_no_tag): Remove.
4697         (type_name_or_error): Rename from type_name_no_tag_or_error.
4698         (lookup_struct_elt_type, check_typedef): Update.
4699         * expprint.c (print_subexp_standard): Update.
4700         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4701         * d-namespace.c (d_lookup_nested_symbol): Update.
4702         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4703         (cp_print_class_member): Update.
4704         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4705         * completer.c (add_struct_fields): Update.
4706         * c-typeprint.c (cp_type_print_derivation_info)
4707         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4708         Update.
4709         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4710         (ada_prefer_type, ada_is_exception_sym): Update.
4711
4712 2018-06-01  Tom Tromey  <tom@tromey.com>
4713
4714         * valops.c (enum_constant_from_type, value_namespace_elt)
4715         (value_maybe_namespace_elt): Update.
4716         * valarith.c (find_size_for_pointer_math): Update.
4717         * target-descriptions.c (make_gdb_type): Update.
4718         * symmisc.c (print_symbol): Update.
4719         * stabsread.c (define_symbol, read_type)
4720         (complain_about_struct_wipeout, add_undefined_type)
4721         (cleanup_undefined_types_1): Update.
4722         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4723         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4724         (rust_internal_print_type, rust_composite_type)
4725         (rust_evaluate_funcall, rust_evaluate_subexp)
4726         (rust_inclusive_range_type_p): Update.
4727         * python/py-type.c (typy_get_tag): Update.
4728         * p-typeprint.c (pascal_type_print_base): Update.
4729         * mdebugread.c (parse_symbol, parse_type): Update.
4730         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4731         Update.
4732         * guile/scm-type.c (gdbscm_type_tag): Update.
4733         * go-lang.c (sixg_string_p): Update.
4734         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4735         Update.
4736         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4737         (TYPE_TAG_NAME): Remove.
4738         * gdbtypes.c (type_name_no_tag): Simplify.
4739         (check_typedef, check_types_equal, recursive_dump_type)
4740         (copy_type_recursive, arch_composite_type): Update.
4741         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4742         in summary mode when needed.
4743         * eval.c (evaluate_funcall): Update.
4744         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4745         (process_structure_scope, read_enumeration_type)
4746         (read_namespace_type, read_module_type, determine_prefix): Update.
4747         * cp-support.c (inspect_type): Update.
4748         * coffread.c (process_coff_symbol, decode_base_type): Update.
4749         * c-varobj.c (c_is_path_expr_parent): Update.
4750         * c-typeprint.c (c_type_print_base_struct_union): Update.
4751         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4752         summary when using C language.
4753         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4754         (gen_maybe_namespace_elt): Update.
4755         * ada-lang.c (ada_type_name): Simplify.
4756         (empty_record, ada_template_to_fixed_record_type_1)
4757         (template_to_static_fixed_type)
4758         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4759
4760 2018-06-01  Tom Tromey  <tom@tromey.com>
4761
4762         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4763         c_print_type.
4764         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4765         (c_print_type): Update.
4766         (c_print_type): New overload.
4767         (c_type_print_varspec_prefix, c_type_print_args)
4768         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4769         (c_type_print_base_struct_union, c_type_print_base_1)
4770         (cp_type_print_method_args): Add "language" parameter.
4771         (c_type_print_base): Update.
4772         * c-lang.h (c_print_type): Add new overload.
4773
4774 2018-06-01  Tom Tromey  <tom@tromey.com>
4775
4776         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4777         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4778
4779 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4780
4781         * aarch64-tdep.c (aarch64_sve_register_names): New const
4782         var.
4783         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4784         (AARCH64_SVE_Z_REGS_NUM): New define.
4785         (AARCH64_SVE_P_REGS_NUM): Likewise.
4786         (AARCH64_SVE_NUM_REGS): Likewise.
4787
4788 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4789
4790         * nat/linux-ptrace.h [__alpha__]
4791         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4792         definitions.
4793
4794 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4795
4796         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4797         the endianness selected.
4798         * NEWS: Document `set endian auto' mode operation update.
4799
4800 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4801
4802         * Makefile.in: Add new header.
4803         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4804         (sve_vl_from_vg): Likewise.
4805         (sve_vq_from_vl): Likewise.
4806         (sve_vl_from_vq): Likewise.
4807         (sve_vq_from_vg): Likewise.
4808         (sve_vg_from_vq): Likewise.
4809         * configure.nat: Add new c file.
4810         * nat/aarch64-sve-linux-ptrace.c: New file.
4811         * nat/aarch64-sve-linux-ptrace.h: New file.
4812
4813 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4814
4815         * aarch64-linux-nat.c (aarch64_linux_read_description):
4816         Add parmeter zero.
4817         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4818         Likewise.
4819         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4820         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4821         (aarch64_gdbarch_init): Add parmeter zero.
4822         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4823         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4824         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4825         parmeter.
4826         * doc/gdb.texinfo: Describe SVE feature
4827         * features/aarch64-sve.c: New file.
4828
4829 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4830
4831         PR gdb/23210
4832         * gdbarch.sh (significant_addr_bit): Default to zero when
4833         not set by target architecture.
4834         * gdbarch.c: Re-generated.
4835         * utils.c (address_significant): Update.
4836
4837 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4838
4839         * stack.c (func_command): Remove trailing newline in call to error.
4840
4841 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4842
4843         * regcache.h (regcache_raw_collect): Remove, update callers to
4844         use regcache::raw_collect.
4845         * regcache.c (regcache_raw_collect): Remove.
4846
4847 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4848
4849         * regcache.h (regcache_raw_supply): Remove, update callers to
4850         use detached_regcache::raw_supply.
4851         * regcache.c (regcache_raw_supply): Remove.
4852
4853 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4854
4855         * regcache.h (regcache_cooked_write_part): Remove, update
4856         callers to use regcache::cooked_write_part.
4857         * regcache.c (regcache_cooked_write_part): Remove.
4858
4859 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4860
4861         * regcache.h (regcache_cooked_read_part): Remove, update callers
4862         to use readable_regcache::cooked_read_part.
4863         * regcache.c (regcache_cooked_read_part): Remove.
4864
4865 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4866
4867         * regcache.h (regcache_cooked_read_value): Remove, update
4868         callers to use readable_regcache::cooked_read_value.
4869         * regcache.c (regcache_cooked_read_value): Remove.
4870
4871 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4872
4873         * regcache.h (regcache_cooked_write): Remove, update callers to
4874         use regcache::cooked_write.
4875         * regcache.c (regcache_cooked_write): Remove.
4876
4877 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4878
4879         * regcache.h (regcache_invalidate): Remove, update callers to
4880         use detached_regcache::invalidate instead.
4881         * regcache.c (regcache_invalidate): Remove.
4882
4883 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4884
4885         * regcache.h (regcache_raw_write_part): Remove, update callers
4886         to use regcache::raw_write_part instead.
4887         * regcache.c (regcache_raw_write_part): Remove.
4888
4889 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4890
4891         * regcache.h (regcache_raw_read_part): Remove, update callers to
4892         use readable_regcache::raw_read_part instead.
4893         * regcache.c (regcache_raw_read_part): Remove.
4894
4895 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4896
4897         * regcache.h (regcache_cooked_read): Remove, update callers to
4898         use readable_regcache::cooked_read instead.
4899         * regcache.c (regcache_cooked_read): Remove.
4900
4901 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4902
4903         * regcache.h (regcache_raw_write): Remove, update callers to use
4904         regcache::raw_write instead.
4905         * regcache.c (regcache_raw_write): Remove.
4906
4907 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4908
4909         * regcache.h (regcache_raw_read): Remove, update callers to use
4910         readable_regcache::raw_read instead.
4911         * regcache.c (regcache_raw_read): Remove.
4912
4913 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4914
4915         * regcache.h (regcache_raw_update): Remove, update callers to
4916         use readable_regcache::raw_update instead.
4917         * regcache.c (regcache_raw_update): Remove.
4918
4919 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4920
4921         * regcache.h (regcache_register_status): Remove, update callers
4922         to use reg_buffer::get_register_status directly instead.
4923         * regcache.c (regcache_register_status): Remove.
4924
4925 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4926
4927         * regcache.h (regcache_get_ptid): Remove, update all callers to
4928         call regcache::ptid instead.
4929         * regcache.c (regcache_get_ptid): Remove.
4930
4931 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4932
4933         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4934
4935 2018-05-30  Pedro Alves  <palves@redhat.com>
4936
4937         * common/common-exceptions.h (exception_rethrow): Use
4938         ATTRIBUTE_NORETURN.
4939
4940 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
4941
4942         * breakpoint.c (print_solib_event, check_status_catch_solib):
4943         Remove struct keyword in range-based for loops.
4944         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4945         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4946         Likewise.
4947         * linespec.c (find_superclass_methods, search_minsyms_for_name):
4948         Likewise.
4949         * symfile.c (addr_info_make_relative): Likewise.
4950         * thread.c (value_in_thread_stack_temporaries): Likewise.
4951
4952 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
4953
4954         PR gdb/16841
4955         * valops.c (value_struct_elt_for_reference): Call check_typedef on
4956         aggregate type to get its real type before accessing it.
4957
4958 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
4959
4960         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4961         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4962         * coff-pe-read.c (add_pe_forwarded_sym): Replace
4963         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4964         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4965         * jit.c (jit_breakpoint_re_set_internal): Likewise.
4966         * printcmd.c (info_address_command): Likewise.
4967
4968 2018-05-29  Tom Tromey  <tom@tromey.com>
4969
4970         * windows-nat.c (handle_exception): Update fall-through comment.
4971
4972 2018-05-29  Tom Tromey  <tom@tromey.com>
4973
4974         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
4975         (struct program_space) <added_solibs>: Now a std::vector.
4976         * breakpoint.c (print_solib_event): Update.
4977         (check_status_catch_solib): Update.
4978         * progspace.c (clear_program_space_solib_cache): Update.
4979         * solib.c (update_solib_list): Update.
4980
4981 2018-05-29  Tom Tromey  <tom@tromey.com>
4982
4983         * python/py-type.c (typy_richcompare): Update.
4984         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4985         * gdbtypes.h (types_deeply_equal): Return bool.
4986         (types_equal): Likewise.
4987         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
4988         declare VEC.
4989         (check_types_equal): Change worklist to std::vector.  Return
4990         bool.
4991         (struct type_equality_entry): Add constructor.
4992         (compare_maybe_null_strings): Return bool.
4993         (check_types_worklist): Return bool.  Change worklist to
4994         std::vector.
4995         (types_deeply_equal): Use std::vector.
4996         (types_equal): Return bool.
4997         (compare_maybe_null_strings): Simplify.
4998
4999 2018-05-29  Tom Tromey  <tom@tromey.com>
5000
5001         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5002
5003 2018-05-29  Tom Tromey  <tom@tromey.com>
5004
5005         * objc-lang.h: Don't include cp-support.h.
5006         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5007         declare VEC.
5008
5009 2018-05-27  Tom Tromey  <tom@tromey.com>
5010
5011         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5012
5013 2018-05-25  Tom Tromey  <tom@tromey.com>
5014
5015         * value.c (value::location): Initialize.
5016
5017 2018-05-25  Tom Tromey  <tom@tromey.com>
5018
5019         * dbxread.c (init_bincl_list): Remove.
5020         (bincl_list): Now a std::vector.
5021         (bincls_allocated, next_bincl): Remove.
5022         (free_bincl_list, do_free_bincl_list_cleanup)
5023         (make_cleanup_free_bincl_list): Remove.
5024         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5025         unique_xmalloc_ptr.
5026         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5027         (struct header_file_location): Add constructor.
5028         (add_bincl_to_list): Remove.
5029
5030 2018-05-25  Tom Tromey  <tom@tromey.com>
5031
5032         * tui/tui.c (tui_enable): Update.
5033         * mi/mi-interp.c (mi_interp::init): Update.
5034         * interps.h (class interp) <name>: New method.
5035         <m_name>: Rename from name.
5036         (~scoped_restore_interp): Update.
5037         * interps.c (interp::interp): Update.
5038         (interp_add, interp_set, interp_lookup_existing)
5039         (current_interp_named_p): Update.
5040
5041 2018-05-25  Tom Tromey  <tom@tromey.com>
5042
5043         * interps.c (interp_name): Remove.
5044         * mi/mi-interp.c (mi_interp::init): Update.
5045         * interps.h (interp_name): Remove.
5046         (~scoped_restore_interp): Update.
5047         * tui/tui.c (tui_enable): Update.
5048
5049 2018-05-25  Tom Tromey  <tom@tromey.com>
5050
5051         * utils.c (fputs_maybe_filtered): Update.
5052         * linespec.c (decode_line_full): Update.
5053         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5054         (mi_print_breakpoint_for_event, mi_solib_loaded)
5055         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5056         (mi_user_selected_context_changed): Update.
5057         * mi/mi-main.c (mi_execute_command): Update.
5058         * cli/cli-script.c (execute_control_command): Update.
5059         * python/python.c (execute_gdb_command): Update.
5060         * solib.c (info_sharedlibrary_command): Update.
5061         * interps.c (interp_ui_out): Remove.
5062         * interps.h (interp_ui_out): Remove.
5063
5064 2018-05-25  Tom Tromey  <tom@tromey.com>
5065
5066         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5067         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5068         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5069
5070 2018-05-25  Tom Tromey  <tom@tromey.com>
5071
5072         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5073         * interps.c (interp_exec): Use scoped_restore.
5074
5075 2018-05-25  Tom Tromey  <tom@tromey.com>
5076
5077         * remote.c (remote_target::remote_file_get): Use
5078         gdb::byte_vector.
5079         (remote_target::remote_file_put): Likewise.
5080
5081 2018-05-25  Tom Tromey  <tom@tromey.com>
5082
5083         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5084         a std::string.
5085         (get_pe_section_index, add_pe_exported_sym): Update.
5086         (read_pe_exported_syms): Use gdb::def_vector.
5087
5088 2018-05-25  Tom Tromey  <tom@tromey.com>
5089
5090         * frame.c (remove_prev_frame): Remove.
5091         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5092
5093 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5094
5095         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5096         Remove prototypes.
5097         * mips-linux-nat.c (supply_fpregset): Always call
5098         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5099         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5100         `mips_fill_fpregset'.
5101         * mips-linux-tdep.c (mips_supply_fpregset)
5102         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5103         (mips_fill_fpregset_wrapper): Remove functions.
5104         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5105         (mips_linux_fpregset): Remove variable.
5106         (mips_linux_iterate_over_regset_sections): Use
5107         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5108         (mips_linux_o32_sigframe_init): Remove comment.
5109
5110 2018-05-25  Pedro Alves  <palves@redhat.com>
5111
5112         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5113         (struct readahead_cache, struct packet_reg, struct
5114         remote_arch_state, class remote_state): Move higher up in the
5115         file.
5116         (remote_target::m_remote_state): Now an object instead of a pointer.
5117         (remote_target::get_remote_state): Adjust.
5118
5119 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5120
5121         * stack.c (select_and_print_frame): Delete.
5122         (struct function_bounds): Move struct within function.
5123         (func_command): Most content moved into new function
5124         find_frame_for_function, use new function, print result, add
5125         function comment.
5126         (find_frame_for_function): New function, now returns a result.
5127
5128 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5129
5130         * stack.c (iterate_over_block_arg_vars): Fix comment.
5131         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5132
5133 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5134
5135         PR gdb/23203
5136         * frame.c
5137         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5138         Define.
5139         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5140         Define.
5141         * frame.h (class scoped_restore_selected_frame): New class.
5142         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5143         of any exception, use scoped_restore_selected_frame to restore the
5144         frame instead.
5145
5146 2018-05-24  Pedro Alves  <palves@redhat.com>
5147
5148         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5149         override.
5150
5151 2018-05-23  Tom Tromey  <tom@tromey.com>
5152
5153         * complaints.c (struct complaints): Remove.
5154         (symfile_complaint_book): Remove.
5155         (series): New global.
5156         (complaint_internal): Update.
5157         (clear_complaints): Update.
5158
5159 2018-05-23  Tom Tromey  <tom@tromey.com>
5160
5161         * complaints.c (counters): New global.
5162         (struct complain): Remove.
5163         (struct complaints) <root>: Remove.
5164         (complaint_sentinel): Remove.
5165         (symfile_complaint_book): Update.
5166         (find_complaint) Remove.
5167         (complaint_internal, clear_complaints): Update.
5168
5169 2018-05-23  Tom Tromey  <tom@tromey.com>
5170
5171         * complaints.c (struct complain) <file, line>: Remove.
5172         (find_complaint): Remove file, line parameters.
5173         (complaint_internal): Update.
5174
5175 2018-05-23  Tom Tromey  <tom@tromey.com>
5176
5177         * complaints.c (vcomplaint): Remove.
5178         (complaint_internal) Merge in contents of vcomplaint.
5179
5180 2018-05-23  Tom Tromey  <tom@tromey.com>
5181
5182         * complaints.c (struct complaints) <explanation>: Remove.
5183         (symfile_explanations): Remove.
5184         (symfile_complaint_book): Update.
5185         (vcomplaint): Update.
5186         (struct explanation): Remove.
5187
5188 2018-05-23  Tom Tromey  <tom@tromey.com>
5189
5190         * complaints.c (symfile_complaints): Remove.
5191         (complaint_internal): Remove "complaints" parameter.
5192         (clear_complaints, vcomplaint): Remove "c" parameter.
5193         (get_complaints): Remove.
5194         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5195         (dwarf2_debug_line_missing_file_complaint)
5196         (dwarf2_debug_line_missing_end_sequence_complaint)
5197         (dwarf2_complex_location_expr_complaint)
5198         (dwarf2_const_value_length_mismatch_complaint)
5199         (dwarf2_section_buffer_overflow_complaint)
5200         (dwarf2_macro_malformed_definition_complaint)
5201         (dwarf2_invalid_attrib_class_complaint)
5202         (create_addrmap_from_index, dw2_symtab_iter_next)
5203         (dw2_expand_marked_cus)
5204         (dw2_debug_names_iterator::find_vec_in_debug_names)
5205         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5206         (create_debug_type_hash_table, init_cutu_and_read_dies)
5207         (partial_die_parent_scope, add_partial_enumeration)
5208         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5209         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5210         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5211         (create_cus_hash_table, create_dwp_hash_table)
5212         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5213         (dwarf2_rnglists_process, dwarf2_ranges_process)
5214         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5215         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5216         (handle_struct_member_die, process_structure_scope)
5217         (read_array_type, read_common_block, read_module_type)
5218         (read_tag_pointer_type, read_typedef, read_base_type)
5219         (read_subrange_type, load_partial_dies, partial_die_info::read)
5220         (partial_die_info::read, partial_die_info::read)
5221         (partial_die_info::read, read_checked_initial_length_and_offset)
5222         (dwarf2_string_attr, read_formatted_entries)
5223         (dwarf_decode_line_header)
5224         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5225         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5226         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5227         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5228         (get_signatured_type, get_DW_AT_signature_type)
5229         (decode_locdesc, file_file_name, consume_improper_spaces)
5230         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5231         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5232         (dwarf2_symbol_mark_computed, set_die_type)
5233         (read_attribute_value): Update.
5234         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5235         Update.
5236         * dbxread.c (unknown_symtype_complaint)
5237         (lbrac_mismatch_complaint, repeated_header_complaint)
5238         (set_namestring, function_outside_compilation_unit_complaint)
5239         (read_dbx_symtab, process_one_symbol): Update.
5240         * gdbtypes.c (stub_noname_complaint): Update.
5241         * windows-nat.c (handle_unload_dll): Update.
5242         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5243         (decode_base_type): Update.
5244         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5245         (eb_complaint, record_include_begin, record_include_end)
5246         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5247         (process_xcoff_symbol, read_symbol)
5248         (function_outside_compilation_unit_complaint)
5249         (scan_xcoff_symtab): Update.
5250         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5251         * buildsym.c (finish_block_internal, make_blockvector)
5252         (end_symtab_get_static_block, augment_type_symtab): Update.
5253         * dtrace-probe.c (dtrace_process_dof)
5254         (dtrace_static_probe_ops::get_probes): Update.
5255         * complaints.h (struct complaint): Don't declare.
5256         (symfile_complaints): Remove.
5257         (complaint_internal): Remove "complaints" parameter.
5258         (complaint): Likewise.
5259         (clear_complaints): Likewise.
5260         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5261         (reread_symbols): Update.
5262         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5263         (dwarf2_frame_cache, decode_frame_entry): Update.
5264         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5265         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5266         (info_selectors_command): Update.
5267         * macrotab.c (macro_include, check_for_redefinition)
5268         (macro_undef): Update.
5269         * objfiles.c (filter_overlapping_sections): Update.
5270         * stabsread.c (invalid_cpp_abbrev_complaint)
5271         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5272         (define_symbol, error_type, read_type, rs6000_builtin_type)
5273         (stabs_method_name_from_physname, read_member_functions)
5274         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5275         (attach_fields_to_type, complain_about_struct_wipeout)
5276         (read_range_type, read_args, common_block_start)
5277         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5278         Update.
5279         * mdebugread.c (index_complaint, unknown_ext_complaint)
5280         (basic_type_complaint, bad_tag_guess_complaint)
5281         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5282         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5283         (parse_procedure, parse_lines)
5284         (function_outside_compilation_unit_complaint)
5285         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5286         (bad_tag_guess_complaint, reg_value_complaint): Update.
5287         * cp-support.c (demangled_name_complaint): Update.
5288         * macroscope.c (sal_macro_scope): Update.
5289         * dwarf-index-write.c (class debug_names): Update.
5290
5291 2018-05-23  Tom Tromey  <tom@tromey.com>
5292
5293         * complaints.c (clear_complaints): Remove "noisy" parameter.
5294         * complaints.h (clear_complaints): Update.
5295         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5296         (reread_symbols): Update.
5297
5298 2018-05-23  Tom Tromey  <tom@tromey.com>
5299
5300         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5301         SUBSEQUENT_MESSAGE.
5302         (vcomplaint, clear_complaints): Update.
5303         (symfile_explanations): Remove some messages.
5304
5305 2018-05-23  Tom Tromey  <tom@tromey.com>
5306
5307         * complaints.c (internal_complaint): Remove.
5308         * complaints.h (internal_complaint): Remove.
5309
5310 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5311
5312         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5313
5314 2018-05-22  Pedro Alves  <palves@redhat.com>
5315
5316         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5317         (remote_fileio_badfd, remote_fileio_return_errno)
5318         (remote_fileio_return_success, remote_fileio_func_open)
5319         (remote_fileio_func_open, remote_fileio_func_close)
5320         (remote_fileio_func_read, remote_fileio_func_write)
5321         (remote_fileio_func_lseek, remote_fileio_func_rename)
5322         (remote_fileio_func_unlink, remote_fileio_func_stat)
5323         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5324         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5325         remote_target parameter.
5326         (remote_fio_func_map) <func>: Add remote_target parameter.
5327         (do_remote_fileio_request, remote_fileio_request):
5328         * remote-fileio.h (remote_fileio_request):
5329         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5330         remote_target parameter.
5331         (remote_notif_process, handle_notification): Adjust to pass down
5332         the remote.
5333         (remote_notif_state_allocate): Add remote_target parameter.  Save
5334         it.
5335         * remote-notif.h (struct remote_target): Forward declare.
5336         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5337         remote_target parameter.
5338         (struct remote_notif_state) <remote>: New field.
5339         (remote_notif_ack, remote_notif_parse): Add remote_target
5340         parameter.
5341         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5342         remote_target parameter.
5343         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5344         (threads_listing_context, rmt_thread_action, protocol_feature)
5345         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5346         (packet_result, struct threads_listing_context, remote_state):
5347         Move definitions and declarations higher up.
5348         (remote_target) <~remote_target>: Declare.
5349         (remote_download_command_source, remote_file_put, remote_file_get)
5350         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5351         (remote_hostio_pread_vFile, remote_hostio_send_command)
5352         (remote_hostio_set_filesystem, remote_hostio_open)
5353         (remote_hostio_close, remote_hostio_unlink, remote_state)
5354         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5355         (get_memory_write_packet_size, get_memory_read_packet_size)
5356         (append_pending_thread_resumptions, remote_detach_1)
5357         (append_resumption, remote_resume_with_vcont)
5358         (add_current_inferior_and_thread, wait_ns, wait_as)
5359         (process_stop_reply, remote_notice_new_inferior)
5360         (process_initial_stop_replies, remote_add_thread)
5361         (btrace_sync_conf, remote_btrace_maybe_reopen)
5362         (remove_new_fork_children, kill_new_fork_children)
5363         (discard_pending_stop_replies, stop_reply_queue_length)
5364         (check_pending_events_prevent_wildcard_vcont)
5365         (discard_pending_stop_replies_in_queue, stop_reply)
5366         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5367         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5368         (remote_interrupt_as, remote_interrupt_ns)
5369         (remote_get_noisy_reply, remote_query_attached)
5370         (remote_add_inferior, remote_current_thread, get_current_thread)
5371         (set_thread, set_general_thread, set_continue_thread)
5372         (set_general_process, write_ptid)
5373         (remote_unpack_thread_info_response, remote_get_threadinfo)
5374         (parse_threadlist_response, remote_get_threadlist)
5375         (remote_threadlist_iterator, remote_get_threads_with_ql)
5376         (remote_get_threads_with_qxfer)
5377         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5378         (get_offsets, remote_check_symbols, remote_supported_packet)
5379         (remote_query_supported, remote_packet_size)
5380         (remote_serial_quit_handler, remote_detach_pid)
5381         (remote_vcont_probe, remote_resume_with_hc)
5382         (send_interrupt_sequence, interrupt_query)
5383         (remote_notif_get_pending_events, fetch_register_using_p)
5384         (send_g_packet, process_g_packet, fetch_registers_using_g)
5385         (store_register_using_P, store_registers_using_G)
5386         (set_remote_traceframe, check_binary_download)
5387         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5388         (remote_xfer_live_readonly_partial, remote_read_bytes)
5389         (remote_send_printf, remote_flash_write, readchar)
5390         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5391         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5392         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5393         (extended_remote_disable_randomization, extended_remote_run)
5394         (send_environment_packet, extended_remote_environment_support)
5395         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5396         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5397         (packet_command): Now methods of ...
5398         (remote_target): ... this class.
5399         (m_remote_state) <remote_target>: New field.
5400         (struct remote_state) <stop_reply_queue,
5401         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5402         fields.
5403         (remote_state::remote_state): Allocate stop_reply_queue.
5404         (remote_state): Delete global.
5405         (get_remote_state_raw): Delete.
5406         (remote_target::get_remote_state): Allocate m_remote_state on
5407         demand.
5408         (get_current_remote_target): New.
5409         (remote_ops, extended_remote_ops): Delete.
5410         (wait_forever_enabled_p, remote_async_inferior_event_token):
5411         Delete, moved to struct remote_state.
5412         (remote_target::close): Delete self.  Destruction bits split to
5413         ...
5414         (remote_target::~remote_target): ... this.
5415         (show_memory_packet_size): Adjust to use
5416         get_current_remote_target.
5417         (struct protocol_feature) <func>: Add remote_target parameter.
5418         All callers adjusted.
5419         (curr_quit_handler_target): New.
5420         (remote_serial_quit_handler): Reimplement.
5421         (remote_target::open_1): Adjust to use get_current_remote_target.
5422         Heap-allocate remote_target/extended_remote_target instances.
5423         (vcont_builder::vcont_builder): Add remote_target parameter, and
5424         save it in m_remote.  All callers adjusted.
5425         (vcont_builder::m_remote): New field.
5426         (vcont_builder::restart, vcont_builder::flush)
5427         (vcont_builder::push_action): Use it.
5428         (remote_target::commit_resume): Use it.
5429         (struct queue_iter_param) <remote>: New field.
5430         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5431         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5432         (check_pending_event_prevents_wildcard_vcont_callback)
5433         (remote_target::check_pending_events_prevent_wildcard_vcont)
5434         (remote_target::discard_pending_stop_replies)
5435         (remote_target::discard_pending_stop_replies_in_queue)
5436         (remote_target::remote_notif_remove_queued_reply): Fill in
5437         'remote' field.
5438         (remote_notif_get_pending_events): New.
5439         (remote_target::readchar, remote_target::remote_serial_write):
5440         Save/restore curr_quit_handler_target.
5441         (putpkt): New.
5442         (kill_new_fork_children): Fill in 'remote' field.
5443         (packet_command): Use get_current_remote_target, defer to
5444         remote_target method of same name.
5445         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5446         parameter, and save it in m_remote.  All callers adjusted.
5447         (scoped_remote_fd::release): Use m_remote.
5448         (scoped_remote_fd::m_remote): New field.
5449         (remote_file_put, remote_file_get, remote_file_delete): Use
5450         get_current_remote_target, defer to remote_target method of same
5451         name.
5452         (remote_btrace_reset): Add remote_state paremeter.  Update all
5453         callers.
5454         (remote_async_inferior_event_handler). Pass down 'data'.
5455         (remote_new_objfile): Use get_current_remote_target.
5456         (remote_target::vcont_r_supported): New.
5457         (set_range_stepping): Use get_current_remote_target and
5458         remote_target::vcont_r_supported.
5459         (_initialize_remote): Don't allocate 'remote_state' and
5460         'stop_reply_queue' globals.
5461         * remote.h (struct remote_target): Forward declare.
5462         (getpkt, putpkt, remote_notif_get_pending_events): Add
5463         'remote_target' parameter.
5464
5465 2018-05-22  Pedro Alves  <palves@redhat.com>
5466
5467         * remote.c (vcont_builder): Now a class.  Make all data members
5468         private.
5469         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5470         Declare methods.
5471         (vcont_builder_restart): Rename to ...
5472         (vcont_builder::restart): ... this.
5473         (vcont_builder_flush): Rename to ...
5474         (vcont_builder::flush): ... this.
5475         (vcont_builder_push_action): Rename to ...
5476         (vcont_builder::push_action): ... this.
5477         (remote_target::commit_resume): Adjust.
5478
5479 2018-05-22  Pedro Alves  <palves@redhat.com>
5480
5481         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5482         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5483         (get_fixed_memory_packet_size): New.
5484         (get_memory_packet_size): Use it.
5485         (set_memory_packet_size): Don't override the config size with
5486         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5487         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5488         Don't refer to get_memory_packet_size if not connected to a remote
5489         target.  Show "(default)" if configured size is 0.
5490
5491 2018-05-22  Pedro Alves  <palves@redhat.com>
5492
5493         * remote.c (remote_target::mourn_inferior): Move
5494         discard_pending_stop_replies call here from ...
5495         (_initialize_remote): ... here.
5496
5497 2018-05-22  Pedro Alves  <palves@redhat.com>
5498
5499         * remote.c (compare_section_command): Remove set_general_process
5500         call.
5501
5502 2018-05-22  Pedro Alves  <palves@redhat.com>
5503
5504         * remote.c (struct packet_reg, struct remote_arch_state):
5505         Move higher up in the file.
5506         (remote_state) <m_arch_states>: Store remote_arch_state values
5507         instead of remote_arch_state pointers.
5508         (remote_state::get_remote_arch_state): Adjust.
5509
5510 2018-05-22  Pedro Alves  <palves@redhat.com>
5511
5512         * remote.c: Include <unordered_map>.
5513         (remote_state): Now a class.
5514         (remote_state) <get_remote_arch_state>: Declare method.
5515         <get_remote_arch_state>: New field.
5516         (remote_arch_state) <remote_arch_state>: Declare ctor.
5517         <regs>: Now a unique_ptr.
5518         (remote_gdbarch_data_handle): Delete.
5519         (get_remote_arch_state): Delete.
5520         (remote_state::get_remote_arch_state): New.
5521         (get_remote_state): Adjust to call remote_state's
5522         get_remote_arch_state method.
5523         (init_remote_state): Delete, bits factored out to ...
5524         (remote_arch_state::remote_arch_state): ... this new method.
5525         (get_remote_packet_size, get_memory_packet_size)
5526         (process_g_packet, remote_target::fetch_registers)
5527         (remote_target::prepare_to_store, store_registers_using_G)
5528         (remote_target::store_registers, remote_target::get_trace_status):
5529         Adjust to call remote_state's method.
5530         (_initialize_remote): Remove reference to
5531         remote_gdbarch_data_handle.
5532
5533 2018-05-22  Pedro Alves  <palves@redhat.com>
5534
5535         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5536         pread>: New method declarations.
5537         (remote_target::open_1): Adjust.
5538         (readahead_cache_invalidate): Rename to ...
5539         (readahead_cache::invalidate): ... this, and adjust to be a class
5540         method.
5541         (readahead_cache_invalidate_fd): Rename to ...
5542         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5543         class method.
5544         (remote_hostio_pwrite): Adjust.
5545         (remote_hostio_pread_from_cache): Rename to ...
5546         (readahead_cache::pread): ... this, and adjust to be a class
5547         method.
5548         (remote_hostio_close): Adjust.
5549
5550 2018-05-22  Pedro Alves  <palves@redhat.com>
5551
5552         * remote.c (remote_hostio_close_cleanup): Delete.
5553         (class scoped_remote_fd): New.
5554         (remote_file_put, remote_file_get): Use it.
5555
5556 2018-05-22  Pedro Alves  <palves@redhat.com>
5557
5558         (struct vCont_action_support): Use bool and initialize all fields.
5559         (struct readahead_cache): Initialize all fields.
5560         (remote_state): Use bool and initialize all fields.
5561         (remote_state::remote_state, remote_state::~remote_state): New.
5562         (new_remote_state): Delete.
5563         (_initialize_remote): Use new to allocate remote_state.
5564
5565 2018-05-22  Pedro Alves  <palves@redhat.com>
5566             張俊芝  <zjz@zjz.name>
5567
5568         PR gdb/22973
5569         * c-exp.y: Include "c-support.h".
5570         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5571         of tolower.  Use c_ident_is_alpha to scan names.
5572         * c-lang.c: Include "c-support.h".
5573         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5574         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5575         * c-support.h: New file, with bits factored out from ...
5576         * cp-name-parser.y: ... this file.
5577         Include "c-support.h".
5578         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5579         c-support.h and renamed.
5580         (symbol_end, yylex): Adjust.
5581
5582 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5583
5584         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5585         parameter type to CORE_ADDR.
5586         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5587         parameter type in declaration to CORE_ADDR.
5588         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5589         target_auxv_search to get AT_HWCAP and use the result to get the
5590         target description.
5591         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5592         to CORE_ADDR. Remove the cast of the return value to unsigned
5593         long. Fix error predicate of target_auxv_search.
5594         (ppc_linux_nat_target::read_description): Change the type of the
5595         hwcap variable to CORE_ADDR.
5596
5597 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5598
5599         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5600         if the size of fpscr is larger than 32 bits.
5601
5602 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5603
5604         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5605         (ppc32_linux_vsxregmap): New global.
5606         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5607         regcache_supply_regset, and regcache_collect_regset.
5608         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5609         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5610         (fetch_vsx_register, store_vsx_register): Remove.
5611         (fetch_vsx_registers): Add regno parameter. Get regset using
5612         ppc_linux_vsxregset. Use regset to supply registers.
5613         (store_vsx_registers): Add regno parameter. Get regset using
5614         ppc_linux_vsxregset. Use regset to collect registers.
5615         (fetch_register): Call fetch_vsx_registers instead of
5616         fetch_vsx_register.
5617         (store_register): Call store_vsx_registers instead of
5618         store_vsx_register.
5619         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5620         new regno parameter.
5621         (store_ppc_registers): Call store_vsx_registers with -1 for the
5622         new regno parameter.
5623         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5624         (ppc_collect_vsxregset): Remove.
5625
5626 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5627
5628         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5629         offset fields.
5630         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5631         for vector register offset fields.
5632         (ppc64_fbsd_reg_offsets): Likewise.
5633         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5634         to vector register offset fields.
5635         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5636         to vector register offset fields.
5637         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5638         vector register offset fields.
5639         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5640         initializers for vector register offset fields.
5641         (rs6000_aix64_reg_offsets): Likewise.
5642         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5643         (ppc_supply_vrregset): Remove.
5644         (ppc_collect_vrregset): Remove.
5645         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5646         (ppc_linux_vrregset) : New function.
5647         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5648         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5649         (ppc32_linux_vrregset): Remove.
5650         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5651         and use result instead of ppc32_linux_vrregset.
5652         (ppc32_linux_reg_offsets): Remove initializers for vector register
5653         offset fields.
5654         (ppc64_linux_reg_offsets): Likewise.
5655         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5656         * ppc-linux-nat.c: Include regset.h.
5657         (gdb_vrregset_t): Adjust comment to account for little-endian
5658         mode.
5659         (supply_vrregset, fill_vrregset): Remove.
5660         (fetch_altivec_register, store_altivec_register): Remove.
5661         (fetch_altivec_registers): Add regno parameter. Get regset using
5662         ppc_linux_vrregset. Use regset to supply registers.
5663         (store_altivec_registers): Add regno parameter. Get regset using
5664         ppc_linux_vrregset. Use regset to collect registers.
5665         (fetch_register): Call fetch_altivec_registers instead of
5666         fetch_altivec_register.
5667         (store_register): Call store_altivec_registers instead of
5668         store_altivec_register.
5669         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5670         the new regno parameter.
5671         (store_ppc_registers): Call store_altivec_registers with -1 for
5672         the new regno parameter.
5673
5674 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5675
5676         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5677         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5678         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5679         (gdb_vrregset_t): Change array type size to
5680         PPC_LINUX_SIZEOF_VRREGSET.
5681         (gdb_vsxregset_t): Change array type size to
5682         PPC_LINUX_SIZEOF_VSXREGSET.
5683         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5684         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5685         PPC_LINUX_SIZEOF_VSXREGSET.
5686
5687 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5688
5689         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5690         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5691         nat/ppc-linux.c.
5692         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5693         ppc_linux_target_wordsize with tid.
5694         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5695         wordsize with tid.
5696         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5697         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5698         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5699         tid parameter. Remove static specifier.
5700         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5701         (ppc_linux_target_wordsize): New declaration.
5702
5703 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5704
5705         * arch/ppc-linux-common.c: New file.
5706         * arch/ppc-linux-common.h: New file.
5707         * arch/ppc-linux-tdesc.h: New file.
5708         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5709         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5710         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5711         arch/ppc-linux-tdesc.h.
5712         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5713         arch/ppc-linux-tdesc.h.
5714         (ppc_linux_nat_target::read_description): Remove target
5715         description matching code. Fill a ppc_linux_features struct and
5716         call ppc_linux_match_description with it. Move comment about ISA
5717         2.05 to ppc-linux-common.c.
5718         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5719         arch/ppc-linux-tdesc.h.
5720         (ppc_linux_core_read_description): Remove target description
5721         matching code. Fill a ppc_linux_features struct and call
5722         ppc_linux_match_description with it.
5723         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5724         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5725         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5726         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5727         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5728         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5729         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5730         (tdesc_powerpc_e500l): Remove.
5731
5732 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5733
5734         * ada-lang.c (catch_assert_command): Pass empty string instead
5735         of NULL for excep_string argument.
5736
5737 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5738
5739         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5740         the width of the requested register exceeds the width of the
5741         `ptrace' data type.
5742
5743 2018-05-21  Tom Tromey  <tom@tromey.com>
5744
5745         * printcmd.c (output_command): Remove.
5746         (output_command_const): Rename to output_command.
5747         * valprint.h (output_command): Rename from output_command_const.
5748         * tracepoint.c (trace_dump_actions): Call output_command.
5749
5750 2018-05-21  Tom Tromey  <tom@tromey.com>
5751
5752         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5753         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5754         * ada-lang.h (create_ada_exception_catchpoint): Update.
5755         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5756         std::string.
5757         (create_excep_cond_exprs, ~ada_catchpoint)
5758         (should_stop_exception, print_one_exception)
5759         (print_mention_exception, print_recreate_exception): Update.
5760         (ada_get_next_arg): Remove.
5761         (catch_ada_exception_command_split): Use std::string.  Change type
5762         of "excep_string", "cond_string".
5763         (catch_ada_exception_command): Update.
5764         (create_ada_exception_catchpoint): Change type of excep_string.
5765         (ada_exception_sal): Remove excep_string parameter.
5766         (~ada_catchpoint): Remove.
5767
5768 2018-05-21  Tom Tromey  <tom@tromey.com>
5769
5770         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5771         cleanup.
5772
5773 2018-05-21  Tom Tromey  <tom@tromey.com>
5774
5775         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5776         Return unique_xmalloc_ptr.
5777         (print_it_exception): Update.
5778
5779 2018-05-21  Tom Tromey  <tom@tromey.com>
5780
5781         * tracepoint.c (trace_dump_actions): Use std::string.
5782
5783 2018-05-21  Tom Tromey  <tom@tromey.com>
5784
5785         * symfile.c (reread_symbols): Use std::string for original_name.
5786
5787 2018-05-21  Tom Tromey  <tom@tromey.com>
5788
5789         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5790         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5791         constructor.
5792
5793 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5794
5795         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5796         instance to...
5797         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5798         * objfiles.c (get_objfile_bfd_data): Allocate
5799         objfile_per_bfd_storage with obstack_new when allocating on
5800         obstack.
5801
5802 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5803
5804         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5805         OBSTACK_ZALLOC.
5806         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5807         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5808         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5809         (add_pending): Likewise.
5810         (parse_symbol): Likewise.
5811         (parse_partial_symbols): Likewise.
5812         (psymtab_to_symtab_1): Likewise.
5813         (new_psymtab): Likewise.
5814         (elfmdebug_build_psymtabs): Likewise.
5815         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5816         * objfiles.c (get_objfile_bfd_data): Likewise.
5817         (objfile_register_static_link): Likewise.
5818         * psymtab.c (allocate_psymtab): Likewise.
5819         * stabsread.c (read_member_functions): Likewise.
5820         * xcoffread.c (xcoff_end_psymtab): Likewise.
5821
5822 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5823
5824         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5825         compiler supports std::is_trivially_constructible.
5826         * common/poison.h: Include obstack.h.
5827         (IsMallocable): Define to is_trivially_constructible if the
5828         compiler supports it, define to true_type otherwise.
5829         (xobnew): New.
5830         (XOBNEW): Redefine.
5831         (xobnewvec): New.
5832         (XOBNEWVEC): Redefine.
5833         * gdb_obstack.h (obstack_zalloc): New.
5834         (OBSTACK_ZALLOC): Redefine.
5835         (obstack_calloc): New.
5836         (OBSTACK_CALLOC): Redefine.
5837         (obstack_new): New.
5838         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5839         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5840         gdbarch.c.
5841         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5842         obstack_calloc/obstack_zalloc.
5843         (gdbarch_obstack_zalloc): Remove.
5844         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5845
5846 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5847
5848         * stack.c (backtrace_command_1): Remove useless variable int i.
5849
5850 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5851
5852         * stack.c (print_frame_info): Fix comment.
5853
5854 2018-05-18  Tom Tromey  <tom@tromey.com>
5855
5856         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5857         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5858         (~dwarf2_per_objfile): Update
5859         (dwarf2_get_dwz_file): Use new.
5860         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5861         unique_ptr.
5862
5863 2018-05-18  Tom Tromey  <tom@tromey.com>
5864
5865         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5866         unique_ptr.
5867         * dwarf2read.c (struct dwp_file): Add constructor and
5868         initializers.
5869         (open_and_init_dwp_file): Return a unique_ptr.
5870         (dwarf2_per_objfile, create_dwp_hash_table)
5871         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5872         (lookup_dwo_unit_in_dwp): Update.
5873         (open_and_init_dwp_file, get_dwp_file): Update.
5874
5875 2018-05-18  Tom Tromey  <tom@tromey.com>
5876
5877         * dwarf2read.c (dwarf2_per_objfile): Update.
5878         (struct mapped_index): Add initializers.
5879         (dwarf2_read_index): Use new.
5880         (dw2_symtab_iter_init): Update.
5881         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5882         unique_ptr.
5883
5884 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5885
5886         * dwarf2read.c (mapped_index) <total_size>: Remove.
5887
5888 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5889
5890         * unittests/format_pieces-selftests.c (test_format_specifier):
5891         Add ARI comments.
5892
5893 2018-05-18  Tom Tromey  <tom@tromey.com>
5894
5895         * c-typeprint.c (maybe_print_hole): New function.
5896         (c_print_type_struct_field_offset): Update.
5897         (c_type_print_base_struct_union): Call maybe_print_hole.
5898
5899 2018-05-17  Keith Seitz  <keiths@redhat.com>
5900
5901         * breakpoint.c (build_bpstat_chain): New function, moved from
5902         bpstat_stop_status.
5903         (bpstat_stop_status): Add optional parameter, `stop_chain'.
5904         If no stop chain is passed, call build_bpstat_chain to build it.
5905         * breakpoint.h (build_bpstat_chain): Declare.
5906         (bpstat_stop_status): Move documentation here from breakpoint.c.
5907         * infrun.c (handle_signal_stop): Before eliding inlined frames,
5908         build the stop chain and pass it to skip_inline_frames.
5909         Pass this stop chain to bpstat_stop_status.
5910         * inline-frame.c: Include breakpoint.h.
5911         (stopped_by_user_bp_inline_frame): New function.
5912         (skip_inline_frames): Add parameter `stop_chain'.
5913         Move documention to inline-frame.h.
5914         If non-NULL, use stopped_by_user_bp_inline_frame to determine
5915         whether the frame should be elided.
5916         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5917         Add moved documentation and update for new parameter.
5918
5919 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5920
5921         PR cli/14975
5922         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5923         unittests/format_pieces-selftests.c.
5924         * common/format.h (format_piece) <operator==>: New.
5925         (format_pieces) <operator[]>: Remove.
5926         * common/format.c (format_pieces::format_pieces): Handle \e.
5927         * unittests/format_pieces-selftests.c: New.
5928
5929 2018-05-17  Tom Tromey  <tom@tromey.com>
5930
5931         PR symtab/23010:
5932         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5933         (dw2_instantiate_symtab): Add skip_partial parameter.
5934         (dw2_find_last_source_symtab, dw2_map_expand_apply)
5935         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5936         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5937         (dw2_expand_symtabs_matching_one)
5938         (dw2_find_pc_sect_compunit_symtab)
5939         (dw2_debug_names_lookup_symbol)
5940         (dw2_debug_names_expand_symtabs_for_function): Update.
5941         (init_cutu_and_read_dies): Add skip_partial parameter.
5942         (process_psymtab_comp_unit, build_type_psymtabs_1)
5943         (process_skeletonless_type_unit, load_partial_comp_unit)
5944         (psymtab_to_symtab_1): Update.
5945         (load_full_comp_unit): Add skip_partial parameter.
5946         (process_imported_unit_die, dwarf2_read_addr_index)
5947         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5948         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5949         (read_signatured_type): Update.
5950
5951 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5952
5953         * value.c (release_value): Remove unused variable.
5954         (record_latest_value): Likewise.
5955         (access_value_history): Likewise.
5956         (preserve_values): Likewise.
5957
5958 2018-05-17  Tom Tromey  <tom@tromey.com>
5959
5960         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5961         Initialize.
5962
5963 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
5964
5965         PR gdb/22286
5966         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5967         Also handle registers whose width is not a multiple of
5968         PTRACE_TYPE_RET.
5969         (linux_nat_trad_target::store_register): Likewise.
5970
5971 2018-05-16  Tom Tromey  <tom@tromey.com>
5972
5973         * gdbcore.h (core_bfd): Redefine.
5974         * corelow.c (core_target::close): Update.
5975         (core_target_open): Update.
5976         * progspace.h (struct program_space) <cbfd>: Now a
5977         gdb_bfd_ref_ptr.
5978
5979 2018-05-16  Tom Tromey  <tom@tromey.com>
5980
5981         PR cli/19551:
5982         * symfile-add-flags.h (enum symfile_add_flags)
5983         <SYMFILE_NOT_FILENAME>: New constant.
5984         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
5985         objfile name from BFD.
5986         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5987         * minidebug.c (find_separate_debug_file_in_section): Put
5988         ".gnu_debugdata" into BFD's file name.
5989
5990 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
5991
5992         * regcache.c (regcache_read_ftype, regcache_write_ftype):
5993         Remove.
5994
5995 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
5996
5997         PR binutils/21446
5998         * aarch64-tdep.c (aarch64_analyze_prologue,
5999         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6000         Indicate not interested in errors.
6001
6002 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6003
6004         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6005         Supply the MIPS_ZERO_REGNUM register.
6006
6007 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6008
6009         * mips-tdep.c (mask_address_var): Make variable static.
6010
6011 2018-05-14  Tom Tromey  <tom@tromey.com>
6012
6013         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6014
6015 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6016
6017         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6018         FXSAVE_ADDR for the mxcsr register.
6019
6020 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6021
6022         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6023
6024 2018-05-11  Pedro Alves  <palves@redhat.com>
6025
6026         * corelow.c (core_target) <core_target>: No longer inline.
6027         Initialize m_core_gdbarch, m_core_vec and build the section table
6028         here.
6029         <~core_target>: New.
6030         <core_gdbarch, get_core_register_section>: New methods.
6031         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6032         factored out from ...
6033         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6034         (core_ops): Delete.
6035         (sniff_core_bfd): Add gdbarch parameter.
6036         (core_close): Delete, merged into ...
6037         (core_target::close): ... here.  Delete self.
6038         (core_close_cleanup): Delete.
6039         (core_target_open): Allocate a core_target on the heap.  Use a
6040         unique_ptr instead of a cleanup.  Bits moved into the core_target
6041         ctor.  Adjust to use core_target methods instead of globals.
6042         (get_core_register_section): Rename to ...
6043         (core_target::get_core_register_section): ... this and adjust.
6044         (struct get_core_registers_cb_data): New.
6045         (get_core_registers_cb): Use it.  Use bool.
6046         (core_target::fetch_registers, core_target::files_info)
6047         (core_target::xfer_partial, core_target::read_description)
6048         (core_target::pid_to, core_target::thread_name): Adjust to
6049         reference class fields instead of globals.
6050         * target.h (struct target_ops_deleter, target_ops_up): New.
6051
6052 2018-05-11  Pedro Alves  <palves@redhat.com>
6053
6054         * corefile.c (core_file_command): Move to corelow.c.
6055         * corelow.c (the_core_target): Delete.
6056         (core_file_command): Moved from corefile.c.  Check exec_bfd
6057         instead of the_core_target.  Use target_detach instead of calling
6058         into the_core_target directly.
6059         (maybe_say_no_core_file_now): New.
6060         (core_target::detach): Use it.
6061         (_initialize_corelow): Remove references to the_core_target.
6062         * gdbcore.h (the_core_target): Delete.
6063
6064 2018-05-11  Tom Tromey  <tromey@redhat.com>
6065             Pedro Alves  <palves@redhat.com>
6066
6067         * corefile.c (core_bfd): Remove.
6068         * gdbcore.h (core_bfd): Now a macro.
6069         * progspace.h (struct program_space) <cbfd>: New field.
6070
6071 2018-05-11  Tom Tromey  <tom@tromey.com>
6072
6073         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6074         gdb::def_vector.
6075
6076 2018-05-10  Tom Tromey  <tom@tromey.com>
6077
6078         * configure: Rebuild.
6079         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6080
6081 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6082
6083         PR server/23158:
6084         * regformats/regdat.sh: Adjust script, following the addition
6085         of the new expedite_regs parameter to init_target_desc.
6086
6087 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6088     
6089         PR gdb/23127
6090         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6091         set_gdbarch_significant_addr_bit.
6092         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6093         set_gdbarch_significant_addr_bit.
6094         * utils.c (address_significant): Update to sign extend addr.
6095
6096 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6097
6098         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6099         (xtensa_linux_init_abi): Limit tdep->num_regs by
6100         tdep->num_nopriv_regs.
6101         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6102         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6103         not initialized.
6104
6105 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6106
6107         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6108
6109 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6110
6111         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6112         (I387_MXCSR_INIT_VAL): New constant.
6113         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6114         buffer if it was supplied by the inferior.
6115         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6116         (i387_xsave_get_clear_bv): New function.
6117         (i387_supply_xsave): Only read x87 control registers from the
6118         xsave buffer if the feature is enabled, and the state will have
6119         been written, otherwise, provide a suitable default.
6120         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6121         including x87 control registers.  Update control registers if they
6122         have changed from the default value, and mark features as enabled
6123         as required.
6124         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6125
6126 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6127
6128         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6129
6130 2018-05-07  Tom Tromey  <tom@tromey.com>
6131
6132         * configure: Rebuild.
6133         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6134
6135 2018-05-07  Tom Tromey  <tom@tromey.com>
6136
6137         PR tdep/20362:
6138         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6139         bit.  Use correct value for VDIV.
6140
6141 2018-05-04  Tom Tromey  <tom@tromey.com>
6142
6143         * configure: Rebuild.
6144         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6145
6146 2018-05-04  Tom Tromey  <tom@tromey.com>
6147
6148         * linux-record.c (record_linux_system_call) <case
6149         RECORD_SYS_RECVFROM>: Add "break".
6150
6151 2018-05-04  Tom Tromey  <tom@tromey.com>
6152
6153         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6154         Add missing "break".
6155         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6156         Add missing "break".
6157
6158 2018-05-04  Tom Tromey  <tom@tromey.com>
6159
6160         * rs6000-tdep.c (ppc_process_record_op4)
6161         (ppc_process_record_op63): Add fall-through comment.
6162
6163 2018-05-04  Tom Tromey  <tom@tromey.com>
6164
6165         * i386-tdep.c (i386_process_record): Add fall-through comment.
6166
6167 2018-05-04  Tom Tromey  <tom@tromey.com>
6168
6169         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6170         comment.
6171
6172 2018-05-04  Tom Tromey  <tom@tromey.com>
6173
6174         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6175         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6176         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6177         comment.
6178         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6179         comment.
6180         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6181         comment.
6182
6183 2018-05-04  Tom Tromey  <tom@tromey.com>
6184
6185         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6186
6187 2018-05-04  Tom Tromey  <tom@tromey.com>
6188
6189         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6190         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6191         * symfile.c (section_is_mapped): Fix fall-through comment.
6192         * stabsread.c (define_symbol, read_member_functions): Fix
6193         fall-through comment.
6194         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6195         comment.
6196         * remote.c (remote_wait_as): Fix fall-through comment.
6197         * p-exp.y (yylex): Fix fall-through comment.
6198         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6199         comment.
6200         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6201         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6202         * jv-exp.y (yylex): Fix fall-through comment.
6203         * go-exp.y (lex_one_token): Fix fall-through comment.
6204         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6205         fall-through comment.
6206         * f-exp.y (yylex): Fix fall-through comment.
6207         * dwarf2read.c (process_die): Fix fall-through comments.
6208         * dbxread.c (process_one_symbol): Fix fall-through comment.
6209         * d-exp.y (lex_one_token): Fix fall-through comment.
6210         * cp-name-parser.y (yylex): Fix fall-through comment.
6211         * coffread.c (coff_symtab_read): Fix fall-through comment.
6212         * c-exp.y (lex_one_token): Fix fall-through comment.
6213         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6214         comment.
6215         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6216         comment.
6217
6218 2018-05-04  Tom Tromey  <tom@tromey.com>
6219
6220         PR python/22730:
6221         * NEWS: Mention gdb.execute change.
6222         * gdbcmd.h (execute_control_command): Don't declare.
6223         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6224         execute_control_commands, execute_control_commands_to_string.
6225         * cli/cli-script.h (execute_control_commands)
6226         (execute_control_commands_to_string): Declare.
6227         (execute_control_command): Add from_tty parameter.
6228         * cli/cli-script.c (execute_control_commands)
6229         (execute_control_commands_to_string): New functions.
6230         (execute_user_command): Use execute_control_commands.
6231         (execute_control_command_1): Add "from_tty" parameter.  Update.
6232         (execute_control_command): Likewise.
6233
6234 2018-05-04  Tom Tromey  <tom@tromey.com>
6235
6236         PR python/22731:
6237         * NEWS: Mention that breakpoint commands are writable.
6238         * python/py-breakpoint.c (bppy_set_commands): New function.
6239         (breakpoint_object_getset) <"commands">: Use it.
6240
6241 2018-05-04  Tom Tromey  <tom@tromey.com>
6242
6243         * tracepoint.c (actions_command): Update.
6244         * mi/mi-cmd-break.c (mi_command_line_array)
6245         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6246         (mi_read_next_line): Remove.
6247         (mi_cmd_break_commands): Update.
6248         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6249         function_view.
6250         * cli/cli-script.c (get_command_line): Update.
6251         (process_next_line): Use function_view.  Constify.
6252         (recurse_read_control_structure, read_command_lines)
6253         (read_command_lines_1): Change argument types to function_view.
6254         (do_define_command, document_command): Update.
6255         * breakpoint.h (check_tracepoint_command): Don't declare.
6256         * breakpoint.c (check_tracepoint_command): Remove.
6257         (commands_command_1, create_tracepoint_from_upload): Update.
6258
6259 2018-05-04  Tom Tromey  <tom@tromey.com>
6260
6261         PR gdb/11750:
6262         * cli/cli-script.h (enum command_control_type) <define_control>:
6263         New constant.
6264         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6265         (build_command_line, execute_control_command_1)
6266         (process_next_line): Likewise.
6267         (do_define_command): New function, extracted from define_command.
6268         (define_command): Use it.
6269
6270 2018-05-04  Tom Tromey  <tom@tromey.com>
6271
6272         * tracepoint.c (actions_command): Update.
6273         * cli/cli-script.h (read_command_lines): Update.
6274         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6275         (MAX_TMPBUF): Remove define.
6276         (define_command): Use string_printf.
6277         (document_command): Likewise.
6278         * breakpoint.c (commands_command_1): Update.
6279
6280 2018-05-04  Tom Tromey  <tom@tromey.com>
6281
6282         * top.c (execute_command): Update.
6283         * cli/cli-script.h (print_command_lines): Now varargs.
6284         * cli/cli-script.c (print_command_lines): Now varargs.
6285         (execute_control_command_1) <case while_control, case if_control>:
6286         Update.
6287
6288 2018-05-04  Tom Tromey  <tom@tromey.com>
6289
6290         * tracepoint.c (all_tracepoint_actions): Rename from
6291         all_tracepoint_actions_and_cleanup.  Change return type.
6292         (actions_command, encode_actions_1, encode_actions)
6293         (trace_dump_actions, tdump_command): Update.
6294         * remote.c (remote_download_command_source): Update.
6295         * python/python.c (gdbpy_eval_from_control_command)
6296         (python_command, python_interactive_command): Update.
6297         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6298         * guile/guile.c (guile_command)
6299         (gdbscm_eval_from_control_command, guile_command): Update.
6300         * compile/compile.c (compile_code_command)
6301         (compile_print_command, compile_to_object): Update.
6302         * cli/cli-script.h (struct command_lines_deleter): New.
6303         (counted_command_line): New typedef.
6304         (struct command_line): Add constructor, destructor.
6305         <body_list>: Remove.
6306         <body_list_0, body_list_1>: New members.
6307         (command_line_up): Remove typedef.
6308         (read_command_lines, read_command_lines_1, get_command_line):
6309         Update.
6310         (copy_command_lines): Don't declare.
6311         * cli/cli-script.c (build_command_line): Use "new".
6312         (get_command_line): Return counted_command_line.
6313         (print_command_lines, execute_user_command)
6314         (execute_control_command_1, while_command, if_command): Update.
6315         (realloc_body_list): Remove.
6316         (process_next_line, recurse_read_control_structure): Update.
6317         (read_command_lines, read_command_lines_1): Return counted_command_line.
6318         (free_command_lines): Use "delete".
6319         (copy_command_lines): Remove.
6320         (define_command, document_command, show_user_1): Update.
6321         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6322         a counted_command_line.
6323         * breakpoint.h (counted_command_line): Remove typedef.
6324         (breakpoint_set_commands): Update.
6325         * breakpoint.c (check_no_tracepoint_commands)
6326         (validate_commands_for_breakpoint): Update.
6327         (breakpoint_set_commands): Change commands to be a
6328         counted_command_line.
6329         (commands_command_1, update_dprintf_command_list)
6330         (create_tracepoint_from_upload): Update.
6331
6332 2018-05-04  Tom Tromey  <tom@tromey.com>
6333
6334         * cli/cli-decode.h (cmd_list_element): New constructor.
6335         (~cmd_list_element): New destructor.
6336         (struct cmd_list_element): Add initializers.
6337         * cli/cli-decode.c (do_add_cmd): Use "new".
6338         (delete_cmd): Use "delete".
6339
6340 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6341             Pedro Alves <palves@redhat.com>
6342
6343         PR breakpoints/19806 and support for PR external/20207.
6344         * NEWS: Mention Aarch64 watchpoint improvements.
6345         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6346         watchpoints and PR external/20207 watchpoints.
6347         * nat/aarch64-linux-hw-point.c
6348         (kernel_supports_any_contiguous_range): New.
6349         (aarch64_watchpoint_offset): New.
6350         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6351         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6352         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6353         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6354         next_addr_orig_p.  Support PR external/20207 watchpoints.
6355         (aarch64_downgrade_regs): New.
6356         (aarch64_dr_state_insert_one_point): New parameters offset and
6357         addr_orig.
6358         (aarch64_dr_state_remove_one_point): Likewise.
6359         (aarch64_handle_breakpoint): Update caller.
6360         (aarch64_handle_aligned_watchpoint): Likewise.
6361         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6362         aligned_offset.
6363         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6364         aarch64_downgrade_regs.
6365         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6366         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6367         (DR_CONTROL_MASK): ... this.
6368         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6369         (unsigned int aarch64_watchpoint_offset): New prototype.
6370         (aarch64_linux_set_debug_regs): Remove const from state.
6371         * utils.c (align_up, align_down): Move to ...
6372         * common/common-utils.c (align_up, align_down): ... here.
6373         * utils.h (align_up, align_down): Move to ...
6374         * common/common-utils.h (align_up, align_down): ... here.
6375
6376 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6377
6378         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6379         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6380         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6381         Re-implement to match the ABI as summarized in GCC's
6382         gcc/config/sparc/sparc.c.  All callers updated.
6383         (sparc32_store_arguments): Remove assertion.
6384
6385 2018-05-04  Tom Tromey  <tom@tromey.com>
6386
6387         * printcmd.c: Don't include tui.h.
6388         (decode_format): Use skip_spaces.
6389
6390 2018-05-04  Tom Tromey  <tom@tromey.com>
6391
6392         PR gdb/22619:
6393         * printcmd.c (last_count): New global.
6394         (x_command): Use saved count when repeating.
6395
6396 2018-05-04  Tom Tromey  <tom@tromey.com>
6397
6398         * nto-procfs.c (do_closedir_cleanup): Remove.
6399         (procfs_pidlist): Use gdb_dir_up.
6400         * procfs.c (do_closedir_cleanup): Remove.
6401         (proc_update_threads): Use gdb_dir_up.
6402         * common/filestuff.h (struct gdb_dir_deleter): New.
6403         (gdb_dir_up): New typedef.
6404
6405 2018-05-04  Tom Tromey  <tom@tromey.com>
6406
6407         * ada-lang.c (print_mention_exception): Use std::string.
6408
6409 2018-05-04  Tom Tromey  <tom@tromey.com>
6410
6411         * ada-lang.c (create_excep_cond_exprs): Update.
6412         (ada_exception_catchpoint_cond_string): Use std::string.
6413
6414 2018-05-04  Tom Tromey  <tom@tromey.com>
6415
6416         * ada-lang.c (xget_renaming_scope): Return std::string.
6417         (old_renaming_is_invisible): Update.
6418
6419 2018-05-04  Tom Tromey  <tom@tromey.com>
6420
6421         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6422         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6423
6424 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6425
6426         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6427
6428 2018-05-04  Tom Tromey  <tom@tromey.com>
6429
6430         * remote.c (remote_query_supported_append): Change type.
6431         (remote_check_symbols): Update.
6432
6433 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6434
6435         PR gdb/11420
6436         * configure.ac: Prepend libpython.
6437         * python/python-config.py: Likewise.
6438         * configure: Regenerate.
6439
6440 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6441
6442         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6443
6444 2018-05-03  Pedro Alves  <palves@redhat.com>
6445
6446         * s390-linux-nat.c
6447         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6448         override.  Write 'true' instead of '1'.
6449         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6450         declaration.
6451
6452 2018-05-02  Pedro Alves  <palves@redhat.com>
6453
6454         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6455         add_inf_child_target.
6456         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6457         add_inf_child_target.
6458         * aix-thread.c (aix_thread_target_info): New.
6459         (aix_thread_target) <shortname, longname, doc>: Delete.
6460         <info>: New.
6461         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6462         add_inf_child_target.
6463         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6464         add_inf_child_target.
6465         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6466         add_inf_child_target.
6467         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6468         add_inf_child_target.
6469         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6470         add_inf_child_target.
6471         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6472         add_inf_child_target.
6473         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6474         add_inf_child_target.
6475         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6476         add_inf_child_target.
6477         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6478         add_inf_child_target.
6479         * bfd-target.c (target_bfd_target_info): New.
6480         (target_bfd) <shortname, longname, doc>: Delete.
6481         <info>: New.
6482         * bsd-kvm.c (bsd_kvm_target_info): New.
6483         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6484         <info>: New.
6485         (bsd_kvm_target::open): Rename to ...
6486         (bsd_kvm_target_open): ... this.  Adjust.
6487         * bsd-uthread.c (bsd_uthread_target_info): New.
6488         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6489         <info>: New.
6490         * corefile.c (core_file_command): Adjust.
6491         * corelow.c (core_target_info): New.
6492         (core_target) <shortname, longname, doc>: Delete.
6493         <info>: New.
6494         (core_target::open): Rename to ...
6495         (core_target_open): ... this.  Adjust.
6496         * ctf.c (ctf_target_info): New.
6497         (ctf_target) <shortname, longname, doc>: Delete.
6498         <info>: New.
6499         (ctf_target::open): Rename to ...
6500         (ctf_target_open): ... this.
6501         (_initialize_ctf): Adjust.
6502         * exec.c (exec_target_info): New.
6503         (exec_target) <shortname, longname, doc>: Delete.
6504         <info>: New.
6505         (exec_target::open): Rename to ...
6506         (exec_target_open): ... this.
6507         * gdbcore.h (core_target_open): Declare.
6508         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6509         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6510         add_inf_child_target.
6511         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6512         add_inf_child_target.
6513         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6514         add_inf_child_target.
6515         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6516         add_inf_child_target.
6517         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6518         add_inf_child_target.
6519         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6520         add_inf_child_target.
6521         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6522         add_inf_child_target.
6523         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6524         add_inf_child_target.
6525         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6526         add_inf_child_target.
6527         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6528         add_inf_child_target.
6529         * inf-child.c (inf_child_target_info): New.
6530         (inf_child_target::info): New.
6531         (inf_child_open_target): Remove 'target' parameter.  Use
6532         get_native_target instead.
6533         (inf_child_target::open): Delete.
6534         (add_inf_child_target): New.
6535         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6536         Delete.
6537         <info>: New.
6538         (add_inf_child_target): Declare.
6539         (inf_child_open_target): Declare.
6540         * linux-thread-db.c (thread_db_target_info): New.
6541         (thread_db_target) <shortname, longname, doc>: Delete.
6542         <info>: New.
6543         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6544         add_inf_child_target.
6545         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6546         add_inf_child_target.
6547         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6548         add_inf_child_target.
6549         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6550         add_inf_child_target.
6551         * make-target-delegates (print_class): Adjust.
6552         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6553         add_inf_child_target.
6554         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6555         add_inf_child_target.
6556         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6557         add_inf_child_target.
6558         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6559         add_inf_child_target.
6560         * nto-procfs.c (nto_native_target_info): New.
6561         (nto_procfs_target_native) <shortname, longname, doc>:
6562         Delete.
6563         <info>: New.
6564         (nto_procfs_target_info): New.
6565         (nto_procfs_target_procfs) <shortname, longname, doc>:
6566         Delete.
6567         <info>: New.
6568         (init_procfs_targets): Adjust.
6569         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6570         add_inf_child_target.
6571         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6572         add_inf_child_target.
6573         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6574         add_inf_child_target.
6575         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6576         add_inf_child_target.
6577         * ravenscar-thread.c (ravenscar_target_info): New.
6578         (ravenscar_thread_target) <shortname, longname, doc>:
6579         Delete.
6580         <info>: New.
6581         * record-btrace.c (record_btrace_target_info):
6582         (record_btrace_target) <shortname, longname, doc>: Delete.
6583         <info>: New.
6584         (record_btrace_target::open): Rename to ...
6585         (record_btrace_target_open): ... this.  Adjust.
6586         * record-full.c (record_longname, record_doc): New.
6587         (record_full_base_target) <shortname, longname, doc>: Delete.
6588         <info>: New.
6589         (record_full_target_info): New.
6590         (record_full_target): <shortname>: Delete.
6591         <info>: New.
6592         (record_full_core_open_1, record_full_open_1): Update comments.
6593         (record_full_base_target::open): Rename to ...
6594         (record_full_open): ... this.
6595         (cmd_record_full_restore): Update.
6596         (_initialize_record_full): Update.
6597         * remote-sim.c (remote_sim_target_info): New.
6598         (gdbsim_target) <shortname, longname, doc>: Delete.
6599         <info>: New.
6600         (gdbsim_target::open): Rename to ...
6601         (gdbsim_target_open): ... this.
6602         (_initialize_remote_sim): Adjust.
6603         * remote.c (remote_doc): New.
6604         (remote_target_info): New.
6605         (remote_target) <shortname, longname, doc>: Delete.
6606         <info>: New.
6607         (extended_remote_target_info): New.
6608         (extended_remote_target) <shortname, longname, doc>: Delete.
6609         <info>: New.
6610         (remote_target::open_1): Make static.  Adjust.
6611         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6612         * s390-linux-nat.c (_initialize_s390_nat): Use
6613         add_inf_child_target.
6614         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6615         add_inf_child_target.
6616         * sol-thread.c (thread_db_target_info): New.
6617         (sol_thread_target) <shortname, longname, doc>: Delete.
6618         <info>: New.
6619         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6620         add_inf_child_target.
6621         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6622         add_inf_child_target.
6623         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6624         add_inf_child_target.
6625         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6626         add_inf_child_target.
6627         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6628         add_inf_child_target.
6629         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6630         add_inf_child_target.
6631         * spu-linux-nat.c (_initialize_spu_nat): Use
6632         add_inf_child_target.
6633         * spu-multiarch.c (spu_multiarch_target_info): New.
6634         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6635         <info>: New.
6636         * target-delegates.c: Regenerate.
6637         * target.c: Include <unordered_map>.
6638         (target_ops_p): Delete.
6639         (DEF_VEC_P(target_ops_p)): Delete.
6640         (target_factories): New.
6641         (test_target_info): New.
6642         (test_target_ops::info): New.
6643         (open_target): Adjust to use target_factories.
6644         (add_target_with_completer): Rename to ...
6645         (add_target): ... this.  Change prototype.  Register target_info
6646         and open callback in target_factories.  Register target_info in
6647         command context instead of target_ops.
6648         (add_target): Delete old implementation.
6649         (add_deprecated_target_alias): Change prototype.  Adjust.
6650         (the_native_target): New.
6651         (set_native_target, get_native_target): New.
6652         (find_default_run_target): Use the_native_target.
6653         (find_attach_target, find_run_target): Simplify.
6654         (target_ops::open): Delete.
6655         (dummy_target_info): New.
6656         (dummy_target::shortname, dummy_target::longname)
6657         (dummy_target::doc): Delete.
6658         (dummy_target::info): New.
6659         (debug_target::shortname, debug_target::longname)
6660         (debug_target::doc): Delete.
6661         (debug_target::info): New.
6662         * target.h (struct target_info): New.
6663         (target_ops::~target_ops): Add comment.
6664         (target_ops::info): New.
6665         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6666         longer virtual.  Implement in terms of target_info.
6667         (set_native_target, get_native_target): Declare.
6668         (target_open_ftype): New.
6669         (add_target, add_target_with_completer)
6670         (add_deprecated_target_alias): Change prototype.
6671         (test_target) <shortname, longname, doc>: Delete.
6672         <info>: New.
6673         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6674         add_inf_child_target.
6675         * tracefile-tfile.c (tfile_target_info): New.
6676         (tfile_target) <shortname, longname, doc>: Delete.
6677         <info>: New.
6678         (tfile_target::open): Rename to ...
6679         (tfile_target_open): ... this.
6680         (_initialize_tracefile_tfile): Adjust.
6681         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6682         add_inf_child_target.
6683         * windows-nat.c (_initialize_windows_nat): Use
6684         add_inf_child_target.
6685         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6686         add_inf_child_target.
6687
6688 2018-05-02  Pedro Alves  <palves@redhat.com>
6689
6690         * linux-nat.h (linux_nat_target) <low_new_thread,
6691         low_delete_thread, low_new_fork, low_forget_process,
6692         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6693         New virtual methods.
6694         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6695         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6696         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6697         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6698         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6699         Delete.
6700         * linux-fork.c (delete_fork): Adjust to call low method.
6701         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6702         (linux_nat_new_fork, linux_nat_forget_process_hook)
6703         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6704         (linux_nat_status_is_event):
6705         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6706         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6707         to call low method.
6708         (sigtrap_is_event): Rename to ...
6709         (linux_nat_target::low_status_is_event): ... this.
6710         (linux_nat_set_status_is_event): Delete.
6711         (save_stop_reason, linux_nat_wait_1)
6712         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6713         low methods.
6714         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6715         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6716         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6717         (linux_nat_set_prepare_to_resume): Delete.
6718         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6719         low virtual methods.
6720         * amd64-linux-nat.c: Likewise.
6721         * arm-linux-nat.c: Likewise.
6722         * i386-linux-nat.c: Likewise.
6723         * ia64-linux-nat.c: Likewise.
6724         * mips-linux-nat.c: Likewise.
6725         * ppc-linux-nat.c: Likewise.
6726         * s390-linux-nat.c: Likewise.
6727         * sparc64-linux-nat.c: Likewise.
6728         * x86-linux-nat.c: Likewise.
6729         * x86-linux-nat.h: Include "nat/x86-linux.h".
6730         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6731         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6732         Override methods.
6733
6734 2018-05-02  Pedro Alves  <palves@redhat.com>
6735
6736         * target.h (target_ops)
6737         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6738         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6739         stopped_by_watchpoint, have_continuable_watchpoint,
6740         stopped_data_address, watchpoint_addr_within_range,
6741         can_accel_watchpoint_condition, can_run, thread_alive,
6742         has_all_memory, has_memory, has_stack, has_registers,
6743         has_execution, can_async_p, is_async_p, supports_non_stop,
6744         always_non_stop_p, can_execute_reverse, supports_multi_process,
6745         supports_enable_disable_tracepoint,
6746         supports_disable_randomization, supports_string_tracing,
6747         supports_evaluation_of_breakpoint_conditions,
6748         can_run_breakpoint_commands, filesystem_is_local,
6749         can_download_tracepoint, get_trace_state_variable_value,
6750         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6751         record_is_replaying, record_will_replay,
6752         augmented_libraries_svr4_read>: Adjust to return bool.
6753         * aarch64-linux-nat.c: All implementations adjusted.
6754         * aix-thread.c: All implementations adjusted.
6755         * arm-linux-nat.c: All implementations adjusted.
6756         * breakpoint.c: All implementations adjusted.
6757         * bsd-kvm.c: All implementations adjusted.
6758         * bsd-uthread.c: All implementations adjusted.
6759         * corelow.c: All implementations adjusted.
6760         * ctf.c: All implementations adjusted.
6761         * darwin-nat.c: All implementations adjusted.
6762         * darwin-nat.h: All implementations adjusted.
6763         * exec.c: All implementations adjusted.
6764         * fbsd-nat.c: All implementations adjusted.
6765         * fbsd-nat.h: All implementations adjusted.
6766         * gnu-nat.c: All implementations adjusted.
6767         * gnu-nat.h: All implementations adjusted.
6768         * go32-nat.c: All implementations adjusted.
6769         * ia64-linux-nat.c: All implementations adjusted.
6770         * inf-child.c: All implementations adjusted.
6771         * inf-child.h: All implementations adjusted.
6772         * inf-ptrace.c: All implementations adjusted.
6773         * inf-ptrace.h: All implementations adjusted.
6774         * linux-nat.c: All implementations adjusted.
6775         * linux-nat.h: All implementations adjusted.
6776         * mips-linux-nat.c: All implementations adjusted.
6777         * nto-procfs.c: All implementations adjusted.
6778         * ppc-linux-nat.c: All implementations adjusted.
6779         * procfs.c: All implementations adjusted.
6780         * ravenscar-thread.c: All implementations adjusted.
6781         * record-btrace.c: All implementations adjusted.
6782         * record-full.c: All implementations adjusted.
6783         * remote-sim.c: All implementations adjusted.
6784         * remote.c: All implementations adjusted.
6785         * s390-linux-nat.c: All implementations adjusted.
6786         * sol-thread.c: All implementations adjusted.
6787         * spu-multiarch.c: All implementations adjusted.
6788         * target-delegates.c: All implementations adjusted.
6789         * target.c: All implementations adjusted.
6790         * target.h: All implementations adjusted.
6791         * tracefile-tfile.c: All implementations adjusted.
6792         * tracefile.c: All implementations adjusted.
6793         * tracefile.h: All implementations adjusted.
6794         * windows-nat.c: All implementations adjusted.
6795         * x86-linux-nat.h: All implementations adjusted.
6796         * x86-nat.h: All implementations adjusted.
6797
6798 2018-05-02  Pedro Alves  <palves@redhat.com>
6799
6800         * make-target-delegates (scan_target_h): Don't trim lines here.
6801         Replace sequences of tabs and/or whitespace with a single
6802         whitespace.
6803         (top level, parsing methods): Trim each line before processing it
6804         here.
6805
6806 2018-05-02  Pedro Alves  <palves@redhat.com>
6807             John Baldwin  <jhb@freebsd.org>
6808
6809         * target.h (enum strata) <debug_stratum>: New.
6810         (struct target_ops) <all delegation methods>: Replace by C++
6811         virtual methods, and drop "to_" prefix.  All references updated
6812         throughout.
6813         <to_shortname, to_longname, to_doc, to_data,
6814         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6815         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6816         virtual methods.  All references updated throughout.
6817         <can_attach, supports_terminal_ours, can_create_inferior,
6818         get_thread_control_capabilities, attach_no_wait>: New
6819         virtual methods.
6820         <insert_breakpoint, remove_breakpoint>: Now
6821         TARGET_DEFAULT_NORETURN methods.
6822         <info_proc>: Now returns bool.
6823         <to_magic>: Delete.
6824         (OPS_MAGIC): Delete.
6825         (current_target): Delete.  All references replaced by references
6826         to ...
6827         (target_stack): ... this.  New.
6828         (target_shortname, target_longname): Adjust.
6829         (target_can_run): Now a function declaration.
6830         (default_child_has_all_memory, default_child_has_memory)
6831         (default_child_has_stack, default_child_has_registers)
6832         (default_child_has_execution): Remove target_ops parameter.
6833         (complete_target_initialization): Delete.
6834         (memory_breakpoint_target): New template class.
6835         (test_target_ops): Refactor as a C++ class with virtual methods.
6836         * make-target-delegates (NAME_PART): Tighten.
6837         (POINTER_PART, CP_SYMBOL): New.
6838         (SIMPLE_RETURN_PART): Reimplement.
6839         (VEC_RETURN_PART): Expect less.
6840         (RETURN_PART, VIRTUAL_PART): New.
6841         (METHOD): Adjust to C++ virtual methods.
6842         (scan_target_h): Remove reference to C99.
6843         (dname): Output "target_ops::" prefix.
6844         (write_function_header): Adjust to output a C++ class method.
6845         (write_declaration): New.
6846         (write_delegator): Adjust to output a C++ class method.
6847         (tdname): Output "dummy_target::" prefix.
6848         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6849         method.
6850         (tdefault_names, debug_names): Delete.
6851         (return_types, tdefaults, styles, argtypes_array): New.
6852         (top level): All methods are delegators.
6853         (print_class): New.
6854         (top level): Print dummy_target and debug_target classes.
6855         * target-delegates.c: Regenerate.
6856         * target-debug.h (target_debug_print_enum_info_proc_what)
6857         (target_debug_print_thread_control_capabilities)
6858         (target_debug_print_thread_info_p): New.
6859         * target.c (dummy_target): Delete.
6860         (the_dummy_target, the_debug_target): New.
6861         (target_stack): Now extern.
6862         (set_targetdebug): Push/unpush debug target.
6863         (default_child_has_all_memory, default_child_has_memory)
6864         (default_child_has_stack, default_child_has_registers)
6865         (default_child_has_execution): Remove target_ops parameter.
6866         (complete_target_initialization): Delete.
6867         (add_target_with_completer): No longer call
6868         complete_target_initialization.
6869         (target_supports_terminal_ours): Use regular delegation.
6870         (update_current_target): Delete.
6871         (push_target): No longer check magic number.  Don't call
6872         update_current_target.
6873         (unpush_target): Don't call update_current_target.
6874         (target_is_pushed): No longer check magic number.
6875         (target_require_runnable): Skip for all stratums over
6876         process_stratum.
6877         (target_ops::info_proc): New.
6878         (target_info_proc): Use find_target_at and
6879         find_default_run_target.
6880         (target_supports_disable_randomization): Use regular delegation.
6881         (target_get_osdata): Use find_target_at.
6882         (target_ops::open, target_ops::close, target_ops::can_attach)
6883         (target_ops::attach, target_ops::can_create_inferior)
6884         (target_ops::create_inferior, target_ops::can_run)
6885         (target_can_run): New.
6886         (default_fileio_target): Use regular delegation.
6887         (target_ops::fileio_open, target_ops::fileio_pwrite)
6888         (target_ops::fileio_pread, target_ops::fileio_fstat)
6889         (target_ops::fileio_close, target_ops::fileio_unlink)
6890         (target_ops::fileio_readlink): New.
6891         (target_fileio_open_1, target_fileio_unlink)
6892         (target_fileio_readlink): Always call the target method.  Handle
6893         FILEIO_ENOSYS.
6894         (return_zero, return_zero_has_execution): Delete.
6895         (init_dummy_target): Delete.
6896         (dummy_target::dummy_target, dummy_target::shortname)
6897         (dummy_target::longname, dummy_target::doc)
6898         (debug_target::debug_target, debug_target::shortname)
6899         (debug_target::longname, debug_target::doc): New.
6900         (target_supports_delete_record): Use regular delegation.
6901         (setup_target_debug): Delete.
6902         (maintenance_print_target_stack): Skip debug_stratum.
6903         (initialize_targets): Instantiate the_dummy_target and
6904         the_debug_target.
6905         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
6906         use target_stack.
6907         (target_auxv_search, fprint_target_auxv): Adjust.
6908         (info_auxv_command): Adjust to use target_stack.
6909         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6910         * exceptions.c (print_flush): Handle a NULL target_stack.
6911         * regcache.c (target_ops_no_register): Refactor as class with
6912         virtual methods.
6913
6914         * exec.c (exec_target): New class.
6915         (exec_ops): Now an exec_target.
6916         (exec_open, exec_close_1, exec_get_section_table)
6917         (exec_xfer_partial, exec_files_info, exec_has_memory)
6918         (exec_make_note_section): Refactor as exec_target methods.
6919         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6920         Delete.
6921         (exec_target::find_memory_regions): New.
6922         (_initialize_exec): Don't call init_exec_ops.
6923         * gdbcore.h (exec_file_clear): Delete.
6924
6925         * corefile.c (core_target): Delete.
6926         (core_file_command): Adjust.
6927         * corelow.c (core_target): New class.
6928         (the_core_target): New.
6929         (core_close): Remove target_ops parameter.
6930         (core_close_cleanup): Adjust.
6931         (core_target::close): New.
6932         (core_open, core_detach, get_core_registers, core_files_info)
6933         (core_xfer_partial, core_thread_alive, core_read_description)
6934         (core_pid_to_str, core_thread_name, core_has_memory)
6935         (core_has_stack, core_has_registers, core_info_proc): Rework as
6936         core_target methods.
6937         (ignore, core_remove_breakpoint, init_core_ops): Delete.
6938         (_initialize_corelow): Initialize the_core_target.
6939         * gdbcore.h (core_target): Delete.
6940         (the_core_target): New.
6941
6942         * ctf.c: (ctf_target): New class.
6943         (ctf_ops): Now a ctf_target.
6944         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6945         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6946         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6947         methods.
6948         (init_ctf_ops): Delete.
6949         (_initialize_ctf): Don't call it.
6950         * tracefile-tfile.c (tfile_target): New class.
6951         (tfile_ops): Now a tfile_target.
6952         (tfile_open, tfile_close, tfile_files_info)
6953         (tfile_get_tracepoint_status, tfile_trace_find)
6954         (tfile_fetch_registers, tfile_xfer_partial)
6955         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6956         Refactor as tfile_target methods.
6957         (tfile_xfer_partial_features): Remove target_ops parameter.
6958         (init_tfile_ops): Delete.
6959         (_initialize_tracefile_tfile): Don't call it.
6960         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6961         (tracefile_has_stack, tracefile_has_registers)
6962         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6963         tracefile_target methods.
6964         (init_tracefile_ops): Delete.
6965         (tracefile_target::tracefile_target): New.
6966         * tracefile.h: Include "target.h".
6967         (tracefile_target): New class.
6968         (init_tracefile_ops): Delete.
6969
6970         * spu-multiarch.c (spu_multiarch_target): New class.
6971         (spu_ops): Now a spu_multiarch_target.
6972         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6973         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6974         (spu_search_memory, spu_mourn_inferior): Refactor as
6975         spu_multiarch_target methods.
6976         (init_spu_ops): Delete.
6977         (_initialize_spu_multiarch): Remove references to init_spu_ops,
6978         complete_target_initialization.
6979
6980         * ravenscar-thread.c (ravenscar_thread_target): New class.
6981         (ravenscar_ops): Now a ravenscar_thread_target.
6982         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6983         (ravenscar_thread_alive, ravenscar_pid_to_str)
6984         (ravenscar_fetch_registers, ravenscar_store_registers)
6985         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6986         (ravenscar_stopped_by_hw_breakpoint)
6987         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6988         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6989         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6990         methods.
6991         (init_ravenscar_thread_ops): Delete.
6992         (_initialize_ravenscar): Remove references to
6993         init_ravenscar_thread_ops and complete_target_initialization.
6994
6995         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6996         (bsd_uthread_target): New class.
6997         (bsd_uthread_ops): Now a bsd_uthread_target.
6998         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6999         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7000         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7001         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7002         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7003         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7004         (bsd_uthread_target): Delete function.
7005         (_initialize_bsd_uthread): Remove reference to
7006         complete_target_initialization.
7007
7008         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7009         (target_bfd): ... this new class.
7010         (target_bfd_xfer_partial, target_bfd_get_section_table)
7011         (target_bfd_close): Refactor as target_bfd methods.
7012         (target_bfd::~target_bfd): New.
7013         (target_bfd_reopen): Adjust.
7014         (target_bfd::close): New.
7015
7016         * record-btrace.c (record_btrace_target): New class.
7017         (record_btrace_ops): Now a record_btrace_target.
7018         (record_btrace_open, record_btrace_stop_recording)
7019         (record_btrace_disconnect, record_btrace_close)
7020         (record_btrace_async, record_btrace_info)
7021         (record_btrace_insn_history, record_btrace_insn_history_range)
7022         (record_btrace_insn_history_from, record_btrace_call_history)
7023         (record_btrace_call_history_range)
7024         (record_btrace_call_history_from, record_btrace_record_method)
7025         (record_btrace_is_replaying, record_btrace_will_replay)
7026         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7027         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7028         (record_btrace_store_registers, record_btrace_prepare_to_store)
7029         (record_btrace_to_get_unwinder)
7030         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7031         (record_btrace_commit_resume, record_btrace_wait)
7032         (record_btrace_stop, record_btrace_can_execute_reverse)
7033         (record_btrace_stopped_by_sw_breakpoint)
7034         (record_btrace_supports_stopped_by_sw_breakpoint)
7035         (record_btrace_stopped_by_hw_breakpoint)
7036         (record_btrace_supports_stopped_by_hw_breakpoint)
7037         (record_btrace_update_thread_list, record_btrace_thread_alive)
7038         (record_btrace_goto_begin, record_btrace_goto_end)
7039         (record_btrace_goto, record_btrace_stop_replaying_all)
7040         (record_btrace_execution_direction)
7041         (record_btrace_prepare_to_generate_core)
7042         (record_btrace_done_generating_core): Refactor as
7043         record_btrace_target methods.
7044         (init_record_btrace_ops): Delete.
7045         (_initialize_record_btrace): Remove reference to
7046         init_record_btrace_ops.
7047         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7048         the execution_direction global.
7049         (record_full_base_target, record_full_target)
7050         (record_full_core_target): New classes.
7051         (record_full_ops): Now a record_full_target.
7052         (record_full_core_ops): Now a record_full_core_target.
7053         (record_full_target::detach, record_full_target::disconnect)
7054         (record_full_core_target::disconnect)
7055         (record_full_target::mourn_inferior, record_full_target::kill):
7056         New.
7057         (record_full_open, record_full_close, record_full_async): Refactor
7058         as methods of the record_full_base_target class.
7059         (record_full_resume, record_full_commit_resume): Refactor
7060         as methods of the record_full_target class.
7061         (record_full_wait, record_full_stopped_by_watchpoint)
7062         (record_full_stopped_data_address)
7063         (record_full_stopped_by_sw_breakpoint)
7064         (record_full_supports_stopped_by_sw_breakpoint)
7065         (record_full_stopped_by_hw_breakpoint)
7066         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7067         methods of the record_full_base_target class.
7068         (record_full_store_registers, record_full_xfer_partial)
7069         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7070         Refactor as methods of the record_full_target class.
7071         (record_full_can_execute_reverse, record_full_get_bookmark)
7072         (record_full_goto_bookmark, record_full_execution_direction)
7073         (record_full_record_method, record_full_info, record_full_delete)
7074         (record_full_is_replaying, record_full_will_replay)
7075         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7076         (record_full_stop_replaying): Refactor as methods of the
7077         record_full_base_target class.
7078         (record_full_core_resume, record_full_core_kill)
7079         (record_full_core_fetch_registers)
7080         (record_full_core_prepare_to_store)
7081         (record_full_core_store_registers, record_full_core_xfer_partial)
7082         (record_full_core_insert_breakpoint)
7083         (record_full_core_remove_breakpoint)
7084         (record_full_core_has_execution): Refactor
7085         as methods of the record_full_core_target class.
7086         (record_full_base_target::supports_delete_record): New.
7087         (init_record_full_ops): Delete.
7088         (init_record_full_core_ops): Delete.
7089         (record_full_save): Refactor as method of the
7090         record_full_base_target class.
7091         (_initialize_record_full): Remove references to
7092         init_record_full_ops and init_record_full_core_ops.
7093
7094         * remote.c (remote_target, extended_remote_target): New classes.
7095         (remote_ops): Now a remote_target.
7096         (extended_remote_ops): Now an extended_remote_target.
7097         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7098         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7099         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7100         (remote_pass_signals, remote_set_syscall_catchpoint)
7101         (remote_program_signals, )
7102         (remote_thread_always_alive): Remove target_ops parameter.
7103         (remote_thread_alive, remote_thread_name)
7104         (remote_update_thread_list, remote_threads_extra_info)
7105         (remote_static_tracepoint_marker_at)
7106         (remote_static_tracepoint_markers_by_strid)
7107         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7108         (remote_open): Refactor as methods of remote_target.
7109         (extended_remote_open, extended_remote_detach)
7110         (extended_remote_attach, extended_remote_post_attach):
7111         (extended_remote_supports_disable_randomization)
7112         (extended_remote_create_inferior): : Refactor as method of
7113         extended_remote_target.
7114         (remote_set_permissions, remote_open_1, remote_detach)
7115         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7116         (remote_resume, remote_commit_resume, remote_stop)
7117         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7118         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7119         (remote_prepare_to_store, remote_store_registers)
7120         (remote_flash_erase, remote_flash_done, remote_files_info)
7121         (remote_kill, remote_mourn, remote_insert_breakpoint)
7122         (remote_remove_breakpoint, remote_insert_watchpoint)
7123         (remote_watchpoint_addr_within_range)
7124         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7125         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7126         (remote_supports_stopped_by_sw_breakpoint)
7127         (remote_stopped_by_hw_breakpoint)
7128         (remote_supports_stopped_by_hw_breakpoint)
7129         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7130         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7131         (remote_verify_memory): Refactor as methods of remote_target.
7132         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7133         parameter.
7134         (remote_xfer_partial, remote_get_memory_xfer_limit)
7135         (remote_search_memory, remote_rcmd, remote_memory_map)
7136         (remote_pid_to_str, remote_get_thread_local_address)
7137         (remote_get_tib_address, remote_read_description): Refactor as
7138         methods of remote_target.
7139         (remote_target::fileio_open, remote_target::fileio_pwrite)
7140         (remote_target::fileio_pread, remote_target::fileio_close): New.
7141         (remote_hostio_readlink, remote_hostio_fstat)
7142         (remote_filesystem_is_local, remote_can_execute_reverse)
7143         (remote_supports_non_stop, remote_supports_disable_randomization)
7144         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7145         (remote_supports_enable_disable_tracepoint)
7146         (remote_supports_string_tracing)
7147         (remote_can_run_breakpoint_commands, remote_trace_init)
7148         (remote_download_tracepoint, remote_can_download_tracepoint)
7149         (remote_download_trace_state_variable, remote_enable_tracepoint)
7150         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7151         (remote_trace_start, remote_get_trace_status)
7152         (remote_get_tracepoint_status, remote_trace_stop)
7153         (remote_trace_find, remote_get_trace_state_variable_value)
7154         (remote_save_trace_data, remote_get_raw_trace_data)
7155         (remote_set_disconnected_tracing, remote_core_of_thread)
7156         (remote_set_circular_trace_buffer, remote_traceframe_info)
7157         (remote_get_min_fast_tracepoint_insn_len)
7158         (remote_set_trace_buffer_size, remote_set_trace_notes)
7159         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7160         (remote_disable_btrace, remote_teardown_btrace)
7161         (remote_read_btrace, remote_btrace_conf)
7162         (remote_augmented_libraries_svr4_read, remote_load)
7163         (remote_pid_to_exec_file, remote_can_do_single_step)
7164         (remote_execution_direction, remote_thread_handle_to_thread_info):
7165         Refactor as methods of remote_target.
7166         (init_remote_ops, init_extended_remote_ops): Delete.
7167         (remote_can_async_p, remote_is_async_p, remote_async)
7168         (remote_thread_events, remote_upload_tracepoints)
7169         (remote_upload_trace_state_variables): Refactor as methods of
7170         remote_target.
7171         (_initialize_remote): Remove references to init_remote_ops and
7172         init_extended_remote_ops.
7173
7174         * remote-sim.c (gdbsim_target): New class.
7175         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7176         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7177         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7178         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7179         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7180         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7181         Refactor as methods of gdbsim_target.
7182         (gdbsim_ops): Now a gdbsim_target.
7183         (init_gdbsim_ops): Delete.
7184         (gdbsim_cntrl_c): Adjust.
7185         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7186
7187         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7188         (the_amd64_linux_nat_target): New.
7189         (amd64_linux_fetch_inferior_registers)
7190         (amd64_linux_store_inferior_registers): Refactor as methods of
7191         amd64_linux_nat_target.
7192         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7193         * i386-linux-nat.c: Don't include "linux-nat.h".
7194         (i386_linux_nat_target): New class.
7195         (the_i386_linux_nat_target): New.
7196         (i386_linux_fetch_inferior_registers)
7197         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7198         as methods of i386_linux_nat_target.
7199         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7200         * inf-child.c (inf_child_ops): Delete.
7201         (inf_child_fetch_inferior_registers)
7202         (inf_child_store_inferior_registers): Delete.
7203         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7204         methods of inf_child_target.
7205         (inf_child_target::supports_terminal_ours)
7206         (inf_child_target::terminal_init)
7207         (inf_child_target::terminal_inferior)
7208         (inf_child_target::terminal_ours_for_output)
7209         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7210         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7211         New.
7212         (inf_child_open, inf_child_disconnect, inf_child_close)
7213         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7214         (inf_child_post_startup_inferior, inf_child_can_run)
7215         (inf_child_pid_to_exec_file): Refactor as methods of
7216         inf_child_target.
7217         (inf_child_follow_fork): Delete.
7218         (inf_child_target::can_create_inferior)
7219         (inf_child_target::can_attach): New.
7220         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7221         (inf_child_target::has_stack, inf_child_target::has_registers)
7222         (inf_child_target::has_execution): New.
7223         (inf_child_fileio_open, inf_child_fileio_pwrite)
7224         (inf_child_fileio_pread, inf_child_fileio_fstat)
7225         (inf_child_fileio_close, inf_child_fileio_unlink)
7226         (inf_child_fileio_readlink, inf_child_use_agent)
7227         (inf_child_can_use_agent): Refactor as methods of
7228         inf_child_target.
7229         (return_zero, inf_child_target): Delete.
7230         (inf_child_target::inf_child_target): New.
7231         * inf-child.h: Include "target.h".
7232         (inf_child_target): Delete function prototype.
7233         (inf_child_target): New class.
7234         (inf_child_open_target, inf_child_mourn_inferior)
7235         (inf_child_maybe_unpush_target): Delete.
7236         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7237         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7238         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7239         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7240         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7241         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7242         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7243         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7244         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7245         methods of inf_ptrace_target.
7246         (inf_ptrace_target): Delete function.
7247         * inf-ptrace.h: Include "inf-child.h".
7248         (inf_ptrace_target): Delete function declaration.
7249         (inf_ptrace_target): New class.
7250         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7251         * linux-nat.c (linux_target): New.
7252         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7253         (linux_nat_target::~linux_nat_target): New.
7254         (linux_child_post_attach, linux_child_post_startup_inferior)
7255         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7256         (linux_child_remove_fork_catchpoint)
7257         (linux_child_insert_vfork_catchpoint)
7258         (linux_child_remove_vfork_catchpoint)
7259         (linux_child_insert_exec_catchpoint)
7260         (linux_child_remove_exec_catchpoint)
7261         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7262         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7263         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7264         (linux_nat_stopped_data_address)
7265         (linux_nat_stopped_by_sw_breakpoint)
7266         (linux_nat_supports_stopped_by_sw_breakpoint)
7267         (linux_nat_stopped_by_hw_breakpoint)
7268         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7269         (linux_nat_kill, linux_nat_mourn_inferior)
7270         (linux_nat_xfer_partial, linux_nat_thread_alive)
7271         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7272         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7273         (linux_child_static_tracepoint_markers_by_strid)
7274         (linux_nat_is_async_p, linux_nat_can_async_p)
7275         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7276         (linux_nat_supports_multi_process)
7277         (linux_nat_supports_disable_randomization, linux_nat_async)
7278         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7279         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7280         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7281         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7282         methods of linux_nat_target.
7283         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7284         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7285         parameter.
7286         (check_stopped_by_watchpoint): Adjust.
7287         (linux_xfer_partial): Delete.
7288         (linux_target_install_ops, linux_target, linux_nat_add_target):
7289         Delete.
7290         (linux_nat_target::linux_nat_target): New.
7291         * linux-nat.h: Include "inf-ptrace.h".
7292         (linux_nat_target): New.
7293         (linux_target, linux_target_install_ops, linux_nat_add_target):
7294         Delete function declarations.
7295         (linux_target): Declare global.
7296         * linux-thread-db.c (thread_db_target): New.
7297         (thread_db_target::thread_db_target): New.
7298         (thread_db_ops): Delete.
7299         (the_thread_db_target): New.
7300         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7301         (thread_db_update_thread_list, thread_db_pid_to_str)
7302         (thread_db_extra_thread_info)
7303         (thread_db_thread_handle_to_thread_info)
7304         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7305         (thread_db_resume): Refactor as methods of thread_db_target.
7306         (init_thread_db_ops): Delete.
7307         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7308         * x86-linux-nat.c: Don't include "linux-nat.h".
7309         (super_post_startup_inferior): Delete.
7310         (x86_linux_nat_target::~x86_linux_nat_target): New.
7311         (x86_linux_child_post_startup_inferior)
7312         (x86_linux_read_description, x86_linux_enable_btrace)
7313         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7314         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7315         methods of x86_linux_nat_target.
7316         (x86_linux_create_target): Delete.  Bits folded ...
7317         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7318         pointer.
7319         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7320         (x86_linux_nat_target): New class.
7321         (x86_linux_create_target): Delete.
7322         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7323         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7324         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7325         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7326         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7327         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7328         make extern.
7329         (x86_use_watchpoints): Delete.
7330         * x86-nat.h: Include "breakpoint.h" and "target.h".
7331         (x86_use_watchpoints): Delete.
7332         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7333         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7334         (x86_insert_watchpoint, x86_remove_watchpoint)
7335         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7336         (x86_stopped_by_hw_breakpoint): New declarations.
7337         (x86_nat_target): New template class.
7338
7339         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7340         (the_ppc_linux_nat_target): New.
7341         (ppc_linux_fetch_inferior_registers)
7342         (ppc_linux_can_use_hw_breakpoint)
7343         (ppc_linux_region_ok_for_hw_watchpoint)
7344         (ppc_linux_ranged_break_num_registers)
7345         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7346         (ppc_linux_insert_mask_watchpoint)
7347         (ppc_linux_remove_mask_watchpoint)
7348         (ppc_linux_can_accel_watchpoint_condition)
7349         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7350         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7351         (ppc_linux_watchpoint_addr_within_range)
7352         (ppc_linux_masked_watch_num_registers)
7353         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7354         (ppc_linux_read_description): Refactor as methods of
7355         ppc_linux_nat_target.
7356         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7357
7358         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7359         (procfs_target): New class.
7360         (the_procfs_target): New.
7361         (procfs_target): Delete function.
7362         (procfs_auxv_parse, procfs_attach, procfs_detach)
7363         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7364         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7365         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7366         (procfs_create_inferior, procfs_update_thread_list)
7367         (procfs_thread_alive, procfs_pid_to_str)
7368         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7369         (procfs_stopped_data_address, procfs_insert_watchpoint)
7370         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7371         (proc_find_memory_regions, procfs_info_proc)
7372         (procfs_make_note_section): Refactor as methods of procfs_target.
7373         (_initialize_procfs): Adjust.
7374         * sol-thread.c (sol_thread_target): New class.
7375         (sol_thread_ops): Now a sol_thread_target.
7376         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7377         (sol_thread_fetch_registers, sol_thread_store_registers)
7378         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7379         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7380         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7381         (init_sol_thread_ops): Delete.
7382         (_initialize_sol_thread): Adjust.  Remove references to
7383         init_sol_thread_ops and complete_target_initialization.
7384
7385         * windows-nat.c (windows_nat_target): New class.
7386         (windows_fetch_inferior_registers)
7387         (windows_store_inferior_registers, windows_resume, windows_wait)
7388         (windows_attach, windows_detach, windows_pid_to_exec_file)
7389         (windows_files_info, windows_create_inferior)
7390         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7391         (windows_close, windows_pid_to_str, windows_xfer_partial)
7392         (windows_get_tib_address, windows_get_ada_task_ptid)
7393         (windows_thread_name, windows_thread_alive): Refactor as
7394         windows_nat_target methods.
7395         (do_initial_windows_stuff): Adjust.
7396         (windows_target): Delete function.
7397         (_initialize_windows_nat): Adjust.
7398
7399         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7400         (darwin_mourn_inferior, darwin_kill_inferior)
7401         (darwin_create_inferior, darwin_attach, darwin_detach)
7402         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7403         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7404         (darwin_supports_multi_process): Refactor as darwin_nat_target
7405         methods.
7406         (darwin_resume_to, darwin_files_info): Delete.
7407         (_initialize_darwin_inferior): Rename to ...
7408         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7409         * darwin-nat.h: Include "inf-child.h".
7410         (darwin_nat_target): New class.
7411         (darwin_complete_target): Delete.
7412         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7413         (darwin_target): New.
7414         (i386_darwin_fetch_inferior_registers)
7415         (i386_darwin_store_inferior_registers): Refactor as methods of
7416         darwin_nat_target.
7417         (darwin_complete_target): Delete, with ...
7418         (_initialize_i386_darwin_nat): ... bits factored out here.
7419
7420         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7421         (the_alpha_linux_nat_target): New.
7422         (alpha_linux_register_u_offset): Refactor as
7423         alpha_linux_nat_target method.
7424         (_initialize_alpha_linux_nat): Adjust.
7425         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7426         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7427         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7428         methods of linux_nat_trad_target.
7429         (linux_trad_target): Delete.
7430         * linux-nat-trad.h (linux_trad_target): Delete function.
7431         (linux_nat_trad_target): New class.
7432         * mips-linux-nat.c (mips_linux_nat_target): New class.
7433         (super_fetch_registers, super_store_registers, super_close):
7434         Delete.
7435         (the_mips_linux_nat_target): New.
7436         (mips64_linux_regsets_fetch_registers)
7437         (mips64_linux_regsets_store_registers)
7438         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7439         (mips_linux_register_u_offset, mips_linux_read_description)
7440         (mips_linux_can_use_hw_breakpoint)
7441         (mips_linux_stopped_by_watchpoint)
7442         (mips_linux_stopped_data_address)
7443         (mips_linux_region_ok_for_hw_watchpoint)
7444         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7445         (mips_linux_close): Refactor as methods of mips_linux_nat.
7446         (_initialize_mips_linux_nat): Adjust to C++ification.
7447
7448         * aix-thread.c (aix_thread_target): New class.
7449         (aix_thread_ops): Now an aix_thread_target.
7450         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7451         (aix_thread_fetch_registers, aix_thread_store_registers)
7452         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7453         (aix_thread_thread_alive, aix_thread_pid_to_str)
7454         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7455         Refactor as methods of aix_thread_target.
7456         (init_aix_thread_ops): Delete.
7457         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7458         and complete_target_initialization.
7459         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7460         (rs6000_nat_target): New class.
7461         (the_rs6000_nat_target): New.
7462         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7463         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7464         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7465         (super_create_inferior): Delete.
7466         (_initialize_rs6000_nat): Adjust to C++ification.
7467
7468         * arm-linux-nat.c (arm_linux_nat_target): New class.
7469         (the_arm_linux_nat_target): New.
7470         (arm_linux_fetch_inferior_registers)
7471         (arm_linux_store_inferior_registers, arm_linux_read_description)
7472         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7473         (arm_linux_remove_hw_breakpoint)
7474         (arm_linux_region_ok_for_hw_watchpoint)
7475         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7476         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7477         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7478         arm_linux_nat_target.
7479         (_initialize_arm_linux_nat): Adjust to C++ification.
7480
7481         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7482         (the_aarch64_linux_nat_target): New.
7483         (aarch64_linux_fetch_inferior_registers)
7484         (aarch64_linux_store_inferior_registers)
7485         (aarch64_linux_child_post_startup_inferior)
7486         (aarch64_linux_read_description)
7487         (aarch64_linux_can_use_hw_breakpoint)
7488         (aarch64_linux_insert_hw_breakpoint)
7489         (aarch64_linux_remove_hw_breakpoint)
7490         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7491         (aarch64_linux_region_ok_for_hw_watchpoint)
7492         (aarch64_linux_stopped_data_address)
7493         (aarch64_linux_stopped_by_watchpoint)
7494         (aarch64_linux_watchpoint_addr_within_range)
7495         (aarch64_linux_can_do_single_step): Refactor as methods of
7496         aarch64_linux_nat_target.
7497         (super_post_startup_inferior): Delete.
7498         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7499
7500         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7501         (the_hppa_linux_nat_target): New.
7502         (hppa_linux_fetch_inferior_registers)
7503         (hppa_linux_store_inferior_registers): Refactor as methods of
7504         hppa_linux_nat_target.
7505         (_initialize_hppa_linux_nat): Adjust to C++ification.
7506
7507         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7508         (the_ia64_linux_nat_target): New.
7509         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7510         (ia64_linux_stopped_data_address)
7511         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7512         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7513         ia64_linux_nat_target methods.
7514         (super_xfer_partial): Delete.
7515         (_initialize_ia64_linux_nat): Adjust to C++ification.
7516
7517         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7518         (the_m32r_linux_nat_target): New.
7519         (m32r_linux_fetch_inferior_registers)
7520         (m32r_linux_store_inferior_registers): Refactor as
7521         m32r_linux_nat_target methods.
7522         (_initialize_m32r_linux_nat): Adjust to C++ification.
7523
7524         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7525         (the_m68k_linux_nat_target): New.
7526         (m68k_linux_fetch_inferior_registers)
7527         (m68k_linux_store_inferior_registers): Refactor as
7528         m68k_linux_nat_target methods.
7529         (_initialize_m68k_linux_nat): Adjust to C++ification.
7530
7531         * s390-linux-nat.c (s390_linux_nat_target): New class.
7532         (the_s390_linux_nat_target): New.
7533         (s390_linux_fetch_inferior_registers)
7534         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7535         (s390_insert_watchpoint, s390_remove_watchpoint)
7536         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7537         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7538         (s390_auxv_parse, s390_read_description): Refactor as methods of
7539         s390_linux_nat_target.
7540         (_initialize_s390_nat): Adjust to C++ification.
7541
7542         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7543         (the_sparc_linux_nat_target): New.
7544         (_initialize_sparc_linux_nat): Adjust to C++ification.
7545         * sparc-nat.c (sparc_fetch_inferior_registers)
7546         (sparc_store_inferior_registers): Remove target_ops parameter.
7547         * sparc-nat.h (sparc_fetch_inferior_registers)
7548         (sparc_store_inferior_registers): Remove target_ops parameter.
7549         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7550         (the_sparc64_linux_nat_target): New.
7551         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7552
7553         * spu-linux-nat.c (spu_linux_nat_target): New class.
7554         (the_spu_linux_nat_target): New.
7555         (spu_child_post_startup_inferior, spu_child_post_attach)
7556         (spu_child_wait, spu_fetch_inferior_registers)
7557         (spu_store_inferior_registers, spu_xfer_partial)
7558         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7559         methods.
7560         (_initialize_spu_nat): Adjust to C++ification.
7561
7562         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7563         (the_tilegx_linux_nat_target): New.
7564         (fetch_inferior_registers, store_inferior_registers):
7565         Refactor as methods.
7566         (_initialize_tile_linux_nat): Adjust to C++ification.
7567
7568         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7569         (the_xtensa_linux_nat_target): New.
7570         (xtensa_linux_fetch_inferior_registers)
7571         (xtensa_linux_store_inferior_registers): Refactor as
7572         xtensa_linux_nat_target methods.
7573         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7574
7575         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7576         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7577         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7578         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7579         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7580         (fbsd_stopped_by_sw_breakpoint)
7581         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7582         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7583         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7584         (fbsd_post_startup_inferior, fbsd_post_attach)
7585         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7586         (fbsd_set_syscall_catchpoint)
7587         (super_xfer_partial, super_resume, super_wait)
7588         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7589         (fbsd_handle_debug_trap): Remove target_ops parameter.
7590         (fbsd_nat_add_target): Delete.
7591         * fbsd-nat.h: Include "inf-ptrace.h".
7592         (fbsd_nat_add_target): Delete.
7593         (USE_SIGTRAP_SIGINFO): Define.
7594         (fbsd_nat_target): New class.
7595
7596         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7597         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7598         (amd64bsd_target): Delete.
7599         * amd64-bsd-nat.h: New file.
7600         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7601         "x86-bsd-nat.h".
7602         (amd64_fbsd_nat_target): New class.
7603         (the_amd64_fbsd_nat_target): New.
7604         (amd64fbsd_read_description): Refactor as method of
7605         amd64_fbsd_nat_target.
7606         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7607         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7608         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7609         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7610         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7611         (i386bsd_target): Delete.
7612         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7613         (i386bsd_fetch_inferior_registers)
7614         (i386bsd_store_inferior_registers): Declare.
7615         (i386_bsd_nat_target): New class.
7616         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7617         (the_i386_fbsd_nat_target): New.
7618         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7619         i386_fbsd_nat_target methods.
7620         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7621         (_initialize_i386fbsd_nat): Adjust to C++ification.
7622         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7623         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7624         (_initialize_x86_bsd_nat): Adjust to C++ification.
7625         * x86-bsd-nat.h: Include "x86-nat.h".
7626         (x86bsd_target): Delete declaration.
7627         (x86bsd_nat_target): New class.
7628
7629         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7630         (the_aarch64_fbsd_nat_target): New.
7631         (aarch64_fbsd_fetch_inferior_registers)
7632         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7633         aarch64_fbsd_nat_target.
7634         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7635         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7636         (the_alpha_bsd_nat_target): New.
7637         (alphabsd_fetch_inferior_registers)
7638         (alphabsd_store_inferior_registers): Refactor as
7639         alpha_bsd_nat_target methods.
7640         (_initialize_alphabsd_nat): Refactor as methods of
7641         alpha_bsd_nat_target.
7642         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7643         (the_amd64_nbsd_nat_target): New.
7644         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7645         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7646         (the_amd64_obsd_nat_target): New.
7647         (_initialize_amd64obsd_nat): Adjust to C++ification.
7648         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7649         (the_arm_fbsd_nat_target): New.
7650         (arm_fbsd_fetch_inferior_registers)
7651         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7652         (_initialize_arm_fbsd_nat): Refactor as methods of
7653         arm_fbsd_nat_target.
7654         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7655         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7656         (the_arm_netbsd_nat_target): New.
7657         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7658         arm_netbsd_nat_target.
7659         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7660         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7661         (the_hppa_nbsd_nat_target): New.
7662         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7663         hppa_nbsd_nat_target methods.
7664         (_initialize_hppanbsd_nat): Adjust to C++ification.
7665         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7666         (the_hppa_obsd_nat_target): New.
7667         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7668         methods of hppa_obsd_nat_target.
7669         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7670         add_target.
7671         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7672         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7673         add_target.
7674         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7675         (_initialize_i386obsd_nat): Use add_target.
7676         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7677         (the_m68k_bsd_nat_target): New.
7678         (m68kbsd_fetch_inferior_registers)
7679         (m68kbsd_store_inferior_registers): Refactor as methods of
7680         m68k_bsd_nat_target.
7681         (_initialize_m68kbsd_nat): Adjust to C++ification.
7682         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7683         (the_mips_fbsd_nat_target): New.
7684         (mips_fbsd_fetch_inferior_registers)
7685         (mips_fbsd_store_inferior_registers): Refactor as methods of
7686         mips_fbsd_nat_target.
7687         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7688         add_target.
7689         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7690         (the_mips_nbsd_nat_target): New.
7691         (mipsnbsd_fetch_inferior_registers)
7692         (mipsnbsd_store_inferior_registers): Refactor as methods of
7693         mips_nbsd_nat_target.
7694         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7695         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7696         (the_mips64_obsd_nat_target): New.
7697         (mips64obsd_fetch_inferior_registers)
7698         (mips64obsd_store_inferior_registers): Refactor as methods of
7699         mips64_obsd_nat_target.
7700         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7701         add_target.
7702         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7703         nbsd_nat_target.
7704         * nbsd-nat.h: Include "inf-ptrace.h".
7705         (nbsd_nat_target): New class.
7706         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7707         (obsd_wait): Refactor as methods of obsd_nat_target.
7708         (obsd_add_target): Delete.
7709         * obsd-nat.h: Include "inf-ptrace.h".
7710         (obsd_nat_target): New class.
7711         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7712         (the_ppc_fbsd_nat_target): New.
7713         (ppcfbsd_fetch_inferior_registers)
7714         (ppcfbsd_store_inferior_registers): Refactor as methods of
7715         ppc_fbsd_nat_target.
7716         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7717         add_target.
7718         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7719         (the_ppc_nbsd_nat_target): New.
7720         (ppcnbsd_fetch_inferior_registers)
7721         (ppcnbsd_store_inferior_registers): Refactor as methods of
7722         ppc_nbsd_nat_target.
7723         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7724         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7725         (the_ppc_obsd_nat_target): New.
7726         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7727         methods of ppc_obsd_nat_target.
7728         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7729         add_target.
7730         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7731         (the_sh_nbsd_nat_target): New.
7732         (shnbsd_fetch_inferior_registers)
7733         (shnbsd_store_inferior_registers): Refactor as methods of
7734         sh_nbsd_nat_target.
7735         (_initialize_shnbsd_nat): Adjust to C++ification.
7736         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7737         (inf_ptrace_xfer_partial): Delete.
7738         (sparc_xfer_partial, sparc_target): Delete.
7739         * sparc-nat.h (sparc_fetch_inferior_registers)
7740         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7741         (sparc_target): Delete function declaration.
7742         (sparc_target): New template class.
7743         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7744         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7745         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7746         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7747         add_target.
7748         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7749         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7750         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7751         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7752         add_target.
7753         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7754         (the_vax_bsd_nat_target): New.
7755         (vaxbsd_fetch_inferior_registers)
7756         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7757         methods.
7758         (_initialize_vaxbsd_nat): Adjust to C++ification.
7759
7760         * bsd-kvm.c (bsd_kvm_target): New class.
7761         (bsd_kvm_ops): Now a bsd_kvm_target.
7762         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7763         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7764         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7765         bsd_kvm_target.
7766         (bsd_kvm_return_one): Delete.
7767         (bsd_kvm_add_target): Adjust to C++ification.
7768
7769         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7770         (nto_procfs_target_procfs): New classes.
7771         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7772         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7773         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7774         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7775         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7776         (procfs_remove_hw_breakpoint, procfs_resume)
7777         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7778         (procfs_kill_inferior, procfs_store_registers)
7779         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7780         as methods of nto_procfs_target.
7781         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7782         (nto_native_ops): Delete.
7783         (procfs_open, procfs_native_open): Delete.
7784         (nto_native_ops): Now an nto_procfs_target_native.
7785         (init_procfs_targets): Adjust to C++ification.
7786         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7787         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7788         Refactor as methods of nto_procfs_target.
7789
7790         * go32-nat.c (go32_nat_target): New class.
7791         (the_go32_nat_target): New.
7792         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7793         (go32_store_registers, go32_xfer_partial, go32_files_info)
7794         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7795         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7796         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7797         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7798         (go32_target): Delete.
7799         (_initialize_go32_nat): Adjust to C++ification.
7800
7801         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7802         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7803         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7804         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7805         gnu_nat_target.
7806         (gnu_target): Delete.
7807         * gnu-nat.h (gnu_target): Delete.
7808         (gnu_nat_target): New class.
7809         * i386-gnu-nat.c (gnu_base_target): New.
7810         (i386_gnu_nat_target): New class.
7811         (the_i386_gnu_nat_target): New.
7812         (_initialize_i386gnu_nat): Adjust to C++ification.
7813
7814 2018-05-02  Pedro Alves  <palves@redhat.com>
7815
7816         * bfd-target.c (target_bfd_xclose): Rename to ...
7817         (target_bfd_close): ... this.
7818         (target_bfd_reopen): Adjust.
7819         * target.c (target_close): Remove references to to_xclose.
7820         * target.h (target_ops::to_xclose): Delete.
7821         (target_ops::to_close): Update comments.
7822
7823 2018-05-02  Pedro Alves  <palves@redhat.com>
7824
7825         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7826         "linux-nat.h".
7827         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7828         * inf-ptrace.c (inf_ptrace_register_u_offset)
7829         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7830         (inf_ptrace_store_register, inf_ptrace_store_registers)
7831         (inf_ptrace_trad_target): Move to ...
7832         * linux-nat-trad.c: ... this new file.
7833         * linux-nat-trad.h: New file.
7834         * linux-nat.c (linux_target_install_ops): Make extern.
7835         (linux_trad_target): Delete.
7836         * linux-nat.h (linux_trad_target): Delete declaration.
7837         (linux_target_install_ops): Declare.
7838         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7839         "linux-nat.h".
7840
7841 2018-05-02  Pedro Alves  <palves@redhat.com>
7842
7843         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7844         procfs_target/add_target here.
7845         * procfs.c (procfs_target): Make static.
7846         (_initialize_procfs): Call add_target here.
7847         * procfs.h (struct target_ops): Remove forward declaration.
7848         (procfs_target): Remove declaration.
7849         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7850
7851 2018-05-02  Pedro Alves  <palves@redhat.com>
7852
7853         * procfs.c (procfs_stopped_by_watchpoint)
7854         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7855         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7856         Forward declare.
7857         (procfs_use_watchpoints): Delete, move contents...
7858         (procfs_target): ... here.
7859         * procfs.h (procfs_use_watchpoints): Delete declaration.
7860         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7861         procfs_use_watchpoints.
7862         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7863         procfs_use_watchpoints.
7864
7865 2018-05-02  Tom Tromey  <tom@tromey.com>
7866
7867         PR python/20084:
7868         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7869         and var_zuinteger_unlimited.
7870         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7871         and PARAM_ZUINTEGER_UNLIMITED.
7872         (set_parameter_value): Handle var_zuinteger and
7873         var_zuinteger_unlimited.
7874         (add_setshow_generic): Likewise.
7875         (parmpy_init): Likewise.
7876
7877 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
7878
7879         PR rust/23124
7880         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7881         pointer is not null before dereferencing it.
7882
7883 2018-04-30  Tom Tromey  <tom@tromey.com>
7884
7885         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7886         is_mi_like_p.
7887
7888 2018-04-30  Tom Tromey  <tom@tromey.com>
7889
7890         * breakpoint.c (mention): Remove use of is_mi_like_p.
7891         (print_mention_ranged_breakpoint): Likewise.
7892         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7893         of is_mi_like_p.
7894
7895 2018-04-30  Tom Tromey  <tom@tromey.com>
7896
7897         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7898
7899 2018-04-30  Tom Tromey  <tom@tromey.com>
7900
7901         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7902         (info_spu_event_command): Remove some uses of is_mi_like_p.
7903
7904 2018-04-30  Tom Tromey  <tom@tromey.com>
7905
7906         * python/py-framefilter.c (py_print_single_arg)
7907         (enumerate_locals, py_print_args, py_print_frame): Remove some
7908         uses of is_mi_like_p.
7909
7910 2018-04-30  Tom Tromey  <tom@tromey.com>
7911
7912         * ui-out.c: Update.
7913         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7914         * ui-out.h (ui_out::is_mi_like_p): Now const.
7915         (ui_out::do_is_mi_like_p): Now const.
7916         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7917
7918 2018-04-30  Tom Tromey  <tom@tromey.com>
7919
7920         * varobj.c (varobj_set_visualizer): Use new_reference.
7921         * python/python.c (gdbpy_decode_line): Use new_reference.
7922         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7923         new_reference.
7924
7925 2018-04-30  Tom Tromey  <tom@tromey.com>
7926
7927         * varobj.c (install_new_value): Use new_reference.
7928         * value.h (value_incref): Return void.  Swap intro comment with
7929         value_decref.
7930         * value.c (set_value_parent): Use new_reference.
7931         (value_incref): Return void.  Update intro comment.
7932         (release_value): Use new_reference.
7933         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7934
7935 2018-04-30  Tom Tromey  <tom@tromey.com>
7936
7937         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7938         * gdb_bfd.h (new_bfd_ref): Remove.
7939         (gdb_bfd_open): Update comment.
7940         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7941         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7942         (gdb_bfd_fdopenr): Use new_reference.
7943         * exec.c (exec_file_attach): Use new_reference.
7944
7945 2018-04-30  Tom Tromey  <tom@tromey.com>
7946
7947         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7948         method.
7949
7950 2018-04-30  Tom Tromey  <tom@tromey.com>
7951
7952         * jit.c (jit_read_code_entry): Use type_align.
7953         * i386-tdep.c (i386_gdbarch_init): Don't call
7954         set_gdbarch_long_long_align_bit.
7955         * gdbarch.sh: Remove long_long_align_bit.
7956         * gdbarch.c, gdbarch.h: Rebuild.
7957         * arc-tdep.c (arc_type_align): New function.
7958         (arc_gdbarch_init): Use arc_type_align.  Don't call
7959         set_gdbarch_long_long_align_bit.
7960
7961 2018-04-30  Tom Tromey  <tom@tromey.com>
7962
7963         * rust-lang.c (rust_type_alignment): Remove.
7964         (rust_composite_type): Use type_align.
7965
7966 2018-04-30  Tom Tromey  <tom@tromey.com>
7967
7968         * NEWS: Mention Type.align.
7969         * python/py-type.c (typy_get_alignof): New function.
7970         (type_object_getset): Add "alignof".
7971
7972 2018-04-30  Tom Tromey  <tom@tromey.com>
7973
7974         PR exp/17095:
7975         * NEWS: Update.
7976         * std-operator.def (UNOP_ALIGNOF): New operator.
7977         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7978         New.
7979         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7980         * c-lang.c (c_op_print_tab): Add alignof.
7981         * c-exp.y (ALIGNOF): New token.
7982         (exp): Add "ALIGNOF" production.
7983         (ident_tokens): Add _Alignof and alignof.
7984
7985 2018-04-30  Tom Tromey  <tom@tromey.com>
7986
7987         * i386-tdep.c (i386_type_align): New function.
7988         (i386_gdbarch_init): Update.
7989         * gdbarch.sh (type_align): New method.
7990         * gdbarch.c, gdbarch.h: Rebuild.
7991         * arch-utils.h (default_type_align): Declare.
7992         * arch-utils.c (default_type_align): New function.
7993         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7994         (struct type) <align_log2>: New field.
7995         <instance_flags>: Now a bitfield.
7996         (TYPE_RAW_ALIGN): New macro.
7997         (type_align, type_raw_align, set_type_align): Declare.
7998         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7999         functions.
8000         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8001         (get_alignment, maybe_set_alignment): New functions.
8002         (read_structure_type, read_enumeration_type, read_array_type)
8003         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8004         (read_subrange_type, read_base_type): Set type alignment.
8005
8006 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8007
8008         * dwarf2read.c (read_index_from_section): Use bool.
8009
8010 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8011
8012         PR gdb/22950
8013         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8014         with #ifdef.
8015
8016 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8017
8018         PR build/22873
8019         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8020         last step, and do it atomically.
8021
8022 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8023
8024         * compile/compile-c-types.c (convert_int, convert_float):
8025         Update for C FE v1.
8026
8027 2018-04-27  Tom Tromey  <tom@tromey.com>
8028
8029         PR rust/22545:
8030         * rust-lang.c (rust_inclusive_range_type_p): New function.
8031         (rust_range): Handle inclusive ranges.
8032         (rust_compute_range): Likewise.
8033         * rust-exp.y (struct rust_op) <inclusive>: New field.
8034         (DOTDOTEQ): New constant.
8035         (range_expr): Add "..=" productions.
8036         (operator_tokens): Add "..=" token.
8037         (ast_range): Add "inclusive" parameter.
8038         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8039         ranges.
8040         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8041         bounds values.
8042         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8043         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8044         Update comments.
8045         * expprint.c (print_subexp_standard): Handle new bounds values.
8046         (dump_subexp_body_standard): Likewise.
8047
8048 2018-04-27  Tom Tromey  <tom@tromey.com>
8049
8050         * configure: Rebuild.
8051         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8052         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8053         "OVERRIDE".
8054         (class symbol_needs_eval_context): Likewise.
8055         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8056         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8057         "virtual".
8058         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8059         "override".
8060         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8061         * aarch64-tdep.c (instruction_reader::read): Use "override".
8062         (instruction_reader_test::read): Likewise.
8063         * arm-tdep.c (instruction_reader::read): Use "override".
8064         (instruction_reader_thumb::read): Likewise.
8065
8066 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8067
8068         PR remote/9665
8069         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8070         instead of remote_send.
8071         (remote_send): Remove.
8072
8073 2018-04-26  Pedro Alves  <palves@redhat.com>
8074
8075         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8076         find_function_start_sal instead of find_pc_line.
8077
8078 2018-04-26  Pedro Alves  <palves@redhat.com>
8079
8080         * breakpoint.c (set_breakpoint_location_function): Handle
8081         mst_data_gnu_ifunc.
8082         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8083         * elfread.c (elf_symtab_read): Give data symbols with
8084         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8085         (elf_rel_plt_read): Update comment.
8086         * linespec.c (convert_linespec_to_sals): Handle
8087         mst_data_gnu_ifunc.
8088         (minsym_found): Handle mst_data_gnu_ifunc.
8089         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8090         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8091         * parse.c (find_minsym_type_and_address): Handle
8092         mst_data_gnu_ifunc.
8093         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8094         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8095         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8096         comment.
8097         <mst_data_gnu_ifunc>: New enumerator.
8098
8099 2018-04-26  Pedro Alves  <palves@redhat.com>
8100
8101         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8102         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8103         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8104         Handle it.
8105         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8106         (lookup_minimal_symbol_by_pc): Adjust.
8107         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8108         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8109         * minsyms.h (lookup_msym_prefer): New enum.
8110         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8111         parameter by a lookup_msym_prefer parameter.
8112
8113 2018-04-26  Pedro Alves  <palves@redhat.com>
8114
8115         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8116         ends in "@plt" instead of looking at the symbol's section.
8117
8118 2018-04-26  Pedro Alves  <palves@redhat.com>
8119
8120         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8121         all references.
8122         (find_pc_partial_function_gnu_ifunc): Rename to ...
8123         (find_pc_partial_function): ... this, and remove references to
8124         'is_gnu_ifunc_p'.
8125         (find_pc_partial_function): Delete old implementation.
8126         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8127
8128 2018-04-26  Pedro Alves  <palves@redhat.com>
8129
8130         * linespec.c (struct bound_minimal_symbol_search_key): New.
8131         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8132         skip first line if we found a GNU ifunc minimal symbol by name.
8133         (compare_msymbols): Change parameters to work with a destructured
8134         lhs minsym.
8135         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8136         functions.
8137
8138 2018-04-26  Pedro Alves  <palves@redhat.com>
8139
8140         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8141         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8142         address/name.
8143         (add_location_to_breakpoint): Store the minsym and the objfile in
8144         the breakpoint location.
8145         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8146         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8147         Record the minsym in the sal.
8148         * symtab.h (symtab_and_line) <msymbol>: New field.
8149
8150 2018-04-26  Pedro Alves  <palves@redhat.com>
8151
8152         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8153         unless we actually resolved the ifunc.
8154
8155 2018-04-26  Pedro Alves  <palves@redhat.com>
8156
8157         * c-exp.y (variable production): Prefer ifunc minsyms over
8158         regular function symbols.
8159         * symtab.c (find_gnu_ifunc): New function.
8160         * minsyms.h (lookup_msym_prefer): New enum.
8161         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8162         parameter by a lookup_msym_prefer parameter.
8163         * symtab.h (find_gnu_ifunc): New declaration.
8164
8165 2018-04-26  Pedro Alves  <palves@redhat.com>
8166
8167         * blockframe.c (find_gnu_ifunc_target_type): New function.
8168         (find_function_type): New.
8169         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8170         return a value with a memory address.
8171         (eval_call): For calls to GNU ifunc functions, try to find the
8172         type of the target function from the type that the resolver
8173         returns.
8174         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8175         symbols.
8176         * infcall.c (find_function_return_type): Delete.
8177         (find_function_addr): Add 'function_type' parameter.  For calls to
8178         GNU ifunc functions, try to find the type of the target function
8179         from the type that the resolver returns, and return it via
8180         FUNCTION_TYPE.
8181         (call_function_by_hand_dummy): Adjust to use the function type
8182         returned by find_function_addr.
8183         (find_function_addr): Add 'function_type' parameter and move
8184         description here.
8185         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8186         declarations.
8187
8188 2018-04-26  Pedro Alves  <palves@redhat.com>
8189
8190         * c-exp.y (variable production): Skip finding an alias for ifunc
8191         symbols.
8192
8193 2018-04-26  Pedro Alves  <palves@redhat.com>
8194
8195         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8196
8197 2018-04-25  Pedro Alves  <palves@redhat.com>
8198
8199         * infcmd.c (kill_command): Print the pid as string, not the whole
8200         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8201         message.
8202         * remote.c (remote_detach_1): Print the pid as string, not the
8203         whole thread's ptid.
8204
8205 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8206             Sergio Durigan Junior  <sergiodj@redhat.com>
8207             Pedro Alves  <palves@redhat.com>
8208
8209         * infcmd.c (kill_command): Print message when inferior has
8210         been killed.
8211         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8212         '1'.
8213         (add_inferior): Improve message printed when
8214         'print_inferior_events' is on.
8215         (exit_inferior): Remove message printed when
8216         'print_inferior_events' is on.
8217         (detach_inferior): Improve message printed when
8218         'print_inferior_events' is on.
8219         (initialize_inferiors): Use 'add_inferior_silent' to set
8220         'current_inferior_'.
8221         * inferior.h (print_inferior_events): Declare here as
8222         'extern'.
8223         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8224         '[Detaching...]' messages when 'print_inferior_events' is on.
8225         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8226         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8227         'Detaching after fork from child...', replace it by '... from
8228         parent...'.
8229         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8230         prefix/suffix when printing 'Detaching...' messages.  Print
8231         them when 'print_inferior_events' is on.
8232         * remote.c (remote_detach_1): Print message when detaching
8233         from inferior and '!is_fork_parent'.
8234
8235 2018-04-24  Tom Tromey  <tom@tromey.com>
8236
8237         * cli-out.h: Reindent.
8238
8239 2018-04-24  Tom Tromey  <tom@tromey.com>
8240
8241         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8242         (cli_ui_out::do_field_string): Use fputs_filtered.
8243         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8244
8245 2018-04-23  Tom Tromey  <tom@tromey.com>
8246
8247         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8248         gdb::unique_xmalloc_ptr.
8249
8250 2018-04-23  Tom Tromey  <tom@tromey.com>
8251
8252         * configure: Rebuild.
8253
8254 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8255
8256         PR gdb/23095
8257         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8258         prepare_for_testing.  Set normal_bp to r_debug_state if target
8259         is bsd.
8260
8261 2018-04-21  Pedro Alves  <palves@redhat.com>
8262             Rajendra SY  <rajendra.sy@gmail.com>
8263
8264         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8265         * remote.c (extended_remote_attach): In all-stop mode, mark the
8266         thread as executing.
8267
8268 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8269
8270         * thread.c (thread_apply_all_command): Fix comment.
8271         (thread_command): Fix comment.
8272
8273 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8274
8275         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8276         parameter.
8277         * features/aarch64-core.c (create_feature_aarch64_core):
8278         Regenerate.
8279         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8280         Likewise.
8281         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8282         Likewise.
8283         * features/i386/32bit-avx512.c
8284         (create_feature_i386_32bit_avx512): Likewise.
8285         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8286         Likewise.
8287         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8288         Likewise.
8289         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8290         Likewise.
8291         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8292         Likewise.
8293         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8294         Likewise.
8295         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8296         Likewise.
8297         * features/i386/64bit-avx512.c
8298         (create_feature_i386_64bit_avx512): Likewise.
8299         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8300         Likewise.
8301         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8302         Likewise.
8303         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8304         Likewise.
8305         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8306         Likewise.
8307         * features/i386/64bit-segments.c
8308         (create_feature_i386_64bit_segments): Likewise.
8309         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8310         Likewise.
8311         * features/i386/x32-core.c
8312         (create_feature_i386_x32_core): Likewise.
8313         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8314         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8315         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8316         * target-descriptions.c: In generated code, don't pass xml
8317         filename.
8318
8319 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8320
8321         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8322         (print_xml_feature::visit_post): Likewise.
8323         (print_xml_feature::visit): Likewise.
8324         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8325         (print_xml_feature): Add new class.
8326         * regformats/regdat.sh: Null xmltarget on feature targets.
8327         * target-descriptions.c (struct target_desc): Add xmltarget.
8328         (maintenance_check_tdesc_xml_convert): Add unittest function.
8329         (tdesc_get_features_xml): Add function to get xml.
8330         (maintenance_check_xml_descriptions): Test xml generation.
8331         * xml-tdesc.c (string_read_description_xml): Add function.
8332         * xml-tdesc.h (string_read_description_xml): Add declaration.
8333
8334 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8335
8336         * features/Makefile: Add feature marker to targets with new style
8337         target descriptions.
8338         * regformats/aarch64.dat: Regenerate.
8339         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8340         * regformats/i386/amd64-avx-linux.dat: Likewise.
8341         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8342         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8343         * regformats/i386/amd64-linux.dat: Likewise.
8344         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8345         * regformats/i386/amd64.dat: Likewise.
8346         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8347         * regformats/i386/i386-avx-linux.dat: Likewise.
8348         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8349         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8350         * regformats/i386/i386-linux.dat: Likewise.
8351         * regformats/i386/i386-mmx-linux.dat: Likewise.
8352         * regformats/i386/i386-mpx-linux.dat: Likewise.
8353         * regformats/i386/i386.dat: Likewise.
8354         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8355         * regformats/i386/x32-avx-linux.dat: Likewise.
8356         * regformats/i386/x32-linux.dat: Likewise.
8357         * regformats/tic6x-c62x-linux.dat: Likewise.
8358         * regformats/tic6x-c64x-linux.dat: Likewise.
8359         * regformats/tic6x-c64xp-linux.dat: Likewise.
8360         * regformats/regdat.sh: Parse feature marker.
8361
8362 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8363
8364         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8365         (tdesc_osabi_name): Likewise.
8366         * target-descriptions.c (tdesc_architecture_name): Add new
8367         function.
8368         (tdesc_osabi_name): Likewise.
8369
8370 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8371
8372         * common/tdesc.c (tdesc_predefined_type): Move to here.
8373         (tdesc_named_type): Likewise.
8374         (tdesc_create_vector): Likewise.
8375         (tdesc_create_struct): Likewise.
8376         (tdesc_set_struct_size): Likewise.
8377         (tdesc_create_union): Likewise.
8378         (tdesc_create_flags): Likewise.
8379         (tdesc_create_enum): Likewise.
8380         (tdesc_add_field): Likewise.
8381         (tdesc_add_typed_bitfield): Likewise.
8382         (tdesc_add_bitfield): Likewise.
8383         (tdesc_add_flag): Likewise.
8384         (tdesc_add_enum_value): Likewise.
8385         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8386         (struct tdesc_type_vector): Likewise.
8387         (struct tdesc_type_field): Likewise.
8388         (struct tdesc_type_with_fields): Likewise.
8389         (tdesc_create_enum): Add declaration.
8390         (tdesc_add_typed_bitfield): Likewise.
8391         (tdesc_add_enum_value): Likewise.
8392         * target-descriptions.c (tdesc_type_field): Move from here.
8393         (tdesc_type_builtin): Likewise.
8394         (tdesc_type_vector): Likewise.
8395         (tdesc_type_with_fields): Likewise.
8396         (tdesc_predefined_types): Likewise.
8397         (tdesc_named_type): Likewise.
8398         (tdesc_create_vector): Likewise.
8399         (tdesc_create_struct): Likewise.
8400         (tdesc_set_struct_size): Likewise.
8401         (tdesc_create_union): Likewise.
8402         (tdesc_create_flags): Likewise.
8403         (tdesc_create_enum): Likewise.
8404         (tdesc_add_field): Likewise.
8405         (tdesc_add_typed_bitfield): Likewise.
8406         (tdesc_add_bitfield): Likewise.
8407         (tdesc_add_flag): Likewise.
8408         (tdesc_add_enum_value): Likewise.
8409         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8410         (tdesc_add_typed_bitfield): Likewise.
8411         (tdesc_add_enum_value): Likewise.
8412
8413 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8414
8415         * common/tdesc.c (tdesc_feature::accept): Move to here.
8416         (tdesc_feature::operator==): Likewise.
8417         (tdesc_create_reg): Likewise.
8418         * common/tdesc.h (tdesc_type_kind): Likewise.
8419         (struct tdesc_type): Likewise.
8420         (struct tdesc_feature): Likewise.
8421         * regformats/regdat.sh: Create a feature.
8422         * target-descriptions.c (tdesc_type_kind): Move from here.
8423         (tdesc_type): Likewise.
8424         (tdesc_type_up): Likewise.
8425         (tdesc_feature): Likewise.
8426         (tdesc_create_reg): Likewise.
8427
8428 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8429
8430         * Makefile.in: Add arch/tdesc.c
8431         * common/tdesc.c: New file.
8432         * common/tdesc.h (tdesc_element_visitor): Move to here.
8433         (tdesc_element): Likewise.
8434         (tdesc_reg): Likewise.
8435         (tdesc_reg_up): Likewise.
8436         * regformats/regdef.h (reg): Add offset to constructors.
8437         * target-descriptions.c (tdesc_element_visitor): Move from here.
8438         (tdesc_element): Likewise.
8439         (tdesc_reg): Likewise.
8440         (tdesc_reg_up): Likewise.
8441
8442 2018-04-17  Tom Tromey  <tom@tromey.com>
8443
8444         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8445         discriminant field.
8446
8447 2018-04-17  Tom Tromey  <tom@tromey.com>
8448
8449         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8450
8451 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8452
8453         * symtab.c (print_symbol_info): Skip printing filename and line
8454         number when `last' is NULL.
8455         (symtab_symbol_info): Use empty string instead of NULL for first
8456         invocation of print_symbol_info.
8457         (rbreak_command): Pass NULL to `last' parameter of
8458         print_symbol_info.
8459
8460 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8461
8462         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8463         instead of nullptr.
8464
8465 2018-04-16  Pedro Alves  <palves@redhat.com>
8466
8467         * MAINTAINERS (sh): Remove.
8468         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8469         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8470         (ALLDEPFILES): Remove sh64-tdep.c.
8471         * NEWS: Mentions that support for SH-5/SH64 is removed.
8472         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8473         (sh*-*-openbsd*): Ditto.
8474         (sh64-*-elf*): Remove.
8475         (sh*): Remove.
8476         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8477         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8478         * sh-tdep.c: No longer include "sh64-tdep.h".
8479         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8480         * sh64-tdep.c, sh64-tdep.h: Remove files.
8481
8482 2018-04-16  Pedro Alves  <palves@redhat.com>
8483
8484         * MAINTAINERS: Remove m88k.
8485         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8486         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8487         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8488         * NEWS: Mention that support for m88k was removed.
8489         * configure.host (m88*-*-*): Remove support.
8490         * configure.nat (m88k-*-*): Remove support.
8491         * configure.tgt (m88*-*-openbsd*): Remove.
8492         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8493
8494 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8495
8496         * configure.tgt (x86_tobjs): New variable.
8497         (amd64_tobjs, i386_tobjs): Use it.
8498
8499 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8500
8501         * symtab.c (print_symbol_info): Precede the symbol definition by
8502         the line number when available.
8503         * NEWS: Advertise this enhancement.
8504
8505 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8506
8507         * NEWS (New options): announce set/show record btrace cpu.
8508         * btrace.c: Include record-btrace.h.
8509         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8510         the vendor is unknown.
8511         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8512         Maybe overwrite the btrace configuration's cpu.
8513         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8514         (btrace_fetch): Add cpu parameter.  Update callers.
8515         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8516         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8517         errata workarounds if the vendor is unknown.
8518         * python/py-record-btrace.c: Include record-btrace.h.
8519         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8520         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8521         * record-btrace.c (record_btrace_cpu_state_kind): New.
8522         (record_btrace_cpu): New.
8523         (set_record_btrace_cpu_cmdlist): New.
8524         (record_btrace_get_cpu): New.
8525         (require_btrace_thread, record_btrace_info)
8526         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8527         (cmd_set_record_btrace_cpu_none): New.
8528         (cmd_set_record_btrace_cpu_auto): New.
8529         (cmd_set_record_btrace_cpu): New.
8530         (cmd_show_record_btrace_cpu): New.
8531         (_initialize_record_btrace): Initialize set/show record btrace cpu
8532         commands.
8533         * record-btrace.h (record_btrace_get_cpu): New.
8534
8535 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8536
8537         * record.c (set_record_command): Fix typo in message.
8538
8539 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8540
8541         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8542
8543 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8544
8545         * infrun.c (process_event_stop_test): Call
8546         gdbarch_in_indirect_branch_thunk.
8547         * gdbarch.sh (in_indirect_branch_thunk): New.
8548         * gdbarch.c: Regenerated.
8549         * gdbarch.h: Regenerated.
8550         * x86-tdep.h: New.
8551         * x86-tdep.c: New.
8552         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8553         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8554         (ALLDEPFILES): Add x86-tdep.c.
8555         * arch-utils.h (default_in_indirect_branch_thunk): New.
8556         * arch-utils.c (default_in_indirect_branch_thunk): New.
8557         * i386-tdep: Include x86-tdep.h.
8558         (i386_in_indirect_branch_thunk): New.
8559         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8560         function.
8561         * amd64-tdep: Include x86-tdep.h.
8562         (amd64_in_indirect_branch_thunk): New.
8563         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8564
8565 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8566
8567         PR gdb/23053
8568         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8569         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8570         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8571         regression.
8572
8573 2018-04-12  Tom Tromey  <tom@tromey.com>
8574
8575         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8576         (rust_evaluate_subexp): Likewise.
8577
8578 2018-04-12  Pedro Alves  <palves@redhat.com>
8579
8580         * procfs.c (procfs_detach): Make forward declaration's prototype
8581         match definition's protototype.
8582         (proc_get_LDT_entry): Remove stale do_cleanups call.
8583
8584 2018-04-12  Pedro Alves  <palves@redhat.com>
8585
8586         * target.h (target_ops::to_has_exited): Delete.
8587         (target_has_exited): Delete.
8588         * target-delegates.c: Regenerate.
8589
8590 2018-04-11  Pedro Alves  <palves@redhat.com>
8591
8592         * target.c (fileio_fh_t::t): Add comment.
8593         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8594         (target_fileio_close): Handle a NULL target.
8595         (invalidate_fileio_fh): New.
8596         (target_close): Call it.
8597         * remote.c (remote_hostio_send_command): No longer check whether
8598         remote_desc is open.
8599
8600 2018-04-11  Pedro Alves  <palves@redhat.com>
8601
8602         * target.c (fileio_fh_t): Make it a named struct instead of a
8603         typedef.
8604         (fileio_fh_t::is_closed): New method.
8605         (DEF_VEC_O (fileio_fh_t)): Remove.
8606         (fileio_fhandles): Now a std::vector.
8607         (is_closed_fileio_fh): Delete.
8608         (acquire_fileio_fd): Adjust.  Rename parameters.
8609         (release_fileio_fd): Adjust.
8610         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8611         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8612         (target_fileio_close): Adjust.
8613
8614 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8615
8616         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8617         index.
8618
8619 2018-04-10  Pedro Alves  <palves@redhat.com>
8620
8621         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8622         (scoped_finish_thread_state): New class.
8623         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8624         cleanup.
8625         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8626         (fetch_inferior_event, normal_stop): Likewise.
8627         * thread.c (finish_thread_state_cleanup): Delete.
8628
8629 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8630             Pedro Alves  <palves@redhat.com>
8631
8632         * value.c: Include "selftest.h" and "common/array-view.h".
8633         (struct range) <operator ==>: New.
8634         (test_ranges_contain): New.
8635         (check_ranges_vector): New.
8636         (test_insert_into_bit_range_vector): New.
8637         (_initialize_values): Register selftests.
8638         * common/array-view.h (operator==, operator!=): New.
8639
8640 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8641
8642         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8643         an iterator.
8644         * inline-frame.c: Include <algorithm>.
8645         (struct inline_state): Add constructor.
8646         (inline_state_s): Remove.
8647         (DEF_VEC_O(inline_state_s)): Remove.
8648         (inline_states): Change type to std::vector.
8649         (find_inline_frame_state): Adjust to std::vector.
8650         (allocate_inline_frame_state): Remove.
8651         (clear_inline_frame_state): Adjust to std::vector.
8652         (skip_inline_frames): Adjust to std::vector.
8653
8654 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8655
8656         * tracepoint.h (struct trace_state_variable): Add constructor.
8657         <name>: Change type to std::string.
8658         * tracepoint.c (tsv_s): Remove.
8659         (DEF_VEC_O(tsv_s)): Remove.
8660         (tvariables): Change to std::vector.
8661         (create_trace_state_variable): Adjust to std::vector.
8662         (find_trace_state_variable): Likewise.
8663         (find_trace_state_variable_by_number): Likewise.
8664         (delete_trace_state_variable): Likewise.
8665         (trace_variable_command): Adjust to std::string.
8666         (delete_trace_variable_command): Likewise.
8667         (tvariables_info_1): Adjust to std::vector.
8668         (save_trace_state_variables): Likewise.
8669         (start_tracing): Likewise.
8670         (merge_uploaded_trace_state_variables): Adjust to std::vector
8671         and std::string.
8672         * target.h (struct target_ops)
8673         <to_download_trace_state_variable>: Pass reference to
8674         trace_state_variable.
8675         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8676         * target-delegates.c: Re-generate.
8677         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8678         (mi_tsv_deleted): Likewise.
8679         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8680         * remote.c (remote_download_trace_state_variable): Change
8681         pointer to reference and adjust.
8682         * make-target-delegates (parse_argtypes): Handle references.
8683         (write_function_header): Likewise.
8684         (munge_type): Likewise.
8685
8686 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8687
8688         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8689         string_view-selftests.c.
8690         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8691         testsuite.
8692         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8693         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8694         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8695         * unittests/basic_string_view/element_access/char/1.cc:
8696         Likewise.
8697         * unittests/basic_string_view/element_access/char/empty.cc:
8698         Likewise.
8699         * unittests/basic_string_view/element_access/char/front_back.cc:
8700         Likewise.
8701         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8702         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8703         Likewise.
8704         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8705         Likewise.
8706         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8707         Likewise.
8708         * unittests/basic_string_view/operations/compare/char/1.cc:
8709         Likewise.
8710         * unittests/basic_string_view/operations/compare/char/13650.cc:
8711         Likewise.
8712         * unittests/basic_string_view/operations/copy/char/1.cc:
8713         Likewise.
8714         * unittests/basic_string_view/operations/data/char/1.cc:
8715         Likewise.
8716         * unittests/basic_string_view/operations/find/char/1.cc:
8717         Likewise.
8718         * unittests/basic_string_view/operations/find/char/2.cc:
8719         Likewise.
8720         * unittests/basic_string_view/operations/find/char/3.cc:
8721         Likewise.
8722         * unittests/basic_string_view/operations/find/char/4.cc:
8723         Likewise.
8724         * unittests/basic_string_view/operations/rfind/char/1.cc:
8725         Likewise.
8726         * unittests/basic_string_view/operations/rfind/char/2.cc:
8727         Likewise.
8728         * unittests/basic_string_view/operations/rfind/char/3.cc:
8729         Likewise.
8730         * unittests/basic_string_view/operations/substr/char/1.cc:
8731         Likewise.
8732         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8733         * unittests/string_view-selftests.c: New file.
8734
8735 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8736
8737         * unittests/basic_string_view/capacity/1.cc: New file.
8738         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8739         * unittests/basic_string_view/cons/char/1.cc: New file.
8740         * unittests/basic_string_view/cons/char/2.cc: New file.
8741         * unittests/basic_string_view/cons/char/3.cc: New file.
8742         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8743         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8744         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8745         * unittests/basic_string_view/element_access/char/1.cc: New file.
8746         * unittests/basic_string_view/element_access/char/2.cc: New file.
8747         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8748         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8749         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8750         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8751         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8752         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8753         * unittests/basic_string_view/include.cc: New file.
8754         * unittests/basic_string_view/inserters/char/1.cc: New file.
8755         * unittests/basic_string_view/inserters/char/2.cc: New file.
8756         * unittests/basic_string_view/inserters/char/3.cc: New file.
8757         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8758         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8759         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8760         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8761         * unittests/basic_string_view/literals/types.cc: New file.
8762         * unittests/basic_string_view/literals/values.cc: New file.
8763         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8764         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8765         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8766         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8767         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8768         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8769         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8770         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8771         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8772         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8773         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8774         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8775         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8776         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8777         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8778         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8779         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8780         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8781         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8782         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8783         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8784         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8785         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8786         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8787         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8788         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8789         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8790         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8791         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8792         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8793         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8794         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8795         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8796         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8797         * unittests/basic_string_view/operators/char/2.cc: New file.
8798         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8799         * unittests/basic_string_view/range_access/char/1.cc: New file.
8800         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8801         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8802         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8803         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8804         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8805         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8806         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8807         * unittests/basic_string_view/typedefs.cc: New file.
8808         * unittests/basic_string_view/types/1.cc: New file.
8809
8810 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8811
8812         * common/gdb_string_view.h: Remove libstdc++ implementation
8813         details, adjust to gdb reality.
8814         * common/gdb_string_view.tcc: Likewise.
8815         * cli/cli-script.c (struct string_view): Remove.
8816         (user_args) <m_args>: Change element type to gdb::string_view.
8817         (user_args::insert_args): Adjust.
8818
8819 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8820
8821         * common/gdb_string_view.h: New file.
8822         * common/gdb_string_view.tcc: New file.
8823
8824 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8825
8826         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8827         * configure: Re-generate.
8828
8829 2018-04-09  Pedro Alves  <palves@redhat.com>
8830
8831         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8832         (set_target_gdbarch): Call
8833         gdb::observers::architecture_changed.notify instead of
8834         observer_notify_architecture_changed.
8835
8836 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8837
8838         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8839         (do_restore_current_traceframe_cleanup): Remove.
8840         (restore_current_traceframe_cleanup_dtor): Remove.
8841         (make_cleanup_restore_current_traceframe): Remove.
8842         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8843         New.
8844         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8845         * infrun.c (fetch_inferior_event): Use
8846         scoped_restore_current_traceframe.
8847
8848 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8849
8850         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8851         Remove.
8852         <n_allocated_type_units>: Remove.
8853         <all_type_units>: Change to std::vector.
8854         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8855         to std::vector change.
8856         (dwarf2_per_objfile::get_cutu): Likewise.
8857         (dwarf2_per_objfile::get_tu): Likewise.
8858         (create_signatured_type_table_from_index): Likewise.
8859         (create_signatured_type_table_from_debug_names): Likewise.
8860         (dw2_symtab_iter_next): Likewise.
8861         (dw2_print_stats): Likewise.
8862         (dw2_expand_all_symtabs): Likewise.
8863         (dw2_expand_marked_cus): Likewise.
8864         (dw2_debug_names_iterator::next): Likewise.
8865         (dwarf2_initialize_objfile): Likewise.
8866         (add_signatured_type_cu_to_table): Likewise.
8867         (create_all_type_units): Likewise.
8868         (add_type_unit): Likewise.
8869         (struct tu_abbrev_offset): Add constructor.
8870         (build_type_psymtabs_1): Adjust to std::vector change.
8871         (print_tu_stats): Likewise.
8872         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8873         (write_debug_names): Likewise.
8874
8875 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8876
8877         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8878         Make an std::vector.
8879         <n_comp_units>: Remove.
8880         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8881         to std::vector change.
8882         (dwarf2_per_objfile::get_cutu): Likewise.
8883         (dwarf2_per_objfile::get_cu): Likewise.
8884         (create_cus_from_index): Likewise.
8885         (create_addrmap_from_index): Likewise.
8886         (create_addrmap_from_aranges): Likewise.
8887         (dwarf2_read_index): Likewise.
8888         (dw2_find_last_source_symtab): Likewise.
8889         (dw2_map_symtabs_matching_filename): Likewise.
8890         (dw2_symtab_iter_next): Likewise.
8891         (dw2_print_stats): Likewise.
8892         (dw2_expand_all_symtabs): Likewise.
8893         (dw2_expand_symtabs_with_fullname): Likewise.
8894         (dw2_expand_marked_cus): Likewise.
8895         (dw2_map_symbol_filenames): Likewise.
8896         (create_cus_from_debug_names): Likewise.
8897         (dwarf2_read_debug_names): Likewise.
8898         (dw2_debug_names_iterator::next): Likewise.
8899         (dwarf2_initialize_objfile): Likewise.
8900         (set_partial_user): Likewise.
8901         (dwarf2_build_psymtabs_hard): Likewise.
8902         (read_comp_units_from_section): Remove arguments, adjust to
8903         std::vector change.
8904         (create_all_comp_units): Adjust to std::vector and
8905         read_comp_units_from_section changes.
8906         (dwarf2_find_containing_comp_unit): Adjust to std::vector
8907         change.
8908         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8909         (psyms_seen_size): Likewise.
8910         (write_gdbindex): Likewise.
8911         (write_debug_names): Likewise.
8912
8913 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8914
8915         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8916         with dwarf2_per_objfile.
8917         (create_cus_from_index): Likewise.
8918         (create_signatured_type_table_from_index): Likewise.
8919         (dwarf2_read_index): Likewise.
8920         (dwarf2_initialize_objfile): Likewise.
8921         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
8922         per_cu rather than get_dwarf2_per_objfile.
8923
8924 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8925
8926         * dwarf2read.h (struct signatured_type): Forward declare.
8927         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8928         New methods.
8929         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8930         (dw2_get_cutu): ...this.
8931         (dwarf2_per_objfile::get_cu): Rename from...
8932         (dw2_get_cu): ...this.
8933         (dwarf2_per_objfile::get_tu): New.
8934         (create_addrmap_from_index): Adjust.
8935         (create_addrmap_from_aranges): Adjust.
8936         (dw2_find_last_source_symtab): Adjust.
8937         (dw2_map_symtabs_matching_filename): Adjust.
8938         (dw2_symtab_iter_next): Adjust.
8939         (dw2_print_stats): Adjust.
8940         (dw2_expand_all_symtabs): Adjust.
8941         (dw2_expand_symtabs_with_fullname): Adjust.
8942         (dw2_expand_marked_cus): Adjust.
8943         (dw_expand_symtabs_matching_file_matcher): Adjust.
8944         (dw2_map_symbol_filenames): Adjust.
8945         (dw2_debug_names_iterator::next): Adjust.
8946         (dwarf2_initialize_objfile): Adjust.
8947         (set_partial_user): Adjust.
8948         (dwarf2_build_psymtabs_hard): Adjust.
8949
8950 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8951
8952         * dwarf2read.c (create_signatured_type_table_from_debug_names):
8953         Remove unused variables.
8954         (dw2_map_symtabs_matching_filename): Likewise.
8955         (dwarf2_record_block_ranges): Likewise.
8956         (dwarf2_read_addr_index): Likewise.
8957         (follow_die_offset): Likewise.
8958
8959 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8960
8961         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8962         to symbol_file_add_main.
8963
8964 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8965
8966         PR mi/22299
8967         * mi/mi-console.c (do_fputc_async_safe): New.
8968         (mi_console_file::write_async_safe): New.
8969         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8970         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8971         New.
8972         * ui-file.c (ui_file::putstrn): Adjust call to
8973         fputstrn_unfiltered.
8974         * utils.c (printchar): Replace do_fputs and do_fprintf
8975         parameters by do_fputc.
8976         (fputstr_filtered): Adjust call to printchar.
8977         (fputstr_unfiltered): Likewise.
8978         (fputstrn_filtered): Likewise.
8979         (fputstrn_unfiltered): Add do_fputc parameter, pass to
8980         printchar.
8981         * utils.h (do_fputc_ftype): New typedef.
8982         (fputstrn_unfiltered): Add do_fputc parameter.
8983
8984 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8985
8986         * regformats/i386/i386-avx.dat: Remove.
8987
8988 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8989
8990         PR gdb/22979
8991         * amd64-tdep.c (amd64_none_init_abi): New function.
8992         (amd64_x32_none_init_abi): New function.
8993         (_initialize_amd64_tdep): Register handlers for x86-64 and
8994         x64_32 with GDB_OSABI_NONE.
8995         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8996         GDB_OSABI_NONE osabi.
8997
8998 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8999
9000         PR gdb/22980
9001         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9002         GDB_OSABI_NONE.
9003         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9004         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9005
9006 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9007
9008         * common/byte-vector.h (char_vector): New type.
9009         * target.h (target_read_alloc): Return
9010         gdb::optional<byte_vector>.
9011         (target_read_stralloc): Return gdb::optional<char_vector>.
9012         (target_get_osdata): Return gdb::optional<char_vector>.
9013         * target.c (target_read_alloc_1): Templatize.  Replacement
9014         manual memory management with vector.
9015         (target_read_alloc): Change return type, adjust.
9016         (target_read_stralloc): Change return type, adjust.
9017         (target_get_osdata): Change return type, adjust.
9018         * auxv.c (struct auxv_info) <length>: Remove.
9019         <data>: Change type to gdb::optional<byte_vector>.
9020         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9021         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9022         (target_auxv_search): Adjust.
9023         (fprint_target_auxv): Adjust.
9024         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9025         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9026         (linux_make_corefile_notes): Adjust.
9027         * osdata.c (get_osdata): Adjust.
9028         * remote.c (remote_get_threads_with_qxfer): Adjust.
9029         (remote_memory_map): Adjust.
9030         (remote_traceframe_info): Adjust.
9031         (btrace_read_config): Adjust.
9032         (remote_read_btrace): Adjust.
9033         (remote_pid_to_exec_file): Adjust.
9034         * solib-aix.c (solib_aix_get_library_list): Adjust.
9035         * solib-dsbt.c (decode_loadmap): Don't free buf.
9036         (dsbt_get_initial_loadmaps): Adjust.
9037         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9038         * solib-target.c (solib_target_current_sos): Adjust.
9039         * tracepoint.c (sdata_make_value): Adjust.
9040         * xml-support.c (xinclude_start_include): Adjust.
9041         (xml_fetch_content_from_file): Adjust.
9042         * xml-support.h (xml_fetch_another): Change return type.
9043         (xml_fetch_content_from_file): Change return type.
9044         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9045         * xml-tdesc.c (file_read_description_xml): Adjust.
9046         (fetch_available_features_from_target): Change return type.
9047         (target_fetch_description_xml): Adjust.
9048         (target_read_description_xml): Adjust.
9049
9050 2018-04-06  Tom Tromey  <tom@tromey.com>
9051
9052         * value.c (~value): Update.
9053         (struct value) <contents>: Now unique_xmalloc_ptr.
9054         (value_contents_bits_eq, allocate_value_contents)
9055         (value_contents_raw, value_contents_all_raw)
9056         (value_contents_for_printing, value_contents_for_printing_const)
9057         (set_value_enclosing_type): Update.
9058
9059 2018-04-06  Tom Tromey  <tom@tromey.com>
9060
9061         * value.c (range_s): Remove typedef, VEC.
9062         (struct range): Add operator<.
9063         (range_lessthan): Remove.
9064         (ranges_contain): Change type.
9065         (~value): Update.
9066         (struct value) <unavailable, optimized_out>: Now std::vector.
9067         (value_entirely_available)
9068         (value_entirely_covered_by_range_vector)
9069         (value_entirely_unavailable, value_entirely_optimized_out):
9070         Update.
9071         (insert_into_bit_range_vector): Change argument type.
9072         (find_first_range_overlap): Likewise.
9073         (struct ranges_and_idx, value_contents_bits_eq)
9074         (require_not_optimized_out, require_available): Update.
9075         (ranges_copy_adjusted): Change argument types.
9076         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9077
9078 2018-04-06  Tom Tromey  <tom@tromey.com>
9079
9080         * value.c (~value): Update.
9081         (struct value) <parent>: Now a value_ref_ptr.
9082         (value_parent, set_value_parent, value_address, value_copy):
9083         Update.
9084
9085 2018-04-06  Tom Tromey  <tom@tromey.com>
9086
9087         * value.c (struct value): Add constructor, destructor, and member
9088         initializers.
9089         (allocate_value_lazy, value_decref): Update.
9090
9091 2018-04-06  Tom Tromey  <tom@tromey.com>
9092
9093         * value.c (struct value) <released, next>: Remove.
9094         (all_values): Now a std::vector.
9095         (allocate_value_lazy): Update.
9096         (value_next): Remove.
9097         (value_mark, value_free_to_mark, release_value)
9098         (value_release_to_mark): Update.
9099
9100 2018-04-06  Tom Tromey  <tom@tromey.com>
9101
9102         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9103         (free_value_chain): Remove.
9104         * value.c (free_value_chain): Remove.
9105         (value_release_to_mark): Return a std::vector.
9106         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9107         std::vector.
9108         (check_condition): Update.
9109         * eval.c (fetch_subexp_value): Change "val_chain" to a
9110         std::vector.
9111         * breakpoint.c (update_watchpoint): Update.
9112         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9113
9114 2018-04-06  Tom Tromey  <tom@tromey.com>
9115
9116         * value.h (free_all_values): Remove.
9117         * value.c (free_all_values): Remove.
9118
9119 2018-04-06  Tom Tromey  <tom@tromey.com>
9120
9121         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9122         (value_history_chain, value_history_count): Remove.
9123         (value_history): New global.
9124         (record_latest_value, access_value_history, show_values)
9125         (preserve_values): Update.
9126
9127 2018-04-06  Tom Tromey  <tom@tromey.com>
9128
9129         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9130         * varobj.c (varobj_set_display_format, varobj_set_value)
9131         (install_default_visualizer, construct_visualizer)
9132         (install_new_value, ~varobj, varobj_get_value_type)
9133         (my_value_of_variable, varobj_editable_p): Update.
9134         * c-varobj.c (c_describe_child, c_value_of_variable)
9135         (cplus_number_of_children, cplus_describe_child): Update.
9136         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9137         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9138         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9139
9140 2018-04-06  Tom Tromey  <tom@tromey.com>
9141
9142         * printcmd.c (last_examine_address): Change type to
9143         value_ref_ptr.
9144         (do_examine, x_command): Update.
9145
9146 2018-04-06  Tom Tromey  <tom@tromey.com>
9147
9148         * value.c (release_value): Update.
9149         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9150         (struct bpstats) <val>: Now a value_ref_ptr.
9151         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9152         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9153         (~watchpoint, print_it_watchpoint, watch_command_1)
9154         (invalidate_bp_value_on_memory_change): Update.
9155
9156 2018-04-06  Tom Tromey  <tom@tromey.com>
9157
9158         * varobj.c (varobj_clear_saved_item)
9159         (update_dynamic_varobj_children, install_new_value, ~varobj):
9160         Update.
9161         * value.h (value_incref): Move declaration earlier.
9162         (value_decref): Rename from value_free.
9163         (struct value_ref_policy): New.
9164         (value_ref_ptr): New typedef.
9165         (struct value_deleter): Remove.
9166         (gdb_value_up): Remove typedef.
9167         (release_value): Change return type.
9168         (release_value_or_incref): Remove.
9169         * value.c (set_value_parent): Update.
9170         (value_incref): Change return type.
9171         (value_decref): Rename from value_free.
9172         (value_free_to_mark, free_all_values, free_value_chain): Update.
9173         (release_value): Return value_ref_ptr.
9174         (release_value_or_incref): Remove.
9175         (record_latest_value, set_internalvar, clear_internalvar):
9176         Update.
9177         * stack.c (info_frame_command): Don't call value_free.
9178         * python/py-value.c (valpy_dealloc, valpy_new)
9179         (value_to_value_object): Update.
9180         * printcmd.c (do_examine): Update.
9181         * opencl-lang.c (lval_func_free_closure): Update.
9182         * mi/mi-main.c (register_changed_p): Don't call value_free.
9183         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9184         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9185         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9186         value_free.
9187         * guile/scm-value.c (vlscm_free_value_smob)
9188         (vlscm_scm_from_value): Update.
9189         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9190         (frame_unwind_register_unsigned, get_frame_register_bytes)
9191         (put_frame_register_bytes): Don't call value_free.
9192         * findvar.c (address_from_register): Don't call value_free.
9193         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9194         * dwarf2loc.c (entry_data_value_free_closure)
9195         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9196         (dwarf2_evaluate_loc_desc_full): Update.
9197         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9198         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9199         (~watchpoint, watch_command_1)
9200         (invalidate_bp_value_on_memory_change): Update.
9201         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9202
9203 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9204
9205         PR gdb/23022
9206         * warning.m4: Add -Wno-error=deprecated-register.
9207         * configure: Re-generate.
9208
9209 2018-04-05  Tom Tromey  <tom@tromey.com>
9210
9211         * linespec.h: Remove include of "vec.h".
9212
9213 2018-04-05  Tom Tromey  <tom@tromey.com>
9214
9215         * linespec.c (typep): Remove typedef.
9216         (find_methods, find_superclass_methods): Take a std::vector.
9217         (find_method): Use std::vector.
9218
9219 2018-04-05  Tom Tromey  <tom@tromey.com>
9220
9221         * utils.c (compare_strings): Remove.
9222         * utils.h (compare_strings): Remove.
9223         * objc-lang.h (find_imps): Update.
9224         * objc-lang.c (find_methods): Take a std::vector.
9225         (uniquify_strings, find_imps): Likewise.
9226         * linespec.c (find_methods): Take a std::vector.
9227         (decode_objc): Use std::vector.
9228         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9229         a std::vector.
9230         (find_method, find_function_symbols): Use std::vector.
9231
9232 2018-04-05  Tom Tromey  <tom@tromey.com>
9233
9234         * completer.c (completion_tracker::completion_tracker): Remove
9235         cast.
9236         (completion_tracker::discard_completions): Likewise.
9237         * breakpoint.c (ambiguous_names_p): Remove cast.
9238         * ada-lang.c (_initialize_ada_language): Remove cast.
9239         * utils.h (streq): Update.
9240         (streq_hash): Add new declaration.
9241         * utils.c (streq): Return bool.
9242         (streq_hash): New function.
9243
9244 2018-04-05  Tom Tromey  <tom@tromey.com>
9245
9246         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9247         Remove a string copy.
9248
9249 2018-04-05  Tom Tromey  <tom@tromey.com>
9250
9251         * linespec.c (filter_results): Use std::vector.
9252         (decode_line_2, decode_line_full): Update.
9253
9254 2018-04-05  Tom Tromey  <tom@tromey.com>
9255
9256         * linespec.c (canonical_to_fullform): Return std::string.
9257         (filter_results): Update.
9258         (struct decode_line_2_item): Add constructor.
9259         <fullform, displayform>: Now std::string.
9260         (decode_line_2_compare_items): Now a std::sort comparator.
9261         (decode_line_2): Update.
9262
9263 2018-04-05  Tom Tromey  <tom@tromey.com>
9264
9265         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9266         (unexpected_linespec_error): Update.
9267         (linespec_parse_basic, parse_linespec): Update.
9268
9269 2018-04-05  Tom Tromey  <tom@tromey.com>
9270
9271         * linespec.c (linespec_parse_basic): Reindent.
9272
9273 2018-04-05  Tom Tromey  <tom@tromey.com>
9274
9275         * minsyms.h (iterate_over_minimal_symbols): Update.
9276         * minsyms.c (iterate_over_minimal_symbols): Take a
9277         gdb::function_view.
9278         * linespec.c (struct collect_minsyms): Remove.
9279         (compare_msyms): Now a std::sort comparator.
9280         (add_minsym): Add parameters.
9281         (search_minsyms_for_name): Update.  Use std::vector.
9282
9283 2018-04-03  Tom Tromey  <tom@tromey.com>
9284
9285         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9286         gdb::byte_vector.
9287
9288 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9289
9290         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9291
9292 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9293
9294         PR gdb/16959
9295         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9296         printing static type.
9297
9298 2018-04-01  Tom Tromey  <tom@tromey.com>
9299
9300         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9301         (rs6000_xfer_shared_libraries): Update.
9302
9303 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9304
9305         * common/gdb_vecs.h (char_ptr): Remove.
9306         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9307
9308 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9309
9310         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9311         with std::vector.
9312         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9313
9314 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9315
9316         * tracepoint.h (struct uploaded_tp): Initialize fields.
9317         <actions, step_actions, cmd_strings>: Change type to
9318         std::vector<char *>.
9319         * tracepoint.c (get_uploaded_tp): Allocate with new.
9320         (free_uploaded_tps): Free with delete.
9321         (parse_tracepoint_definition): Adjust to std::vector change.
9322         * breakpoint.c (read_uploaded_action): Likewise.
9323         (create_tracepoint_from_upload): Likewise.
9324         * ctf.c (ctf_write_uploaded_tp): Likewise.
9325         (SET_ARRAY_FIELD): Likewise.
9326         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9327
9328 2018-03-30  Tom Tromey  <tom@tromey.com>
9329
9330         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9331         std::unique_ptr.
9332         (svr4_keep_data_in_core): Update.
9333         (svr4_read_so_list): Update.
9334
9335 2018-03-30  Tom Tromey  <tom@tromey.com>
9336
9337         * windows-nat.c (handle_output_debug_string, handle_exception):
9338         Update.
9339         * target.h (target_read_string): Update.
9340         * target.c (target_read_string): Change "string" to
9341         unique_xmalloc_ptr.
9342         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9343         Update.
9344         * solib-frv.c (frv_current_sos): Update.
9345         * solib-dsbt.c (dsbt_current_sos): Update.
9346         * solib-darwin.c (darwin_current_sos): Update.
9347         * linux-thread-db.c (inferior_has_bug): Update.
9348         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9349         Update.  Remove alloca.
9350         * ada-lang.c (ada_main_name): Update.
9351
9352 2018-03-30  Tom Tromey  <tom@tromey.com>
9353
9354         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9355         (struct dwo_file_deleter): New.
9356         (dwo_file_up): New typedef.
9357         (open_and_init_dwo_file): Use dwo_file_up.
9358         (free_dwo_file_cleanup): Remove.
9359
9360 2018-03-30  Tom Tromey  <tom@tromey.com>
9361
9362         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9363         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9364
9365 2018-03-30  Tom Tromey  <tom@tromey.com>
9366
9367         * dwarf2read.c (class free_cached_comp_units): New class.
9368         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9369         (free_cached_comp_units): Remove function.
9370
9371 2018-03-30  Tom Tromey  <tom@tromey.com>
9372
9373         * utils.h (make_cleanup_unpush_target): Remove.
9374         * inf-ptrace.c (struct target_unpusher): New.
9375         (target_unpush_up) New typedef.
9376         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9377         target_unpush_up.
9378         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9379
9380 2018-03-27  Tom Tromey  <tom@tromey.com>
9381
9382         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9383
9384 2018-03-27  Pedro Alves  <palves@redhat.com>
9385             Tom Tromey  <tom@tromey.com>
9386
9387         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9388         destructor.  Now a class.
9389         (gdb_readline_wrapper_cleanup): Remove function.
9390         (gdb_readline_wrapper): Remove cleanups.
9391
9392 2018-03-27  Tom Tromey  <tom@tromey.com>
9393
9394         * typeprint.h (struct type_print_options) <local_typedefs,
9395         global_typedefs>: Remove "struct" keyword.
9396         (class typedef_hash_table): New class.
9397         (recursively_update_typedef_hash, add_template_parameters)
9398         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9399         (find_typedef_in_hash): Don't declare.
9400         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9401         (typedef_hash_table::recursively_update): Rename from
9402         recursively_update_typedef_hash.  Now a member.
9403         (typedef_hash_table::add_template_parameters): Rename from
9404         add_template_parameters.  Now a member.
9405         (typedef_hash_table::typedef_hash_table): Now a constructor;
9406         rename from create_typedef_hash.
9407         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9408         rename from free_typedef_hash.
9409         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9410         (do_free_global_table): Remove.
9411         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9412         from copy_type_recursive.
9413         (create_global_typedef_table): Remove.
9414         (typedef_hash_table::find_global_typedef): Now a member of
9415         typedef_hash_table.
9416         (typedef_hash_table::find_typedef): Rename from
9417         find_typedef_in_hash; now a member.
9418         (whatis_exp): Update.
9419         * extension.h (struct ext_lang_type_printers): Add constructor and
9420         destructor.
9421         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9422         declare.
9423         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9424         Now a constructor; rename from start_ext_lang_type_printers.
9425         (ext_lang_type_printers): Now a destructor; rename from
9426         free_ext_lang_type_printers.
9427         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9428         Update.
9429         (c_type_print_base_struct_union): Update.  Remove cleanups.
9430
9431 2018-03-27  Tom Tromey  <tom@tromey.com>
9432
9433         * dwarf-index-write.c: Include <cmath>.
9434
9435 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9436
9437         * NEWS: Add entry describing new "set|show varsize-limit" command.
9438         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9439         command.
9440         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9441         "set variable".
9442
9443 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9444
9445         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9446         dwarf-index-write.c
9447         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9448         * dwarf-index-common.c: New file.
9449         * dwarf-index-common.h: New file.
9450         * dwarf-index-write.c: New file.
9451         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9452         (struct dwarf2_section_info): Move from here.
9453         (dwarf2_section_info_def): Likewise.
9454         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9455         (offset_type): Likewise.
9456         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9457         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9458         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9459         (byte_swap): Likewise.
9460         (MAYBE_SWAP): Likewise.
9461         (dwarf2_per_cu_ptr): Likewise.
9462         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9463         (struct tu_stats): Likewise.
9464         (struct dwarf2_per_objfile): Likewise.
9465         (struct dwarf2_per_cu_data): Likewise.
9466         (struct signatured_type): Likewise.
9467         (sig_type_ptr): Likewise.
9468         (DEF_VEC_P (sig_type_ptr)): Likewise.
9469         (INDEX4_SUFFIX): Likewise.
9470         (INDEX5_SUFFIX): Likewise.
9471         (DEBUG_STR_SUFFIX): Likewise.
9472         (dwarf2_read_section): Make non-static.
9473         (mapped_index_string_hash): Move from here.
9474         (dwarf5_djb_hash): Likewise.
9475         (file_write): Likewise.
9476         (class data_buf): Likewise.
9477         (struct symtab_index_entry): Likewise.
9478         (struct mapped_symtab): Likewise.
9479         (find_slot): Likewise.
9480         (hash_expand): Likewise.
9481         (add_index_entry): Likewise.
9482         (uniquify_cu_indices): Likewise.
9483         (class c_str_view): Likewise.
9484         (class c_str_view_hasher): Likewise.
9485         (class vector_hasher): Likewise.
9486         (write_hash_table): Likewise.
9487         (psym_index_map): Likewise.
9488         (struct addrmap_index_data): Likewise.
9489         (add_address_entry): Likewise.
9490         (add_address_entry_worker): Likewise.
9491         (write_address_map): Likewise.
9492         (symbol_kind): Likewise.
9493         (write_psymbols): Likewise.
9494         (struct signatured_type_index_data): Likewise.
9495         (write_one_signatured_type): Likewise.
9496         (recursively_count_psymbols): Likewise.
9497         (recursively_write_psymbols): Likewise.
9498         (class debug_names): Likewise.
9499         (check_dwarf64_offsets): Likewise.
9500         (psyms_seen_size): Likewise.
9501         (write_gdbindex): Likewise.
9502         (write_debug_names): Likewise.
9503         (assert_file_size): Likewise.
9504         (write_psymtabs_to_index): Likewise.
9505         (save_gdb_index_command): Likewise.
9506         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9507         command.
9508         * dwarf2read.h: New file.
9509
9510 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9511
9512         PR gdb/22670
9513         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9514         symbol name if the CU's language stores symbol names in linkage
9515         format.
9516         * language.h (struct language_defn)
9517         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9518         all instances of this struct.
9519
9520 2018-03-26  Tom Tromey  <tom@tromey.com>
9521
9522         * stack.c (backtrace_command_1): Remove verbose code.
9523
9524 2018-03-26  Tom Tromey  <tom@tromey.com>
9525
9526         * python/py-framefilter.c (py_print_type): Don't catch
9527         exceptions.  Return void.
9528         (py_print_value): Likewise.
9529         (py_print_single_arg): Likewise.
9530         (enumerate_args): Don't catch exceptions.
9531         (py_print_args): Likewise.
9532         (py_print_frame): Likewise.
9533         (gdbpy_apply_frame_filter): Catch exceptions here.
9534
9535 2018-03-26  Tom Tromey  <tom@tromey.com>
9536
9537         * stack.c (_initialize_stack): Remove trailing newlines from help
9538         text.  Add "Usage" line to "backtrace" help.
9539
9540 2018-03-26  Tom Tromey  <tom@tromey.com>
9541
9542         PR python/16486:
9543         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9544
9545 2018-03-26  Tom Tromey  <tom@tromey.com>
9546
9547         * python/py-framefilter.c (py_print_single_arg): Return
9548         EXT_LANG_BT_ERROR from catch.
9549
9550 2018-03-26  Tom Tromey  <tom@tromey.com>
9551
9552         PR backtrace/15584:
9553         * stack.c (backtrace_command_1): Move some code into no-filters
9554         "if".
9555
9556 2018-03-26  Tom Tromey  <tom@tromey.com>
9557
9558         * python/py-framefilter.c (throw_quit_or_print_exception): New
9559         function.
9560         (gdbpy_apply_frame_filter): Use it.
9561
9562 2018-03-26  Tom Tromey  <tom@tromey.com>
9563
9564         PR cli/17716:
9565         * python/py-framefilter.c (py_print_type, py_print_value)
9566         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9567         RETURN_MASK_ERROR.
9568
9569 2018-03-26  Tom Tromey  <tom@tromey.com>
9570
9571         * python/py-framefilter.c (enumerate_args): Use
9572         gdb::unique_xmalloc_ptr.
9573
9574 2018-03-26  Tom Tromey  <tom@tromey.com>
9575
9576         * python/py-framefilter.c (py_print_frame): Return
9577         EXT_LANG_BT_OK.
9578         (gdbpy_apply_frame_filter): Update comment.
9579         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9580         Remove.
9581         <EXT_LANG_BT_NO_FILTERS>: Change value.
9582
9583 2018-03-26  Tom Tromey  <tom@tromey.com>
9584
9585         PR backtrace/15582:
9586         * stack.c (backtrace_command): Parse "hide" argument.
9587         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9588         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9589         constant.
9590
9591 2018-03-26  Tom Tromey  <tom@tromey.com>
9592
9593         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9594         add "flags".
9595         (backtrace_command): Remove "fulltrace", add "flags".
9596
9597 2018-03-26  Tom Tromey  <tom@tromey.com>
9598
9599         * stack.c (backtrace_command): Rewrite command line parsing.
9600
9601 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9602
9603         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9604
9605 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9606
9607         * filename-seen-cache.h: Add include guard.
9608
9609 2018-03-26  Keith Seitz  <keiths@redhat.com>
9610
9611         * symfile.c (place_section): Remove "struct" from section_addr_info
9612         in comment.
9613         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9614         "struct" keyword from section_addr_info.
9615
9616 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9617
9618         * regformats/regdef.h (reg): Add constructors.
9619
9620 2018-03-25  Pedro Alves  <palves@redhat.com>
9621
9622         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9623         if then/else bodies in var_func_name extraction.
9624
9625 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9626
9627         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9628         lookup_minimal_symbol() to find symbol entry.
9629         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9630
9631 2018-03-23  Keith Seitz  <keiths@redhat.com>
9632
9633         PR c++/22968
9634         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9635         nested type definitions for C++, too.
9636
9637 2018-03-23  Tom Tromey  <tom@tromey.com>
9638
9639         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9640         a typedef.
9641         (macho_register_oso): Remove.
9642         (macho_symtab_read): Take a std::vector.
9643         (oso_el_compare_name): Now a std::sort comparator.
9644         (macho_symfile_read_all_oso): Take a std::vector.
9645         (macho_symfile_read): Use std::vector.  Remove cleanups.
9646
9647 2018-03-22  Tom Tromey  <tom@tromey.com>
9648
9649         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9650         (record_full_goto_bookmark): Use std::string.
9651
9652 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9653
9654         PR tdep/18295
9655         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9656         a single mask.
9657
9658 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9659
9660         * rs6000-tdep.c (store_insn_p): New function.
9661         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9662         and cr_reg to their unshifted values. Use store_insn_p to
9663         match LR saves using either R1 or fdata->alloca_reg. Use
9664         store_insn_p to match CR saves. Set alloca_reg_offset
9665         when alloca_reg and framep are set. Remove lr_reg shift
9666         when assigning to fdata->lr_register.
9667
9668 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9669
9670         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9671         command line args instead of emitting a warning.
9672
9673 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9674
9675         * tracepoint.h (struct static_tracepoint_marker): Initialize
9676         fields, define default constructor, move constructor and move
9677         assignment, disable the rest.
9678         <str_id, extra>: Make std::string.
9679         (release_static_tracepoint_marker): Remove.
9680         (free_current_marker): Remove.
9681         * tracepoint.c (free_current_marker): Remove.
9682         (parse_static_tracepoint_marker_definition): Adjust to
9683         std::string, use new hex2str overload.
9684         (release_static_tracepoint_marker): Remove.
9685         (print_one_static_tracepoint_marker): Get marker by reference
9686         and adjust to std::string.
9687         (info_static_tracepoint_markers_command): Adjust to std::vector
9688         changes
9689         * target.h (static_tracepoint_marker_p): Remove typedef.
9690         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9691         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9692         bool.
9693         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9694         * target-debug.h
9695         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9696         (target_debug_print_std_vector_static_tracepoint_marker): New.
9697         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9698         to...
9699         (target_debug_print_static_tracepoint_marker_p): ... this.
9700         * target-delegates.c: Re-generate.
9701         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9702         Make std::string.
9703         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9704         (decode_static_tracepoint_spec): Adjust to std::vector.
9705         (tracepoint_print_one_detail): Adjust to std::string.
9706         (strace_marker_decode_location): Adjust to std::string.
9707         (update_static_tracepoint): Adjust to std::string, remove call
9708         to release_static_tracepoint_marker.
9709         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9710         Adjust to std::vector.
9711         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9712         (remote_static_tracepoint_markers_by_strid): Adjust to
9713         std::vector.
9714         * common/rsp-low.h (hex2str): New overload with explicit count
9715         of bytes.
9716         * common/rsp-low.c (hex2str): New overload with explicit count
9717         of bytes.
9718         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9719         (_initialize_rsp_low_selftests): Add test_hex2str test.
9720         * unittests/tracepoint-selftests.c
9721         (test_parse_static_tracepoint_marker_definition): Adjust to
9722         std::string.
9723
9724 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9725
9726         * tracepoint.c (parse_static_tracepoint_marker_definition):
9727         Consider case where the definition is followed by more
9728         definitions.
9729         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9730         tracepoint-selftests.c.
9731         * unittests/tracepoint-selftests.c: New.
9732
9733 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9734
9735         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9736         Carvalho.
9737
9738 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9739
9740         * symtab.c (find_pc_sect_line): fixed indentation.
9741
9742 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9743
9744         * symtab.c (find_pc_sect_line): now uses binary search.
9745
9746 2018-03-19  Tom Tromey  <tom@tromey.com>
9747
9748         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9749         "IDENT" production.
9750
9751 2018-03-19  Pedro Alves  <palves@redhat.com>
9752             Tom Tromey  <tom@tromey.com>
9753
9754         * unittests/observable-selftests.c: New file.
9755         * common/observable.h: New file.
9756         * observable.h: New file.
9757         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9758         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9759         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9760         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9761         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9762         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9763         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9764         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9765         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9766         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9767         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9768         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9769         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9770         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9771         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9772         tui/tui-interp.c, valops.c: Update all users.
9773         * tui/tui-hooks.c (tui_bp_created_observer)
9774         (tui_bp_deleted_observer, tui_bp_modified_observer)
9775         (tui_inferior_exit_observer, tui_before_prompt_observer)
9776         (tui_normal_stop_observer, tui_register_changed_observer):
9777         Remove.
9778         (tui_observers_token): New global.
9779         (attach_or_detach, tui_attach_detach_observers): New functions.
9780         (tui_install_hooks, tui_remove_hooks): Use
9781         tui_attach_detach_observers.
9782         * record-btrace.c (record_btrace_thread_observer): Remove.
9783         (record_btrace_thread_observer_token): New global.
9784         * observer.sh: Remove.
9785         * observer.c: Rename to observable.c.
9786         * observable.c (namespace gdb_observers): Define new objects.
9787         (observer_debug): Move into gdb_observers namespace.
9788         (struct observer, struct observer_list, xalloc_observer_list_node)
9789         (xfree_observer_list_node, generic_observer_attach)
9790         (generic_observer_detach, generic_observer_notify): Remove.
9791         (_initialize_observer): Update.
9792         Don't include observer.inc.
9793         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9794         (clean mostlyclean): Likewise.
9795         (observer.h, observer.inc): Remove targets.
9796         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9797         (COMMON_SFILES): Use observable.c, not observer.c.
9798         * .gitignore: Remove observer.h.
9799
9800 2018-03-18  Tom Tromey  <tom@tromey.com>
9801
9802         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9803         gdb::def_vector.
9804         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9805
9806 2018-03-17  Tom Tromey  <tom@tromey.com>
9807
9808         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9809
9810 2018-03-17  Tom Tromey  <tom@tromey.com>
9811
9812         * target.c (class scoped_target_fd): New.
9813         (target_fileio_close_cleanup): Remove.
9814         (target_fileio_read_alloc_1): Use scoped_target_fd.
9815
9816 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9817
9818         * silent-rules.mk: New.
9819         * Makefile.in: Include silent-rules.mk
9820         (srcdir, VPATH, top_srcdir): Move up.
9821         (COMPILE): Add ECHO_CXX.
9822         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9823         (init.c): Add ECHO_INIT_C.
9824         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9825         (version.c): Add ECHO_GEN.
9826         (printcmd.o): Add ECHO_CXX.
9827         (target-float.o): Add ECHO_CXX.
9828         (ada-exp.o): Add ECHO_CXX.
9829         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9830         (insight$(EXEEXT)): Add ECHO_CXXLD.
9831         * gnulib/configure.ac: Add AM_SILENT_RULES.
9832         * gnulib/aclocal.m4: Re-generate.
9833         * gnulib/configure: Re-generate.
9834         * gnulib/import/Makefile.in: Re-generate.
9835
9836 2018-03-16  Tom Tromey  <tom@tromey.com>
9837
9838         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9839         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9840         * utils.c (do_free_section_addr_info)
9841         (make_cleanup_free_section_addr_info): Remove.
9842         * symfile.h (struct other_sections): Add constructor.
9843         (struct section_addr_info): Remove.
9844         (section_addr_info): New typedef.
9845         (struct sym_fns) <sym_offsets>: Change type of parameter.
9846         (build_section_addr_info_from_objfile)
9847         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9848         (default_symfile_offsets, symbol_file_add)
9849         (symbol_file_add_from_bfd)
9850         (build_section_addr_info_from_section_table): Update.
9851         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9852         * symfile.c (alloc_section_addr_info): Remove.
9853         (build_section_addr_info_from_section_table): Change return type.
9854         Update.
9855         (build_section_addr_info_from_bfd)
9856         (build_section_addr_info_from_objfile): Likewise.
9857         (free_section_addr_info): Remove.
9858         (relative_addr_info_to_section_offsets): Change type of "addrs".
9859         (addrs_section_compar): Now a std::sort comparator.
9860         (addrs_section_sort): Change return type.
9861         (addr_info_make_relative): Change type of "addrs".  Update.
9862         (default_symfile_offsets, syms_from_objfile_1)
9863         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9864         (symbol_file_add_separate): Update.
9865         (symbol_file_add): Change type of "addrs".  Update.
9866         (add_symbol_file_command): Update.  Remove cleanups.
9867         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
9868         cleanups.
9869         * symfile-debug.c (debug_sym_offsets): Change type of "info".
9870         * solib.c (solib_read_symbols): Update.
9871         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
9872         * machoread.c (macho_symfile_offsets): Update.
9873         * jit.c (jit_bfd_try_read_symtab): Update.
9874
9875 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
9876
9877         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9878         unittests/utils-selftests.c.
9879         * unittests/utils-selftests.c: New file.
9880
9881 2018-03-14  Tom Tromey  <tom@tromey.com>
9882
9883         PR cli/14977:
9884         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9885         for NULL.
9886
9887 2018-03-14  Tom Tromey  <tom@tromey.com>
9888
9889         PR cli/19918:
9890         * printcmd.c (printf_pointer): Allow "-" in format.
9891
9892 2018-03-14  Tom Tromey  <tom@tromey.com>
9893
9894         * printcmd.c (_initialize_printcmd): Add usage to printf.
9895
9896 2018-03-14  Yao Qi  <qiyao@sourceware.org>
9897
9898         * MAINTAINERS: Update my email address.
9899
9900 2018-03-13  Tom Tromey  <tom@tromey.com>
9901
9902         * machoread.c (macho_check_dsym): Change filenamep to a
9903         std::string*.
9904         (macho_symfile_read): Update.
9905         * symfile.c (load_command): Use std::string.
9906
9907 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9908
9909         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9910         to error message string.
9911         (riscv_register_name): Use xsnprintf instead of sprintf.
9912         (riscv_insn::fetch_instruction): Use gdb_assert instead of
9913         internal_error.
9914         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9915         error.
9916         (riscv_push_dummy_call): Likewise.
9917
9918 2018-03-12  Tom Tromey  <tom@tromey.com>
9919
9920         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9921         Use gdb::byte_vector.
9922         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9923
9924 2018-03-12  Yao Qi  <yao.qi@linaro.org>
9925
9926         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9927         parameter type to readable_regcache.
9928         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9929         the declaration.
9930
9931 2018-03-11  Tom Tromey  <tom@tromey.com>
9932
9933         * dwarf2read.c (struct nextfield): Add initializers.
9934         (struct nextfnfield): Remove.
9935         (struct fnfieldlist): Add initializers.  Remove "length" and
9936         "head", use std::vector.
9937         (struct decl_field_list): Remove.
9938         (struct field_info): Add initializers.
9939         <fields, baseclasses>: Now std::vector.
9940         <nbaseclasses, nfnfields, typedef_field_list_count,
9941         nested_types_list_count>: Remove.
9942         (dwarf2_add_field, dwarf2_add_type_defn)
9943         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9944         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9945         (process_structure_scope): Update.
9946
9947 2018-03-11  Tom Tromey  <tom@tromey.com>
9948
9949         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9950         for use by std::sort.
9951         (build_type_psymtabs_1): Use std::vector.
9952
9953 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
9954
9955         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9956         and LIBMPFR in the printed configuration.
9957
9958 2018-03-08  Tom Tromey  <tom@tromey.com>
9959
9960         * source.c (get_filename_and_charpos): Use scoped_fd.
9961         * nto-procfs.c (procfs_open_1): Use scoped_fd.
9962         (procfs_pidlist): Likewise.
9963         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9964         (iterate_over_mappings): Likewise.
9965
9966 2018-03-08  Tom Tromey  <tom@tromey.com>
9967
9968         * infcall.c (struct call_return_meta_info)
9969         <stack_temporaries_enabled>: Remove.
9970         (get_call_return_value, call_function_by_hand_dummy): Update.
9971         * thread.c (disable_thread_stack_temporaries): Remove.
9972         (enable_thread_stack_temporaries): Remove.
9973         (thread_stack_temporaries_enabled_p): Return bool.
9974         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9975         (get_last_thread_stack_temporary): Update.
9976         * eval.c (evaluate_subexp): Update.
9977         * gdbthread.h (class enable_thread_stack_temporaries): Now a
9978         class, not a function.
9979         (value_ptr, value_vec): Remove typedefs.
9980         (class thread_info) <stack_temporaries_enabled>: Now bool.
9981         <stack_temporaries>: Now a std::vector.
9982         (thread_stack_temporaries_enabled_p)
9983         (value_in_thread_stack_temporaries): Return bool.
9984
9985 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
9986
9987         * remote.c (putpkt_binary): Fix omitted bytes reporting.
9988         (getpkt_or_notif_sane_1): Likewise.
9989
9990 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9991
9992         * build-id.c (build_id_to_debug_bfd): Use std::string.
9993
9994 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9995
9996         * build-id.c (find_separate_debug_file_by_buildid): Return
9997         std::string.
9998         * build-id.h (find_separate_debug_file_by_buildid): Return
9999         std::string.
10000         * coffread.c (coff_symfile_read): Adjust to std::string.
10001         * elfread.c (elf_symfile_read): Adjust to std::string.
10002         * symfile.c (separate_debug_file_exists): Change parameter to
10003         std::string.
10004         (find_separate_debug_file): Return std::string.
10005         (find_separate_debug_file_by_debuglink): Return std::string.
10006         * symfile.h (find_separate_debug_file_by_debuglink): Return
10007         std::string.
10008
10009 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10010
10011         * common/xml-utils.c (xml_escape_text): Move code to...
10012         (xml_escape_text_append): ... this new function.
10013         * common/xml-utils.h (xml_escape_text_append): New declaration.
10014         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10015         New function.
10016         (_initialize_xml_utils): register test_xml_escape_text_append as
10017         a selftest.
10018
10019 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10020
10021         * defs.h: Remove MAX_REGISTER_SIZE.
10022         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10023         asserts.
10024         * python/py-unwind.c (pyuw_sniffer): Likewise.
10025
10026 2018-03-07  Tom Tromey  <tom@tromey.com>
10027
10028         * linux-tdep.c (linux_info_proc): Update.
10029         * target.h (struct target_ops) <to_fileio_readlink>: Return
10030         optional<string>.
10031         (target_fileio_readlink): Return optional<string>.
10032         * remote.c (remote_hostio_readlink): Return optional<string>.
10033         * inf-child.c (inf_child_fileio_readlink): Return
10034         optional<string>.
10035         * target.c (target_fileio_readlink): Return optional<string>.
10036
10037 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10038
10039         * regcache.c (cooked_read_test): Add riscv to the list of
10040         architectures that have a save_reggroup.
10041
10042 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10043
10044         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10045         value is not a dynamic class object.
10046
10047 2018-03-06  Tom Tromey  <tom@tromey.com>
10048
10049         * rust-exp.y: Formatting fixes.
10050
10051 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10052
10053         * riscv-tdep.c (riscv_register_name): Remove target description
10054         support.
10055         (riscv_gdbarch_init): Remove target description check.
10056
10057 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10058
10059         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10060         comment.
10061         * riscv-tdep.h: Likewise.
10062
10063 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10064
10065         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10066         (riscv_pseudo_register_write): Delete.
10067         (riscv_gdbarch_init): Remove all use of pseudo registers.
10068
10069 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10070
10071         * record-btrace.c (btrace_print_lines): Replace cleanup
10072         parameter with RAII equivalents.
10073         (btrace_insn_history): Replace cleanup with RAII equivalents.
10074         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10075         make_cleanup_ui_out_tuple_begin_end): Remove.
10076         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10077         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10078         make_cleanup_ui_out_list_begin_end): Remove.
10079
10080 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10081
10082         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10083         parameter types to std::vector.  Use bool.
10084         (record_btrace_wait): Replace VEC(tp_t) with
10085         std::vector<thread_info *>.
10086         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10087
10088 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10089
10090         * record-btrace.c (record_btrace_disable_callback): Remove.
10091         (struct scoped_btrace_disable): New.
10092         (record_btrace_open): Use scoped_btrace_disable.
10093
10094 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10095
10096         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10097         reading values from registers.
10098
10099 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10100
10101         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10102         where appropriate.
10103
10104 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10105
10106         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10107         change parameter type.  Use GDB's print functions, and use
10108         core_addr_to_string where appropriate.
10109         (riscv_push_dummy_call): Use core_addr_to_string where
10110         appropriate, update call to riscv_print_arg_location, and reindent
10111         a few lines.
10112         (riscv_return_value): Update call to riscv_print_arg_location.
10113
10114 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10115             Tim Newsome <tim@sifive.com>
10116             Albert Ou <a0u@eecs.berkeley.edu>
10117             Darius Rad <darius@bluespec.com>
10118
10119         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10120         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10121         (ALLDEPFILES): Add riscv-tdep.c
10122         * configure.tgt: Add riscv support.
10123         * riscv-tdep.c: New file.
10124         * riscv-tdep.h: New file.
10125         * NEWS: Mention new target.
10126         * MAINTAINERS: Add entry for riscv.
10127
10128 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10129
10130         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10131         fields within aggregates.
10132
10133 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10134
10135         * record-btrace.c (btrace_print_lines): Change type of flags to
10136         gdb_disassembly_flags.
10137
10138 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10139
10140         * fbsd-nat.c: Include "inf-ptrace.h".
10141         (USE_SIGTRAP_SIGINFO): Conditionally define.
10142         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10143         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10144         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10145         function.
10146         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10147         Likewise.
10148         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10149         Likewise.
10150         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10151         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10152         "supports_stopped_by_hw_breakpoint" target methods.
10153
10154 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10155
10156         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10157         * fbsd-nat.c (debug_fbsd_nat): New variable.
10158         (show_fbsd_nat_debug): New function.
10159         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10160         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10161
10162 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10163
10164         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10165         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10166         prototype.
10167         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10168         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10169         method.
10170
10171 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10172
10173         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10174         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10175
10176 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10177
10178         * charset.c (struct charset_vector): New.
10179         (charsets): Change type to charset_vector.
10180         (find_charset_names): Adjust.
10181         (add_one): Adjust.
10182         (_initialize_charset): Adjust.
10183
10184 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10185
10186         * progspace.h (struct program_space) <deleted_solibs>: Change
10187         type to std::vector<std::string>.
10188         * progspace.c (clear_program_space_solib_cache): Adjust.
10189         * breakpoint.c (print_solib_event): Adjust.
10190         (check_status_catch_solib): Adjust.
10191         * solib.c (update_solib_list): Adjust.
10192         * ui-out.h (class ui_out) <field_string>: New overload.
10193         * ui-out.c (ui_out::field_string): New overload.
10194
10195 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10196
10197         * progspace.h (struct program_space): Add constructor and
10198         destructor, initialize fields.
10199         (add_program_space): Remove.
10200         * progspace.c (add_program_space): Rename to...
10201         (program_space::program_space): ... this.
10202         (release_program_space): Rename to...
10203         (program_space::~program_space): ... this.
10204         (delete_program_space): Use delete to delete program_space.
10205         (initialize_progspace): Use new to allocate program_space.
10206         * inferior.c (add_inferior_with_spaces): Likewise.
10207         (clone_inferior_command): Likewise.
10208         * infrun.c (follow_fork_inferior): Likewise.
10209         (handle_vfork_child_exec_or_exit): Likewise.
10210
10211 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10212
10213         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10214         (delim_string_to_char_ptr_vec): Return std::vector of
10215         gdb::unique_xmalloc_ptr.
10216         (dirnames_to_char_ptr_vec_append): Take std::vector of
10217         gdb::unique_xmalloc_ptr.
10218         (dirnames_to_char_ptr_vec): Return std::vector of
10219         gdb::unique_xmalloc_ptr.
10220         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10221         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10222         (delim_string_to_char_ptr_vec): Return an std::vector of
10223         gdb::unique_xmalloc_ptr, adjust the code.
10224         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10225         gdb::unique_xmalloc_ptr, adjust the code.
10226         (dirnames_to_char_ptr_vec): Return an std::vector of
10227         gdb::unique_xmalloc_ptr, adjust the code.
10228         * auto-load.c (auto_load_safe_path_vec): Change type to
10229         std::vector of gdb::unique_xmalloc_ptr.
10230         (auto_load_expand_dir_vars): Return an std::vector of
10231         gdb::unique_xmalloc_ptr, adjust the code.
10232         (auto_load_safe_path_vec_update): Adjust.
10233         (filename_is_in_auto_load_safe_path_vec): Adjust.
10234         (auto_load_objfile_script_1): Adjust.
10235         * build-id.c (build_id_to_debug_bfd): Adjust.
10236         * linux-thread-db.c (thread_db_load_search): Adjust.
10237         * source.c (add_path): Adjust.
10238         (openp): Adjust.
10239         * symfile.c (find_separate_debug_file): Adjust.
10240         * utils.c (do_free_char_ptr_vec): Remove.
10241         (make_cleanup_free_char_ptr_vec): Remove.
10242
10243 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10244
10245         PR gdb/22907
10246         * common/pathstuff.c: Conditionally include "<windows.h>".
10247
10248 2018-03-01  Georg Sauthoff  <mail@georg.so>
10249
10250         PR gdb/22888
10251         * gcore.in: Quote variables and switch interpreter to bash.
10252
10253 2018-03-01  Tom Tromey  <tom@tromey.com>
10254
10255         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10256         assertion.  Add assertion for discriminant_index.
10257         (quirk_rust_enum): Use correct base type name in univariant case.
10258
10259 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10260
10261         * record.c (get_call_history_modifiers): Return a
10262         record_print_flags.
10263         (cmd_record_call_history): Adjust.
10264         * record-btrace.c (record_btrace_call_history): Adjust.
10265         (record_btrace_call_history_range): Adjust.
10266         (record_btrace_call_history_from): Adjust.
10267         * target-debug.h (target_debug_print_record_print_flags): New.
10268         * target-delegates.c: Re-generate.
10269         * target.c (target_call_history): Change flags type.
10270         (target_call_history_from): Likewise.
10271         (target_call_history_range): Likewise.
10272         * target.h (struct target_ops) <target_call_history>: Likewise.
10273         (target_call_history_from): Likewise.
10274         (target_call_history_range): Likewise.
10275
10276 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10277             Simon Marchi  <simon.marchi@polymtl.ca>
10278
10279         * common/common-utils.c: Include "sys/stat.h".
10280         (is_regular_file): Move here from "source.c"; change return
10281         type to "bool".
10282         * common/common-utils.h (is_regular_file): New prototype.
10283         * common/pathstuff.c (contains_dir_separator): New function.
10284         * common/pathstuff.h (contains_dir_separator): New prototype.
10285         * source.c: Don't include "sys/stat.h".
10286         (is_regular_file): Move to "common/common-utils.c".
10287
10288 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10289
10290         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10291         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10292         * auto-load.c: Include "common/pathstuff.h".
10293         * common/common-def.h (current_directory): Move here.
10294         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10295         function.
10296         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10297         prototype.
10298         * common/pathstuff.c: New file.
10299         * common/pathstuff.h: New file.
10300         * compile/compile.c: Include "common/pathstuff.h".
10301         * defs.h (current_directory): Move to "common/common-defs.h".
10302         * dwarf2read.c: Include "common/pathstuff.h".
10303         * exec.c: Likewise.
10304         * guile/scm-safe-call.c: Likewise.
10305         * linux-thread-db.c: Likewise.
10306         * main.c: Likewise.
10307         * nto-tdep.c: Likewise.
10308         * objfiles.c: Likewise.
10309         * source.c: Likewise.
10310         * symtab.c: Likewise.
10311         * utils.c: Include "common/pathstuff.h".
10312         (gdb_realpath): Move to "common/pathstuff.c".
10313         (gdb_realpath_keepfile): Likewise.
10314         (gdb_abspath): Likewise.
10315         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10316         (gdb_realpath_keepfile): Likewise.
10317         (gdb_abspath): Likewise.
10318
10319 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10320
10321         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10322         wildcard process pid for super_resume for kernels with a
10323         specific bug.
10324
10325 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10326
10327         * compile/compile.c (get_args): Add additional comments
10328         explaining function.
10329
10330 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10331             Tom Tromey  <tom@tromey.com>
10332
10333         * target.h (memory_write_request_s): Remove typedef.  Don't define
10334         VEC.
10335         (target_write_memory_blocks): Change argument to std::vector.
10336         (struct memory_write_request): Add constructor.
10337         * target-memory.c (compare_block_starting_address): Return bool.
10338         Change argument types.
10339         (claim_memory): Change arguments to use std::vector.
10340         (split_regular_and_flash_blocks, blocks_to_erase)
10341         (compute_garbled_blocks): Likewise.
10342         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10343         (target_write_memory_blocks): Change argument to std::vector.
10344         * symfile.c (struct load_section_data): Add constructor and
10345         destructor.  Use std::vector for "requests".
10346         (struct load_progress_data): Add initializers.
10347         (load_section_callback): Update.  Use "new".
10348         (clear_memory_write_data): Remove.
10349         (generic_load): Update.
10350
10351 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10352
10353         * arch/aarch64.h: Use common/tdesc.h.
10354
10355 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10356
10357         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10358         architecture with a 64-bit ABI.
10359
10360 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10361
10362         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10363         ahead of target description loading.
10364
10365 2018-02-26  Tom Tromey  <tom@tromey.com>
10366
10367         * stack.c (backtrace_command_1): Update.
10368         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10369         of "flags".
10370         * python/py-framefilter.c (py_print_frame)
10371         (gdbpy_apply_frame_filter): Change type of "flags".
10372         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10373         of "flags".
10374         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10375         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10376         * extension.h (enum frame_filter_flag): Rename from
10377         frame_filter_flags.
10378         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10379         (apply_ext_lang_frame_filter): Change type of "flags".
10380         * extension.c (apply_ext_lang_frame_filter): Change type of
10381         "flags".
10382         * extension-priv.h (struct extension_language_ops)
10383         <apply_frame_filter>: Change type of "flags".
10384
10385 2018-02-26  Tom Tromey  <tom@tromey.com>
10386
10387         PR python/16497:
10388         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10389         off-by-one in py_end computation.
10390         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10391         PRINT_MORE_FRAMES.
10392         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10393         constant.
10394
10395 2018-02-26  Tom Tromey  <tom@tromey.com>
10396
10397         * dwarf2read.c (struct variant_field): New.
10398         (struct nextfield) <variant>: New field.
10399         (dwarf2_add_field): Handle DW_TAG_variant_part.
10400         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10401         discriminated union.
10402         (read_structure_type): Handle DW_TAG_variant_part.
10403         (handle_struct_member_die): New function, extracted from
10404         process_structure_scope.  Handle DW_TAG_variant.
10405         (process_structure_scope): Handle discriminated unions.  Call
10406         handle_struct_member_die.
10407
10408 2018-02-26  Tom Tromey  <tom@tromey.com>
10409
10410         * rust-lang.h (rust_last_path_segment): Declare.
10411         * rust-lang.c (rust_last_path_segment): Now public.  Change
10412         contract.
10413         (struct disr_info): Remove.
10414         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10415         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10416         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10417         (rust_enum_p, rust_enum_variant): New function.
10418         (rust_underscore_fields): Remove "offset" parameter.
10419         (rust_print_enum): New function.
10420         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10421         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10422         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10423         enums.
10424         (rust_internal_print_type): New function, from rust_print_type.
10425         Remove enum code.
10426         (rust_print_type): Call rust_internal_print_type.
10427         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10428         Update enum handling.
10429         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10430         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10431         (rust_union_quirks): New functions.
10432         (process_full_comp_unit, process_full_type_unit): Call
10433         rust_union_quirks.
10434         (process_structure_scope): Update rust_unions if necessary.
10435
10436 2018-02-26  Tom Tromey  <tom@tromey.com>
10437
10438         * value.h (value_union_variant): Declare.
10439         * valops.c (value_union_variant): New function.
10440         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10441         (struct discriminant_info): New.
10442         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10443         enumerator.
10444         (struct main_type) <flag_discriminated_union>: New field.
10445
10446 2018-02-26  Tom Tromey  <tom@tromey.com>
10447
10448         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10449         unittests/unpack-selftests.c.
10450         * unittests/unpack-selftests.c: New file.
10451         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10452
10453 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10454
10455         * dwarf2read.c (struct partial_die_info) <read>: New method.
10456         (read_partial_die): Remove the declaration.
10457         (load_partial_dies): Update.
10458         (partial_die_info::partial_die_info):
10459         (read_partial_die): Change it to partial_die_info::read.
10460
10461 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10462
10463         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10464         (fixup_partial_die): Remove declaration.
10465         (scan_partial_symbols): Update.
10466         (partial_die_parent_scope): Likewise.
10467         (partial_die_full_name): Likewise.
10468         (fixup_partial_die): Change it to partial_die_info::fixup.
10469
10470 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10471
10472         * dwarf2read.c (read_partial_die): Update the declaration.
10473         (load_partial_dies): Caller update.
10474         (read_partial_die): Remove one argument abbrev_len.
10475
10476 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10477
10478         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10479         assignment operator.
10480         (load_partial_dies): Use ctor and copy ctor.
10481         (read_partial_die): Update.
10482         (dwarf2_cu::find_partial_die): Use ctor.
10483
10484 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10485
10486         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10487         (find_partial_die_in_comp_unit): Change it to
10488         dwarf2_cu::find_partial_die.
10489         (find_partial_die): Update.
10490
10491 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10492
10493         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10494         is NULL.
10495
10496 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10497
10498         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10499
10500 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10501
10502         * arch/amd64.h: Use common/tdesc.h.
10503         * arch/i386.c: Likewise.
10504         * arch/i386.h: Likewise.
10505         * arch/tic6x.c: Likewise.
10506         * arch/tdesc.h: Move file from here...
10507         * common/tdesc.h: ...to here.
10508         * features/aarch64-core.c: Regenerate.
10509         * features/aarch64-fpu.c: Regenerate.
10510         * features/i386/32bit-avx.c: Regenerate.
10511         * features/i386/32bit-avx512.c: Regenerate.
10512         * features/i386/32bit-core.c: Regenerate.
10513         * features/i386/32bit-linux.c: Regenerate.
10514         * features/i386/32bit-mpx.c: Regenerate.
10515         * features/i386/32bit-pkeys.c: Regenerate.
10516         * features/i386/32bit-sse.c: Regenerate.
10517         * features/i386/64bit-avx.c: Regenerate.
10518         * features/i386/64bit-avx512.c: Regenerate.
10519         * features/i386/64bit-core.c: Regenerate.
10520         * features/i386/64bit-linux.c: Regenerate.
10521         * features/i386/64bit-mpx.c: Regenerate.
10522         * features/i386/64bit-pkeys.c: Regenerate.
10523         * features/i386/64bit-segments.c: Regenerate.
10524         * features/i386/64bit-sse.c: Regenerate.
10525         * features/i386/x32-core.c: Regenerate.
10526         * features/tic6x-c6xp.c: Regenerate.
10527         * features/tic6x-core.c: Regenerate.
10528         * features/tic6x-gp.c: Regenerate.
10529         * target-descriptions.c: Use common/tdesc.h.
10530         * target-descriptions.h: Likewise.
10531
10532 2018-02-24  Tom Tromey  <tom@tromey.com>
10533
10534         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10535         (try_thread_db_load_from_dir, thread_db_load_search): Use
10536         std::string.
10537         (info_auto_load_libthread_db_compare): Return bool.  Change
10538         argument types.
10539         (info_auto_load_libthread_db): Use std::vector, std::string.
10540         Remove cleanups.
10541
10542 2018-02-24  Tom Tromey  <tom@tromey.com>
10543
10544         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10545         std::string.
10546         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10547         std::string*.
10548         * gdbarch.c: Rebuild.
10549         * gdbarch.h: Rebuild.
10550         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10551         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10552         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10553         std::string*.
10554
10555 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10556
10557         * gdbtypes.h (sect_offset): Change type to uint64_t.
10558         (sect_offset_str): New function.
10559         * dwarf2read.c (create_addrmap_from_aranges): Use
10560         sect_offset_str.
10561         (error_check_comp_unit_head): Likewise.
10562         (create_debug_type_hash_table): Likewise.
10563         (read_cutu_die_from_dwo): Likewise.
10564         (init_cutu_and_read_dies): Likewise.
10565         (init_cutu_and_read_dies_no_follow): Likewise.
10566         (process_psymtab_comp_unit_reader): Likewise.
10567         (partial_die_parent_scope): Likewise.
10568         (peek_die_abbrev): Likewise.
10569         (process_queue): Likewise.
10570         (dwarf2_physname): Likewise.
10571         (read_namespace_alias): Likewise.
10572         (read_import_statement): Likewise.
10573         (create_dwo_cu_reader): Likewise.
10574         (create_cus_hash_table): Likewise.
10575         (lookup_dwo_cutu): Likewise.
10576         (inherit_abstract_dies): Likewise.
10577         (read_func_scope): Likewise.
10578         (read_call_site_scope): Likewise.
10579         (dwarf2_add_member_fn): Likewise.
10580         (read_common_block): Likewise.
10581         (read_module_type): Likewise.
10582         (read_typedef): Likewise.
10583         (read_subrange_type): Likewise.
10584         (load_partial_dies): Likewise.
10585         (read_partial_die): Likewise.
10586         (find_partial_die): Likewise.
10587         (read_str_index): Likewise.
10588         (dwarf2_string_attr): Likewise.
10589         (build_error_marker_type): Likewise.
10590         (lookup_die_type): Likewise.
10591         (dump_die_shallow): Likewise.
10592         (follow_die_ref): Likewise.
10593         (dwarf2_fetch_die_loc_sect_off): Likewise.
10594         (dwarf2_fetch_constant_bytes): Likewise.
10595         (follow_die_sig): Likewise.
10596         (get_signatured_type): Likewise.
10597         (get_DW_AT_signature_type): Likewise.
10598         (dwarf2_find_containing_comp_unit): Likewise.
10599         (set_die_type): Likewise.
10600
10601 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10602
10603         * arch/aarch64.c: Include "common-defs.h".
10604         * arch/amd64.c: Likewise.
10605         * arch/i386.c: Likewise.
10606
10607 2018-02-21  Tom Tromey  <tom@tromey.com>
10608
10609         * value.h: (extract_field_op): Update.
10610         * eval.c (extract_field_op): Return a const char *.
10611         * expression.h (parse_expression_for_completion): Update.
10612         * completer.c (complete_expression): Update.
10613         (add_struct_fields): Make fieldname const.
10614         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10615         (mark_completion_tag, parse_exp_in_context_1): Update.
10616         (parse_expression_for_completion): Change "name" to
10617         unique_xmalloc_ptr*.
10618
10619 2018-02-21  Tom Tromey  <tom@tromey.com>
10620
10621         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10622
10623 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10624
10625         * avr-tdep.c (avr_read_pc): Change parameter type to
10626         readable_regcache.
10627         * gdbarch.sh (read_pc): Likewise.
10628         * gdbarch.c: Re-generated.
10629         * gdbarch.h: Re-generated.
10630         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10631         readable_regcache.
10632         * ia64-tdep.c (ia64_read_pc): Likewise.
10633         * mips-tdep.c (mips_read_pc): Likewise.
10634         * spu-tdep.c (spu_read_pc): Likewise.
10635
10636 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10637
10638         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10639         * regcache-dump.c: New file.
10640         * regcache.c: Move register_dump to regcache-dump.c.
10641         (maintenance_print_registers): Likewise.
10642         (maintenance_print_raw_registers): Likewise.
10643         (maintenance_print_cooked_registers): Likewise.
10644         (maintenance_print_register_groups): Likewise.
10645         (maintenance_print_remote_registers): Likewise.
10646         (_initialize_regcache): Likewise.
10647         * regcache.h (register_dump): Moved from regcache.c.
10648
10649 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10650
10651         * regcache.c (regcache::regcache): Update.
10652         (regcache::invalidate): Move it to detached_regcache::invalidate.
10653         (get_thread_arch_aspace_regcache): Update.
10654         (regcache::raw_update): Update.
10655         (regcache::cooked_read): Remove some code.
10656         (regcache::cooked_read_value): Likewise.
10657         (regcache::raw_write): Remove assert on m_readonly_p.
10658         (regcache::raw_supply_integer): Move it to
10659         detached_regcache::raw_supply_integer.
10660         (regcache::raw_supply_zeroed): Likewise.
10661         * regcache.h (detached_regcache) <raw_supply_integer>: New
10662         declaration.
10663         <raw_supply_zeroed, invalidate>: Likewise.
10664         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10665         <invalidate>: Likewise.
10666         <m_readonly_p>: Removed.
10667
10668 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10669
10670         * infcmd.c (get_return_value): Let stop_regs point to
10671         get_current_regcache.
10672         * regcache.c (regcache::regcache): Remove.
10673         (register_dump_reg_buffer): New class.
10674         (regcache_print): Adjust.
10675         * regcache.h (regcache): Remove constructors.
10676
10677 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10678
10679         * regcache.c (class register_dump): New class.
10680         (register_dump_regcache, register_dump_none): New class.
10681         (register_dump_remote, register_dump_groups): New class.
10682         (regcache_print): Update.
10683         * regcache.h (regcache_dump_what): Move it to regcache.c.
10684         (regcache) <dump>: Remove.
10685
10686 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10687
10688         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10689          reg_buffer_rw *.
10690         (jit_unwind_reg_set_impl): Call raw_supply.
10691         (jit_frame_sniffer): Use reg_buffer_rw.
10692         * record-full.c (record_full_core_regbuf): Change its type.
10693         (record_full_core_open_1): Use reg_buffer_rw.
10694         (record_full_close): Likewise.
10695         (record_full_core_fetch_registers): Use regcache->raw_supply.
10696         (record_full_core_store_registers): Likewise.
10697         * regcache.c (regcache::get_register_status): Move it to
10698         reg_buffer.
10699         (regcache_raw_set_cached_value): Remove.
10700         (regcache::raw_set_cached_value): Remove.
10701         (regcache::raw_write): Call raw_supply.
10702         (regcache::raw_supply): Move it to reg_buffer_rw.
10703         * regcache.h (regcache_raw_set_cached_value): Remove.
10704         (reg_buffer_rw): New class.
10705
10706 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10707
10708         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10709         readonly_detached_regcache.
10710         (dummy_frame_prev_register): Use regcache->cooked_read.
10711         * frame.c (frame_save_as_regcache): Change return type.
10712         (frame_pop): Update.
10713         * frame.h (frame_save_as_regcache): Update declaration.
10714         * inferior.h (get_infcall_suspend_state_regcache): Update
10715         declaration.
10716         * infrun.c (infcall_suspend_state) <registers>: use
10717         readonly_detached_regcache.
10718         (save_infcall_suspend_state): Don't use regcache_dup.
10719         (get_infcall_suspend_state_regcache): Change return type.
10720         * linux-fork.c (struct fork_info) <savedregs>: Change to
10721         readonly_detached_regcache.
10722         <pc>: New field.
10723         (fork_save_infrun_state): Don't use regcache_dup.
10724         (info_checkpoints_command): Adjust.
10725         * mi/mi-main.c (register_changed_p): Update declaration.
10726         (mi_cmd_data_list_changed_registers): Use
10727         readonly_detached_regcache.
10728         (register_changed_p): Change parameter type to
10729         readonly_detached_regcache.
10730         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10731         readonly_detached_regcache.
10732         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10733         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10734         New.
10735         (regcache::save): Move it to reg_buffer.
10736         (regcache::restore): Change parameter type.
10737         (regcache_dup): Remove.
10738         * regcache.h (reg_buffer) <save>: New method.
10739         (readonly_detached_regcache): New class.
10740         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10741         readonly_detached_regcache.
10742         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10743
10744 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10745
10746         * frame.c (frame_save_as_regcache): Use regcache method save.
10747         (frame_pop): Use regcache method restore.
10748         * infrun.c (restore_infcall_suspend_state): Likewise.
10749         * linux-fork.c (fork_load_infrun_state): Likewise.
10750         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10751         save.
10752         * regcache.c (regcache_save): Remove.
10753         (regcache::restore): More asserts.
10754         (regcache_cpy): Remove.
10755         * regcache.h (regcache_save): Remove the declaration.
10756         (regcache::restore): Move from private to public.
10757         Remove the friend declaration of regcache_cpy.
10758         (regcache_cpy): Remove declaration.
10759
10760 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10761
10762         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10763         parameter type to 'readable_regcache *'.
10764         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10765         * arm-tdep.c (arm_neon_quad_read): Likewise.
10766         (arm_pseudo_read): Likewise.
10767         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10768         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10769         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10770         * gdbarch.c: Re-generated.
10771         * gdbarch.h: Re-generated.
10772         * gdbarch.sh (pseudo_register_read): Change parameter type to
10773         'readable_regcache *'.
10774         (pseudo_register_read_value): Likewise.
10775         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10776         (h8300_pseudo_register_read): Likewise.
10777         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10778         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10779         (i386_pseudo_register_read_into_value): Likewise.
10780         (i386_pseudo_register_read_value): Likewise.
10781         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10782         declaration.
10783         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10784         * m32c-tdep.c (m32c_raw_read): Likewise.
10785         (m32c_read_flg): Likewise.
10786         (m32c_banked_register): Likewise.
10787         (m32c_banked_read): Likewise.
10788         (m32c_sb_read): Likewise.
10789         (m32c_part_read): Likewise.
10790         (m32c_cat_read): Likewise.
10791         (m32c_r3r2r1r0_read): Likewise.
10792         (m32c_pseudo_register_read): Likewise.
10793         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10794         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10795         (mep_pseudo_cr64_read): Likewise.
10796         (mep_pseudo_register_read): Likewise.
10797         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10798         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10799         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10800         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10801         (regcache::cooked_read): Likewise.
10802         (regcache::cooked_read_value): Likewise.
10803         (regcache_cooked_read_signed):
10804         (regcache::cooked_read): Likewise.
10805         * regcache.h (readable_regcache): New class.
10806         (regcache): Inherit readable_regcache.  Move some methods to
10807         readable_regcache.
10808         * rl78-tdep.c (rl78_pseudo_register_read): Change
10809         parameter type to 'readable_regcache *'.
10810         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10811         (e500_pseudo_register_read): Change parameter type to
10812         'readable_regcache *'.
10813         (dfp_pseudo_register_read): Likewise.
10814         (vsx_pseudo_register_read): Likewise.
10815         (efpr_pseudo_register_read): Likewise.
10816         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10817         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10818         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10819         (sh64_pseudo_register_read): Likewise.
10820         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10821         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10822         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10823         (spu_pseudo_register_read): Likewise.
10824         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10825         (xtensa_pseudo_register_read): Likewise.
10826
10827 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10828
10829         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10830         (regcache::arch): Move it to reg_buffer::arch.
10831         (regcache::register_buffer): Likewise.
10832         (regcache::assert_regnum): Likewise.
10833         (regcache::num_raw_registers): Likewise.
10834         * regcache.h (reg_buffer): New class.
10835         (regcache): Inherit reg_buffer.
10836
10837 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10838
10839         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10840         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10841
10842 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
10843
10844         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10845
10846 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
10847
10848         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10849         (SFILES): Remove common/*.c files.
10850         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10851         * common/common.host: Add common reference.
10852         * configure.ac: Likewise.
10853         * configure: Regenerate.
10854
10855 2018-02-16  Yao Qi  <yao.qi@linaro.org>
10856
10857         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10858         (block_initialize_namespace): Use new.
10859         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10860         (dwarf2_free_objfile): Use delete.
10861         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10862         (copy_type_recursive): Use new.
10863         * gdb_obstack.h (allocate_on_obstack): New.
10864
10865 2018-02-15  Yao Qi  <yao.qi@linaro.org>
10866
10867         PR gdb/22849
10868         * inferior.c (exit_inferior_1): Reset inf->control.
10869
10870 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
10871
10872         * ada-lang.c (ada_to_fixed_value_create): Delete advance
10873         declaration.
10874
10875 2018-02-14  Pedro Alves  <palves@redhat.com>
10876
10877         * frame-unwind.c (frame_unwind_try_unwinder): Always call
10878         frame_cleanup_after_sniffer on exception.
10879
10880 2018-02-14  Tom Tromey  <tom@tromey.com>
10881
10882         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10883         const.
10884         (solib_bfd_open): Make pathname const.
10885         * solib.c (solib_bfd_open): Make pathname const.
10886         * solib-spu.c (spu_bfd_fopen): Make name const.
10887         (spu_bfd_open): Make pathname const.
10888         * solib-darwin.c (darwin_bfd_open): Make pathname const.
10889         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10890
10891 2018-02-14  Tom Tromey  <tom@tromey.com>
10892
10893         * symfile.c (symfile_bfd_open): Update.
10894         * source.h (openp, source_full_path_of, find_and_open_source):
10895         Change argument type to unique_xmalloc_ptr.
10896         * source.c (openp): Take a unique_xmalloc_ptr.
10897         (source_full_path_of, find_and_open_source): Likewise.
10898         (open_source_file, symtab_to_fullname): Update.
10899         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10900         unique_xmalloc_ptr.
10901         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10902         (exec_file_find): Update.
10903         * psymtab.c (psymtab_to_fullname): Update.
10904         * nto-tdep.h (nto_find_and_open_solib): Update.
10905         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10906         unique_xmalloc_ptr.
10907         * exec.c (exec_file_attach): Update.
10908         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10909         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10910
10911 2018-02-14  Tom Tromey  <tom@tromey.com>
10912
10913         * solib.c: Include source.h.
10914         * nto-tdep.c: Include source.h.
10915         * mi/mi-cmd-env.c: Include source.h.
10916         * infcmd.c: Include source.h.
10917         * exec.c: Include source.h.
10918         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10919         (add_path, directory_switch, source_path, init_source_path): Move
10920         declarations...
10921         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10922         (add_path, directory_switch, source_path, init_source_path):
10923         ...here.
10924
10925 2018-02-14  Tom Tromey  <tom@tromey.com>
10926
10927         * solist.h (exec_file_find, solib_find): Return
10928         unique_xmalloc_ptr.
10929         (solib_bfd_fopen): Take a const char *.
10930         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10931         (exec_file_find, solib_find): Likewise.
10932         (solib_bfd_fopen): Do not take ownership of "pathname".
10933         (solib_bfd_open): Use unique_xmalloc_ptr.
10934         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10935         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10936         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10937         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10938
10939 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
10940
10941         * ada-lang.c (name_match_type_from_name): Remove reference to
10942         ada_name_for_lookup in function's documentation.
10943         * ada-lang.h (ada_name_for_lookup): Delete declaration.
10944
10945 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10946
10947         * defs.h (enum openp_flags): New enum.
10948         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10949         Move to enum openp_flags.
10950         (openp_flags): New enum flags.
10951         (openp): Change parameter type to openp_flags.
10952         * source.c (openp): Change parameter type to openp_flags.
10953         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10954         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10955
10956 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10957
10958         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10959         per-command.
10960
10961 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10962
10963         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10964         into...
10965         (class dwarf2_queue_guard): ...the destructor of this new class.
10966         (dw2_do_instantiate_symtab): Create instance of the new class
10967         dwarf2_queue_guard, remove cleanup.
10968
10969 2018-02-09  Tom Tromey  <tom@tromey.com>
10970
10971         * source.c (find_source_lines): Don't reference past the end of
10972         the vector.
10973
10974 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10975
10976         * remote.c (remote_btrace_maybe_reopen): Change error message.
10977         * btrace.c (btrace_enable): Likewise.
10978         (parse_xml_btrace): Likewise.
10979         (parse_xml_btrace_conf): Likewise.
10980
10981 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10982
10983         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10984         (linux_enable_pt, linux_enable_bts): Call
10985         diagnose_perf_event_open_fail.
10986
10987 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10988
10989         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10990         Remove parameter and change return type.  Update callers.  Move it.
10991         (linux_enable_bts, linux_enable_pt): Improve error message.
10992         (linux_enable_pt): Remove zero buffer size check.
10993         (linux_enable_btrace): Improve error messages.  Remove NULL return
10994         check.
10995
10996 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10997
10998         * btrace.c (btrace_enable): Remove target_supports_btrace call.
10999         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11000         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11001         (linux_supports_pt, linux_supports_btrace): Remove.
11002         (linux_enable_bts): Call cpu_supports_bts.
11003         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11004         * remote.c (remote_supports_btrace): Remove.
11005         (init_remote_ops): Remove remote_supports_btrace.
11006         * target-delegates.c: Regenerated.
11007         * target.c (target_supports_btrace): Remove.
11008         * target.h (target_ops) <to_supports_btrace>: Remove
11009         (target_supports_btrace): Remove.
11010         * x86-linux-nat.c (x86_linux_create_target): Remove
11011         linux_supports_btrace.
11012
11013 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11014
11015         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11016         btrace failed.
11017         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11018         exception and use message in own exception.
11019
11020 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11021
11022         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11023         (perf_event_pt_event_type): Use gdb_file_up.
11024         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11025         scoped_fd, and scoped_mmap.
11026
11027 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11028
11029         * common/scoped_mmap.h: New.
11030         * unittests/scoped_mmap-selftest.c: New.
11031         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11032         unittests/scoped_mmap-selftest.c.
11033
11034 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11035
11036         * common/scoped_fd.h: New.
11037         * unittests/scoped_fd-selftest.c: New.
11038         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11039         unittests/scoped_fd-selftest.c.
11040
11041 2018-02-09  Tom Tromey  <tom@tromey.com>
11042
11043         * auto-load.c (auto_load_section_scripts): Use
11044         gdb::unique_xmalloc_ptr.
11045
11046 2018-02-09  Tom Tromey  <tom@tromey.com>
11047
11048         * auto-load.c (execute_script_contents): Use std::string.
11049
11050 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11051
11052         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11053         Python function, rather than a new command.
11054
11055 2018-02-08  Tom Tromey  <tom@tromey.com>
11056
11057         * solib.c (solib_find_1): Use std::string.
11058         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11059
11060 2018-02-08  Tom Tromey  <tom@tromey.com>
11061
11062         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11063
11064 2018-02-08  Tom Tromey  <tom@tromey.com>
11065
11066         * source.c (find_source_lines): Use gdb::def_vector.
11067
11068 2018-02-08  Tom Tromey  <tom@tromey.com>
11069
11070         * macrocmd.c (struct temporary_macro_definition): New.
11071         (macro_define_command): Use temporary_macro_definition.  Remove
11072         cleanups.
11073         (free_macro_definition_ptr): Remove.
11074
11075 2018-02-08  Tom Tromey  <tom@tromey.com>
11076
11077         * macroexp.c (maybe_expand): Use std::string.
11078
11079 2018-02-08  Tom Tromey  <tom@tromey.com>
11080
11081         * macroexp.c (struct macro_buffer): Add initializers for some
11082         members.
11083         (init_buffer, init_shared_buffer, free_buffer)
11084         (free_buffer_return_text): Remove.
11085         (macro_buffer): New constructors.
11086         (~macro_buffer): New destructor.
11087         (macro_buffer::set_shared): New method.
11088         (macro_buffer::resize_buffer, macro_buffer::appendc)
11089         (macro_buffer::appendmem): Now methods, not free functions.
11090         (set_token, append_tokens_without_splicing, stringify)
11091         (macro_stringify): Update.
11092         (gather_arguments): Change return type.  Remove argc_p argument,
11093         add args_ptr argument.  Use std::vector.
11094         (substitute_args): Remove argc argument.  Accept std::vector.
11095         (expand): Update.  Use std::vector.
11096         (scan, macro_expand, macro_expand_next): Update.
11097
11098 2018-02-08  Tom Tromey  <tom@tromey.com>
11099
11100         * symtab.c (default_collect_symbol_completion_matches_break_on):
11101         Use unique_xmalloc_ptr.
11102         * macroscope.h: (sal_macro_scope, user_macro_scope)
11103         (default_macro_scope): Return unique_xmalloc_ptr.
11104         * macroscope.c (sal_macro_scope, user_macro_scope)
11105         (default_macro_scope): Return unique_xmalloc_ptr.
11106         * macroexp.h (macro_expand, macro_expand_once): Return
11107         unique_xmalloc_ptr.
11108         * macroexp.c (macro_expand, macro_expand_once): Return
11109         unique_xmalloc_ptr.
11110         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11111         (info_macro_command, info_macros_command): Use
11112         unique_xmalloc_ptr.
11113         * compile/compile-c-support.c (write_macro_definitions): Use
11114         unique_xmalloc_ptr.
11115         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11116
11117 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11118
11119         * value.c (value_static_field): Assign field type instead of
11120         containing type when returning an optimized out value.
11121
11122 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11123
11124         * ft32-tdep.c (ft32_read_pc): Remove.
11125         (ft32_write_pc): Remove.
11126         (ft32_gdbarch_init): Update.
11127         * m32r-tdep.c (m32r_read_pc): Remove.
11128         (m32r_gdbarch_init): Update.
11129         * mep-tdep.c (mep_read_pc): Remove.
11130         (mep_gdbarch_init): Update.
11131         * microblaze-tdep.c (microblaze_write_pc): Remove.
11132         (microblaze_gdbarch_init): Update.
11133         * mn10300-tdep.c (mn10300_read_pc): Remove.
11134         (mn10300_write_pc): Remove.
11135         (mn10300_gdbarch_init): Update.
11136         * moxie-tdep.c (moxie_read_pc): Remove.
11137         (moxie_write_pc): Remove.
11138         (moxie_gdbarch_init): Update.
11139
11140 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11141
11142         * expprint.c (print_subexp_standard): Handle
11143         OP_F77_UNDETERMINED_ARGLIST.
11144         (dump_subexp_body_standard): Likewise.
11145
11146 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11147
11148         * target-descriptions.c (tdesc_element_visitor) Add empty
11149         implementations.
11150         (tdesc_type): Move make_gdb_type from here.
11151         (tdesc_type_builtin): Likewise.
11152         (tdesc_type_vector): Likewise.
11153         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11154         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11155         (make_gdb_type_union): Likewise.
11156         (make_gdb_type_flags): Likewise.
11157         (make_gdb_type_enum): Likewise.
11158         (make_gdb_type): New function.
11159         (tdesc_register_type): Use static make_gdb_type.
11160
11161 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11162
11163         * infcmd.c (default_print_one_register_info): Align natural-format
11164         column values consistently one under another.
11165         (pad_to_column): New function.
11166
11167 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11168
11169         * dwarf2read.c (dwarf2_physname): Move commment.
11170
11171 2018-02-01  Leszek Swirski  <leszeks@google.com>
11172
11173         * varobj.c (varobj_formatted_print_options): Allow recursive
11174         pretty printing if pretty printing is enabled.
11175
11176 2018-02-01  Leszek Swirski  <leszeks@google.com>
11177
11178         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11179         names after a structop as a filename.
11180
11181 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11182
11183         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11184         (arm_record_coproc_data_proc): Likewise.
11185
11186 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11187
11188         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11189
11190 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11191
11192         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11193         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11194
11195 2018-01-31  Pedro Alves  <palves@redhat.com>
11196
11197         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11198         * inflow.c (child_terminal_save_inferior): Wrap reference to
11199         tcgetpgrp in HAVE_TERMIOS_H.
11200         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11201         _WIN32.
11202         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11203         always iterate over all inferiors.
11204         (gdbsim_cntrl_c): Adjust.
11205         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11206
11207 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11208
11209         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11210         index type is objfile-owned if the element type is as well.
11211
11212 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11213
11214         GDB 8.1 released.
11215
11216 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11217
11218         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11219         "features/s390x-linux64.c".
11220         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11221         s390_linux32 and s390x_linux64.
11222         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11223         default tdesc.
11224         * s390-tdep.c: Include "features/s390-linux32.c" and
11225         "features/s390x-linux64.c".
11226         (s390_tdesc_valid): Add check for tdesc_has_registers.
11227         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11228         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11229         tdesc_s390x_linux64.
11230         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11231         tdesc_s390x_linux64 to...
11232         * s390-tdep.h: ...here.
11233
11234 2018-01-30  Pedro Alves  <palves@redhat.com>
11235
11236         PR gdb/13211
11237         * config.in, configure: Regenerate.
11238         * configure.ac: Check for getpgid.
11239         * go32-nat.c (go32_pass_ctrlc): New.
11240         (go32_target): Install it.
11241         * inf-child.c (inf_child_target): Install
11242         child_terminal_save_inferior, child_pass_ctrlc and
11243         child_interrupt.
11244         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11245         (inf_ptrace_target): No longer install it.
11246         * infcmd.c (interrupt_target_1): Adjust.
11247         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11248         (child_interrupt): Declare.
11249         (inferior::terminal_state): New.
11250         * inflow.c (struct terminal_info): Update comments.
11251         (inferior_process_group): Delete.
11252         (terminal_is_ours): Delete.
11253         (gdb_tty_state): New.
11254         (child_terminal_init): Adjust.
11255         (is_gdb_terminal, sharing_input_terminal_1)
11256         (sharing_input_terminal): New functions.
11257         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11258         Set the process's actual process group in the foreground if
11259         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11260         mark terminal as the inferior's if not sharing GDB's terminal.
11261         Don't check attach_flag.
11262         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11263         pass down a target_terminal_state.
11264         (child_terminal_save_inferior): New, factored out from ...
11265         (child_terminal_ours_1): ... this.  Handle
11266         target_terminal_state::is_ours_for_output.
11267         (child_interrupt, child_pass_ctrlc): New.
11268         (inflow_inferior_exit): Clear the inferior's terminal_state.
11269         (copy_terminal_info): Copy the inferior's terminal state.
11270         (_initialize_inflow): Remove reference to terminal_is_ours.
11271         * inflow.h (inferior_process_group): Delete.
11272         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11273         * procfs.c (procfs_target): Don't install procfs_interrupt.
11274         (procfs_interrupt): Delete.
11275         * remote.c (remote_serial_quit_handler): Adjust.
11276         (remote_interrupt): Remove ptid parameter.  Adjust.
11277         * target-delegates.c: Regenerate.
11278         * target.c: Include "terminal.h".
11279         (target_terminal::terminal_state): Rename to ...
11280         (target_terminal::m_terminal_state): ... this.
11281         (target_terminal::init): Adjust.
11282         (target_terminal::inferior): Adjust to per-inferior
11283         terminal_state.
11284         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11285         (target_terminal::ours, target_terminal::ours_for_output): Use
11286         target_terminal_is_ours_kind.
11287         (target_interrupt): Remove ptid parameter.  Adjust.
11288         (default_target_pass_ctrlc): Adjust.
11289         * target.h (target_ops::to_terminal_save_inferior): New field.
11290         (target_ops::to_interrupt): Remove ptid_t parameter.
11291         (target_interrupt): Remove ptid_t parameter.  Update comment.
11292         (target_pass_ctrlc): Update comment.
11293         * target/target.h (target_terminal_state): New scoped enum,
11294         factored out of ...
11295         (target_terminal::terminal_state): ... here.
11296         (target_terminal::inferior): Update comments.
11297         (target_terminal::restore_inferior): New.
11298         (target_terminal::is_inferior, target_terminal::is_ours)
11299         (target_terminal::is_ours_for_output): Adjust.
11300         (target_terminal::scoped_restore_terminal_state): Adjust to
11301         rename, and call restore_inferior() instead of inferior().
11302         (target_terminal::scoped_restore_terminal_state::m_state): Change
11303         type.
11304         (target_terminal::terminal_state): Rename to ...
11305         (target_terminal::m_terminal_state): ... this and change type.
11306
11307 2018-01-30  Pedro Alves  <palves@redhat.com>
11308
11309         * linux-nat.c (wait_for_signal): New function.
11310         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11311         directly.
11312         (async_terminal_is_ours)
11313         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11314         (linux_nat_add_target): Don't override
11315         to_terminal_inferior/to_terminal_ours.
11316
11317 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11318
11319         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11320
11321 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11322
11323         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11324         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11325         dwarf2_per_objfile_free here.
11326         (dwarf2_per_objfile_free): Remove.
11327         (_initialize_dwarf2_read): Don't register
11328         dwarf2_per_objfile_free as a registry cleanup.
11329
11330 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11331
11332         Avoid compilation errors in MinGW native builds
11333
11334         The error is triggered by including python-internal.h, and the
11335         error message is:
11336
11337              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11338                       from build-gnulib/import/math.h:27,
11339                       from d:/usr/Python26/include/pyport.h:235,
11340                       from d:/usr/Python26/include/Python.h:58,
11341                       from python/python-internal.h:94,
11342                       from python/py-arch.c:24:
11343              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11344         using ::hypot;
11345                 ^~~~~
11346
11347         This happens because Python headers define 'hypot' to expand t
11348         '_hypot' in the Windows builds.
11349         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11350         'hypoth'.  This avoids a compilation error.
11351
11352 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11353
11354         * MAINTAINERS (Write After Approval): Fix ordering.
11355
11356 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11357
11358         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11359
11360 2018-01-26  Alan Modra  <amodra@gmail.com>
11361
11362         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11363         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11364         Remove nop.  Make const.  Comment.
11365         (powerpc32_plt_stub_so_2): New.
11366         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11367         Correct count.  Update uses.
11368         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11369         Move common code reading PLT entry word.  Correct
11370         powerpc32_plt_stub PLT address calculation.
11371         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11372         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11373         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11374         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11375         (ppc64_standard_linkage8): Likewise.
11376         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11377         Correct insns description.
11378         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11379
11380 2018-01-24  Pedro Alves  <palves@redhat.com>
11381
11382         GCC PR libstdc++/83906
11383         * gdbtypes.c (operator==(const dynamic_prop &,
11384         const dynamic_prop &)): New.
11385         (operator==(const range_bounds &, const range_bounds &)): New.
11386         (check_types_equal): Use them instead of memcmp.
11387         * gdbtypes.h (operator==(const dynamic_prop &,
11388         const dynamic_prop &)): Declare.
11389         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11390         (operator==(const range_bounds &, const range_bounds &)): Declare.
11391         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11392
11393 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11394
11395         * s390-linux-tdep.c (s390_record_address_mask)
11396         (s390_record_calc_disp_common, s390_record_calc_disp)
11397         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11398         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11399         (s390_process_record): Move to s390-tdep.c.
11400         (s390_linux_init_abi_any): Adjust.
11401         * s390-tdep.c (s390_record_address_mask)
11402         (s390_record_calc_disp_common, s390_record_calc_disp)
11403         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11404         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11405         (s390_process_record): Moved from s390-linux-tdep.c
11406         (s390_gdbarch_init): Adjust.
11407
11408 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11409
11410         * s390-linux-nat.c (s390-tdep.h): New include.
11411         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11412         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11413         (ALLDEPFILES): Add s390-tdep.c.
11414         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11415         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11416         * s390-tdep.h: ...this.  New file.
11417         * s390-linux-tdep.c (s390-tdep.h): New include.
11418         (_initialize_s390_tdep): Rename to...
11419         (_initialize_s390_linux_tdep): ...this and adjust.
11420         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11421         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11422         s390-tdep.h.
11423         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11424         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11425         (s390_is_partial_instruction, s390_software_single_step)
11426         (is_non_branch_ril, s390_displaced_step_copy_insn)
11427         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11428         (s390_prologue_data, s390_addr, s390_store, s390_load)
11429         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11430         (s390_register_call_saved, s390_guess_tracepoint_registers)
11431         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11432         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11433         (s390_pseudo_register_name, s390_pseudo_register_type)
11434         (s390_pseudo_register_read, s390_pseudo_register_write)
11435         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11436         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11437         (s390_addr_bits_remove, s390_address_class_type_flags)
11438         (s390_address_class_type_flags_to_name)
11439         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11440         (s390_function_arg_float, s390_function_arg_vector)
11441         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11442         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11443         (s390_frame_align, s390_register_return_value, s390_return_value)
11444         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11445         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11446         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11447         (s390_trad_frame_prev_register, s390_unwind_cache)
11448         (s390_prologue_frame_unwind_cache)
11449         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11450         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11451         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11452         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11453         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11454         (s390_frame_base_address, s390_local_base_address)
11455         (s390_frame_base, s390_gcc_target_options)
11456         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11457         (s390_validate_reg_range, s390_tdesc_valid)
11458         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11459         * s390-tdep.c: ...this.  New file.
11460
11461 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11462
11463         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11464         (s390_process_record, s390_gdbarch_tdep_alloc)
11465         (s390_linux_init_abi_any): Use/set new hook.
11466
11467 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11468
11469         * s390-linux-tdep.c (osabi.h): New include.
11470         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11471         (s390_linux_init_abi_any): New functions.
11472         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11473
11474 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11475
11476         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11477         tdesc_has_registers check
11478
11479 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11480
11481         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11482         (s390_validate_reg_range): New macro.
11483         (s390_gdbarch_init): Adjust.
11484
11485 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11486
11487         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11488         (s390_gdbarch_tdep_alloc): Adjust.
11489         (s390_gdbarch_init): Adjust.
11490
11491 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11492
11493         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11494         <have_tdb>: Change type to bool.
11495         (s390_gdbarch_tdep_alloc): Adjust.
11496         (s390_gdbarch_init): Adjust.
11497
11498 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11499
11500         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11501         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11502         (s390_gdbarch_tdep_alloc): New function.
11503         (s390_gdbarch_init): Allocate tdep at start and use its fields
11504         instead of separate variables.
11505
11506 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11507
11508         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11509         when looking for cached gdbarch and add comment for remaining.
11510
11511 2018-01-22  Pedro Alves  <palves@redhat.com>
11512             Sergio Durigan Junior  <sergiodj@redhat.com>
11513
11514         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11515         case.
11516
11517 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11518
11519         * MAINTAINERS: Update my company e-mail address.
11520
11521 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11522
11523         * regcache.c (cooked_write_test): New function.
11524         (_initialize_regcache): Register the test.
11525
11526 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11527
11528         * ia64-tdep.c (ia64_pseudo_register_read): Call
11529         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11530         * m32c-tdep.c (m32c_cat_read): Likewise.
11531         (m32c_r3r2r1r0_read): Likewise.
11532         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11533         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11534
11535 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11536
11537         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11538         method raw_read instead of regcache_raw_read.
11539         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11540         * arm-tdep.c (arm_neon_quad_read): Likewise.
11541         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11542         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11543         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11544         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11545         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11546         (i386_pseudo_register_read_into_value): Likewise.
11547         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11548         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11549         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11550         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11551         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11552         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11553         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11554         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11555         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11556
11557 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11558
11559         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11560         * configure.tgt: Remove target mt.
11561         * mt-tdep.c: Remove.
11562         * regcache.c (cooked_read_test): Remove the check for mt.
11563
11564 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11565
11566         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11567         instead of gdbarch_pseudo_register_read_value.
11568
11569 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11570
11571         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11572         language is Ada.
11573
11574 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11575
11576         * linespec.c (create_sals_line_offset): Remove code that preserved
11577         the symtab_and_line's line number.
11578
11579 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11580
11581         * varobj.c (varobj_create): Don't set valid_block when creating a
11582         floating varobj.
11583
11584 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11585
11586         * varobj.c (varobj_create): Remove out of date comment.
11587
11588 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11589
11590         PR mi/20395
11591         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11592         updating innermost block.
11593         * parse.c (innermost_block_tracker::update): Take extra type
11594         parameter, and check types match before updating innermost block.
11595         (write_dollar_variable): Update innermost block for registers.
11596         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11597         (innermost_block_tracker::innermost_block_tracker): Initialise
11598         m_types member.
11599         (innermost_block_tracker::reset): Take type parameter.
11600         (innermost_block_tracker::update): Take type parameter, and pass
11601         type through as needed.
11602         (innermost_block_tracker::m_types): New member.
11603         * varobj.c (varobj_create): Pass type when reseting innermost
11604         block.
11605
11606 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11607
11608         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11609         * ada-lang.c (resolve_subexp): Likewise.
11610         * breakpoint.c (set_breakpoint_condition) Likewise.
11611         (watch_command_1) Likewise.
11612         * c-exp.y (variable): Likewise.
11613         * d-exp.y (PrimaryExpression): Likewise.
11614         * f-exp.y (variable): Likewise.
11615         * go-exp.y (variable): Likewise.
11616         * m2-exp.y (variable): Likewise.
11617         * objfiles.c (objfile::~objfile): Likewise.
11618         * p-exp.y (variable): Likewise.
11619         * parse.c (innermost_block): Change type.
11620         * parser-defs.h (class innermost_block_tracker): New.
11621         (innermost_block): Change to innermost_block_tracker.
11622         * printcmd.c (display_command): Switch to innermost_block API.
11623         (do_one_display): Likewise.
11624         * rust-exp.y (do_one_display): Likewise.
11625         * symfile.c (clear_symtab_users): Likewise.
11626         * varobj.c (varobj_create): Switch to innermost_block API, replace
11627         use of innermost_block with block stored on varobj object.
11628
11629 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11630
11631         * expression.h (innermost_block): Remove declaration.
11632         * varobj.c: Add 'parser-defs.h' include.
11633
11634 2018-01-19  Tom Tromey  <tom@tromey.com>
11635
11636         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11637         symbols in the static and global blocks.
11638
11639 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11640
11641         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11642         gdb_ptrace.h, and move including gdb_wait.h ...
11643         * nat/linux-ptrace.h: ... to here.
11644
11645 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11646
11647         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11648         inf_ptrace_detach_success.
11649         (inf_ptrace_detach_success): Add inferior parameter, use it
11650         instead of inferior_ptid, pass it to detach_inferior.
11651         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11652         parameter.
11653         * inferior.c (detach_inferior): Add overload that takes an
11654         inferior object.
11655         * inferior.h (detach_inferior): Likewise.
11656         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11657         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11658         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11659
11660 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11661
11662         * target.h (struct target_ops) <to_detach>: Add inferior
11663         parameter.
11664         (target_detach): Likewise.
11665         * target.c (dispose_inferior): Pass inferior down.
11666         (target_detach): Pass inferior down.  Assert that it is equal to
11667         the current inferior.
11668         * aix-thread.c (aix_thread_detach): Pass inferior down.
11669         * corefile.c (core_file_command): Pass current_inferior() down.
11670         * corelow.c (core_detach): Add inferior parameter.
11671         * darwin-nat.c (darwin_detach): Likewise.
11672         * gnu-nat.c (gnu_detach): Likewise.
11673         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11674         * infcmd.c (detach_command): Pass current_inferior() down to
11675         target_detach.
11676         * infrun.c (follow_fork_inferior): Pass parent_inf to
11677         target_detach.
11678         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11679         target_detach.
11680         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11681         * linux-thread-db.c (thread_db_detach): Likewise.
11682         * nto-procfs.c (procfs_detach): Likewise.
11683         * procfs.c (procfs_detach): Likewise.
11684         * record.c (record_detach): Likewise.
11685         * record.h (struct inferior): Forward-declare.
11686         (record_detach): Add inferior parameter.
11687         * remote-sim.c (gdbsim_detach): Likewise.
11688         * remote.c (remote_detach_1): Likewise.
11689         (remote_detach): Likewise.
11690         (extended_remote_detach): Likewise.
11691         * sol-thread.c (sol_thread_detach): Likewise.
11692         * target-debug.h (target_debug_print_inferior_p): New macro.
11693         * target-delegates.c: Re-generate.
11694         * top.c (kill_or_detach): Pass inferior down to target_detach.
11695         * windows-nat.c (windows_detach): Add inferior parameter.
11696
11697 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11698
11699         * target.h (struct target_ops) <to_detach>: Remove args
11700         parameter.
11701         (target_detach): Likewise.
11702         * target.c (dispose_inferior): Adjust.
11703         (target_detach): Remove args parameter, adjust.
11704         * aix-thread.c (aix_thread_detach): Adjust.
11705         * corefile.c (core_file_command): Adjust.
11706         * corelow.c (core_detach): Adjust.
11707         * darwin-nat.c (darwin_detach): Adjust.
11708         * gnu-nat.c (gnu_detach): Adjust.
11709         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11710         * infcmd.c (detach_command): Adjust
11711         * infrun.c (follow_fork_inferior): Adjust.
11712         (handle_vfork_child_exec_or_exit): Adjust.
11713         * linux-fork.c (linux_fork_detach): Remove args parameter.
11714         * linux-fork.h (linux_fork_detach): Likewise.
11715         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11716         * linux-thread-db.c (thread_db_detach): Likewise.
11717         * nto-procfs.c (procfs_detach): Likewise.
11718         * procfs.c (procfs_detach): Likewise.
11719         (do_detach): Remove signo parameter.
11720         * record.c (record_detach): Remove args parameter.
11721         * record.h (record_detach): Likewise.
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-delegates.c: Re-generate.
11728         * top.c (struct qt_args) <args>: Remove field.
11729         (kill_or_detach): Don't pass args.
11730         (quit_force): Don't set args.
11731         * windows-nat.c (windows_detach): Remove args parameter.
11732
11733 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11734
11735         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11736         (arm_linux_init_abi): Install it.
11737
11738 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11739
11740         * osabi.c (gdb_osabi_names): Extend the regexp for
11741         arm-linux-gnueabihf.
11742
11743 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11744
11745         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11746         m_abbrevs.
11747         (abbrev_table::add_abbrev): Update.
11748         (abbrev_table::lookup_abbrev): Update.
11749
11750 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11751
11752         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11753
11754 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11755
11756         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11757         to "std::string".
11758
11759 2018-01-17  Tom Tromey  <tom@tromey.com>
11760
11761         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11762
11763 2018-01-17  Tom Tromey  <tom@tromey.com>
11764
11765         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11766         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11767         (create_array_type_with_stride): Update.
11768         * dwarf2read.c (set_die_type): Update.
11769
11770 2018-01-17  Tom Tromey  <tom@tromey.com>
11771
11772         * dwarf2read.c (delayed_method_info): Remove typedef.
11773         (dwarf2_cu::method_info): Now a std::vector.
11774         (add_to_method_list): Update.
11775         (free_delayed_list): Remove.
11776         (compute_delayed_physnames): Update.
11777         (process_full_comp_unit, process_full_type_unit): Clear the method
11778         list.  Remove cleanups.
11779         (psymtab_include_file_name): Add name_holder parameter.  Use
11780         unique_xmalloc_ptr.
11781         (dwarf_decode_lines): Update.
11782
11783 2018-01-17  Tom Tromey  <tom@tromey.com>
11784             Simon Marchi  <simon.marchi@ericsson.com>
11785
11786         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11787         (dwarf2_per_objfile::free_cached_comp_units)
11788         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11789         (init_cutu_and_read_dies_no_follow): Update.
11790         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11791         (dwarf2_cu::~dwarf2_cu): New.
11792         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11793         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11794
11795 2018-01-17  Tom Tromey  <tom@tromey.com>
11796             Simon Marchi  <simon.marchi@ericsson.com>
11797
11798         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11799         (struct die_reader_specs) <abbrev_table>: New member.
11800         (struct abbrev_table): Add constructor.
11801         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11802         <abbrev_obstack>: Now an auto_obstack.
11803         (abbrev_table_up): New typedef.
11804         (init_cu_die_reader): Add abbrev_table parameter.
11805         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11806         Add result_dwo_abbrev_table.
11807         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11808         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11809         Update.
11810         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11811         parameter.
11812         (skip_children): Update.
11813         (abbrev_table::alloc_abbrev): Rename from
11814         abbrev_table_alloc_abbrev.
11815         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11816         (abbrev_table::lookup_abbrev): Rename from
11817         abbrev_table_lookup_abbrev.
11818         (abbrev_table_read_table): Return abbrev_table_up.
11819         (abbrev_table_free, abbrev_table_free_cleanup)
11820         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11821         (load_partial_dies): Update.
11822
11823 2018-01-17  Tom Tromey  <tom@tromey.com>
11824
11825         * dwarf2read.c (dwarf2_compute_name): Update comment.
11826         (read_func_scope, read_variable): Update.
11827         (new_symbol): Remove.
11828         (new_symbol_full): Rename to new_symbol.
11829
11830 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11831
11832         PR gdb/16577
11833         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11834         a warning instead of throwing an error, set section size to 0 and return
11835         NULL.
11836         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11837
11838 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11839
11840         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11841         std::string.
11842         (linux_ptrace_attach_fail_reason_string): Likewise.
11843         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11844         Likewise.
11845         (linux_ptrace_attach_fail_reason_string): Likewise.
11846         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11847
11848 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11849
11850         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11851
11852 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
11853
11854         PR gdb/21559
11855         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11856         checking for fs_base/gs_base fields in struct user_regs_struct.
11857         * configure: Regenerate.
11858
11859 2018-01-17  Yao Qi  <yao.qi@linaro.org>
11860
11861         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11862         function.
11863         (aarch64_linux_init_abi): Install it to gdbarch hook
11864         gcc_target_options.
11865
11866 2018-01-15  Pedro Alves  <palves@redhat.com>
11867
11868         * common/signals-state-save-restore.c
11869         (save_original_signals_state): Fix typos.
11870
11871 2017-01-12  Tom Tromey  <tom@tromey.com>
11872             Sergio Durigan Junior  <sergiodj@redhat.com>
11873
11874         * Makefile.in (install-only): Install gdb-add-index.
11875
11876 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
11877
11878         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11879
11880 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11881
11882         * infrun.c (keep_going_pass_signal): Clear step-over info when
11883         insert_breakpoints fails.
11884
11885 2018-01-11  Pedro Alves  <palves@redhat.com>
11886
11887         PR gdb/22583
11888         * infrun.c (resume): Rename to ...
11889         (resume_1): ... this.
11890         (resume): Reimplement as wrapper around resume_1.
11891
11892 2018-01-11  Pedro Alves  <palves@redhat.com>
11893
11894         PR remote/22597
11895         * remote.c (remote_parse_stop_reply): Default to the last-set
11896         general thread instead of to 'magic_null_ptid'.
11897
11898 2018-01-10  Pedro Alves  <palves@redhat.com>
11899
11900         * language.h (language_get_symbol_name_matcher): Rename ...
11901         (get_symbol_name_matcher): ... this.
11902         * language.c (language_get_symbol_name_matcher): Ditto.
11903         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11904         callers adjusted.
11905
11906 2018-01-10  Pedro Alves  <palves@redhat.com>
11907
11908         PR gdb/22670
11909         * dwarf2read.c
11910         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11911         Adjust to use language_get_symbol_name_matcher instead of
11912         language_defn::la_get_symbol_name_matcher.
11913         * language.c (language_get_symbol_name_matcher): If in Ada mode
11914         and the lookup name is a verbatim match, return Ada's matcher.
11915         * language.h (language_get_symbol_name_matcher): Adjust comment.
11916         (ada_lookup_name_info::verbatim_p):: New method.
11917
11918 2018-01-10  Pedro Alves  <palves@redhat.com>
11919
11920         PR gdb/22670
11921         * ada-lang.c (ada_collect_symbol_completion_matches): If the
11922         minsym's language is language_auto or language_cplus, pass down
11923         language_ada instead.
11924         * symtab.c (compare_symbol_name): Don't frob symbol language here.
11925
11926 2018-01-10  Pedro Alves  <palves@redhat.com>
11927
11928         PR gdb/22670
11929         * minsyms.c (linkage_name_str): New function.
11930         (iterate_over_minimal_symbols): Use it.
11931
11932 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11933
11934         * NEWS: Document that 'info proc' now works on FreeBSD.
11935
11936 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11937
11938         * configure.ac: Check for kinfo_getfile in libutil.
11939         * configure: Regenerate.
11940         * config.in: Regenerate.
11941         * fbsd-nat.c: Include "fbsd-tdep.h".
11942         (fbsd_fetch_cmdline): New.
11943         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11944         rather than calling error.
11945         (fbsd_info_proc): New.
11946         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11947         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11948         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11949
11950 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11951
11952         * fbsd-nat.c (struct free_deleter): Remove.
11953         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11954
11955 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11956
11957         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11958         NULL for an empty pathname.
11959
11960 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11961
11962         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11963         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11964         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11965         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11966         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11967         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11968         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11969         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11970         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11971         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11972         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11973         (fbsd_core_fetch_timeval, fbsd_print_sigset)
11974         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11975         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
11976         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11977
11978 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
11979
11980         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11981         (gnu_xfer_auxv): New function.
11982         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11983         TARGET_OBJECT_AUXV.
11984
11985 2018-01-08  Yao Qi  <yao.qi@linaro.org>
11986             Simon Marchi  <simon.marchi@ericsson.com>
11987
11988         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11989         common/selftest.c.
11990         (COMMON_OBS): Remove selftest.o.
11991         * configure.ac: Append selftest-arch.c and common/selftest.c to
11992         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
11993         * configure: Re-generated.
11994         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11995         GDB_SELF_TEST.
11996         (maintenance_info_selftests): Likewise.
11997
11998 2018-01-08  Xavier Roirand  <roirand@adacore.com>
11999
12000         * ada-valprint.c (val_print_packed_array_elements): Use
12001         proper number of elements when printing an array indexed
12002         by an enumeration type.
12003
12004 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12005
12006         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12007         (dw2_get_file_names_reader): Adjust.
12008         (lookup_dwo_signatured_type): Adjust.
12009         (lookup_dwp_signatured_type): Adjust.
12010         (lookup_signatured_type): Adjust.
12011         (create_type_unit_group): Adjust.
12012         (get_type_unit_group): Adjust.
12013         (process_psymtab_comp_unit_reader): Adjust.
12014         (build_type_psymtabs_reader): Adjust.
12015         (scan_partial_symbols): Adjust.
12016         (add_partial_symbol): Adjust.
12017         (add_partial_subprogram): Adjust.
12018         (peek_die_abbrev): Adjust.
12019         (fixup_go_packaging): Adjust.
12020         (process_imported_unit_die): Adjust.
12021         (dwarf2_compute_name): Adjust.
12022         (dwarf2_physname): Adjust.
12023         (read_import_statement): Adjust.
12024         (handle_DW_AT_stmt_list): Adjust.
12025         (read_file_scope): Adjust.
12026         (read_func_scope): Adjust.
12027         (read_lexical_block_scope): Adjust.
12028         (read_call_site_scope): Adjust.
12029         (read_variable): Adjust.
12030         (dwarf2_rnglists_process): Adjust.
12031         (dwarf2_ranges_process): Adjust.
12032         (dwarf2_ranges_read): Adjust.
12033         (dwarf2_get_pc_bounds): Adjust.
12034         (dwarf2_record_block_ranges): Adjust.
12035         (dwarf2_add_field): Adjust.
12036         (dwarf2_add_member_fn): Adjust.
12037         (read_structure_type): Adjust.
12038         (process_structure_scope): Adjust.
12039         (read_enumeration_type): Adjust.
12040         (read_array_type): Adjust.
12041         (mark_common_block_symbol_computed): Adjust.
12042         (read_common_block): Adjust.
12043         (read_namespace_type): Adjust.
12044         (read_namespace): Adjust.
12045         (read_module_type): Adjust.
12046         (read_tag_pointer_type): Adjust.
12047         (read_tag_ptr_to_member_type): Adjust.
12048         (read_tag_string_type): Adjust.
12049         (read_subroutine_type): Adjust.
12050         (read_typedef): Adjust.
12051         (read_base_type): Adjust.
12052         (attr_to_dynamic_prop): Adjust.
12053         (read_subrange_type): Adjust.
12054         (read_unspecified_type): Adjust.
12055         (dwarf2_read_abbrevs): Adjust.
12056         (load_partial_dies): Adjust.
12057         (read_partial_die): Adjust.
12058         (find_partial_die): Adjust.
12059         (guess_partial_die_structure_name): Adjust.
12060         (fixup_partial_die): Adjust.
12061         (read_attribute_value): Adjust.
12062         (read_addr_index): Adjust.
12063         (read_addr_index_from_leb128): Adjust.
12064         (read_str_index): Adjust.
12065         (dwarf2_string_attr): Adjust.
12066         (get_debug_line_section): Adjust.
12067         (dwarf_decode_line_header): Adjust.
12068         (lnp_state_machine::check_line_address): Adjust.
12069         (dwarf_decode_lines_1): Adjust.
12070         (dwarf_decode_lines): Adjust.
12071         (dwarf2_start_symtab): Adjust.
12072         (var_decode_location): Adjust.
12073         (new_symbol_full): Adjust.
12074         (dwarf2_const_value_data): Adjust.
12075         (dwarf2_const_value_attr): Adjust.
12076         (dwarf2_const_value): Adjust.
12077         (die_type): Adjust.
12078         (die_containing_type): Adjust.
12079         (build_error_marker_type): Adjust.
12080         (lookup_die_type): Adjust.
12081         (guess_full_die_structure_name): Adjust.
12082         (anonymous_struct_prefix): Adjust.
12083         (determine_prefix): Adjust.
12084         (dwarf2_name): Adjust.
12085         (follow_die_ref_or_sig): Adjust.
12086         (follow_die_offset): Adjust.
12087         (follow_die_ref): Adjust.
12088         (follow_die_sig_1): Adjust.
12089         (follow_die_sig): Adjust.
12090         (get_signatured_type): Adjust.
12091         (get_DW_AT_signature_type): Adjust.
12092         (decode_locdesc): Adjust.
12093         (dwarf_decode_macros): Adjust.
12094         (cu_debug_loc_section): Adjust.
12095         (fill_in_loclist_baton): Adjust.
12096         (dwarf2_symbol_mark_computed): Adjust.
12097         (init_one_comp_unit): Don't assign
12098         dwarf2_cu::dwarf2_per_objfile.
12099         (set_die_type): Adjust.
12100
12101 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12102
12103         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12104         <dwarf2_per_objfile>: New field.
12105         (dwarf2_per_objfile): Remove global.
12106         (get_dwarf2_per_objfile): New function.
12107         (set_dwarf2_per_objfile): New function.
12108         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12109         dwarf2_per_objfile.
12110         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12111         (read_abbrev_offset): Likewise.
12112         (read_indirect_string): Likewise.
12113         (read_indirect_line_string): Likewise.
12114         (read_indirect_string_at_offset): Likewise.
12115         (read_indirect_string_from_dwz): Likewise.
12116         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12117         dwarf2_per_objfile.
12118         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12119         (create_all_comp_units): Change objfile parameter to
12120         dwarf2_per_objfile.
12121         (create_all_type_units): Likewise.
12122         (process_queue): Add dwarf2_per_objfile parameter.
12123         (read_and_check_comp_unit_head): Likewise.
12124         (lookup_dwo_unit_in_dwp): Likewise.
12125         (get_dwp_file): Likewise.
12126         (process_cu_includes): Likewise.
12127         (struct free_dwo_file_cleanup_data): New struct.
12128         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12129         set_dwarf2_per_objfile.
12130         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12131         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12132         context, adjust calls.
12133         (dw2_instantiate_symtab): Likewise.
12134         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12135         (dw2_get_cu): Likewise.
12136         (create_cu_from_index_list): Change objfile parameter to
12137         dwarf2_per_objfile.
12138         (create_cus_from_index_list): Get dwarf2_per_objfile from
12139         context, adjust calls.
12140         (create_cus_from_index): Likewise.
12141         (create_signatured_type_table_from_index): Change objfile
12142         parameter to dwarf2_per_objfile.
12143         (create_signatured_type_table_from_debug_names): Change objfile
12144         parameter to dwarf2_per_objfile.
12145         (create_addrmap_from_index): Likewise.
12146         (create_addrmap_from_aranges): Likewise.
12147         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12148         (dw2_setup): Remove.
12149         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12150         context.
12151         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12152         get_dwarf2_per_objfile.
12153         (dw2_forget_cached_source_info): Likewise.
12154         (dw2_map_symtabs_matching_filename): Likewise.
12155         (struct dw2_symtab_iterator) <index>: Remove.
12156         <dwarf2_per_objfile>: New field.
12157         (dw2_symtab_iter_init): Replace index parameter with
12158         dwarf2_per_objfile.
12159         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12160         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12161         (dw2_print_stats): Likewise.
12162         (dw2_dump): Likewise.
12163         (dw2_expand_symtabs_for_function): Likewise.
12164         (dw2_expand_all_symtabs): Likewise.
12165         (dw2_expand_symtabs_with_fullname): Likewise.
12166         (dw2_expand_marked_cus): Replace index and objfile parameters
12167         with dwarf2_per_objfile.
12168         (dw_expand_symtabs_matching_file_matcher): Add
12169         dwarf2_per_objfile parameter and adjust calls.
12170         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12171         adjust calls.
12172         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12173         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12174         adjust calls.
12175         (create_cus_from_debug_names_list): Replace objfile parameter
12176         with dwarf2_per_objfile and adjust calls.
12177         (create_cus_from_debug_names): Likewise.
12178         (dwarf2_read_debug_names): Likewise.
12179         (mapped_debug_names::namei_to_name): Adjust call.
12180         (dw2_debug_names_iterator::next): Likewise.
12181         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12182         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12183         (dw2_debug_names_dump): Likewise.
12184         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12185         (dw2_debug_names_expand_symtabs_matching): Likewise.
12186         (dwarf2_initialize_objfile): Likewise.
12187         (dwarf2_build_psymtabs): Likewise.
12188         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12189         this_cu.
12190         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12191         (read_and_check_comp_unit_head): Likewise.
12192         (read_abbrev_offset): Likewise.
12193         (create_debug_type_hash_table): Likewise.
12194         (create_debug_types_hash_table): Likewise.
12195         (create_all_type_units): Replace objfile parameter with
12196         dwarf2_per_objfile.
12197         (add_type_unit): Add dwarf2_per_objfile parameter.
12198         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12199         with dwarf2_per_objfile.
12200         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12201         (lookup_dwp_signatured_type): Likewise.
12202         (lookup_signatured_type): Likewise.
12203         (read_cutu_die_from_dwo): Likewise.
12204         (init_tu_and_read_dwo_dies): Likewise.
12205         (init_cutu_and_read_dies): Likewise.
12206         (init_cutu_and_read_dies_no_follow): Likewise.
12207         (allocate_type_unit_groups_table): Add objfile parameter.
12208         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12209         (get_type_unit_group): Likewise.
12210         (process_psymtab_comp_unit): Update call.
12211         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12212         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12213         (print_tu_stats): Likewise.
12214         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12215         in void* parameter.
12216         (build_type_psymtabs): Change objfile parameter to
12217         dwarf2_per_objfile.
12218         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12219         passed in void* parameter.
12220         (process_skeletonless_type_units): Change objfile parameter to
12221         dwarf2_per_objfile.
12222         (set_partial_user): Likewise.
12223         (dwarf2_build_psymtabs_hard): Likewise.
12224         (read_comp_units_from_section): Likewise.
12225         (create_all_comp_units): Likewise.
12226         (scan_partial_symbols): Update calls.
12227         (add_partial_symbol): Likewise.
12228         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12229         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12230         (process_queue): Add dwarf2_per_objfile parameter.
12231         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12232         (compute_compunit_symtab_includes): Likewise.
12233         (process_cu_includes): Add dwarf2_per_objfile parameter.
12234         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12235         (process_full_type_unit): Likewise.
12236         (process_imported_unit_die): Update call.
12237         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12238         (read_file_scope): Likewise.
12239         (allocate_dwo_file_hash_table): Add objfile parameter.
12240         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12241         (create_cus_hash_table): Likewise.
12242         (create_dwp_hash_table): Likewise.
12243         (create_dwo_unit_in_dwp_v1): Likewise.
12244         (create_dwp_v2_section): Likewise.
12245         (create_dwo_unit_in_dwp_v2): Likewise.
12246         (lookup_dwo_unit_in_dwp): Likewise.
12247         (try_open_dwop_file): Likewise.
12248         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12249         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12250         cleanup to include a reference to dwarf2_per_objfile.
12251         (open_dwp_file): Add dwarf2_per_objfile parameter.
12252         (open_and_init_dwp_file): Likewise.
12253         (get_dwp_file): Likewise.
12254         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12255         (queue_and_load_all_dwo_tus): Update call.
12256         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12257         data.
12258         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12259         (dwarf2_ranges_process): Likewise.
12260         (dwarf2_get_pc_bounds): Likewise.
12261         (mark_common_block_symbol_computed): Likewise.
12262         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12263         (dwarf2_read_abbrevs): Update call.
12264         (read_partial_die): Use dwarf2_per_objfile from cu.
12265         (find_partial_die): Likewise.
12266         (fixup_partial_die): Likewise.
12267         (read_attribute_value): Likewise.
12268         (read_indirect_string_at_offset_from): Add objfile parameter.
12269         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12270         parameter.
12271         (read_indirect_string_from_dwz): Add objfile parameter.
12272         (read_indirect_string): Add objfile parameter.
12273         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12274         (read_addr_index): Use dwarf2_per_objfile from cu.
12275         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12276         call dw2_setup.
12277         (read_str_index): Use dwarf2_per_objfile from cu.
12278         (get_debug_line_section): Likewise.
12279         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12280         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12281         (new_symbol_full): Use dwarf2_per_objfile from cu.
12282         (build_error_marker_type): Likewise.
12283         (lookup_die_type): Likewise.
12284         (determine_prefix): Likewise.
12285         (follow_die_offset): Likewise.
12286         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12287         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12288         (dwarf2_fetch_die_type_sect_off): Likewise.
12289         (dwarf2_get_die_type): Likewise.
12290         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12291         (get_signatured_type): Likewise.
12292         (get_DW_AT_signature_type): Likewise.
12293         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12294         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12295         (cu_debug_loc_section): Likewise.
12296         (fill_in_loclist_baton): Likewise.
12297         (dwarf2_symbol_mark_computed): Likewise.
12298         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12299         dwarf2_per_objfile.
12300         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12301         parameter.
12302         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12303         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12304         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12305         (set_die_type): Use dwarf2_free_objfile from cu.
12306         (get_die_type_at_offset): Likewise.
12307         (dwarf2_per_objfile_free): Don't assign global variable.
12308         (debug_names) <constructor>: Add dwarf2_per_objfile
12309         parameter, update m_debugstrlookup construction.
12310         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12311         parameter.
12312         <m_dwarf2_per_objfile>: New field.
12313         <lookup>: Use m_dwarf2_per_objfile.
12314         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12315         (psyms_seen_size): Likewise.
12316         (write_gdbindex): Replace objfile parameter with
12317         dwarf2_per_objfile.
12318         (write_debug_names): Likewise.
12319         (write_psymtabs_to_index): Likewise.
12320         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12321         calls.
12322
12323 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12324
12325         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12326         <dwarf2_per_objfile>: New field.
12327         (struct dwarf2_per_cu_data) <objfile>: Remove.
12328         <dwarf2_per_objfile>: New field.
12329         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12330         of objfile.
12331         (create_signatured_type_table_from_index): Likewise.
12332         (create_debug_type_hash_table): Likewise.
12333         (fill_in_sig_entry_from_dwo_entry): Likewise.
12334         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12335         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12336         objfile.
12337         (create_partial_symtab): Access objfile through
12338         dwarf2_per_objfile.
12339         (process_psymtab_comp_unit_reader): Likewise.
12340         (read_comp_units_from_section): Likewise.
12341         (scan_partial_symbols): Likewise.
12342         (add_partial_symbol): Likewise.
12343         (add_partial_subprogram): Likewise.
12344         (peek_die_abbrev): Likewise.
12345         (fixup_go_packaging): Likewise.
12346         (process_full_comp_unit): Likewise.
12347         (process_full_type_unit): Likewise.
12348         (process_imported_unit_die): Likewise.
12349         (dwarf2_compute_name): Likewise.
12350         (dwarf2_physname): Likewise.
12351         (read_import_statement): Likewise.
12352         (create_cus_hash_table): Assign dwarf2_physname instead of
12353         objfile.
12354         (read_func_scope): Access objfile through dwarf2_per_objfile.
12355         (read_lexical_block_scope): Likewise.
12356         (read_call_site_scope): Likewise.
12357         (read_variable): Likewise.
12358         (dwarf2_rnglists_process): Likewise.
12359         (dwarf2_ranges_process): Likewise.
12360         (dwarf2_ranges_read): Likewise.
12361         (dwarf2_record_block_ranges): Likewise.
12362         (dwarf2_add_field): Likewise.
12363         (dwarf2_add_member_fn): Likewise.
12364         (read_structure_type): Likewise.
12365         (process_structure_scope): Likewise.
12366         (read_enumeration_type): Likewise.
12367         (read_array_type): Likewise.
12368         (read_common_block): Likewise.
12369         (read_namespace_type): Likewise.
12370         (read_namespace): Likewise.
12371         (read_module_type): Likewise.
12372         (read_tag_pointer_type): Likewise.
12373         (read_tag_ptr_to_member_type): Likewise.
12374         (read_tag_string_type): Likewise.
12375         (read_subroutine_type): Likewise.
12376         (read_typedef): Likewise.
12377         (read_base_type): Likewise.
12378         (attr_to_dynamic_prop): Likewise.
12379         (read_subrange_type): Likewise.
12380         (read_unspecified_type): Likewise.
12381         (load_partial_dies): Likewise.
12382         (read_partial_die): Likewise.
12383         (find_partial_die): Likewise.
12384         (guess_partial_die_structure_name): Likewise.
12385         (fixup_partial_die): Likewise.
12386         (read_attribute_value): Likewise.
12387         (read_addr_index_from_leb128): Likewise.
12388         (dwarf2_read_addr_index): Likewise.
12389         (dwarf2_string_attr): Likewise.
12390         (lnp_state_machine::check_line_address): Likewise.
12391         (dwarf_decode_lines_1): Likewise.
12392         (dwarf_decode_lines): Likewise.
12393         (dwarf2_start_symtab): Likewise.
12394         (var_decode_location): Likewise.
12395         (new_symbol_full): Likewise.
12396         (dwarf2_const_value_data): Likewise.
12397         (dwarf2_const_value_attr): Likewise.
12398         (dwarf2_const_value): Likewise.
12399         (die_type): Likewise.
12400         (die_containing_type): Likewise.
12401         (lookup_die_type): Likewise.
12402         (guess_full_die_structure_name): Likewise.
12403         (anonymous_struct_prefix): Likewise.
12404         (dwarf2_name): Likewise.
12405         (follow_die_ref_or_sig): Likewise.
12406         (follow_die_offset): Likewise.
12407         (follow_die_ref): Likewise.
12408         (dwarf2_fetch_die_loc_sect_off): Likewise.
12409         (dwarf2_fetch_constant_bytes): Likewise.
12410         (dwarf2_fetch_die_type_sect_off): Likewise.
12411         (dwarf2_get_die_type): Likewise.
12412         (follow_die_sig): Likewise.
12413         (decode_locdesc): Likewise.
12414         (dwarf2_per_cu_objfile): Likewise.
12415         (dwarf2_per_cu_text_offset): Likewise.
12416         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12417         objfile.
12418         (set_die_type): Access objfile through
12419         dwarf2_per_objfile.
12420
12421 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12422
12423         * valprint.c (converted_character_d): Remove typedef.
12424         (DEF_VEC_O (converted_character_d)): Remove.
12425         (count_next_character): Use std::vector.
12426         (print_converted_chars_to_obstack): Likewise.
12427         (generic_printstr): Likewise.
12428
12429 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12430
12431         * xml-support.h (struct gdb_xml_value): Add constructor.
12432         <value>: Change type to unique_xmalloc_ptr.
12433         (gdb_xml_value_s): Remove typedef.
12434         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12435         (gdb_xml_element_start_handler): Change parameter type to
12436         std::vector.
12437         (xml_find_attribute): Likewise.
12438         * xml-support.c (xml_find_attribute): Change parameter type to
12439         std::vector and adjust.
12440         (gdb_xml_values_cleanup): Remove.
12441         (gdb_xml_parser::start_element): Adjust to std::vector.
12442         (xinclude_start_include): Change paraeter type to std::vector
12443         and adjust.
12444         * btrace.c (check_xml_btrace_version): Likewise.
12445         (parse_xml_btrace_block): Likewise.
12446         (parse_xml_btrace_pt_config_cpu): Likewise.
12447         (parse_xml_btrace_pt): Likewise.
12448         (parse_xml_btrace_conf_bts): Likewise.
12449         (parse_xml_btrace_conf_pt): Likewise.
12450         * memory-map.c (memory_map_start_memory): Likewise.
12451         (memory_map_start_property): Likewise.
12452         * osdata.c (osdata_start_osdata): Likewise.
12453         (osdata_start_item): Likewise.
12454         (osdata_start_column): Likewise.
12455         * remote.c (start_thread): Likewise.
12456         * solib-aix.c (library_list_start_library): Likewise.
12457         (library_list_start_list): Likewise.
12458         * solib-svr4.c (library_list_start_library): Likewise.
12459         (svr4_library_list_start_list): Likewise.
12460         * solib-target.c (library_list_start_segment): Likewise.
12461         (library_list_start_section): Likewise.
12462         (library_list_start_library): Likewise.
12463         (library_list_start_list): Likewise.
12464         * tracepoint.c (traceframe_info_start_memory): Likewise.
12465         (traceframe_info_start_tvar): Likewise.
12466         * xml-syscall.c (syscall_start_syscall): Likewise.
12467         * xml-tdesc.c (tdesc_start_target): Likewise.
12468         (tdesc_start_feature): Likewise.
12469         (tdesc_start_reg): Likewise.
12470         (tdesc_start_union): Likewise.
12471         (tdesc_start_struct): Likewise.
12472         (tdesc_start_flags): Likewise.
12473         (tdesc_start_enum): Likewise.
12474         (tdesc_start_field): Likewise.
12475         (tdesc_start_enum_value): Likewise.
12476         (tdesc_start_vector): Likewise.
12477
12478 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12479
12480         * extension.h (struct xmethod_worker) <clone>: Remove.
12481         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12482         Remove.
12483         (python_xmethod_worker::clone): Remove.
12484         * valops.c (find_overload_match): Use std::move instead of
12485         clone.
12486
12487 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12488
12489         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12490         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12491         <free_xmethod_worker_data>: Remove.
12492         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12493         <get_xmethod_arg_types>: Remove.
12494         <get_xmethod_result_type>: Remove.
12495         <invoke_xmethod>: Remove.
12496         * extension.c (new_xmethod_worker): Remove.
12497         (clone_xmethod_worker): Remove.
12498         (get_matching_xmethod_workers): Return void, pass std::vector by
12499         pointer.
12500         (get_xmethod_arg_types): Rename to...
12501         (xmethod_worker::get_arg_types): ... this, and adjust.
12502         (get_xmethod_result_type): Rename to...
12503         (xmethod_worker::get_result_type): ... this, and adjust.
12504         (invoke_xmethod): Remove.
12505         (free_xmethod_worker): Remove.
12506         (free_xmethod_worker_vec): Remove.
12507         * extension.h (enum ext_lang_rc): Move here from
12508         extension-priv.h.
12509         (struct xmethod_worker): Add constructor and destructor.
12510         <data>: Remove.
12511         <value>: Remove.
12512         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12513         virtual pure methods.
12514         <get_arg_types, get_result_type>: New methods.
12515         (xmethod_worker_ptr): Remove typedef.
12516         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12517         (xmethod_worker_vec): Remove typedef.
12518         (xmethod_worker_up): New typedef.
12519         (invoke_xmethod): Remove.
12520         (clone_xmethod_worker): Remove.
12521         (free_xmethod_worker): Remove.
12522         (free_xmethod_worker_vec): Remove.
12523         (get_xmethod_arg_types): Remove.
12524         (get_xmethod_result_type): Remove.
12525         * valops.c (find_method_list): Use std::vector, don't use
12526         intermediate vector.
12527         (value_find_oload_method_list): Use std::vector.
12528         (find_overload_match): Use std::vector.
12529         (find_oload_champ): Use std::vector.
12530         * value.c (value_free): Use operator delete.
12531         (value_of_xmethod): Rename to...
12532         (value_from_xmethod): ... this.  Don't assign
12533         xmethod_worker::value, take rvalue-reference.
12534         (result_type_of_xmethod): Adjust.
12535         (call_xmethod): Adjust.
12536         * value.h: Include extension.h.
12537         (struct xmethod_worker): Don't forward-declare.
12538         (value_of_xmethod): Rename to...
12539         (value_from_xmethod): ... this, take rvalue-reference.
12540         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12541         (struct python_xmethod_worker): ... this, add constructor and
12542         destructor.
12543         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12544         (gdbpy_free_xmethod_worker_data): Rename to...
12545         (python_xmethod_worker::~python_xmethod_worker): ... this and
12546         adjust.
12547         (gdbpy_clone_xmethod_worker_data): Rename to...
12548         (python_xmethod_worker::clone): ... this and adjust.
12549         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12550         temporary vector.
12551         (gdbpy_get_xmethod_arg_types): Rename to...
12552         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12553         (gdbpy_get_xmethod_result_type): Rename to...
12554         (python_xmethod_worker::do_get_result_type): ... this and
12555         adjust.
12556         (gdbpy_invoke_xmethod): Rename to...
12557         (python_xmethod_worker::invoke): ... this and adjust.
12558         (new_python_xmethod_worker): Rename to...
12559         (python_xmethod_worker::python_xmethod_worker): ... this and
12560         adjust.
12561         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12562         Remove.
12563         (gdbpy_free_xmethod_worker_data): Remove.
12564         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12565         (gdbpy_get_xmethod_arg_types): Remove.
12566         (gdbpy_get_xmethod_result_type): Remove.
12567         (gdbpy_invoke_xmethod): Remove.
12568         * python/python.c (python_extension_ops): Remove obsolete
12569         callbacks.
12570
12571 2018-01-05  Pedro Alves  <palves@redhat.com>
12572
12573         PR gdb/18653
12574         * common/signals-state-save-restore.c
12575         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12576         find a custom handler preinstalled, instead of internal erroring.
12577         But only warn if !quiet.
12578         * common/signals-state-save-restore.h
12579         (save_original_signals_state): New parameter 'quiet'.
12580         * main.c (captured_main_1): Move save_original_signals_state call
12581         after option handling, and pass QUIET.
12582
12583 2018-01-05  Pedro Alves  <palves@redhat.com>
12584
12585         * spu-tdep.c (spu_catch_start): Pass
12586         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12587
12588 2018-01-05  Pedro Alves  <palves@redhat.com>
12589
12590         PR gdb/22670
12591         * ada-lang.c (literal_symbol_name_matcher): New function.
12592         (ada_get_symbol_name_matcher): Use it for
12593         symbol_name_match_type::SEARCH_NAME.
12594         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12595         it down instead of assuming symbol_name_match_type::FULL.
12596         * block.h (block_lookup_symbol): New parameter 'match_type'.
12597         * c-valprint.c (print_unpacked_pointer): Use
12598         lookup_symbol_search_name instead of lookup_symbol.
12599         * compile/compile-object-load.c (get_out_value_type): Pass down
12600         symbol_name_match_type::SEARCH_NAME.
12601         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12602         symbol_name_match_type::FULL.
12603         * cp-support.c (cp_get_symbol_name_matcher): Handle
12604         symbol_name_match_type::SEARCH_NAME.
12605         * infrun.c (insert_exception_resume_breakpoint): Use
12606         lookup_symbol_search_name.
12607         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12608         * psymtab.c (maintenance_check_psymtabs): Use
12609         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12610         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12611         SYMBOL_SEARCH_NAME.
12612         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12613         if symbol_name_match_type::SEARCH_NAME.
12614         (lookup_symbol_in_language): Pass down
12615         symbol_name_match_type::FULL.
12616         (lookup_symbol_search_name): New.
12617         (lookup_language_this): Pass down
12618         symbol_name_match_type::SEARCH_NAME.
12619         (lookup_symbol_aux, lookup_local_symbol): New parameter
12620         'match_type'.  Pass it down.
12621         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12622         (lookup_symbol_search_name): New declaration.
12623         (lookup_symbol_in_block): New 'match_type' parameter.
12624
12625 2018-01-05  Pedro Alves  <palves@redhat.com>
12626
12627         PR gdb/22670
12628         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12629         ada_lookup_symbol.
12630         (ada_lookup_symbol): Reimplement in terms of
12631         ada_lookup_symbol_list, bits factored out from
12632         ada_lookup_encoded_symbol.
12633
12634 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12635
12636         * ada-exp.y (write_object_renaming): When subscripting an array
12637         using a symbol as the index, pass the block in call to
12638         ada_lookup_encoded_symbol when looking that symbol up.
12639
12640 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12641
12642         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12643         TYPE_INDEX_TYPE.
12644
12645 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12646
12647         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12648         the case where VALUE_LVAL (val0) is not lval_memory.
12649
12650 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12651
12652         * ada-valprint.c (print_optional_low_bound): Handle
12653         character-indexed array printing like boolean-indexed array
12654         printing.
12655
12656 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12657
12658         * NEWS: Create a new section for the next release branch.
12659         Rename the section of the current branch, now that it has
12660         been cut.
12661
12662 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12663
12664         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12665         * version.in: Bump version to 8.1.50.DATE-git.
12666
12667 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12668
12669         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12670         Add field.
12671         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12672         Add field.
12673         (default_exception_support_info) <catch_handlers_sym>: Add field.
12674         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12675         (ada_exception_name_addr_1): Add "catch handlers" handling.
12676         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12677         Update all callers.
12678         (create_excep_cond_exprs) <ex>: Add parameter.
12679         (re_set_exception): Update create_excep_cond_exprs call.
12680         (print_it_exception, print_one_exception, print_mention_exception)
12681         (print_recreate_exception): Add "catch handler" handling.
12682         (allocate_location_catch_handlers, re_set_catch_handlers)
12683         (check_status_catch_handlers, print_it_catch_handlers)
12684         (print_one_catch_handlers, print_mention_catch_handlers)
12685         (print_recreate_catch_handlers): New function.
12686         (catch_handlers_breakpoint_ops): New variable.
12687         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12688         Add parameter.  Add "catch handler" handling.
12689         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12690         Add "catch handler" handling.
12691         (ada_exception_catchpoint_cond_string): Add "catch handler"
12692         handling.
12693         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12694         call.
12695         (catch_ada_handlers_command): New function.
12696         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12697         operations structure.
12698         (_initialize_ada_language): Add "catch handlers" command entry.
12699         * NEWS: Document "catch handlers" feature.
12700
12701 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12702
12703         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12704         account when creating the array type of the slice.
12705         (ada_value_slice): Likewise.
12706
12707 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12708
12709         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12710         New enum value.
12711         (create_array_type_with_stride): Add byte_stride_prop parameter.
12712         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12713         New parameter.  Update all callers in this file.
12714         (array_type_has_dynamic_stride): New function.
12715         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12716         of arrays with dynamic byte strides.
12717         * dwarf2read.c (read_array_type): Add support for dynamic
12718         DW_AT_byte_stride attributes.
12719
12720 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12721
12722         * dwarf2read.c (read_unspecified_type): Treat
12723         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12724
12725 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12726
12727         Update copyright year range in all GDB files.
12728
12729 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12730
12731         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12732         and gdb/testsuite/gdb.base/step-line.c.
12733
12734 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12735
12736         * copyright.py (main): Dump the contents of
12737         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12738         even if BY_HAND is empty.
12739
12740 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12741
12742         * top.c (print_gdb_version): Update Copyright year in version
12743         message.
12744
12745 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12746
12747         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12748
12749 For older changes see ChangeLog-2017.
12750 \f
12751 Local Variables:
12752 mode: change-log
12753 left-margin: 8
12754 fill-column: 74
12755 version-control: never
12756 coding: utf-8
12757 End: