Automatically update "aclocal_m4_deps" when updating gnulib
[external/binutils.git] / gdb / ChangeLog
1 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2             Pedro Alves  <palves@redhat.com>
3
4         * gnulib/Makefile.in (aclocal_m4_deps): Move to
5         "aclocal-m4-deps.mk".  Include file here.
6         $(srcdir)/aclocal.m4: Add "configure.ac".
7         * gnulib/aclocal-m4-deps.mk: New file.
8         * gnulib/update-gnulib.sh: Automatically update
9         "aclocal-m4-deps.mk".
10
11 2018-09-04  Tom Tromey  <tom@tromey.com>
12
13         * configure: Rebuild.
14         * configure.ac: Remove multi-ice code.
15
16 2018-09-04  Tom Tromey  <tom@tromey.com>
17
18         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
19         (ada-exp.o): Update.
20
21 2018-09-04  Tom Tromey  <tom@tromey.com>
22
23         * Makefile.in (printcmd.o, target-float.o): Remove.
24         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
25
26 2018-09-04  Tom Tromey  <tom@tromey.com>
27
28         * gnulib/Makefile.in: Remove obsolete comment.
29         * Makefile.in: Remove obsolete comment.
30
31 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
32
33         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
34         line with '+'.
35
36 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
37
38         * riscv-tdep.c: Add 'prologue-value.h' include.
39         (struct riscv_unwind_cache): New struct.
40         (riscv_debug_unwinder): New global.
41         (riscv_scan_prologue): Update arguments, capture register details
42         from prologue scan.
43         (riscv_skip_prologue): Reformat arguments line, move end of
44         prologue calculation into riscv_scan_prologue.
45         (riscv_frame_cache): Update return type, create
46         riscv_unwind_cache, scan the prologue, and fill in remaining cache
47         details.
48         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
49         (riscv_frame_prev_register): Use the trad_frame within the
50         riscv_unwind_cache.
51         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
52         flag.
53
54 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
55
56         * trad-frame.h (trad_frame_set_realreg): Declare.
57         (trad_frame_set_addr): Declare.
58         * trad-frame.c (trad_frame_set_realreg): Define new function.
59         (trad_frame_set_addr): Define new function.
60         (trad_frame_set_reg_realreg): Use new function.
61         (trad_frame_set_reg_addr): Use new function.
62
63 2018-09-01  Keith Seitz  <keiths@redhat.com>
64
65         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
66         pulongest instead of "%lld".
67         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
68         ATTRIBUTE_UNUSED.
69
70 2018-08-31  Tom Tromey  <tom@tromey.com>
71
72         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
73         variant part type.
74
75 2018-08-31  Pedro Alves  <palves@redhat.com>
76
77         * gdbarch.h: Regenerate.
78
79 2018-08-31  Pedro Alves  <palves@redhat.com>
80
81         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
82         * target.h (Hardware watchpoint interfaces): Describe
83         continuable/steppable/non-steppable watchpoints.
84         * gdbarch.h, gdbarch.c: Regenerate.
85
86 2018-08-31  Pedro Alves  <palves@redhat.com>
87
88         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
89         Delete.
90         * s390-linux-nat.c
91         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
92         * target.h (target_ops::have_continuable_watchpoint): Delete.
93         (target_have_continuable_watchpoint): Delete.
94         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
95         * target-delegates.c: Regenerate.
96
97 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
98
99         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
100         the files present in "gnulib/import/m4/".
101
102 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
103
104         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
105         c.sw, c.swsp, and c.sdsp.
106
107 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
108
109         * riscv-tdep.c (struct riscv_inferior_data): Delete.
110         (riscv_read_misa_reg): Don't cache value read into inferior data.
111         (riscv_new_inferior_data): Delete.
112         (riscv_inferior_data_cleanup): Delete.
113         (riscv_inferior_data): Delete.
114         (riscv_invalidate_inferior_data): Delete.
115         (_initialize_riscv_tdep): Remove initialisation of inferior data.
116
117 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
118
119         * compile/compile-cplus-types.c
120         (compile_cplus_instance::leave_scope): Take the address of scope
121         object.
122         (compile_cplus_instance::convert_qualified_base): Compare quals
123         to 0.
124
125 2018-08-30  Keith Seitz  <keiths@redhat.com>
126
127         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
128         Use "%s" and host_address_to_string instead of "%p" in printf.
129
130 2018-08-29  Keith Seitz  <keiths@redhat.com>
131
132         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
133         and compile-cplus-types.c.
134         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
135         * c-lang.c (cplus_language_defn): Set C++ compile functions.
136         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
137         Declare.
138         * compile/compile-c-support.c: Include compile-cplus.h.
139         (load_libcompile): Templatize.
140         (get_compile_context): "New" function.
141         (c_get_compile_context): Use get_compile_context.
142         (cplus_get_compile_context): New function.
143         (cplus_push_user_expression, cplus_pop_user_expression)
144         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
145         (cplus_compute_program): Define new structs/functions.
146         * compile/compile-cplus-symmbols.c: New file.
147         * compile/compile-cplus-types.c: New file.
148         * compile/compile-cplus.h: New file.
149         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
150         Declare.
151         * compile/compile-object-load.c (get_out_value_type): Use
152         strncmp_iw when comparing symbol names.
153         (compile_object_load): Add mst_bss and mst_data.
154         * compile/compile.c (_initialize_compile): Remove
155         -Wno-implicit-function-declaration from `compile_args'.
156         * compile/gcc-cp-plugin.h: New file.
157         * NEWS: Mention C++ compile support and new debug options.
158
159 2018-08-29  Keith Seitz  <keiths@redhat.com>
160
161         * linespec.c (collect_info::add_symbol): Make virtual.
162         (struct symbol_searcher_collect_info): New struct.
163         (symbol_searcher::find_all_symbols): New method.
164         * symtab.h (class symbol_searcher): New class.
165
166 2018-08-29  Keith Seitz  <keiths@redhat.com>
167
168         * linespec.c (struct linespec) <function_symbols, label_symbols>:
169         Change to vector of block_symbol.  Update all users.
170         (struct collect_info) <symbols>: Likewise.
171         (collect_info::add_symbol): Take block_symbol as argument.
172         Update all callers.
173         (decode_compound_collector) <m_symbols>: Change type to vector
174         of block_symbol.  Update all users.
175         (decode_compound_collector::operator ()): Change parameter type
176         to block_symbol.
177         (find_method, find_function_symbols, find_linespec_symbols)
178         (find_label_symbols_in_block, find_label_symbols): Change symbol
179         vectors to block_symbol vectors.
180         * symtab.h (symbol_found_callback_ftype): Change parameter type to
181         block_symbol.
182
183 2018-08-29  Keith Seitz  <keiths@redhat.com>
184
185         * linespec.c (symbolp): Remove typedef and VEC definitions.
186         (bound_minimal_symbol_d): Likewise.
187
188 2018-08-29  Keith Seitz  <keiths@redhat.com>
189
190         * linespec.c (decode_compound_collector::decode_compound_collector):
191         Remove initialization for `m_symtabs'.
192         (decode_compound_collector::release_symbols): Change return type
193         to std::vector.  Update all callers.
194         (class decode_compound_collector) <m_symbols>: Change type to
195         std::vector.
196         (lookup_prefix_sym): Change return type to std::vector.  Update all
197         callers.
198         (compare_symbols): Remove.
199         (std_compare_symbols): Rename to `compare_symbols'.
200         (find_method): Change `sym_classes' parameter to std::vector.
201         Update all callers.  Use std::sort to sort sym_classes.
202         (find_linespec_symbols): Remove cleanup.
203
204 2018-08-29  Keith Seitz  <keiths@redhat.com>
205
206         * linespec.c (struct linespec) <minimal_symbols>: Change type to
207         std::vector.  Update all users.
208         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
209         (struct collect_info) <minimal_symbols>: Likewise.
210         (compare_msymbols): Return bool.  Change parameters to const
211         bound_minimal_symbol references.
212         (find_method, find_function_symbols, find_linespec_symbols): Change
213         `minsyms' parameter to std::vector.  Update all callers.
214
215 2018-08-29  Keith Seitz  <keiths@redhat.com>
216
217         * linespec.c (struct linespec) <label_symbols>: Change type to
218         std::vector.  Update all users.
219         (find_label_symbols_in_block): Change `result' parameter to
220         std::vector.  Update all callers.
221         (find_label_symbols): Return std::vector.  Update all callers.
222
223 2018-08-29  Keith Seitz  <keiths@redhat.com>
224
225         * linespec.c (struct linespec) <function_symbols>: Change type to
226         std::vector.  Update all users.
227         (struct collect_info) <function_symbols>: Likewise.
228         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
229         (std_compare_symbols): New function.
230         (find_method, find_function_symbols, find_linespec_symbols)
231         (find_label_symbols_in_block): Change `symbols' parameter to
232         std::vector.  Update all callers.
233         (find_label_symbols): Likewise for `function_symbols' and
234         `label_funcs_ret'.
235
236 2018-08-29  Keith Seitz  <keiths@redhat.com>
237
238         * linespec.c (symtab_vector_up): Define.
239         (struct linespec) <file_symtabs>: Change type to std::vector *.
240         Update all uses.
241         (struct collect_info) <file_symtabs>: Likewise.
242         (collect_symtabs_from_filename): Return symtab_vector_up.
243         Update all callers.
244         (decode_objc): Remove cleanup.
245         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
246         (symtab_collector::release_symtabs): Return symtab_vector_up.
247         Update all callers.
248         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
249         Update all users.
250         (collect_symtabs_from_filename, symtabs_from_filename): Return
251         symtab_vector_up.  Update all callers.
252
253 2018-08-29  Tom Tromey  <tom@tromey.com>
254
255         * csky-tdep.c (csky_analyze_prologue): Use
256         core_addr_to_string_nz.
257
258 2018-08-29  Tom Tromey  <tom@tromey.com>
259
260         * windows-nat.c (struct xlate_exception) <them>: Change type to
261         DWORD.
262         (xlate): Fix formatting.  Remove last entry.
263         (struct xlate_exception, xlate): Comment out.
264         (windows_nat_target::resume): Use ranged for.
265
266 2018-08-29  Jim Wilson  <jimw@sifive.com>
267
268         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
269         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
270         of NT_PRFPREG.
271         (riscv_linux_nat_target::store_registers): Likewise.
272
273 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
274
275         PR gdb/23555
276         PR gdb/23558
277         * gnulib/aclocal.m4: Regenerate.
278         * gnulib/config.in: Regenerate.
279         * gnulib/configure: Regenerate.
280         * gnulib/import/Makefile.am: Update.
281         * gnulib/import/Makefile.in: Update.
282         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
283         * gnulib/import/_Noreturn.h: ... this.
284         * gnulib/import/alloca.in.h: Update.
285         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
286         * gnulib/import/arg-nonnull.h: ... this.
287         * gnulib/import/assure.h: Update.
288         * gnulib/import/at-func.c: Update.
289         * gnulib/import/basename-lgpl.c: Update.
290         * gnulib/import/extra/snippet/c++defs.h: Rename to...
291         * gnulib/import/c++defs.h: ... this.
292         * gnulib/import/canonicalize-lgpl.c: Update.
293         * gnulib/import/cdefs.h: Update.
294         * gnulib/import/chdir-long.c: Update.
295         * gnulib/import/chdir-long.h: Update.
296         * gnulib/import/cloexec.c: Update.
297         * gnulib/import/cloexec.h: Update.
298         * gnulib/import/close.c: Update.
299         * gnulib/import/closedir.c: Update.
300         * gnulib/import/config.charset: Update.
301         * gnulib/import/dirent-private.h: Update.
302         * gnulib/import/dirent.in.h: Update.
303         * gnulib/import/dirfd.c: Update.
304         * gnulib/import/dirname-lgpl.c: Update.
305         * gnulib/import/dirname.h: Update.
306         * gnulib/import/dosname.h: Update.
307         * gnulib/import/dup-safer-flag.c: Update.
308         * gnulib/import/dup-safer.c: Update.
309         * gnulib/import/dup.c: Update.
310         * gnulib/import/dup2.c: Update.
311         * gnulib/import/errno.in.h: Update.
312         * gnulib/import/error.c: Update.
313         * gnulib/import/error.h: Update.
314         * gnulib/import/exitfail.c: Update.
315         * gnulib/import/exitfail.h: Update.
316         * gnulib/import/extra/update-copyright: Update.
317         * gnulib/import/fchdir.c: Update.
318         * gnulib/import/fcntl.c: Update.
319         * gnulib/import/fcntl.in.h: Update.
320         * gnulib/import/fd-hook.c: Update.
321         * gnulib/import/fd-hook.h: Update.
322         * gnulib/import/fd-safer-flag.c: Update.
323         * gnulib/import/fd-safer.c: Update.
324         * gnulib/import/fdopendir.c: Update.
325         * gnulib/import/filename.h: Update.
326         * gnulib/import/filenamecat-lgpl.c: Update.
327         * gnulib/import/filenamecat.h: Update.
328         * gnulib/import/flexmember.h: Update.
329         * gnulib/import/float+.h: Update.
330         * gnulib/import/float.c: Update.
331         * gnulib/import/float.in.h: Update.
332         * gnulib/import/fnmatch.c: Update.
333         * gnulib/import/fnmatch.in.h: Update.
334         * gnulib/import/fnmatch_loop.c: Update.
335         * gnulib/import/fpucw.h: Update.
336         * gnulib/import/frexp.c: Update.
337         * gnulib/import/frexpl.c: Update.
338         * gnulib/import/fstat.c: Update.
339         * gnulib/import/fstatat.c: Update.
340         * gnulib/import/getcwd-lgpl.c: Update.
341         * gnulib/import/getcwd.c: Update.
342         * gnulib/import/getdtablesize.c: Update.
343         * gnulib/import/getlogin_r.c: Update.
344         * gnulib/import/getprogname.c: Update.
345         * gnulib/import/getprogname.h: Update.
346         * gnulib/import/gettext.h: Update.
347         * gnulib/import/gettimeofday.c: Update.
348         * gnulib/import/glob-libc.h: Update.
349         * gnulib/import/glob.c: Update.
350         * gnulib/import/glob.in.h: Update.
351         * gnulib/import/glob_internal.h: Update.
352         * gnulib/import/glob_pattern_p.c: Update.
353         * gnulib/import/globfree.c: Update.
354         * gnulib/import/hard-locale.c: Update.
355         * gnulib/import/hard-locale.h: Update.
356         * gnulib/import/intprops.h: Update.
357         * gnulib/import/inttypes.in.h: Update.
358         * gnulib/import/isnan.c: Update.
359         * gnulib/import/isnand-nolibm.h: Update.
360         * gnulib/import/isnand.c: Update.
361         * gnulib/import/isnanl-nolibm.h: Update.
362         * gnulib/import/isnanl.c: Update.
363         * gnulib/import/itold.c: Update.
364         * gnulib/import/libc-config.h: Update.
365         * gnulib/import/limits.in.h: Update.
366         * gnulib/import/localcharset.c: Update.
367         * gnulib/import/localcharset.h: Update.
368         * gnulib/import/localtime-buffer.c: Update.
369         * gnulib/import/localtime-buffer.h: Update.
370         * gnulib/import/lstat.c: Update.
371         * gnulib/import/m4/00gnulib.m4: Update.
372         * gnulib/import/m4/__inline.m4: Update.
373         * gnulib/import/m4/absolute-header.m4: Update.
374         * gnulib/import/m4/alloca.m4: Update.
375         * gnulib/import/m4/builtin-expect.m4: Update.
376         * gnulib/import/m4/canonicalize.m4: Update.
377         * gnulib/import/m4/chdir-long.m4: Update.
378         * gnulib/import/m4/close.m4: Update.
379         * gnulib/import/m4/closedir.m4: Update.
380         * gnulib/import/m4/configmake.m4: Update.
381         * gnulib/import/m4/d-ino.m4: Update.
382         * gnulib/import/m4/d-type.m4: Update.
383         * gnulib/import/m4/dirent_h.m4: Update.
384         * gnulib/import/m4/dirfd.m4: Update.
385         * gnulib/import/m4/dirname.m4: Update.
386         * gnulib/import/m4/double-slash-root.m4: Update.
387         * gnulib/import/m4/dup.m4: Update.
388         * gnulib/import/m4/dup2.m4: Update.
389         * gnulib/import/m4/eealloc.m4: Update.
390         * gnulib/import/m4/environ.m4: Update.
391         * gnulib/import/m4/errno_h.m4: Update.
392         * gnulib/import/m4/error.m4: Update.
393         * gnulib/import/m4/exponentd.m4: Update.
394         * gnulib/import/m4/exponentl.m4: Update.
395         * gnulib/import/m4/extensions.m4: Update.
396         * gnulib/import/m4/extern-inline.m4: Update.
397         * gnulib/import/m4/fchdir.m4: Update.
398         * gnulib/import/m4/fcntl-o.m4: Update.
399         * gnulib/import/m4/fcntl.m4: Update.
400         * gnulib/import/m4/fcntl_h.m4: Update.
401         * gnulib/import/m4/fdopendir.m4: Update.
402         * gnulib/import/m4/filenamecat.m4: Update.
403         * gnulib/import/m4/flexmember.m4: Update.
404         * gnulib/import/m4/float_h.m4: Update.
405         * gnulib/import/m4/fnmatch.m4: Update.
406         * gnulib/import/m4/fnmatch_h.m4: Update.
407         * gnulib/import/m4/fpieee.m4: Update.
408         * gnulib/import/m4/frexp.m4: Update.
409         * gnulib/import/m4/frexpl.m4: Update.
410         * gnulib/import/m4/fstat.m4: Update.
411         * gnulib/import/m4/fstatat.m4: Update.
412         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
413         * gnulib/import/m4/getcwd-path-max.m4: Update.
414         * gnulib/import/m4/getcwd.m4: Update.
415         * gnulib/import/m4/getdtablesize.m4: Update.
416         * gnulib/import/m4/getlogin.m4: Update.
417         * gnulib/import/m4/getlogin_r.m4: Update.
418         * gnulib/import/m4/getpagesize.m4: Update.
419         * gnulib/import/m4/getprogname.m4: Update.
420         * gnulib/import/m4/gettimeofday.m4: Update.
421         * gnulib/import/m4/glibc21.m4: Update.
422         * gnulib/import/m4/glob.m4: Update.
423         * gnulib/import/m4/glob_h.m4: Update.
424         * gnulib/import/m4/gnulib-cache.m4: Update.
425         * gnulib/import/m4/gnulib-common.m4: Update.
426         * gnulib/import/m4/gnulib-comp.m4: Update.
427         * gnulib/import/m4/gnulib-tool.m4: Update.
428         * gnulib/import/m4/hard-locale.m4: Update.
429         * gnulib/import/m4/include_next.m4: Update.
430         * gnulib/import/m4/inttypes-pri.m4: Update.
431         * gnulib/import/m4/inttypes.m4: Update.
432         * gnulib/import/m4/isnand.m4: Update.
433         * gnulib/import/m4/isnanl.m4: Update.
434         * gnulib/import/m4/largefile.m4: Update.
435         * gnulib/import/m4/limits-h.m4: Update.
436         * gnulib/import/m4/localcharset.m4: Update.
437         * gnulib/import/m4/locale-fr.m4: Update.
438         * gnulib/import/m4/locale-ja.m4: Update.
439         * gnulib/import/m4/locale-zh.m4: Update.
440         * gnulib/import/m4/localtime-buffer.m4: Update.
441         * gnulib/import/m4/longlong.m4: Update.
442         * gnulib/import/m4/lstat.m4: Update.
443         * gnulib/import/m4/malloc.m4: Update.
444         * gnulib/import/m4/malloca.m4: Update.
445         * gnulib/import/m4/math_h.m4: Update.
446         * gnulib/import/m4/mbrtowc.m4: Update.
447         * gnulib/import/m4/mbsinit.m4: Update.
448         * gnulib/import/m4/mbsrtowcs.m4: Update.
449         * gnulib/import/m4/mbstate_t.m4: Update.
450         * gnulib/import/m4/memchr.m4: Update.
451         * gnulib/import/m4/memmem.m4: Update.
452         * gnulib/import/m4/mempcpy.m4: Update.
453         * gnulib/import/m4/memrchr.m4: Update.
454         * gnulib/import/m4/mkdir.m4: Update.
455         * gnulib/import/m4/mkstemp.m4: Update.
456         * gnulib/import/m4/mmap-anon.m4: Update.
457         * gnulib/import/m4/mode_t.m4: Update.
458         * gnulib/import/m4/msvc-inval.m4: Update.
459         * gnulib/import/m4/msvc-nothrow.m4: Update.
460         * gnulib/import/m4/multiarch.m4: Update.
461         * gnulib/import/m4/nocrash.m4: Update.
462         * gnulib/import/m4/off_t.m4: Update.
463         * gnulib/import/m4/onceonly.m4: Update.
464         * gnulib/import/m4/open-cloexec.m4: Update.
465         * gnulib/import/m4/open.m4: Update.
466         * gnulib/import/m4/openat.m4: Update.
467         * gnulib/import/m4/opendir.m4: Update.
468         * gnulib/import/m4/pathmax.m4: Update.
469         * gnulib/import/m4/rawmemchr.m4: Update.
470         * gnulib/import/m4/readdir.m4: Update.
471         * gnulib/import/m4/readlink.m4: Update.
472         * gnulib/import/m4/realloc.m4: Update.
473         * gnulib/import/m4/rename.m4: Update.
474         * gnulib/import/m4/rewinddir.m4: Update.
475         * gnulib/import/m4/rmdir.m4: Update.
476         * gnulib/import/m4/save-cwd.m4: Update.
477         * gnulib/import/m4/secure_getenv.m4: Update.
478         * gnulib/import/m4/setenv.m4: Update.
479         * gnulib/import/m4/signal_h.m4: Update.
480         * gnulib/import/m4/ssize_t.m4: Update.
481         * gnulib/import/m4/stat-time.m4: Update.
482         * gnulib/import/m4/stat.m4: Update.
483         * gnulib/import/m4/std-gnu11.m4: Update.
484         * gnulib/import/m4/stdbool.m4: Update.
485         * gnulib/import/m4/stddef_h.m4: Update.
486         * gnulib/import/m4/stdint.m4: Update.
487         * gnulib/import/m4/stdio_h.m4: Update.
488         * gnulib/import/m4/stdlib_h.m4: Update.
489         * gnulib/import/m4/strchrnul.m4: Update.
490         * gnulib/import/m4/strdup.m4: Update.
491         * gnulib/import/m4/strerror.m4: Update.
492         * gnulib/import/m4/string_h.m4: Update.
493         * gnulib/import/m4/strstr.m4: Update.
494         * gnulib/import/m4/strtok_r.m4: Update.
495         * gnulib/import/m4/sys_socket_h.m4: Update.
496         * gnulib/import/m4/sys_stat_h.m4: Update.
497         * gnulib/import/m4/sys_time_h.m4: Update.
498         * gnulib/import/m4/sys_types_h.m4: Update.
499         * gnulib/import/m4/tempname.m4: Update.
500         * gnulib/import/m4/time_h.m4: Update.
501         * gnulib/import/m4/unistd-safer.m4: Update.
502         * gnulib/import/m4/unistd_h.m4: Update.
503         * gnulib/import/m4/warn-on-use.m4: Update.
504         * gnulib/import/m4/wchar_h.m4: Update.
505         * gnulib/import/m4/wchar_t.m4: Update.
506         * gnulib/import/m4/wctype_h.m4: Update.
507         * gnulib/import/m4/wint_t.m4: Update.
508         * gnulib/import/malloc.c: Update.
509         * gnulib/import/malloc/scratch_buffer.h: Update.
510         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
511         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
512         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
513         * gnulib/import/malloca.c: Update.
514         * gnulib/import/malloca.h: Update.
515         * gnulib/import/malloca.valgrind: Update.
516         * gnulib/import/math.in.h: Update.
517         * gnulib/import/mbrtowc.c: Update.
518         * gnulib/import/mbsinit.c: Update.
519         * gnulib/import/mbsrtowcs-impl.h: Update.
520         * gnulib/import/mbsrtowcs-state.c: Update.
521         * gnulib/import/mbsrtowcs.c: Update.
522         * gnulib/import/memchr.c: Update.
523         * gnulib/import/memmem.c: Update.
524         * gnulib/import/mempcpy.c: Update.
525         * gnulib/import/memrchr.c: Update.
526         * gnulib/import/mkdir.c: Update.
527         * gnulib/import/mkstemp.c: Update.
528         * gnulib/import/msvc-inval.c: Update.
529         * gnulib/import/msvc-inval.h: Update.
530         * gnulib/import/msvc-nothrow.c: Update.
531         * gnulib/import/msvc-nothrow.h: Update.
532         * gnulib/import/open.c: Update.
533         * gnulib/import/openat-die.c: Update.
534         * gnulib/import/openat-priv.h: Update.
535         * gnulib/import/openat-proc.c: Update.
536         * gnulib/import/openat.c: Update.
537         * gnulib/import/openat.h: Update.
538         * gnulib/import/opendir.c: Update.
539         * gnulib/import/pathmax.h: Update.
540         * gnulib/import/pipe-safer.c: Update.
541         * gnulib/import/rawmemchr.c: Update.
542         * gnulib/import/readdir.c: Update.
543         * gnulib/import/readlink.c: Update.
544         * gnulib/import/realloc.c: Update.
545         * gnulib/import/ref-add.sin: Update.
546         * gnulib/import/ref-del.sin: Update.
547         * gnulib/import/rename.c: Update.
548         * gnulib/import/rewinddir.c: Update.
549         * gnulib/import/rmdir.c: Update.
550         * gnulib/import/same-inode.h: Update.
551         * gnulib/import/save-cwd.c: Update.
552         * gnulib/import/save-cwd.h: Update.
553         * gnulib/import/scratch_buffer.h: Update.
554         * gnulib/import/secure_getenv.c: Update.
555         * gnulib/import/setenv.c: Update.
556         * gnulib/import/signal.in.h: Update.
557         * gnulib/import/stat-time.c: Update.
558         * gnulib/import/stat-time.h: Update.
559         * gnulib/import/stat-w32.c: Update.
560         * gnulib/import/stat-w32.h: Update.
561         * gnulib/import/stat.c: Update.
562         * gnulib/import/stdbool.in.h: Update.
563         * gnulib/import/stddef.in.h: Update.
564         * gnulib/import/stdint.in.h: Update.
565         * gnulib/import/stdio.in.h: Update.
566         * gnulib/import/stdlib.in.h: Update.
567         * gnulib/import/str-two-way.h: Update.
568         * gnulib/import/strchrnul.c: Update.
569         * gnulib/import/strdup.c: Update.
570         * gnulib/import/streq.h: Update.
571         * gnulib/import/strerror-override.c: Update.
572         * gnulib/import/strerror-override.h: Update.
573         * gnulib/import/strerror.c: Update.
574         * gnulib/import/string.in.h: Update.
575         * gnulib/import/stripslash.c: Update.
576         * gnulib/import/strnlen1.c: Update.
577         * gnulib/import/strnlen1.h: Update.
578         * gnulib/import/strstr.c: Update.
579         * gnulib/import/strtok_r.c: Update.
580         * gnulib/import/sys_stat.in.h: Update.
581         * gnulib/import/sys_time.in.h: Update.
582         * gnulib/import/sys_types.in.h: Update.
583         * gnulib/import/tempname.c: Update.
584         * gnulib/import/tempname.h: Update.
585         * gnulib/import/time.in.h: Update.
586         * gnulib/import/unistd--.h: Update.
587         * gnulib/import/unistd-safer.h: Update.
588         * gnulib/import/unistd.in.h: Update.
589         * gnulib/import/unsetenv.c: Update.
590         * gnulib/import/verify.h: Update.
591         * gnulib/import/extra/snippet/warn-on-use.h: Update.
592         * gnulib/import/wchar.in.h: Update.
593         * gnulib/import/wctype.in.h: Update.
594         * gnulib/import/xalloc-oversized.h: Update.
595         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
596         "53e2c179f26a890fa6685af4b6c1397ee370433b".
597
598 2018-08-16  Gary Benson <gbenson@redhat.com>
599
600         PR gdb/13000:
601         * gdb/main.c (captured_main_1): Exit with nonzero status
602         in batch mode if the last command to be executed failed.
603         * NEWS: Mention the above.
604
605 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
606
607         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
608         end of warning message.
609
610 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
611
612         PR gdb/22943:
613         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
614         (aarch64_extract_return_value): Use
615         aapcs_is_vfp_call_or_return_candidate.
616         (aarch64_return_in_memory): Likewise.
617         (aarch64_store_return_value): Likewise.
618
619 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
620
621         * aarch64-tdep.c
622         (aapcs_is_vfp_call_or_return_candidate): Make static
623         (pass_in_v_or_stack): Remove function.
624         (pass_in_v_vfp_candidate): New function.
625         (aarch64_push_dummy_call): Check for float register candidates.
626
627 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
628
629         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
630         (aapcs_is_vfp_call_or_return_candidate_1): New function.
631         (aapcs_is_vfp_call_or_return_candidate): Likewise.
632
633 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
634
635         PR build/23399
636         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
637         (struct ipa_sym_addresses): Rename to...
638         (struct ipa_sym_addresses_common): ... this.
639         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
640
641 2018-08-28  Tom Tromey  <tom@tromey.com>
642
643         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
644         (token_fifo): Now a std::vector.
645         (yylex, c_parse): Update.
646         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
647         (token_fifo): Now a std::vector.
648         (yylex, d_parse): Update.
649         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
650         (token_fifo): Now a std::vector.
651         (yylex, go_parse): Update.
652
653 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
654
655         * parser-defs.h (struct type_stack) <elements>: Change type to
656         std::vector<union type_stack_elt>.
657         <depth, size>: Remove.
658         * parse.c (parse_exp_in_context_1): Adjust.
659         (type_stack_reserve): Remove.
660         (check_type_stack_depth): Remove.
661         (insert_into_type_stack): Adjust to std::vector.
662         (insert_type): Likewise.
663         (push_type): Likewise.
664         (push_type_int): Likewise.
665         (insert_type_address_space): Likewise.
666         (pop_type): Likewise.
667         (pop_type_int): Likewise.
668         (pop_typelist): Likewise.
669         (pop_type_stack): Likewise.
670         (append_type_stack): Likewise.
671         (push_type_stack): Likewise.
672         (get_type_stack): Likewise.
673         (type_stack_cleanup): Likewise.
674         (push_typelist): Likewise.
675         (follow_types): Likewise.
676         (_initialize_parse): Likewise.
677
678 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
679
680         * NEWS: Mention csky target.
681
682 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
683             Hafiz Abid Qadeer  <abidh@codesourcery.com>
684             Don Breazeal  <donb@codesourcery.com>
685
686         * csky-linux-tdep.c: New file.
687         * csky-tdep.c: Likewise.
688         * csky-tdep.h: Likewise.
689         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
690         csky-tdep.o.
691         (HFILES_NO_SRCDIR): Add csky-tdep.h.
692         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
693         * configure.tgt: Add csky support.
694
695 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
696
697         * python/py-framefilter.c (py_print_frame): Print frame architecture
698         when printing on an MI output.
699
700 2018-08-27  Tom Tromey  <tom@tromey.com>
701
702         PR build/23087:
703         * configure: Rebuild.
704         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
705
706 2018-08-27  Tom Tromey  <tom@tromey.com>
707
708         * aarch64-linux-tdep.c
709         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
710         casts to int.
711
712 2018-08-27  Tom Tromey  <tom@tromey.com>
713
714         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
715         unsigned.
716         (ppc64_standard_linkage1, ppc64_standard_linkage2)
717         (ppc64_standard_linkage3, ppc64_standard_linkage4)
718         (ppc64_standard_linkage5, ppc64_standard_linkage6)
719         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
720         unsigned.
721
722 2018-08-27  Tom Tromey  <tom@tromey.com>
723
724         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
725         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
726
727 2018-08-27  Tom Tromey  <tom@tromey.com>
728
729         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
730         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
731         ULONGEST_MAX.
732         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
733         ULONGEST_MAX.
734         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
735         ULONGEST_MAX.
736         * sparc-linux-tdep.c (sparc32_linux_sigframe)
737         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
738         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
739         ULONGEST_MAX.
740         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
741         (ppc64_linux_sigaction_tramp_frame)
742         (ppc32_linux_sighandler_tramp_frame)
743         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
744         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
745         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
746         * mn10300-linux-tdep.c (am33_linux_sigframe)
747         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
748         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
749         * mips-linux-tdep.c (mips_linux_o32_sigframe)
750         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
751         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
752         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
753         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
754         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
755         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
756         * microblaze-linux-tdep.c
757         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
758         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
759         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
760         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
761         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
762         * common/common-types.h (ULONGEST_MAX): New define.
763         (CORE_ADDR_MAX): Fix formatting.
764         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
765         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
766         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
767         (arm_linux_rt_sigreturn_tramp_frame)
768         (arm_eabi_linux_sigreturn_tramp_frame)
769         (arm_eabi_linux_rt_sigreturn_tramp_frame)
770         (thumb2_eabi_linux_sigreturn_tramp_frame)
771         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
772         (arm_linux_restart_syscall_tramp_frame)
773         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
774         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
775         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
776         ULONGEST_MAX.
777         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
778
779 2018-08-27  Tom Tromey  <tom@tromey.com>
780
781         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
782         CORE_ADDR_MAX.
783         * mips-tdep.c (mips_deal_with_atomic_sequence)
784         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
785         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
786         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
787         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
788         CORE_ADDR_MAX.
789         * aarch64-tdep.c (aarch64_software_single_step): Use
790         CORE_ADDR_MAX.
791
792 2018-08-27  Tom Tromey  <tom@tromey.com>
793
794         * linespec.c (complete_linespec_component): Add cast to "char".
795         * completer.c (completion_tracker::build_completion_result): Add
796         cast to "char".
797
798 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
799
800         * solist.h (struct solist, struct target_so_ops): Fix
801         indentation.
802
803 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
804
805         * ada-tasks.c (ada_task_info_s): Remove typedef.
806         (DEF_VEC_O(ada_task_info_s)): Remove.
807         (struct ada_tasks_inferior_data): Initialize fields.
808         <task_list>: Make an std::vector.
809         (get_ada_tasks_inferior_data): Allocate with new.
810         (ada_get_task_number): Adjust.
811         (get_task_number_from_id): Likewise.
812         (valid_task_id): Likewise.
813         (ada_get_task_info_from_ptid): Likewise.
814         (iterate_over_live_ada_tasks): Likewise.
815         (add_ada_task): Likewise.
816         (read_known_tasks): Likewise.
817         (ada_build_task_list): Likewise.
818         (print_ada_task_info): Likewise.
819         (info_task): Likewise.
820         (task_command_1): Likewise.
821
822 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
823
824         * ada-lang.c (add_angle_brackets): Return std::string.
825
826 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
827
828         * python/py-threadevent.c (py_get_event_thread): Initialize
829         pythread.
830
831 2018-08-24  Pedro Alves  <palves@redhat.com>
832
833         * python/py-bpevent.c (create_breakpoint_event_object): Use
834         copy-initialization.
835         * python/py-continueevent.c (emit_continue_event): Use
836         copy-initialization.
837         * python/py-exitedevent.c (create_exited_event_object): Return a
838         gdbpy_ref<>.
839         (emit_exited_event): Use copy-initialization.
840         * python/py-inferior.c (python_new_inferior)
841         (python_inferior_deleted, add_thread_object): Use
842         copy-initialization.
843         * python/py-infevents.c (create_inferior_call_event_object)
844         (create_register_changed_event_object)
845         (create_memory_changed_event_object): Return a gdbpy_ref<>.
846         (emit_inferior_call_event, emit_memory_changed_event)
847         (emit_register_changed_event): Use copy-initialization.
848         * python/py-newobjfileevent.c (create_new_objfile_event_object):
849         Return a gdbpy_ref<>.
850         (emit_new_objfile_event): Use copy-initialization.
851         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
852         (emit_clear_objfiles_event): Use copy-initialization.
853         * python/py-signalevent.c (create_signal_event_object): Use
854         copy-initialization.
855         * python/py-threadevent.c (create_thread_event_object): Use
856         copy-initialization.
857
858 2018-08-24  Pedro Alves  <palves@redhat.com>
859             Simon Marchi  <simon.marchi@ericsson.com>
860
861         PR gdb/23379
862         * python/py-continueevent.c: Include "gdbthread.h".
863         (create_continue_event_object): Add intro comment.  Add 'ptid'
864         parameter.  Use it to find thread to pass to
865         create_thread_event_object.
866         (emit_continue_event): Pass PTID down to
867         create_continue_event_object.
868         * python/py-event.h (py_get_event_thread): Declare.
869         (create_thread_event_object): Remove default from 'thread'
870         parameter.
871         * python/py-stopevent.c (create_stop_event_object): Use
872         py_get_event_thread.
873         * python/py-threadevent.c (get_event_thread): Rename to ...
874         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
875         and use it to find the thread.
876         (create_thread_event_object): Assert that THREAD isn't null.
877         Don't find the event thread here.
878
879 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
880
881         * block.h (blockrange, blockranges): New struct declarations.
882         (struct block): Add new field named `ranges'.
883         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
884         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
885         macros for accessing ranges in struct block.
886         (make_blockranges): New declaration.
887         block.c (make_blockranges): New function.
888         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
889         for block.
890         * symtab.h (find_pc_partial_function): Add new parameter `block'.
891         * blockframe.c (cache_pc_function_block): New static global.
892         (clear_pc_function_cache): Clear cache_pc_function_block.
893         (find_pc_partial_function): Move comment to symtab.h.  Add
894         support for non-contiguous blocks.
895         * cli/cli-cmds.c (block.h): Include.
896         (print_disassembly): Handle printing of non-contiguous blocks.
897         (disassemble_current_function): Likewise.
898         (disassemble_command): Likewise.
899
900         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
901         BLOCK_START.
902         * blockframe.c (get_pc_function_start): Likewise.
903         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
904         (gcc_symbol_address): Likewise.
905         * compile/compile-object-run.c (compile_object_run): Likewise.
906         * compile/compile.c (get_expr_block_and_pc): Likewise.
907         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
908         (func_addr_to_tail_call_list): Likewise.
909         * findvar.c (default_read_var_value): Likewise.
910         * inline-frame.c (inline_frame_this_id): Likewise.
911         (skip-inline_frames): Likewise.
912         * infcmd.c (until_next_command): Likewise.
913         * linespec.c (convert_linespec_to_sals): Likewise.
914         * parse.c (parse_exp_in_context_1): Likewise.
915         * printcmd.c (build_address_symbolic): likewise.
916         (info_address_command): Likewise.
917         symtab.c (find_function_start_sal): Likewise.
918         (skip_prologue_sal): Likewise.
919         (find_function_alias_target): Likewise.
920         (find_gnu_ifunc): Likewise.
921         * stack.c (find_frame_funname): Likewise.
922         * symtab.c (fixup_symbol_section): Likewise.
923         (find_function_start_sal): Likewise.
924         (skip_prologue_sal): Likewsie.
925         (find_function_alias_target): Likewise.
926         (find_gnu_ifunc): Likewise.
927         * tracepoint.c (info_scope_command): Likewise.
928         * value.c (value_fn_field): Likewise.
929
930         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
931         in place of find_pc_partial_function.
932         * blockframe.c (find_function_entry_range_from_pc): New function.
933         * symtab.h (find_function_entry_range_from_pc): Declare and document.
934         * objfiles.c (objfile_relocate1): Relocate start and end addresses
935         for each range in a block.
936
937
938 2018-08-23  Xavier Roirand  <roirand@adacore.com>
939
940         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
941         incrementation.
942
943 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
944
945         * solib-svr4.c (read_program_headers_from_bfd): Return
946         gdb::optional<gdb::byte_vector>.
947         (svr4_exec_displacement): Adjust.
948
949 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
950
951         * solib-svr4.c (read_program_header): Return
952         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
953         (find_program_interpreter): Return
954         gdb::optional<gdb::byte_vector>.
955         (scan_dyntag_auxv): Adjust.
956         (enable_break): Adjust.
957         (svr4_exec_displacement): Adjust.
958
959 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
960
961         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
962         * inf-child.c (inf_child_target::terminal_save_inferior): New.
963
964 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
965
966         * guile/scm-string.c (gdbscm_scm_from_printf): Use
967         string_vprintf.
968         * guile/scm-utils.c (gdbscm_printf): Likewise.
969         * serial.c (serial_printf): Likewise.
970         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
971
972 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
973
974         * stack.c (print_frame): Print frame architecture when printing on
975         an MI output.
976         * NEWS: Mention new "arch" attribute in frame output.
977
978 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
979
980         * arch/aarch64.h (aarch64_regnum): Update comment.
981
982 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
983
984         * NEWS: Add SVE to 8.2 section.
985
986 2018-08-21  Pedro Alves  <palves@redhat.com>
987
988         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
989         out from gdbscm_parse_function_args.
990         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
991         gdbscm_parse_function_args_1.
992
993 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
994
995         PR gdb/17816
996         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
997         operator.
998
999 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1000
1001         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1002
1003 2018-08-19  Michael Spang  <spang@google.com>
1004
1005         PR gdb/11786
1006         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1007         for PT_TLS segments.
1008
1009 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1010
1011         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1012         dwarf_variable_value.
1013         * dwarf2-frame.c (class dwarf_expr_executor):
1014         Add override for dwarf_variable_value.
1015         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1016         (class symbol_needs_eval_context): Likewise.
1017         (indirect_synthetic_pointer): Add forward declaration.
1018         (sect_variable_value): New function.
1019         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1020         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1021         for DW_OP_GNU_variable_value.
1022
1023 2018-08-16  Tom Tromey  <tom@tromey.com>
1024
1025         * top.c (read_command_file): Update.
1026         (command_line_input): Remove "repeat" argument.
1027         * ada-lang.c (get_selections): Update.
1028         * linespec.c (decode_line_2): Update.
1029         * defs.h (command_line_input): Remove argument.
1030         * cli/cli-script.c (read_next_line): Update.
1031         * python/py-gdb-readline.c: Update.
1032
1033 2018-08-17  Tom Tromey  <tom@tromey.com>
1034
1035         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1036         command_line_input.
1037
1038 2018-08-15  Tom Tromey  <tom@tromey.com>
1039
1040         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1041
1042 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1043
1044         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1045         If used, use find_pc_partial_function to find address range
1046         to disassemble.
1047         * mi/mi-main.c (mi_cmd_list_features): Report
1048         "data-disassemble-a-option" feature.
1049         * NEWS: Mention new -data-disassemble option -a.
1050
1051 2018-08-13  Tom Tromey  <tom@tromey.com>
1052
1053         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1054
1055 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1056
1057         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1058         (aarch64_linux_collect_sve_regset): Likewise.
1059         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1060         * regcache.h (regcache_map_entry_size): New function.
1061
1062 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1063
1064         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1065         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1066         (SVE_HEADER_VL_LENGTH): Likewise.
1067         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1068         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1069         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1070         (SVE_HEADER_SIZE_OFFSET): Likewise.
1071         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1072         (SVE_HEADER_VL_OFFSET): Likewise.
1073         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1074         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1075         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1076         (SVE_HEADER_SIZE): Likewise.
1077         (aarch64_linux_core_read_vq): Add function.
1078         (aarch64_linux_core_read_description): Check for SVE section.
1079
1080 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1081
1082         * aarch64-fbsd-tdep.c
1083         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1084         collect_size.
1085         * aarch64-linux-tdep.c
1086         (aarch64_linux_iterate_over_regset_sections): Likewise.
1087         * alpha-linux-tdep.c
1088         (alpha_linux_iterate_over_regset_sections):
1089         * alpha-nbsd-tdep.c
1090         (alphanbsd_iterate_over_regset_sections): Likewise.
1091         * amd64-fbsd-tdep.c
1092         (amd64fbsd_iterate_over_regset_sections): Likewise.
1093         * amd64-linux-tdep.c
1094         (amd64_linux_iterate_over_regset_sections): Likewise.
1095         * arm-bsd-tdep.c
1096         (armbsd_iterate_over_regset_sections): Likewise.
1097         * arm-fbsd-tdep.c
1098         (arm_fbsd_iterate_over_regset_sections): Likewise.
1099         * arm-linux-tdep.c
1100         (arm_linux_iterate_over_regset_sections): Likewise.
1101         * corelow.c (get_core_registers_cb): Likewise.
1102         (core_target::fetch_registers): Likewise.
1103         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1104         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1105         * gdbarch.h (void): Regenerate.
1106         * gdbarch.sh: Add supply_size and collect_size.
1107         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1108         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1109         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1110         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1111         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1112         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1113         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1114         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1115         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1116         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1117         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1118         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1119         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1120         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1121         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1122         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1123         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1124         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1125         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1126         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1127         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1128         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1129         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1130         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1131         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1132         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1133         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1134         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1135         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1136         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1137
1138 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1139
1140         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1141         with string_printf.
1142
1143 2018-08-10  Keith Seitz  <keiths@redhat.com>
1144
1145         * compile/compile-c-support.c (add_code_header, add_code_footer):
1146         Move into policy class.
1147         (c_push_user_expression, pop_user_expression_nop)
1148         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1149         (compile_program): New host class.
1150         (c_compile_program): New typedef.
1151         (c_compute_porgram): Use c_compile_program.
1152
1153 2018-08-10  Keith Seitz  <keiths@redhat.com>
1154
1155         * compile/compile-internal.h (compile_instance::~compile_instance):
1156         Remove calls to htab_delete.
1157         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1158         * compile.c (compile_instance::compile_instance): Initialize
1159         htab unique pointers.
1160         (compile_instance::get_cached_type, compile_instance::insert_type)
1161         (compile_instance::error_symbol_once): Update for unique_ptr.
1162
1163 2018-08-10  Keith Seitz  <keiths@redhat.com>
1164
1165         * compile/compile-c-symbols.c (struct symbol_error)
1166         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1167         (compile_instance::insert_symbol_error)
1168         (compile_instance::error_symbol_once): Move to ...
1169         * compile/compile.c: ... here.
1170
1171 2018-08-10  Keith Seitz  <keiths@redhat.com>
1172
1173         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1174         instead of `new_compile_instance'.
1175         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1176         Update description.
1177         If the symbol error map is not initialized, create it.
1178         (generate_c_for_for_one_symbol): Do not check/initialize
1179         the symbol error map.
1180         * compile/compile-c-types.c (compile_c_instance): Make a class.
1181         Update all callers.
1182         (compile_instance::compile_instance): Initialize the type cache.
1183         (get_cached_type): New function.
1184         (insert_type): Update description.
1185         (compile_c_instance::m_default_cflags): Define.
1186         (convert_type): Update description.  Use get_cached_type.
1187         (delete_instance): Moved to destructor.
1188         (new_compile_instance): Moved to constructor.
1189         * compile/compile-c.h (compile_c_instance): Make class inheriting
1190         from compile_instance.
1191         <base>: Remove field.
1192         <type_map, symbol_err_map>: Move to base class.
1193         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1194         * compile/compile-internal.h (compile_instance): Make class.
1195         <type_map_t, symbol_err_map_t>: Define.
1196         <fe>: Rename to `m_gcc_fe'.
1197         <scope, block, gcc_target_options>: Add `m_' prefix.
1198         <m_type_map, m_symbol_err_map>: New fields, moved from
1199         compile_c_instance.
1200         <destroy>: Remove.
1201         (convert_type, new_compile_instance): Remove.
1202         * compile/compile.c (cleanup_compile_instance): Remove.
1203         (compile_to_object): Use unique_ptr to eliminate cleanups.
1204         (compile_instance::set_print_callback, compile_instance::version)
1205         (compile_instance::set_verbose)
1206         (compile_instance::set_driver_filename)
1207         (compile_instance::set_triplet_regexp)
1208         (compile_instance::set_arguments)
1209         (compile_instance::set_source_file)
1210         (compile_instance::compile): Define.
1211
1212 2018-08-10  Keith Seitz  <keiths@redhat.com>
1213
1214         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1215         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1216         gcc-c-fe.def to define C plugin.
1217         (delete_instance): Delete `c_plugin'.
1218         (new_compile_instance): Initialize `c_plugin'.
1219         * compile/compile-c.h: Include gcc_c_plugin.h.
1220         (struct compile_c_instance) <c_plugin>: New member.
1221         * gcc-c-plugin.h: New file.
1222         Update all callers with API change.
1223
1224 2018-08-10  Keith Seitz  <keiths@redhat.com>
1225
1226         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1227         (HFILES_NO_SRCDIR): ... to here.
1228         Add compile-internal.h and compile-c.h.
1229         * compile/compile-c-support.c: Include compile-c.h.
1230         * compile/compile-c-symbols.c: Include compile-c.h.
1231         (generate_c_for_variable_locations): Update comment.
1232         * compile/compile-c-types.c: Include compile-c.h.
1233         * compile/compile-c.h: New file -- moved C language declarations
1234         from other files here.
1235         * compile/compile-internal.h: Do not include hashtab.h or
1236         common/enum-flags.h.
1237         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1238         (gcc_convert_symbol, gcc_symbol_address)
1239         (generate_c_for_variable_locations, c_get_mode_for_size)
1240         (c_get_range_decl_name): Definitions moved to compile-c.h.
1241         * compile/compile-loc2c.c: Include compile-c.h.
1242
1243 2018-08-10  Keith Seitz  <keiths@redhat.com>
1244
1245         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1246         (c_symbol_substitution_name): ... this.
1247         Update all callers.
1248
1249 2018-08-10  Keith Seitz  <keiths@redhat.com>
1250
1251         * compile/compile-c-support.c (c_compute_program): Use
1252         unique_xmalloc_ptr to eliminate cleanup.
1253         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1254         Return a unique_xmalloc_ptr and eliminate cleanup.
1255         * compile/compile-internal.h (generate_c_for_variable_locations):
1256         Return unique_xmalloc_ptr and update description.
1257
1258 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1259
1260         * corelow.c (core_target::get_core_register_section): Rename
1261         min_size to section_min_size.
1262
1263 2018-08-09  Jim Wilson  <jimw@sifive.com>
1264
1265         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1266         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1267         * NEWS: Mention new GNU/Linux RISC-V target.
1268         * configure.host: Add riscv*-*-linux*.
1269         * configure.nat: Add riscv*.
1270         * configure.tgt: Add riscv*-*-linux*.
1271         * riscv-linux-nat.c: New file.
1272         * riscv-linux-tdep.c: New file.
1273
1274 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1275
1276         * infrun.c (resume): Make static, add forward declaration.
1277         (proceed): Update header comment.
1278         * infrun.h (resume): Delete declaration.
1279
1280 2018-08-09  Tom Tromey  <tom@tromey.com>
1281
1282         * riscv-tdep.h: Minor formatting fixes.
1283
1284 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1285
1286         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1287         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1288         (test_mkdir_recursive): Likewise.
1289         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1290
1291 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1292
1293         * valarith.c (value_subscripted_rvalue): If an array is not in
1294         memory, and we don't know the upper bound, then we can't know that
1295         the requested element exists or not.
1296
1297 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1298
1299         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1300         (target_options_to_string): Add comment.
1301
1302 2018-08-08  Tom Tromey  <tom@tromey.com>
1303
1304         * unittests/scoped_mmap-selftests.c: Check result of "write".
1305
1306 2018-08-08  Jim Wilson  <jimw@sifive.com>
1307
1308         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1309         (decode_register_index_short): New.
1310         (decode_j_type_insn, decode_cj_type_insn): New.
1311         (decode_b_type_insn, decode_cb_type_insn): New.
1312         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1313         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1314         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1315         is_c_sw_insn instead of is_sw_insn.
1316         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1317         (riscv_software_single_step): New.
1318         * riscv-tdep.h (riscv_software_single_step): Declare.
1319
1320         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1321         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1322
1323 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1324
1325         PR gdb/18050:
1326         * target.c (dispose_inferior): Don't dispose of inferiors that are
1327         already killed.
1328
1329 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1330
1331         * remote.c (remote_target::download_tracepoint): Change char* to
1332         const char*.
1333
1334 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1335
1336         * target.h (target_options_to_string): Return an std::string.
1337         * target.c (str_comma_list_concat_elem): Return void, use
1338         std::string.
1339         (do_option): Likewise.
1340         (target_options_to_string): Return an std::string.
1341         * linux-nat.c (linux_nat_target::wait): Adjust.
1342         * target-debug.h (target_debug_print_options): Adjust.
1343
1344 2018-08-07  Tom Tromey  <tom@tromey.com>
1345
1346         * Makefile.in (CPPFLAGS): New variable.
1347         (INTERNAL_CPPFLAGS): Use it.
1348
1349 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1350
1351         * NEWS: Mention the index cache.
1352
1353 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1354
1355         * common/pathstuff.h (get_standard_cache_dir): New.
1356         * common/pathstuff.c (get_standard_cache_dir): New.
1357         * build-id.h (build_id_to_string): New.
1358         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1359         DEBUG_STR_SUFFIX): Move to here.
1360         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1361         DEBUG_STR_SUFFIX): Move from there.
1362         (write_psymtabs_to_index): Make non-static, add basename
1363         parameter.  Write to temporary files, rename when done.
1364         (save_gdb_index_command): Adjust call to
1365         write_psymtabs_to_index.
1366         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1367         field.
1368         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1369         (get_gdb_index_contents_from_cache): New.
1370         (get_gdb_index_contents_from_cache_dwz): New.
1371         (dwarf2_initialize_objfile): Read index from cache.
1372         (dwarf2_build_psymtabs): Save to index.
1373         * dwarf-index-cache.h: New file.
1374         * dwarf-index-cache.c: New file.
1375         * dwarf-index-write.h: New file.
1376
1377 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1378
1379         * gnulib/aclocal.m4: Re-generate.
1380         * gnulib/config.in: Re-generate.
1381         * gnulib/configure: Re-generate.
1382         * gnulib/import/Makefile.am: Re-generate.
1383         * gnulib/import/Makefile.in: Re-generate.
1384         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1385         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1386         * gnulib/import/m4/mkdir.m4: New file.
1387         * gnulib/import/mkdir.c: New file.
1388         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1389         module.
1390
1391 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1392
1393         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1394         * common/scoped_mmap.c: New file.
1395         * common/scoped_mmap.h (destroy): New method.
1396         (~scoped_mmap, reset): Use destroy.
1397         (scoped_mmap): New move constructor.
1398         (mmap_file): New declaration.
1399         * unittests/scoped_mmap-selftests.c (test_normal,
1400         test_invalid_filename, run_tests): New functions.
1401         (_initialize_scoped_mmap_selftests): Register selftest.
1402
1403 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1404
1405         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1406         (read_gdb_index_from_buffer): ... this.  Remove section
1407         parameter, add buffer parameter.
1408         (get_gdb_index_contents_ftype,
1409         get_gdb_index_contents_dwz_ftype): New typedefs.
1410         (dwarf2_read_gdb_index): Add callback parameters to get the
1411         index contents.
1412         (get_gdb_index_contents_from_section): New.
1413         (dwarf2_initialize_objfile): Update call to
1414         dwarf2_read_gdb_index.
1415
1416 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1417
1418         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1419         (gdb_open_cloexec): Likewise.
1420         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1421         (commandline_from_pid): Likewise.
1422         (linux_xfer_osdata_threads): Likewise.
1423         (linux_xfer_osdata_fds): Likewise.
1424         * ada-lang.c (is_package_name): Likewise.
1425         * auxv.c (procfs_xfer_auxv): Likewise.
1426         * breakpoint.c (print_one_breakpoint_location): Use
1427         uiout::field_fmt.
1428         (print_one_catch_solib): Use string_printf.
1429         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1430         (add_pe_forwarded_sym): Likewise.
1431         * dwarf2read.c (create_type_unit_group): Likewise.
1432         (build_error_marker_type): Likewise.
1433         * infcall.c (get_function_name): Likewise.
1434         * valprint.c (print_converted_chars_to_obstack): Likewise.
1435         * xtensa-tdep.c (xtensa_register_type): Likewise.
1436
1437 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1438
1439         * remote.c (remote_target::download_tracepoint): Fix format
1440         string errors.
1441
1442 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1443
1444         * tracefile.c: Include common/byte-vector.h.
1445         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1446         with trace_regblock_size if needed.  Update uses of buf.
1447
1448 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1449
1450         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1451         std::vector<unsigned char>.
1452         * tracepoint.c (collection_list::collection_list): Remove
1453         m_regs_mask initializer from initializer list.  Resize
1454         m_regs_mask using the largest remote register number.
1455         (collection_list::add_remote_register): Remove size check on
1456         m_regs_mask.  Use at to access element.
1457         (collection_list::stringify): Change type of temp_buf to
1458         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1459         stringify the register mask.  Use pack_hex_byte for the register
1460         mask.
1461
1462 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1463
1464         * tracepoint.h (class collection_list) <add_register>: Remove.
1465         <add_remote_register, add_ax_registers, add_local_register>:
1466         Declare.
1467         <add_memrange>: Add scope parameter.
1468         * tracepoint.c (encode_actions_1): Likewise.
1469         (collection_list::add_register): Rename to ...
1470         (collection_list::add_remote_register): ... this.  Update
1471         comment.
1472         (collection_list::add_ax_registers, add_local_register): New
1473         methods.
1474         (collection_list::add_memrange): Add scope parameter.  Call
1475         add_local_register instead of add_register.
1476         (finalize_tracepoint_aexpr): New function.
1477         (collection_list::collect_symbol): Update calls to add_memrange.
1478         Call add_local_register instead of add_register.  Call
1479         add_ax_registers.  Call finalize_tracepoint_aexpr.
1480         (encode_actions_1): Get remote regnos for $reg action.  Call
1481         add_remote_register, add_ax_registers, and add_local_register.
1482         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1483         (validate_actionline): Call finalize_tracepoint_aexpr.
1484
1485 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1486
1487         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1488         Replace array buf with gdb::char_vector buf, of size
1489         get_remote_packet_size ().  Replace references to buf and
1490         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1491         and xsnprintf with snprintf.  Raise errors if the buffer is too
1492         small.
1493
1494 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1495
1496         * remote.c (remote_target::download_tracepoint): Fix the has_more
1497         predicate in the QTDP action list iteration.
1498
1499 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1500
1501         * remote.c (remote_target::download_tracepoint): Fix indentation
1502         in for block.
1503
1504 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1505
1506         * proc-api.c (_initialize_proc_api): Remove c, unused.
1507         * procfs.c (procfs_init_inferior): Remove signals, unused.
1508         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1509         unused.
1510
1511 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1512             Andrew Burgess  <andrew.burgess@embecosm.com>
1513
1514         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1515         'W_STOPCODE (0)' as this could be ambiguous.
1516
1517 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1518
1519         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1520         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1521         "ai_socktype").
1522
1523 2018-08-02  Tom Tromey  <tom@tromey.com>
1524
1525         PR symtab/16842.
1526         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1527         symbols.
1528         (process_structure_scope): Likewise.
1529
1530 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1531
1532         PR gdb/22629:
1533         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1534         kill inferior.
1535
1536 2018-08-02  Tom Tromey  <tom@tromey.com>
1537
1538         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1539         (darwin_suspend_inferior, darwin_resume_inferior)
1540         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1541         (darwin_check_new_threads): Check result of get_darwin_inferior.
1542
1543 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1544
1545         GDB 8.1.1 released.
1546
1547 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1548
1549         * varobj.c (varobj_get_path_expr_parent): Report an error if
1550         parent is a dynamic varobj.
1551
1552 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1553
1554         * gnulib/aclocal.m4: Re-generate.
1555         * gnulib/config.in: Re-generate.
1556         * gnulib/configure: Re-generate.
1557         * gnulib/import/Makefile.in: Re-generate.
1558         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1559         * gnulib/import/m4/onceonly.m4: Re-generate.
1560
1561 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1562
1563         * target-descriptions.c (struct xml_test_tdesc): New.
1564         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1565         (record_xml_tdesc): Update.
1566         (maintenance_check_xml_descriptions): Update.
1567         * target-descriptions.h (record_xml_tdesc): Update comment.
1568
1569 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1570
1571         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1572         checking array bounds are defined.
1573
1574 2018-07-30  Tom Tromey  <tom@tromey.com>
1575
1576         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1577         irreflexivity violation.
1578
1579 2018-07-30  Tom Tromey  <tom@tromey.com>
1580
1581         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1582         * value.c (unpack_long): Remove lint code.
1583         * valops.c (value_ind): Remove lint code.
1584         * valarith.c (value_x_binop, value_x_unop, value_equal)
1585         (value_pos): Remove lint code.
1586
1587 2018-07-28  Tom de Vries  <tdevries@suse.de>
1588
1589         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1590         with undefined upper bound as <optimized out>.
1591
1592 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1593
1594         * gcore.in: Rename variable "name" to "prefix".  Expand
1595         "usage" text.
1596
1597 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1598
1599         * windows-nat.c (windows_nat_target::create_inferior): Update to
1600         call close() in global namespace.
1601
1602 2018-07-26  Tom Tromey  <tom@tromey.com>
1603
1604         * dwarf-index-write.c (add_address_entry): Don't add objfile
1605         offsets.
1606         * dbxread.c (find_stab_function): Rename from
1607         find_stab_function_addr.  Return a bound_minimal_symbol.
1608         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1609         Don't add objfile offsets.
1610         (end_psymtab): Use raw_text_low, raw_text_high,
1611         MSYMBOL_VALUE_RAW_ADDRESS.
1612         (read_ofile_symtab): Update.
1613         (process_one_symbol): Update.
1614         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1615         offsets.
1616         (dw2_relocate): Remove.
1617         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1618         searching addrmap.
1619         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1620         Update.
1621         (process_psymtab_comp_unit_reader, add_partial_symbol)
1622         (add_partial_subprogram, dwarf2_ranges_read): Update.
1623         (load_partial_dies): Update.
1624         (add_address_entry): Don't add objfile offsets.
1625         (dwarf2_build_include_psymtabs): Update.
1626         (create_addrmap_from_aranges): Don't add objfile offsets.
1627         (dw2_find_pc_sect_compunit_symtab): Update.
1628         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1629         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1630         Update.
1631         (parse_partial_symbols): Don't add objfile offsets.  Use
1632         raw_text_low, raw_text_high.  Update.
1633         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1634         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1635         or call 'relocate' quick function.  Clear psymbol_map.
1636         * psympriv.h (struct partial_symbol) <address>: Add section
1637         offset.
1638         <set_unrelocated_address>: Rename from set_address.
1639         <raw_text_low, raw_text_high>: New methods.
1640         <text_low, text_high>: Add objfile parameter.
1641         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1642         set_unrelocated_address.
1643         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1644         (find_pc_psymbol): Update.
1645         (fixup_psymbol_section, relocate_psymtabs): Remove.
1646         (dump_psymtab, psym_functions): Update.
1647         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1648         parameter.
1649         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1650         (start_psymtab_common): Update.
1651         * symfile-debug.c (debug_qf_relocate): Remove.
1652         (debug_sym_quick_functions): Update.
1653         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1654         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1655         Update.
1656
1657 2018-07-26  Tom Tromey  <tromey@redhat.com>
1658
1659         * dbxread.c (end_psymtab): Use text_high_valid and
1660         text_low_valid.
1661         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1662         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1663         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1664         Update comment.
1665         <text_low_valid, text_high_valid>: New fields.
1666         <set_text_low, set_text_high>: Update.
1667         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1668
1669 2018-07-26  Tom Tromey  <tom@tromey.com>
1670
1671         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1672         Update.
1673         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1674         textlow and texthigh fields.
1675         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1676         Update.
1677         * mdebugread.c (parse_lines, parse_partial_symbols)
1678         (psymtab_to_symtab_1): Update.
1679         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1680         Rename fields.  Update comment.  Now private.
1681         <text_low, text_high, set_text_low, set_text_high>: New methods.
1682         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1683         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1684         (start_psymtab_common, maintenance_info_psymtabs)
1685         (maintenance_check_psymtabs): Update.
1686         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1687         texthigh fields.
1688         (scan_xcoff_symtab): Update.
1689
1690 2018-07-26  Tom Tromey  <tromey@redhat.com>
1691
1692         * psympriv.h (struct partial_symbol) <unrelocated_address,
1693         address, set_address>: New methods.
1694         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1695         (fixup_psymbol_section, relocate_psymtabs): Update.
1696         (print_partial_symbols): Add 'objfile' parameter.  Update.
1697         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1698         Update.
1699
1700 2018-07-26  Tom Tromey  <tom@tromey.com>
1701
1702         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1703         (debug_names::write_psymbols): Update.
1704         * psympriv.h (struct partial_symbol): Derive from
1705         general_symbol_info.
1706         <obj_section>: New method.
1707         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1708         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1709         (find_pc_sect_psymbol, fixup_psymbol_section)
1710         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1711         (print_partial_symbols, recursively_search_psymtabs)
1712         (compare_psymbols, psymbol_hash, psymbol_compare)
1713         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1714         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1715
1716 2018-07-26  Tom Tromey  <tromey@redhat.com>
1717
1718         * dbxread.c (end_psymtab): Remove dead code.
1719
1720 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1721
1722         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1723         DWARF unwinders are disabled.
1724         * dwarf2-frame.c: Add dwarf2read.h include.
1725         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1726         disabled.
1727         (dwarf2_frame_unwinders_enabled_p): Define.
1728         (show_dwarf_unwinders_enabled_p): New function.
1729         (_initialize_dwarf2_frame): Register switch to control DWARF
1730         unwinder use.
1731         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1732         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1733         (show_dwarf_cmdlist): Remove static keyword.
1734         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1735         (show_dwarf_cmdlist): Declare.
1736         * NEWS: Document new feature.
1737
1738 2018-07-26  Tom de Vries  <tdevries@suse.de>
1739
1740         PR breakpoints/23366
1741         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1742
1743 2018-07-26  Tom de Vries  <tdevries@suse.de>
1744
1745         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1746         DW_AT_count can't be translated to a dynamic prop.
1747
1748 2018-07-25  Tom de Vries  <tdevries@suse.de>
1749
1750         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1751         try/catch.
1752
1753 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1754
1755         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1756
1757 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1758
1759         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1760
1761 2018-07-24  Keith Seitz  <keiths@redhat.comt
1762
1763         PR symtab/23010
1764         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1765         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1766         instead of add_symbol_to_list.
1767         (read_file_scope): Call prepare_one_comp_unit before reading
1768         any other DIEs.
1769
1770 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1771
1772         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1773
1774 2018-07-24  Tom Tromey  <tom@tromey.com>
1775
1776         * utils.c (malloc, realloc, free): Don't declare.
1777         * configure, config.in: Rebuild.
1778         * configure.ac: Don't check for declarations of free, malloc, or
1779         realloc.
1780
1781 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1782
1783         * aarch64-linux-nat.c
1784         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1785         variable.
1786         * arm-linux-nat.c (fetch_regs): Likewise.
1787         (store_regs): Likewise.
1788         (fetch_vfp_regs): Likewise.
1789         (store_vfp_regs): Likewise.
1790         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1791         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1792         (arm_linux_nat_target::insert_watchpoint): Likewise.
1793         (arm_linux_nat_target::remove_watchpoint): Likewise.
1794         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1795         Likewise.
1796         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1797         Likewise.
1798         * ppc-linux-nat.c (fetch_register): Likewise.
1799         (fetch_all_gp_regs): Likewise.
1800         (fetch_ppc_registers): Likewise.
1801         (store_all_gp_regs): Likewise.
1802         (store_ppc_registers): Likewise.
1803         (hwdebug_insert_point): Likewise.
1804         (can_use_watchpoint_cond_accel): Likewise.
1805         * remote-sim.c (gdb_os_write_stdout): Likewise.
1806
1807 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1808             Tom Tromey  <tom@tromey.com>
1809
1810         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1811         test for it.
1812         * configure: Rebuild.
1813
1814 2018-07-22  Tom Tromey  <tom@tromey.com>
1815
1816         * regformats/regdat.sh: Define xmltarget_${name} inside
1817         #ifndef IN_PROCESS_AGENT.
1818
1819 2018-07-22  Tom Tromey  <tom@tromey.com>
1820
1821         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1822
1823 2018-07-22  Tom Tromey  <tom@tromey.com>
1824
1825         * symfile.c (reread_symbols): Notify iter, not objfile.
1826
1827 2018-07-22  Tom Tromey  <tom@tromey.com>
1828
1829         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1830         Use arch_ops.
1831         (ravenscar_thread_target::prepare_to_store): Likewise.
1832
1833 2018-07-22  Tom Tromey  <tom@tromey.com>
1834
1835         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1836         unused variable.  Call value_fetch_lazy when needed.
1837         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1838         Remove unused variable.  Call value_fetch_lazy when needed.
1839
1840 2018-07-22  Tom Tromey  <tom@tromey.com>
1841
1842         * m32c-tdep.c (mark_dma): Return void.
1843         (make_regs): Remove unused declarations.
1844
1845 2018-07-22  Tom Tromey  <tom@tromey.com>
1846
1847         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1848         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1849         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1850         bkscm_get_valid_block_smob_arg_unsafe for effect.
1851
1852 2018-07-22  Tom Tromey  <tom@tromey.com>
1853
1854         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1855         value_type.
1856
1857 2018-07-22  Tom Tromey  <tom@tromey.com>
1858
1859         * windows-nat.c (saved_context): Conditionally define.
1860         * remote.c (remote_target::remote_btrace_maybe_reopen):
1861         Conditionally declare "warned".
1862         * inflow.c (sigquit_ours): Conditionally define.
1863         (new_tty): Move "tty" declaration inside #if.
1864         * guile/guile.c (guile_datadir): Conditionally define.
1865         * charset.c (set_be_le_names): Move some declarations inside #if.
1866         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1867         #if.
1868         (parse_xml_btrace_conf): Likewise.
1869
1870 2018-07-22  Tom Tromey  <tom@tromey.com>
1871
1872         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1873
1874 2018-07-22  Tom Tromey  <tom@tromey.com>
1875
1876         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1877         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1878         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1879         * buildsym-legacy.c (get_macro_table): Remove unused variable.
1880         * stack.c (frame_apply_level_command): Remove unused variable.
1881         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1882         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1883         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1884         unused variable.
1885         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1886         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1887         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1888         variable.
1889         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1890         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1891         variable.
1892         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1893         Remove unused variable.
1894         * cli/cli-script.c (recurse_read_control_structure): Remove unused
1895         variable.
1896         * common/tdesc.c (print_xml_feature::visit): Remove unused
1897         variable.
1898         * compile/compile-object-load.c (store_regs): Remove unused
1899         variables.
1900         * complaints.c (clear_complaints): Remove unused variable.
1901         * corelow.c (core_target_open): Remove unused variable.
1902         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1903         variable.
1904         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1905         variable.
1906         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1907         variable.
1908         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1909         variable.
1910         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1911         variable.
1912         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1913         variable.
1914         * ia64-tdep.c (examine_prologue): Remove unused variable.
1915         * infcall.c (run_inferior_call): Remove unused variable.
1916         * inferior.c (exit_inferior): Remove unused variable.
1917         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1918         * linespec.c (decode_line_2): Remove unused variable.
1919         * linux-nat.c (super_close): Remove.
1920         * linux-tdep.c (linux_info_proc): Remove unused variable.
1921         * mi/mi-main.c (mi_execute_command): Remove unused variable.
1922         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1923         Remove unused variable.
1924         * parse.c (find_minsym_type_and_address): Remove unused variable.
1925         * printcmd.c (info_symbol_command, printf_floating): Remove unused
1926         variable.
1927         * python/py-breakpoint.c (bppy_set_commands): Remove unused
1928         variable.
1929         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1930         variables.
1931         * record-btrace.c (record_btrace_target::store_registers): Remove
1932         unused variable.
1933         (cmd_show_record_btrace_cpu): Remove unused variable.
1934         * riscv-tdep.c (riscv_register_reggroup_p)
1935         (riscv_push_dummy_call, riscv_return_value): Remove unused
1936         variable.
1937         * rust-exp.y (literal): Remove unused variable.
1938         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1939         unused variable.
1940         <STRUCTOP_ANONYMOUS>: Likewise.
1941         * s390-linux-tdep.c (s390_linux_init_abi_31)
1942         (s390_linux_init_abi_64): Remove unused variable.
1943         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1944         (file_select_thread, net_windows_open, _initialize_ser_windows):
1945         Remove unused variables.
1946         * symtab.c (find_pc_sect_line): Remove unused variable.
1947         * target-memory.c (compute_garbled_blocks): Remove unused
1948         variable.
1949         (target_write_memory_blocks): Remove unused variable.
1950         * target.c (target_stack::unpush): Remove unused variables.
1951         * tracepoint.c (start_tracing, all_tracepoint_actions)
1952         (merge_uploaded_trace_state_variables)
1953         (print_one_static_tracepoint_marker): Remove unused variable.
1954         * unittests/basic_string_view/element_access/char/1.cc (test01):
1955         Remove unused variable.
1956         * windows-nat.c (windows_continue, windows_add_all_dlls)
1957         (do_initial_windows_stuff, windows_nat_target::create_inferior):
1958         Remove unused variables.
1959
1960 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
1961
1962         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1963         attr_profile in HAVE_ELF.
1964         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1965         HAVE_ELF.
1966
1967 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
1968
1969         * frame.c (frame_register_unwind): Change parameter name.
1970         (frame_unwind_register): Likewise.
1971         (frame_unwind_register_value): Likewise.
1972         (frame_unwind_register_signed): Likewise.
1973         (frame_unwind_register_unsigned): Likewise.
1974         * frame.h (frame_register_unwind): Likewise.
1975         (frame_unwind_register): Likewise.
1976         (frame_unwind_register_value): Likewise.
1977         (frame_unwind_register_signed): Likewise.
1978         (frame_unwind_register_unsigned): Likewise.
1979         (frame_unwind_arch): Likewise.
1980
1981 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1982
1983         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1984         ISA maintenance.
1985
1986 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1987
1988         * mips-linux-nat.c (mips_linux_nat_target::read_description):
1989         Call `get_ptrace_pid' rather than extracting the ptrace PID by
1990         hand.
1991
1992 2018-07-20  Keith Seitz  <keiths@redhat.com>
1993
1994         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1995         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1996         m_compunit_symtab, m_language>: Add "m_" prefix.
1997         Update all uses.
1998         * buildsym.c: Update all uses.
1999
2000 2018-07-20  Tom Tromey  <tom@tromey.com>
2001
2002         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2003         * buildsym.h (record_line_ftype): Remove typedef.
2004
2005 2018-07-20  Tom Tromey  <tom@tromey.com>
2006
2007         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2008         (end_expandable_symtab): Likewise.
2009         (end_symtab_get_static_block): Likewise.
2010         (end_symtab_from_static_block): Likewise.
2011         * buildsym-legacy.c (augment_type_symtab): Remove.
2012         (end_expandable_symtab): Remove.
2013         (end_symtab_get_static_block): Remove.
2014         (end_symtab_from_static_block): Remove.
2015
2016 2018-07-20  Tom Tromey  <tom@tromey.com>
2017
2018         * dwarf2read.c: Include buildsym.h.
2019         (struct dwarf2_cu) <builder>: New method.
2020         (fixup_go_packaging): Update.
2021         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2022         use scoped_free_pendings.
2023         (using_directives): Add "cu" parameter, remove "language".
2024         (read_import_statement, setup_type_unit_groups, )
2025         (read_func_scope, read_lexical_block_scope)
2026         (dwarf2_record_block_ranges, read_namespace): Update.
2027         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2028         (lnp_state_machine::handle_end_sequence): Update.
2029         (class lnp_state_machine) <m_cu>: New member.
2030         <m_record_line_callback>: Remove.
2031         <m_currently_recording_lines>: New member.
2032         (lnp_state_machine::handle_set_file): Update.
2033         (noop_record_line): Remove.
2034         (dwarf_record_line_p): Add cu parameter.
2035         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2036         (lnp_state_machine::record_line)
2037         (lnp_state_machine::lnp_state_machine)
2038         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2039         (dwarf_decode_lines): Update.
2040         (dwarf2_start_subfile): Add cu parameter.
2041         (dwarf2_start_symtab, new_symbol): Update.
2042         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2043         Remove dwarf2_per_objfile parameter.
2044         (dwarf_decode_macros): Update.
2045
2046 2018-07-20  Tom Tromey  <tom@tromey.com>
2047
2048         * stabsread.c (define_symbol): Update.
2049         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2050         * dwarf2read.c (new_symbol): Update.
2051         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2052         * cp-namespace.c: Include buildsym.h.
2053         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2054         * buildsym-legacy.c (get_buildsym_compunit): New function.
2055
2056 2018-07-20  Tom Tromey  <tom@tromey.com>
2057
2058         * xcoffread.c: Include buildsym-legacy.h.
2059         * windows-nat.c: Include buildsym-legacy.h.
2060         * stabsread.c: Include buildsym-legacy.h.
2061         * mdebugread.c: Include buildsym-legacy.h.
2062         * buildsym-legacy.h: New file.
2063         * buildsym-legacy.c: New file, from buildsym.c.
2064         * go32-nat.c: Include buildsym-legacy.h.
2065         * dwarf2read.c: Include buildsym-legacy.h.
2066         * dbxread.c: Include buildsym-legacy.h.
2067         * cp-namespace.c: Include buildsym-legacy.h.
2068         * coffread.c: Include buildsym-legacy.h.
2069         * buildsym.h: Move some contents to buildsym-legacy.h.
2070         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2071         buildsym-legacy.c.
2072         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2073
2074 2018-07-20  Tom Tromey  <tom@tromey.com>
2075
2076         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2077         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2078         (buildsym_compunit::buildsym_compunit)
2079         (buildsym_compunit::~buildsym_compunit)
2080         (buildsym_compunit::get_macro_table): Define.
2081
2082 2018-07-20  Tom Tromey  <tom@tromey.com>
2083
2084         * buildsym.c (reset_symtab_globals): Remove.
2085         (buildsym_compunit::end_symtab_from_static_block): Update.
2086         (buildsym_compunit::augment_type_symtab): Update.
2087         (end_symtab_from_static_block): Call free_buildsym_compunit.
2088         (augment_type_symtab, end_symtab, end_expandable_symtab):
2089         Likewise.
2090
2091 2018-07-20  Tom Tromey  <tom@tromey.com>
2092
2093         * arch-utils.c: Do not include buildsym.h.
2094         * mipsread.c: Do not include buildsym.h.
2095         * machoread.c: Do not include buildsym.h.
2096         * elfread.c: Do not include buildsym.h.
2097
2098 2018-07-20  Tom Tromey  <tom@tromey.com>
2099
2100         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2101         initialization.
2102         (buildsym_compunit): Add new constructor.
2103         (struct buildsym_compunit) <get_last_source_file, finish_block,
2104         record_block_range, start_subfile, patch_subfile_names,
2105         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2106         set_last_source_start_addr, get_last_source_start_addr,
2107         get_local_using_directives, set_local_using_directives,
2108         get_global_using_directives, outermost_context_p,
2109         get_current_context_stack, get_context_stack_depth,
2110         get_current_subfile, get_local_symbols, get_file_symbols,
2111         get_global_symbols, record_debugformat, record_producer,
2112         push_context, pop_context, end_symtab_get_static_block,
2113         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2114         New public methods.
2115         <record_pending_block, finish_block_internal, make_blockvector,
2116         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2117         private methods.
2118         Update all users.
2119
2120 2018-05-22  Tom Tromey  <tom@tromey.com>
2121
2122         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2123         parameter.
2124         (finish_block_internal): Update.
2125
2126 2018-07-20  Tom Tromey  <tom@tromey.com>
2127
2128         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2129         parameter.
2130         (finish_block_internal): Update.
2131
2132 2018-07-20  Tom Tromey  <tom@tromey.com>
2133
2134         * buildsym.h (EXTERN): Don't define or undef.
2135         * buildsym.c (EXTERN): Don't define.
2136
2137 2018-07-20  Tom Tromey  <tom@tromey.com>
2138
2139         * buildsym.c: Remove TODO comment.
2140
2141 2018-07-20  Tom Tromey  <tom@tromey.com>
2142
2143         * coffread.c (coff_symtab_read): Update.
2144         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2145         (xcoff_new_init): Update.
2146         * mipsread.c (mipscoff_new_init): Update.
2147         * mdebugread.c (mdebug_build_psymtabs): Update.
2148         * elfread.c (elf_new_init): Update.
2149         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2150         Update.
2151         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2152         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2153         (stabsect_build_psymtabs): Update.
2154         * buildsym.h (buildsym_init): Don't declare.
2155         * buildsym.c: Update comment.
2156         (prepare_for_building): Remove.
2157         (start_symtab, restart_symtab): Update.
2158         (reset_symtab_globals): Update comment.
2159         (buildsym_init): Remove.
2160
2161 2018-07-20  Tom Tromey  <tom@tromey.com>
2162
2163         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2164         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2165         (read_enum_type, common_block_start, common_block_end)
2166         (cleanup_undefined_types_1, finish_global_stabs): Update.
2167         * mdebugread.c (psymtab_to_symtab_1): Update.
2168         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2169         (read_lexical_block_scope, new_symbol): Update.
2170         * dbxread.c (process_one_symbol): Update.
2171         * coffread.c (coff_symtab_read, process_coff_symbol)
2172         (coff_read_enum_type): Update.
2173         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2174         declare.
2175         (get_local_symbols, get_file_symbols, get_global_symbols): New
2176         functions.
2177         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2178         m_global_symbols.
2179         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2180         (~scoped_free_pendings): Update.
2181         (finish_block, prepare_for_building, reset_symtab_globals)
2182         (end_symtab_get_static_block, end_symtab_with_blockvector)
2183         (augment_type_symtab, push_context): Update.
2184         (get_local_symbols, get_file_symbols, get_global_symbols): New
2185         functions.
2186         (buildsym_init): Update.
2187
2188 2018-07-20  Tom Tromey  <tom@tromey.com>
2189
2190         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2191         (process_full_type_unit): Likewise.
2192         (dwarf2_start_symtab): Set list_in_scope.
2193
2194 2018-07-20  Tom Tromey  <tom@tromey.com>
2195
2196         * dwarf2read.c (process_psymtab_comp_unit_reader)
2197         (build_type_psymtabs_reader): Do not set list_in_scope.
2198
2199 2018-07-20  Tom Tromey  <tom@tromey.com>
2200
2201         * buildsym.c (free_pendings): Remove.
2202         (add_symbol_to_list, scoped_free_pendings)
2203         (finish_block_internal, buildsym_init): Update.
2204
2205 2018-07-20  Tom Tromey  <tom@tromey.com>
2206
2207         * xcoffread.c (read_xcoff_symtab): Update.
2208         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2209         Update.
2210         * dbxread.c (process_one_symbol): Update.
2211         * coffread.c (coff_symtab_read): Update.
2212         * buildsym.h (finish_block): Update.
2213         * buildsym.c (finish_block): Remove "listhead" argument.
2214         (end_symtab_get_static_block): Update.
2215
2216 2018-07-20  Tom Tromey  <tom@tromey.com>
2217
2218         * buildsym.h (class scoped_free_pendings): Remove constructor.
2219         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2220         method.
2221         <m_pending_block_obstack, m_pending_blocks>: New members.
2222         (pending_block_obstack, pending_blocks): Remove.
2223         (scoped_free_pendings::scoped_free_pendings): Default.
2224         (~scoped_free_pendings): Update.
2225         (free_pending_blocks): Remove.
2226         (finish_block_internal, record_pending_block, make_blockvector)
2227         (end_symtab_get_static_block, augment_type_symtab, push_context)
2228         (buildsym_init): Update.
2229
2230 2018-07-20  Tom Tromey  <tom@tromey.com>
2231
2232         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2233         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2234         members.
2235         (pending_addrmap, pending_addrmap_obstack)
2236         (pending_addrmap_interesting): Remove.
2237         (scoped_free_pendings, record_block_range, make_blockvector)
2238         (prepare_for_building, reset_symtab_globals, buildsym_init):
2239         Update.
2240
2241 2018-07-20  Tom Tromey  <tom@tromey.com>
2242
2243         * xcoffread.c (process_linenos): Update.
2244         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2245         * mdebugread.c (psymtab_to_symtab_1): Update.
2246         * dwarf2read.c (setup_type_unit_groups)
2247         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2248         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2249         * dbxread.c (process_one_symbol): Update.
2250         * coffread.c (coff_symtab_read, enter_linenos)
2251         (process_coff_symbol): Update.
2252         * buildsym.h (current_subfile): Don't declare.
2253         (get_current_subfile): Declare.
2254         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2255         member.
2256         (start_subfile, free_buildsym_compunit, push_subfile)
2257         (prepare_for_building, start_symtab): Update.
2258         (get_current_subfile): New function.
2259
2260 2018-07-20  Tom Tromey  <tom@tromey.com>
2261
2262         * coffread.c (coff_symtab_read): Update.
2263         * xcoffread.c (read_xcoff_symtab): Update.
2264         * dwarf2read.c (new_symbol): Update.
2265         (read_func_scope, read_lexical_block_scope): Update.
2266         * dbxread.c (process_one_symbol): Update.
2267         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2268         (outermost_context_p): Remove macro.
2269         (outermost_context_p, get_current_context_stack)
2270         (get_context_stack_depth): Declare.
2271         (pop_context): Return struct context_stack.
2272         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2273         member.
2274         (context_stack_size): Remove.
2275         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2276         (prepare_for_building, end_symtab_get_static_block)
2277         (augment_type_symtab, push_context): Update.
2278         (pop_context): Return struct context_stack.
2279         (outermost_context_p, get_current_context_stack)
2280         (get_context_stack_depth): New functions.
2281         (buildsym_init): Update.
2282
2283 2018-07-20  Tom Tromey  <tom@tromey.com>
2284
2285         * rust-exp.y: Now a pure parser.  Update all rules.
2286         (%union): Move earlier.
2287         (current_parser, work_obstack): Remove globals.
2288         (rust_parser, ~rust_parser): Update.
2289         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2290         lex_character, lex_number, lex_string, lex_identifier,
2291         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2292         convert_name, convert_params_to_expression,
2293         convert_ast_to_expression, ast_basic_type, ast_operation,
2294         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2295         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2296         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2297         ast_array_type, ast_slice_type, ast_reference_type,
2298         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2299         (rust_parse): Update.
2300         (rustyyerror, rustyylex): Add parser parameter.
2301         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2302         (rust_lex_stringish_test, rust_lex_test_sequence)
2303         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2304         (rust_lex_test_push_back, rust_lex_tests): Update.
2305
2306 2018-07-19  Pedro Alves  <palves@redhat.com>
2307
2308         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2309         gdb::unique_xmalloc_ptr.
2310         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2311         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2312         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2313         copy-initialization.
2314         * guile/scm-pretty-print.c (ppscm_print_children): Use
2315         gdb::unique_xmalloc_ptr instead of cleanups.
2316         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2317         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2318         gdb::unique_xmalloc_ptr.
2319         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2320         Adjust to use gdb::unique_xmalloc_ptr.
2321         * guile/scm-utils.c (extract_arg): Adjust.
2322         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2323         gdb::unique_xmalloc_ptr instead of a cleanup.
2324
2325 2018-07-19  Tom Tromey  <tom@tromey.com>
2326
2327         * utils.c (do_value_free_to_mark)
2328         (make_cleanup_value_free_to_mark): Remove.
2329         * utils.h (make_cleanup_value_free_to_mark): Remove.
2330
2331 2018-07-19  Pedro Alves  <palves@redhat.com>
2332
2333         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2334         forwarding reference.
2335
2336 2018-07-18  Pedro Alves  <palves@redhat.com>
2337
2338         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2339         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2340         cleanup.
2341
2342 2018-07-18  Pedro Alves  <palves@redhat.com>
2343
2344         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2345         exceptions.
2346         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2347         (gdbscm_wrap): New.
2348         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2349         directly instead of a cleanup.
2350         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2351         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2352         (vlscm_binop_gdbthrow): New, factored out from ...
2353         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2354         (vlscm_rich_compare): Use gdbscm_wrap.
2355         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2356         instead of a cleanup.
2357         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2358         cleanup.
2359         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2360         Use xfree directly instead of a cleanup.
2361         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2362         Adjust to use gdbscm_wrap and scoped_value_mark.
2363         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2364         (gdbscm_value_address, gdbscm_value_dereference)
2365         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2366         scoped_value_mark.
2367         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2368         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2369         scoped_value_mark.
2370         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2371         gdbscm_wrap and scoped_value_mark.
2372         (gdbscm_value_to_string): Use xfree directly instead of a
2373         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2374         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2375         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2376         scoped_value_mark.
2377         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2378         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2379         scoped_value_mark.
2380         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2381         gdbscm_wrap.
2382
2383 2018-07-18  Tom de Vries  <tdevries@suse.de>
2384
2385         * findvar.c (default_read_var_value): Also resolve dynamic type for
2386         LOC_OPTIMIZED_OUT vars.
2387
2388 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2389
2390         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2391         decoding.
2392
2393 2018-07-17  Tom Tromey  <tom@tromey.com>
2394
2395         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2396         (compute_enum_list, pascm_set_param_value_x)
2397         (gdbscm_parameter_value): Update.
2398         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2399         (gdbscm_scm_to_host_string): Update.
2400         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2401         Update.
2402         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2403         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2404         * guile/scm-string.c (gdbscm_scm_to_string): Return
2405         unique_xmalloc_ptr.
2406         (gdbscm_scm_to_host_string): Likewise.
2407
2408 2018-07-17  Tom Tromey  <tom@tromey.com>
2409
2410         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2411         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2412         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2413         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2414         unique_xmalloc_ptr.
2415
2416 2018-07-17  Tom Tromey  <tom@tromey.com>
2417
2418         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2419         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2420         Update.
2421         * guile/scm-cmd.c (cmdscm_function): Update.
2422         * guile/scm-pretty-print.c
2423         (ppscm_print_exception_unless_memory_error): Update.
2424         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2425         Return unique_xmalloc_ptr.
2426
2427 2018-07-17  Tom Tromey  <tom@tromey.com>
2428
2429         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2430         Use string_printf.
2431
2432 2018-07-17  Jim Wilson  <jimw@sifive.com>
2433
2434         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2435         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2436         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2437         unecessary braces after EF_RISCV_RVC test.  Delete call to
2438         set_gdbarch_decr_pc_after_break.
2439
2440         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2441         RISCV_LAST_FP_REGNUM + 1.
2442         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2443
2444 2018-07-17  Tom Tromey  <tom@tromey.com>
2445
2446         * configure.ac: Remove --disable-gdbcli.
2447         * configure: Rebuild.
2448         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2449         (SUBDIR_CLI_CFLAGS): Remove.
2450         (SFILES): Use SUBDIR_CLI_SRCS.
2451         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2452
2453 2018-07-17  Tom Tromey  <tom@tromey.com>
2454
2455         PR gdb/18624:
2456         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2457
2458 2018-07-16  Jim Wilson  <jimw@sifive.com>
2459
2460         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2461
2462 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2463
2464         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2465         variable.
2466         (libunwind_frame_sniffer): Likewise.
2467         (libunwind_frame_prev_register): Likewise.
2468         (libunwind_sigtramp_frame_sniffer): Likewise.
2469         * ia64-tdep.c (ia64_access_reg): Likewise.
2470         (ia64_access_rse_reg): Likewise.
2471         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2472         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2473
2474 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2475
2476         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2477
2478 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2479
2480         * remote-sim.c (gdbsim_target::close,
2481         gdbsim_target::mourn_inferior): Remove unused variables.
2482
2483 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2484
2485         * ia64-tdep.c (ktab_buf): New global.
2486         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2487         (get_kernel_table): Adjust.
2488
2489 2018-07-16  Tom Tromey  <tom@tromey.com>
2490
2491         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2492         * dwarf2read.c (using_directives, new_symbol): Use
2493         outermost_context_p.
2494         * dbxread.c (process_one_symbol): Use outermost_context_p.
2495         * coffread.c (coff_symtab_read): Use outermost_context_p.
2496
2497 2018-07-16  Tom Tromey  <tom@tromey.com>
2498
2499         * dwarf2read.c (using_directives, read_func_scope)
2500         (read_lexical_block_scope): Update.
2501         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2502         * buildsym.h (local_using_directives, global_using_directives):
2503         Don't declare.
2504         (get_local_using_directives, set_local_using_directives)
2505         (get_global_using_directives): Declare.
2506         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2507         m_global_using_directives>: New members.
2508         (finish_block_internal, prepare_for_building)
2509         (reset_symtab_globals, end_symtab_get_static_block)
2510         (push_context): Update.
2511         (get_local_using_directives, set_local_using_directives)
2512         (get_global_using_directives): New functions.
2513         (buildsym_init): Update.
2514
2515 2018-07-16  Tom Tromey  <tom@tromey.com>
2516
2517         * xcoffread.c (xcoff_initial_scan): Don't call
2518         free_pending_blocks.
2519         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2520         * buildsym.h (class scoped_free_pendings): Add constructor.
2521         (free_pending_blocks): Don't declare.
2522         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2523         (free_pending_blocks): Now static.
2524
2525 2018-07-16  Tom Tromey  <tom@tromey.com>
2526
2527         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2528         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2529         member.
2530         (struct subfile_stack): Remove.
2531         (subfile_stack): Remove.
2532         (push_subfile, pop_subfile, buildsym_init): Update.
2533
2534 2018-07-16  Tom Tromey  <tom@tromey.com>
2535
2536         * buildsym.c (push_subfile): Use gdb_assert.
2537         (pop_subfile): Use gdb_assert.
2538
2539 2018-07-16  Tom Tromey  <tom@tromey.com>
2540
2541         * buildsym.h (merge_symbol_lists): Remove.
2542         * buildsym.c (merge_symbol_lists): Remove.
2543
2544 2018-07-16  Tom Tromey  <tom@tromey.com>
2545
2546         * stabsread.c (scan_file_globals): Update comment.
2547         * stabsread.h (scan_file_globals): Move from buildsym.h.
2548         * buildsym.h (scan_file_globals): Move to stabsread.h.
2549
2550 2018-07-16  Tom Tromey  <tom@tromey.com>
2551
2552         * xcoffread.c (xcoff_new_init): Update.
2553         * mipsread.c (mipscoff_new_init): Update.
2554         * mdebugread.c (mdebug_build_psymtabs): Update.
2555         * elfread.c (elf_new_init): Update.
2556         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2557         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2558         * buildsym.h (buildsym_new_init): Don't declare.
2559         * buildsym.c (buildsym_new_init): Remove.
2560
2561 2018-07-16  Tom Tromey  <tom@tromey.com>
2562
2563         * stabsread.h (within_function): Move from buildsym.h.
2564         * stabsread.c (start_stabs): Clear within_function.
2565         * coffread.c (coff_start_symtab): Clear within_function.
2566         * buildsym.h (within_function): Move to stabsread.h.
2567         * buildsym.c (prepare_for_building): Update.
2568
2569 2018-07-16  Tom Tromey  <tom@tromey.com>
2570
2571         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2572         * dwarf2read.c (dwarf2_start_symtab): Don't set
2573         processing_gcc_compilation.
2574         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2575
2576 2018-07-16  Tom Tromey  <tom@tromey.com>
2577
2578         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2579         (next_symbol_text_func): Move from buildsym.h.
2580         * stabsread.c (hashname): Move from buildsym.c.
2581         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2582         (next_symbol_text_func, hashname): Move to stabsread.h.
2583         * buildsym.c: Don't include bcache.h
2584         (hashname): Move to stasbread.c.
2585
2586 2018-07-16  Tom Tromey  <tom@tromey.com>
2587
2588         * buildsym.h (context_stack_size): Don't declare.
2589         * buildsym.c (context_stack_size): New global.
2590
2591 2018-07-16  Tom Tromey  <tom@tromey.com>
2592
2593         * dbxread.c (processing_acc_compilation): New global.
2594         * buildsym.h (processing_acc_compilation): Don't declare.
2595
2596 2018-07-16  Tom Tromey  <tom@tromey.com>
2597
2598         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2599         * dbxread.c (read_ofile_symtab): Update.
2600         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2601         * buildsym.h (last_source_start_addr): Remove.
2602         (set_last_source_start_addr, get_last_source_start_addr):
2603         Declare.
2604         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2605         parameter.
2606         (struct buildsym_compunit) <m_last_source_start_addr>: New
2607         member.
2608         (prepare_for_building): Remove start_addr parameter.
2609         (start_symtab, restart_symtab, end_symtab_get_static_block)
2610         (end_symtab_with_blockvector): Update.
2611         (set_last_source_start_addr, get_last_source_start_addr): New
2612         functions.
2613
2614 2018-07-16  Tom Tromey  <tom@tromey.com>
2615
2616         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2617         member.
2618         (have_line_numbers): Remove.
2619         (record_line, prepare_for_building, end_symtab_get_static_block)
2620         (augment_type_symtab): Update.
2621
2622 2018-07-16  Tom Tromey  <tom@tromey.com>
2623
2624         * buildsym.c (~buildsym_compunit): Free the macro table.
2625         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2626         methods.
2627         <m_pending_macros>: New member.
2628         (pending_macros): Remove.
2629         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2630         (reset_symtab_globals, end_symtab_get_static_block)
2631         (end_symtab_with_blockvector, augment_type_symtab)
2632         (buildsym_init): Update.
2633
2634 2018-07-16  Tom Tromey  <tom@tromey.com>
2635
2636         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2637         parameter.
2638         (buildsym_compunit::set_last_source_file): New method.
2639         <m_last_source_file>: New member.
2640         (prepare_for_building): Remove "name" parameter.
2641         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2642         (last_source_file): Remove.
2643         (set_last_source_file, get_last_source_file): Update.
2644
2645 2018-07-16  Tom Tromey  <tom@tromey.com>
2646
2647         * buildsym.c (prepare_for_building): Add assert.
2648
2649 2018-07-16  Tom Tromey  <tom@tromey.com>
2650
2651         * buildsym.c (~buildsym_compunit): Update.
2652         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2653         (start_subfile, patch_subfile_names)
2654         (end_symtab_with_blockvector): Update.
2655
2656 2018-07-16  Tom Tromey  <tom@tromey.com>
2657
2658         * buildsym.c (struct buildsym_compunit): Add constructor,
2659         destructor, initializers.
2660         (start_buildsym_compunit): Remove.
2661         (free_buildsym_compunit): Use "delete".
2662         (start_symtab, restart_symtab): Use "new".
2663
2664 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2665
2666         * symfile.c (set_objfile_default_section_offset): Remove struct
2667         keyword.
2668
2669 2018-07-14  Stafford Horne  <shorne@gmail.com>
2670
2671         * (Responsible Maintainers): Add myself as or1k maintainer.
2672
2673 2018-07-13  Tom Tromey  <tom@tromey.com>
2674
2675         * symfile.c (set_objfile_default_section_offset): Use extra braces
2676         around initializer.
2677
2678 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2679
2680         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2681         non-branching basr.
2682
2683 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2684
2685         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2686         unittests/cli-utils-selftests.c
2687         * unittests/cli-utils-selftests.c: New file.
2688
2689 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2690
2691         * NEWS: Mention new commands. Mention change to 'thread apply'.
2692
2693 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2694
2695         * thread.c (thr_try_catch_cmd): New function.
2696         (thread_apply_all_command): Handle qcs flags.
2697         (thread_apply_command): Handle qcs flags.
2698         (taas_command): New function.
2699         (tfaas_command): New function.
2700         (_initialize_thread): Update to setup the new commands 'taas
2701         and 'tfaas'. Change doc string for 'thread apply'.
2702
2703 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2704
2705         * stack.c: (trailing_outermost_frame): New function, mostly
2706         extracted from backtrace_command_1.
2707         (leading_innermost_frame): New function.
2708         (backtrace_command_1): Update to call trailing_outermost_frame.
2709         (frame_apply_command_count): New function.
2710         (frame_apply_level_command): New function.
2711         (frame_apply_all_command): New function.
2712         (frame_apply_command): New function.
2713         (faas_command): New function.
2714         (frame_cmd_list): New variable.
2715         (_initialize_stack): Update to setup the new commands 'frame apply'
2716         and 'faas'.
2717
2718 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2719
2720         * cli-utils.c (number_or_range_parser::get_number): Only handle
2721         numbers or convenience var as numbers.
2722         (parse_flags): New function.
2723         (parse_flags_qcs): New function.
2724         (number_or_range_parser::finished): Ensure parsing end is detected
2725         before end of string.
2726         * cli-utils.h (parse_flags): New function.
2727         (parse_flags_qcs): New function.
2728         (number_or_range_parser): Remove m_finished bool.
2729         (number_or_range_parser::skip_range): Set m_in_range to false.
2730
2731 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2732
2733         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2734         on Windows.
2735
2736 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2737             Jan Kratochvil  <jan.kratochvil@redhat.com>
2738             Paul Fertser  <fercerpav@gmail.com>
2739             Tsutomu Seki  <sekiriki@gmail.com>
2740             Pedro Alves  <palves@redhat.com>
2741
2742         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2743         'unittests/parse-connection-spec-selftests.c'.
2744         (COMMON_SFILES): Add 'common/netstuff.c'.
2745         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2746         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2747         * common/netstuff.c: New file.
2748         * common/netstuff.h: New file.
2749         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2750         (wait_for_connect): Update comment.  New parameter
2751         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2752         Use 'sock' directly instead of 'scb->fd'.
2753         (try_connect): New function, with code from 'net_open'.
2754         (net_open): Rewrite main loop to deal with multiple
2755         sockets/addresses.  Handle IPv6-style hostnames; implement
2756         support for IPv6 connections.
2757         * unittests/parse-connection-spec-selftests.c: New file.
2758
2759 2018-07-11  Pedro Alves  <palves@redhat.com>
2760
2761         PR gdb/23377
2762         * remote.c (remote_target::remote_detach_pid): Call
2763         set_current_process.
2764
2765 2018-07-11  Pedro Alves  <palves@redhat.com>
2766
2767         * h8300-tdep.c (h8300_gdbarch_init): Remove
2768         set_gdbarch_ecoff_reg_to_regnum calls.
2769
2770 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2771
2772         PR c++/23373
2773         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2774         offsets/sizes for static members of a class/struct.
2775
2776 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2777
2778         * target-descriptions.c (tdesc_register_bitsize): Rename.
2779         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2780         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2781         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2782
2783 2018-07-10  Tom Tromey  <tom@tromey.com>
2784
2785         * breakpoint.c (moribund_locations): Now static and a
2786         std::vector.
2787         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2788         (build_bpstat_chain, update_global_location_list)
2789         (breakpoint_retire_moribund): Update.
2790         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2791         VEC.
2792
2793 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2794
2795         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2796         (riscv_register_reggroup_p): Use new function, remove unneeded
2797         parenthesis.
2798         (riscv_push_dummy_call): Extend assert to compare against xlen or
2799         flen based on register type.
2800
2801 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2802
2803         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2804
2805 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2806
2807         * remote.c (show_hardware_watchpoint_limit): New function.
2808         (show_hardware_watchpoint_length_limit): New function.
2809         (show_hardware_breakpoint_limit): New function.
2810         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2811         where appropriate, update help text.
2812
2813 2018-07-09  Tom Tromey  <tom@tromey.com>
2814
2815         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2816         (CLIBS): Don't mention NAT_CLIBS.
2817
2818 2018-07-09  Tom Tromey  <tom@tromey.com>
2819
2820         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2821         (LIBGDB_OBS, clean mostlyclean): Update.
2822         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2823
2824 2018-07-09  Tom Tromey  <tom@tromey.com>
2825
2826         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2827         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2828         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2829
2830 2018-07-09  Tom Tromey  <tom@tromey.com>
2831
2832         * Makefile.in (ALLDEPFILES): Remove exec.c.
2833         (COMMON_OBS): Remove exec.o.
2834         (COMMON_SFILES): Add exec.c.
2835
2836 2018-07-09  Tom Tromey  <tom@tromey.com>
2837
2838         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2839
2840 2018-07-09  Tom Tromey  <tom@tromey.com>
2841
2842         * Makefile.in (clean mostlyclean): Remove stamp-version.
2843         (version.c): Depend on stamp-version.
2844         (stamp-version): New rule, from version.c rule.
2845
2846 2018-07-09  Tom Tromey  <tom@tromey.com>
2847
2848         * Makefile.in (init.c): Depend on stamp-init.
2849         (stamp-init): New rule, from init.c rule.
2850         (clean mostlyclean): Remove stamp-init.
2851
2852 2018-07-09  Tom Tromey  <tom@tromey.com>
2853
2854         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2855         SUBDIR_GCC_COMPILE_SRCS.
2856
2857 2018-07-09  Tom Tromey  <tom@tromey.com>
2858
2859         * Makefile.in (init.c): Remove some unused sed rules.
2860
2861 2018-07-09  Tom Tromey  <tom@tromey.com>
2862
2863         * Makefile.in (TSOBS): Remove.
2864         (INIT_FILES): Update.
2865         (LIBGDB_OBS): Update.
2866         (COMMON_SFILES): Add inflow.c.
2867         (SFILES): Remove inflow.c.
2868
2869 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2870
2871         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2872
2873 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
2874
2875         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2876         get_saveloc_name, is_signal_frame_name, step_name,
2877         init_remote_name, create_addr_space_name,
2878         destroy_addr_space_name, search_unwind_table_name,
2879         find_dyn_list_name): Constify.
2880
2881 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
2882
2883         * darwin-nat.c (darwin_pthread_kill): New function.
2884         (darwin_resume_thread): Use darwin_pthread_kill.
2885
2886 2018-07-05  Tom de Vries  <tdevries@suse.de>
2887
2888         * macroexp.c (macro_buffer) <operator=>: New member function.
2889
2890 2018-07-04  Tom Tromey  <tom@tromey.com>
2891
2892         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2893
2894 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
2895
2896         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2897         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2898         * maint.c: Likewise.
2899         * top.c: Likewise.
2900
2901 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2902
2903         * NEWS: Create a new section for the next release branch.
2904         Rename the section of the current branch, now that it has
2905         been cut.
2906
2907 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2908
2909         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2910         * version.in: Bump version to 8.2.50.DATE-git.
2911
2912 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
2913             Pedro Alves  <palves@redhat.com>
2914
2915         * linux-nat.c (linux_init_ptrace): Rename to ...
2916         (linux_init_ptrace_procfs): ... this.  Call
2917         linux_proc_init_warnings.
2918         (linux_nat_target::post_attach)
2919         (linux_nat_target::post_startup_inferior): Adjust.
2920         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2921         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2922
2923 2018-07-04  Tom de Vries  <tdevries@suse.de>
2924
2925         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2926         check ...
2927         (read_comp_unit_head): ... here.
2928
2929 2018-07-03  Tom Tromey  <tom@tromey.com>
2930
2931         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2932         (stop_tracing, tstatus_command)
2933         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2934         (print_one_static_tracepoint_marker): Update.
2935         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2936         std::vector.
2937         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
2938         VEC.
2939         (all_tracepoints, static_tracepoints_here): Return std::vector.
2940
2941 2018-07-03  Tom Tromey  <tom@tromey.com>
2942
2943         * common/ptid.c (ptid_equal): Remove.
2944         * common/ptid.h (ptid_equal): Don't declare.
2945         * ada-tasks.c: Update.
2946         * breakpoint.c: Update.
2947         * common/agent.c: Update.
2948         * corelow.c: Update.
2949         * darwin-nat-info.c: Update.
2950         * darwin-nat.c: Update.
2951         * dcache.c: Update.
2952         * dtrace-probe.c: Update.
2953         * dummy-frame.c: Update.
2954         * fbsd-nat.c: Update.
2955         * frame.c: Update.
2956         * gdbthread.h: Update.
2957         * gnu-nat.c: Update.
2958         * go32-nat.c: Update.
2959         * inf-loop.c: Update.
2960         * inf-ptrace.c: Update.
2961         * infcall.c: Update.
2962         * infcmd.c: Update.
2963         * inflow.c: Update.
2964         * infrun.c: Update.
2965         * linux-fork.c: Update.
2966         * linux-nat.c: Update.
2967         * linux-thread-db.c: Update.
2968         * mi/mi-cmd-var.c: Update.
2969         * mi/mi-interp.c: Update.
2970         * mi/mi-main.c: Update.
2971         * nto-procfs.c: Update.
2972         * ppc-linux-tdep.c: Update.
2973         * procfs.c: Update.
2974         * python/py-inferior.c: Update.
2975         * python/py-record-btrace.c: Update.
2976         * python/py-record.c: Update.
2977         * ravenscar-thread.c: Update.
2978         * regcache.c: Update.
2979         * remote-sim.c: Update.
2980         * remote.c: Update.
2981         * sol-thread.c: Update.
2982         * solib.c: Update.
2983         * target.c: Update.
2984         * tui/tui-stack.c: Update.
2985         * varobj.c: Update.
2986         * windows-nat.c: Update.
2987         * windows-tdep.c: Update.
2988
2989 2018-07-03  Tom Tromey  <tom@tromey.com>
2990
2991         * common/ptid.c (ptid_match): Remove.
2992         * common/ptid.h (ptid_match): Don't declare.
2993         * fbsd-nat.c: Update.
2994         * infcmd.c: Update.
2995         * infrun.c: Update.
2996         * linux-nat.c: Update.
2997         * record-btrace.c: Update.
2998         * regcache.c: Update.
2999         * remote.c: Update.
3000
3001 2018-07-03  Tom Tromey  <tom@tromey.com>
3002
3003         * common/ptid.c (ptid_tid_p): Remove.
3004         * common/ptid.h (ptid_tid_p): Don't declare.
3005         * sol-thread.c: Update.
3006
3007 2018-07-03  Tom Tromey  <tom@tromey.com>
3008
3009         * common/ptid.c (ptid_lwp_p): Remove.
3010         * common/ptid.h (ptid_lwp_p): Don't declare.
3011         * fbsd-nat.c: Update.
3012         * linux-nat.c: Update.
3013         * nat/linux-procfs.c: Update.
3014         * nat/x86-linux-dregs.c: Update.
3015         * sol-thread.c: Update.
3016
3017 2018-07-03  Tom Tromey  <tom@tromey.com>
3018
3019         * common/ptid.c (ptid_is_pid): Remove.
3020         * common/ptid.h (ptid_is_pid): Don't declare.
3021         * infrun.c: Update.
3022         * linux-nat.c: Update.
3023         * mi/mi-interp.c: Update.
3024         * remote.c: Update.
3025         * thread.c: Update.
3026
3027 2018-07-03  Tom Tromey  <tom@tromey.com>
3028
3029         * common/ptid.c (ptid_get_tid): Remove.
3030         * common/ptid.h (ptid_get_tid): Don't declare.
3031         * ada-tasks.c: Update.
3032         * aix-thread.c: Update.
3033         * bsd-uthread.c: Update.
3034         * darwin-nat.c: Update.
3035         * fbsd-nat.c: Update.
3036         * i386-darwin-nat.c: Update.
3037         * infrun.c: Update.
3038         * linux-tdep.c: Update.
3039         * nto-procfs.c: Update.
3040         * ppc-ravenscar-thread.c: Update.
3041         * python/py-infthread.c: Update.
3042         * ravenscar-thread.c: Update.
3043         * sol-thread.c: Update.
3044         * sparc-ravenscar-thread.c: Update.
3045         * windows-nat.c: Update.
3046
3047 2018-07-03  Tom Tromey  <tom@tromey.com>
3048
3049         * common/ptid.c (ptid_get_lwp): Remove.
3050         * common/ptid.h (ptid_get_lwp): Don't declare.
3051         * aarch64-linux-nat.c: Update.
3052         * ada-tasks.c: Update.
3053         * aix-thread.c: Update.
3054         * amd64-linux-nat.c: Update.
3055         * arm-linux-nat.c: Update.
3056         * corelow.c: Update.
3057         * fbsd-nat.c: Update.
3058         * fbsd-tdep.c: Update.
3059         * gnu-nat.c: Update.
3060         * i386-cygwin-tdep.c: Update.
3061         * i386-gnu-nat.c: Update.
3062         * i386-linux-nat.c: Update.
3063         * ia64-linux-nat.c: Update.
3064         * inf-ptrace.c: Update.
3065         * infrun.c: Update.
3066         * linux-fork.c: Update.
3067         * linux-nat.c: Update.
3068         * linux-tdep.c: Update.
3069         * linux-thread-db.c: Update.
3070         * mips-linux-nat.c: Update.
3071         * nat/aarch64-linux-hw-point.c: Update.
3072         * nat/aarch64-linux.c: Update.
3073         * nat/linux-btrace.c: Update.
3074         * nat/linux-osdata.c: Update.
3075         * nat/linux-procfs.c: Update.
3076         * nat/x86-linux-dregs.c: Update.
3077         * obsd-nat.c: Update.
3078         * ppc-fbsd-nat.c: Update.
3079         * ppc-linux-nat.c: Update.
3080         * procfs.c: Update.
3081         * python/py-infthread.c: Update.
3082         * ravenscar-thread.c: Update.
3083         * remote.c: Update.
3084         * s390-linux-nat.c: Update.
3085         * sol-thread.c: Update.
3086         * sol2-tdep.c: Update.
3087         * spu-linux-nat.c: Update.
3088         * x86-linux-nat.c: Update.
3089         * xtensa-linux-nat.c: Update.
3090
3091 2018-07-03  Tom Tromey  <tom@tromey.com>
3092
3093         * common/ptid.c (ptid_get_pid): Remove.
3094         * common/ptid.h (ptid_get_pid): Don't declare.
3095         * aarch64-linux-nat.c: Update.
3096         * ada-lang.c: Update.
3097         * aix-thread.c: Update.
3098         * alpha-bsd-nat.c: Update.
3099         * amd64-fbsd-nat.c: Update.
3100         * amd64-linux-nat.c: Update.
3101         * arm-linux-nat.c: Update.
3102         * arm-nbsd-nat.c: Update.
3103         * auxv.c: Update.
3104         * break-catch-syscall.c: Update.
3105         * breakpoint.c: Update.
3106         * bsd-uthread.c: Update.
3107         * corelow.c: Update.
3108         * ctf.c: Update.
3109         * darwin-nat.c: Update.
3110         * fbsd-nat.c: Update.
3111         * fbsd-tdep.c: Update.
3112         * gcore.c: Update.
3113         * gnu-nat.c: Update.
3114         * hppa-nbsd-nat.c: Update.
3115         * hppa-obsd-nat.c: Update.
3116         * i386-fbsd-nat.c: Update.
3117         * ia64-linux-nat.c: Update.
3118         * inf-ptrace.c: Update.
3119         * infcmd.c: Update.
3120         * inferior.c: Update.
3121         * inferior.h: Update.
3122         * inflow.c: Update.
3123         * infrun.c: Update.
3124         * linux-fork.c: Update.
3125         * linux-nat.c: Update.
3126         * linux-tdep.c: Update.
3127         * linux-thread-db.c: Update.
3128         * m68k-bsd-nat.c: Update.
3129         * mi/mi-interp.c: Update.
3130         * mi/mi-main.c: Update.
3131         * mips-linux-nat.c: Update.
3132         * mips-nbsd-nat.c: Update.
3133         * mips64-obsd-nat.c: Update.
3134         * nat/aarch64-linux-hw-point.c: Update.
3135         * nat/aarch64-linux.c: Update.
3136         * nat/linux-btrace.c: Update.
3137         * nat/linux-osdata.c: Update.
3138         * nat/linux-procfs.c: Update.
3139         * nat/x86-linux-dregs.c: Update.
3140         * nto-procfs.c: Update.
3141         * obsd-nat.c: Update.
3142         * ppc-linux-nat.c: Update.
3143         * ppc-nbsd-nat.c: Update.
3144         * ppc-obsd-nat.c: Update.
3145         * proc-service.c: Update.
3146         * procfs.c: Update.
3147         * python/py-inferior.c: Update.
3148         * python/py-infthread.c: Update.
3149         * ravenscar-thread.c: Update.
3150         * record.c: Update.
3151         * remote-sim.c: Update.
3152         * remote.c: Update.
3153         * rs6000-nat.c: Update.
3154         * s390-linux-nat.c: Update.
3155         * sh-nbsd-nat.c: Update.
3156         * sol-thread.c: Update.
3157         * sparc-nat.c: Update.
3158         * sparc64-tdep.c: Update.
3159         * spu-linux-nat.c: Update.
3160         * spu-tdep.c: Update.
3161         * target-debug.h: Update.
3162         * target.c: Update.
3163         * thread.c: Update.
3164         * tid-parse.c: Update.
3165         * tracefile-tfile.c: Update.
3166         * vax-bsd-nat.c: Update.
3167         * windows-nat.c: Update.
3168         * x86-linux-nat.c: Update.
3169         * x86-nat.c: Update.
3170
3171 2018-07-03  Tom Tromey  <tom@tromey.com>
3172
3173         * common/ptid.c (pid_to_ptid): Remove.
3174         * common/ptid.h (pid_to_ptid): Don't declare.
3175         * aix-thread.c: Update.
3176         * arm-linux-nat.c: Update.
3177         * common/ptid.c: Update.
3178         * common/ptid.h: Update.
3179         * corelow.c: Update.
3180         * ctf.c: Update.
3181         * darwin-nat.c: Update.
3182         * fbsd-nat.c: Update.
3183         * fork-child.c: Update.
3184         * gnu-nat.c: Update.
3185         * go32-nat.c: Update.
3186         * inf-ptrace.c: Update.
3187         * infcmd.c: Update.
3188         * inferior.c: Update.
3189         * infrun.c: Update.
3190         * linux-fork.c: Update.
3191         * linux-nat.c: Update.
3192         * nat/aarch64-linux-hw-point.c: Update.
3193         * nat/fork-inferior.c: Update.
3194         * nat/x86-linux-dregs.c: Update.
3195         * nto-procfs.c: Update.
3196         * obsd-nat.c: Update.
3197         * procfs.c: Update.
3198         * progspace.c: Update.
3199         * remote.c: Update.
3200         * rs6000-nat.c: Update.
3201         * s390-linux-nat.c: Update.
3202         * sol-thread.c: Update.
3203         * spu-linux-nat.c: Update.
3204         * target.c: Update.
3205         * top.c: Update.
3206         * tracefile-tfile.c: Update.
3207         * windows-nat.c: Update.
3208
3209 2018-07-03  Tom Tromey  <tom@tromey.com>
3210
3211         * common/ptid.h (ptid_build): Don't declare.
3212         * common/ptid.c (ptid_build): Remove.
3213         * aix-thread.c: Update.
3214         * bsd-kvm.c: Update.
3215         * bsd-uthread.c: Update.
3216         * common/agent.c: Update.
3217         * common/ptid.c: Update.
3218         * common/ptid.h: Update.
3219         * corelow.c: Update.
3220         * darwin-nat.c: Update.
3221         * fbsd-nat.c: Update.
3222         * gnu-nat.c: Update.
3223         * linux-fork.c: Update.
3224         * linux-nat.c: Update.
3225         * linux-thread-db.c: Update.
3226         * nat/linux-osdata.c: Update.
3227         * nat/linux-procfs.c: Update.
3228         * nto-procfs.c: Update.
3229         * obsd-nat.c: Update.
3230         * proc-service.c: Update.
3231         * procfs.c: Update.
3232         * ravenscar-thread.c: Update.
3233         * remote-sim.c: Update.
3234         * remote.c: Update.
3235         * sol-thread.c: Update.
3236         * target.c: Update.
3237         * windows-nat.c: Update.
3238
3239 2018-07-03  Tom Tromey  <tom@tromey.com>
3240
3241         * infrun.c (follow_exec): Use exit_inferior_silent.
3242         * inferior.c (exit_inferior_num_silent): Remove.
3243         * inferior.h (exit_inferior_num_silent): Don't declare.
3244
3245 2018-07-03  Tom Tromey  <tom@tromey.com>
3246
3247         PR cli/23340:
3248         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3249         inferior_ptid on error.
3250
3251 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3252             Simon Marchi  <simon.marchi@polymtl.ca>
3253
3254         PR tdep/8282
3255         * disasm.h (gdb_disassembler): Add
3256         `m_disassembler_options_holder'. member
3257         * disasm.c (get_all_disassembler_options): New function.
3258         (gdb_disassembler::gdb_disassembler): Use it.
3259         (gdb_buffered_insn_length_init_dis): Likewise.
3260         (gdb_buffered_insn_length): Adjust accordingly.
3261         (set_disassembler_options): Handle options with arguments.
3262         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3263         line if showing options with descriptions.
3264         (disassembler_options_completer): Adapt to using the
3265         `disasm_options_and_args_t' structure.
3266         * mips-tdep.c (mips_disassembler_options): New variable.
3267         (mips_disassembler_options_o32): Likewise.
3268         (mips_disassembler_options_n32): Likewise.
3269         (mips_disassembler_options_n64): Likewise.
3270         (gdb_print_insn_mips): Don't set `disassembler_options'.
3271         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3272         functions.
3273         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3274         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3275         `gdbarch_disassembler_options_implicit' and
3276         `gdbarch_valid_disassembler_options'.
3277         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3278         `disasm_options_and_args_t' structure.
3279         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3280         method.
3281         (valid_disassembler_options): Switch from `disasm_options_t' to
3282         the `disasm_options_and_args_t' structure.
3283         * NEWS: Document `set disassembler-options' support for the MIPS
3284         target.
3285         * gdbarch.h: Regenerate.
3286         * gdbarch.c: Regenerate.
3287
3288 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3289
3290         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3291
3292 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3293
3294         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3295         parameter in call to amd64_target_description.
3296         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3297         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3298         (amd64fbsd_init_abi): Likewise.
3299         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3300         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3301         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3302         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3303
3304 2018-06-29  Pedro Alves  <palves@redhat.com>
3305
3306         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3307         "segments" parameter.
3308         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3309         (_initialize_amd64_tdep): Update call to
3310         amd64_create_target_description.
3311         (amd64_target_description): Add "segments" parameter.  Adjust
3312         the implementation to use it.
3313         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3314         call to amd64_create_target_description.
3315         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3316         * gdb/arch/amd64.h (amd64_create_target_description): Add
3317         "segments" register.
3318         * gdb/arch/amd64.c (amd64_create_target_description): Add
3319         "segments" parameter.  Call create_feature_i386_64bit_segments
3320         only if SEGMENTS is true.
3321         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3322         call to amd64_create_target_description.
3323
3324 2018-06-29  Pedro Alves  <palves@redhat.com>
3325
3326         * thread.c (thread_target_id_str): New, factored out from ...
3327         (print_thread_info_1): ... here.  Use it to compute the max
3328         "Target Id" column width.
3329
3330 2018-06-29  Pedro Alves  <palves@redhat.com>
3331
3332         * remote.c (remote_target::extra_thread_info): Delete
3333         'display_buf' and 'n' locals.  from the cache, regardless of
3334         packet mechanims is in use.  Use cache for qThreadExtra and qP
3335         methods too.
3336
3337 2018-06-29  Pedro Alves  <palves@redhat.com>
3338
3339         * blockframe.c (find_pc_sect_containing_function): New function.
3340         * breakpoint.c (print_breakpoint_location): Don't call
3341         find_pc_sect_function.
3342         * linespec.c (create_sals_line_offset): Record the location's
3343         symbol in the sal.
3344         * linespec.c (convert_address_location_to_sals): Fill in sal's
3345         symbol with find_pc_sect_containing_function.
3346         * symtab.c (find_function_start_sal): Rename to ...
3347         (find_function_start_sal_1): ... this.
3348         (find_function_start_sal): Reimplement as wrapper around
3349         find_function_start_sal_1, and use
3350         find_pc_sect_containing_function to fill in the sal's symbol.
3351         (find_function_start_sal(symbol*, bool)): Adjust.
3352         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3353         comments.
3354         (find_pc_sect_containing_function): Declare.
3355
3356 2018-06-29  Pedro Alves  <palves@redhat.com>
3357
3358         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3359         true if the the location has no symbol.
3360
3361 2018-06-28  Tom Tromey  <tom@tromey.com>
3362
3363         * NEWS: Mention --enable-codesign.
3364         * silent-rules.mk (ECHO_SIGN): New variable.
3365         * configure.ac: Add --enable-codesign.
3366         * configure: Rebuild.
3367         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3368         (gdb$(EXEEXT)): Optionally invoke codesign.
3369
3370 2018-06-28  Pedro Alves  <palves@redhat.com>
3371
3372         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3373         comments.
3374         (switch_to_thread_no_regs): Adjust comment.
3375         * infcmd.c (stop_pc): Delete.
3376         (post_create_inferior, info_program_command): Replace references
3377         to stop_pc with references to thread_info->suspend.stop_pc.
3378         * inferior.h (stop_pc): Delete declaration.
3379         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3380         (handle_inferior_event_1, handle_signal_stop)
3381         (process_event_stop_test, keep_going_stepped_thread)
3382         (handle_step_into_function, handle_step_into_function_backward)
3383         (print_stop_location): Replace references to stop_pc with
3384         references to thread_info->suspend.stop_pc.
3385         (struct infcall_suspend_state) <stop_pc>: Delete field.
3386         (save_infcall_suspend_state, restore_infcall_suspend_state):
3387         Remove references to inf_stat->stop_pc.
3388         * linux-fork.c (fork_load_infrun_state): Likewise.
3389         * record-btrace.c (record_btrace_set_replay): Likewise.
3390         * record-full.c (record_full_goto_entry): Likewise.
3391         * remote.c (print_one_stopped_thread): Likewise.
3392         * target.c (target_resume): Extend comment.
3393         * thread.c (set_executing_thread): New.
3394         (set_executing): Use it.
3395         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3396         Remove references to stop_pc.
3397
3398 2018-06-28  Pedro Alves  <palves@redhat.com>
3399
3400         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3401         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3402
3403 2018-06-28  Tom Tromey  <tom@tromey.com>
3404
3405         * coffread.c (coff_symfile_finish): Update.
3406         * xcoffread.c (xcoff_symfile_finish): Update.
3407         * elfread.c (elf_symfile_finish): Update.
3408         * symfile.h (dwarf2_free_objfile): Don't declare.
3409         * dwarf2read.c (_initialize_dwarf2_read): Use
3410         register_objfile_data_with_cleanup.
3411         (dwarf2_free_objfile): Now static.  Change signature.
3412
3413 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3414
3415         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3416         option "-o" to add-symbol-file-load to add an offset to each
3417         section's load address.
3418         * symfile.c (set_objfile_default_section_offset): New function.
3419
3420 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3421
3422         * symfile.c (add_symbol_file_command): Make sure that sections
3423         with the same name are sorted in the same order.
3424
3425 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3426
3427         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3428         require the second argument.  If omitted, load sections at the
3429         addresses specified in the file.
3430
3431 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3432
3433         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3434         (_initialize_symfile): Add option "-o" to symbol-file to add an
3435         offset to each section of the symbol file.
3436
3437 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3438
3439         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3440
3441 2018-06-27  Tom Tromey  <tom@tromey.com>
3442
3443         * stack.c (_initialize_stack): Update "func" help text.
3444
3445 2018-06-27  Tom Tromey  <tom@tromey.com>
3446
3447         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3448         std::vector.
3449         (unwind_infopy_str, pyuw_create_unwind_info)
3450         (unwind_infopy_add_saved_register, pyuw_sniffer)
3451         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3452         Update.
3453         (struct saved_reg): Add constructor.
3454         <value>: Now a gdbpy_ref<>.
3455
3456 2018-06-27  Tom Tromey  <tom@tromey.com>
3457
3458         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3459
3460 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3461
3462         * gdb-gdb.py.in: Format using autopep8.
3463
3464 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3465
3466         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3467         (type_lookup_function): Recognize CORE_ADDR values.
3468
3469 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3470
3471         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3472         print tag_name.
3473
3474 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3475
3476         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3477         <__lt__>: Add.
3478
3479 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3480
3481         * gdb-gdb.py: Move to...
3482         * gdb-gdb.py.in: ... here.
3483         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3484         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3485         dependencies.
3486         (distclean): Remove gdb-gdb.py when cleaning.
3487         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3488         * configure: Re-generate.
3489
3490 2018-06-27  Pedro Alves  <palves@redhat.com>
3491
3492         * proc-service.c (get_ps_regcache): New.
3493         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3494         (ps_lsetfpregs): Use it.
3495
3496 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3497
3498         PR gdb/21695
3499         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3500         (dwarf_decode_lines_1): Adjust.
3501
3502 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3503
3504         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3505         override.
3506         <info_proc>: Likewise.
3507
3508 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3509
3510         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3511         to windows_fetch_one_register, and only handle the case of
3512         fetching one register.  Move the code that reloads the context
3513         and iterates over all registers if R is negative to...
3514         (windows_nat_target::fetch_registers): ... here.
3515         (do_windows_store_inferior_registers): Rename to
3516         windows_store_one_register, and only handle the case of storing
3517         one register.  Move the code that handles the case where r is
3518         negative to...
3519         (windows_nat_target::store_registers) ... here.
3520
3521 2018-06-26  Tom Tromey  <tom@tromey.com>
3522
3523         PR rust/22574:
3524         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3525         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3526         Update.
3527         (rust_internal_print_type): Add podata parameter.
3528         (rust_print_type): Update.
3529
3530 2018-06-26  Tom Tromey  <tom@tromey.com>
3531
3532         * typeprint.h (struct print_offset_data) <update, finish,
3533         maybe_print_hole>: New methods.
3534         <indentation>: New constant.
3535         * typeprint.c (print_offset_data::indentation): Define.
3536         (print_offset_data::maybe_print_hole, print_offset_data::update)
3537         (print_offset_data::finish): Move from c-typeprint.c and rename.
3538         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3539         (print_spaces_filtered_with_print_options): Update.
3540         (c_print_type_union_field_offset, maybe_print_hole)
3541         (c_print_type_struct_field_offset): Move to typeprint.c and
3542         rename.
3543         (c_type_print_base_struct_union): Update.
3544
3545 2018-06-25  Pedro Alves  <palves@redhat.com>
3546
3547         * gdbthread.h (thread_info_ref, delete_thread)
3548         (delete_thread_silent, first_thread_of_inferior)
3549         (any_thread_of_inferior, switch_to_thread)
3550         (enable_thread_stack_temporaries)
3551         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3552         (get_last_thread_stack_temporary)
3553         (value_in_thread_stack_temporaries, can_access_registers_thread):
3554         Spell out "struct thread_info" instead of just "thread_info".
3555         * inferior.h (notice_new_inferior): Likewise.
3556
3557 2018-06-25  Pedro Alves  <palves@redhat.com>
3558
3559         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3560         pass thread_info pointer to delete_thread.
3561         (windows_nat_target::detach): Pass inferior pointer to
3562         detach_inferior.
3563         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3564         delete_thread.
3565         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3566         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3567         and pass a thread_info pointer to delete_thread.
3568         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3569         pass thread_info pointer to delete_thread.
3570         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3571         delete_thread_silent call.
3572         * procfs.c (procfs_target::detach): Pass inferior pointer to
3573         detach_inferior.
3574         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3575         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3576         delete_thread_silent call.
3577         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3578         pass thread_info pointer to delete_thread.
3579         (windows_nat_target::detach): Pass inferior pointer to
3580         delete_inferior.
3581
3582 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3583
3584         * regcache.c (readable_regcache::read_part): Fix asserts.
3585         (reg_buffer::raw_collect_part): New function.
3586         (regcache::write_part): Fix asserts.
3587         (reg_buffer::raw_supply_part): New function.
3588         (regcache::transfer_regset_register): New helper function.
3589         (regcache::transfer_regset): Call new functions.
3590         (regcache_supply_regset): Use gdb_byte*.
3591         (regcache::supply_regset): Likewise.
3592         (regcache_collect_regset): Likewise.
3593         (regcache::collect_regset): Likewise.
3594         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3595         (reg_buffer::raw_supply_part): Likewise.
3596         (regcache::transfer_regset_register): Likewise.
3597         (regcache::transfer_regset): Use gdb_byte*.
3598
3599 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3600
3601         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3602
3603 2018-06-21  Pedro Alves  <palves@redhat.com>
3604
3605         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3606         instead of a ptid_t.  All callers adjusted.
3607         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3608         adjusted.
3609         (print_ada_task_info, display_current_task_id, task_command_1):
3610         Adjust.
3611         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3612         inferior_thread.
3613         (breakpoint_kind): Adjust.
3614         (remove_breakpoints_pid): Rename to ...
3615         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3616         pointer.  All callers adjusted.
3617         (bpstat_clear_actions): Use inferior_thread.
3618         (get_bpstat_thread): New.
3619         (bpstat_do_actions): Use it.
3620         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3621         to take a thread_info pointer.  All callers adjusted.
3622         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3623         (breakpoint_re_set_thread): Use inferior_thread.
3624         * breakpoint.h (struct inferior): Forward declare.
3625         (bpstat_stop_status): Update.
3626         (remove_breakpoints_pid): Delete.
3627         (remove_breakpoints_inf): New.
3628         * bsd-uthread.c (bsd_uthread_target::wait)
3629         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3630         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3631         (maint_btrace_packet_history_cmd)
3632         (maint_btrace_clear_packet_history_cmd): Adjust.
3633         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3634         inferior_thread.
3635         * cli/cli-interp.c: Include "inferior.h".
3636         * common/refcounted-object.h (struct
3637         refcounted_object_ref_policy): New.
3638         * compile/compile-object-load.c: Include gdbthread.h.
3639         (store_regs): Use inferior_thread.
3640         * corelow.c (core_target::close): Use current_inferior.
3641         (core_target_open): Adjust to use first_thread_of_inferior and use
3642         the current inferior.
3643         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3644         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3645         <thread>: ... this new field.  All references adjusted.
3646         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3647         Take a thread_info pointer instead of a ptid_t.
3648         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3649         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3650         thread_info pointer instead of a ptid_t.
3651         * elfread.c: Include "inferior.h".
3652         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3653         Use inferior_thread.
3654         * eval.c (evaluate_subexp): Likewise.
3655         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3656         inferior_thread.
3657         * gdb_proc_service.h (struct thread_info): Forward declare.
3658         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3659         <thread>: ... this new field.  All references adjusted.
3660         * gdbarch.h, gdbarch.c: Regenerate.
3661         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3662         'thread' parameter.  All implementations and callers adjusted.
3663         * gdbthread.h (thread_info) <set_running>: New method.
3664         (delete_thread, delete_thread_silent): Take a thread_info pointer
3665         instead of a ptid.
3666         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3667         (first_thread_of_process): Delete, replaced by ...
3668         (first_thread_of_inferior): ... this new function.  All callers
3669         adjusted.
3670         (any_live_thread_of_process): Delete, replaced by ...
3671         (any_live_thread_of_inferior): ... this new function.  All callers
3672         adjusted.
3673         (switch_to_thread, switch_to_no_thread): Declare.
3674         (is_executing): Delete.
3675         (enable_thread_stack_temporaries): Update comment.
3676         <enable_thread_stack_temporaries>: Take a thread_info pointer
3677         instead of a ptid_t.  Incref the thread.
3678         <~enable_thread_stack_temporaries>: Decref the thread.
3679         <m_ptid>: Delete
3680         <m_thr>: New.
3681         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3682         (get_last_thread_stack_temporary)
3683         (value_in_thread_stack_temporaries, can_access_registers_thread):
3684         Take a thread_info pointer instead of a ptid_t.  All callers
3685         adjusted.
3686         * infcall.c (get_call_return_value): Use inferior_thread.
3687         (run_inferior_call): Work with thread pointers instead of ptid_t.
3688         (call_function_by_hand_dummy): Work with thread pointers instead
3689         of ptid_t.  Use thread_info_ref.
3690         * infcmd.c (proceed_thread_callback): Access thread's state
3691         directly.
3692         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3693         access thread's state directly.
3694         (continue_command): Use inferior_thread.
3695         (info_program_command): Use find_thread_ptid and access thread
3696         state directly.
3697         (proceed_after_attach_callback): Use thread state directly.
3698         (notice_new_inferior): Take a thread_info pointer instead of a
3699         ptid_t.  All callers adjusted.
3700         (exit_inferior): Take an inferior pointer instead of a pid.  All
3701         callers adjusted.
3702         (exit_inferior_silent): New.
3703         (detach_inferior): Delete.
3704         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3705         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3706         (detach_inferior_command, kill_inferior_command): Use
3707         find_inferior_id instead of valid_gdb_inferior_id and
3708         gdb_inferior_id_to_pid.
3709         (inferior_command): Use inferior and thread pointers.
3710         * inferior.h (struct thread_info): Forward declare.
3711         (notice_new_inferior): Take a thread_info pointer instead of a
3712         ptid_t.  All callers adjusted.
3713         (detach_inferior): Delete declaration.
3714         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3715         instead of a pid.  All callers adjusted.
3716         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3717         (valid_gdb_inferior_id): Delete.
3718         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3719         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3720         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3721         ...
3722         <inf>: ... this new field.
3723         <step_ptid>: Delete, replaced by ...
3724         <step_thread>: ... this new field.
3725         (get_displaced_stepping_state): Take an inferior pointer instead
3726         of a pid.  All callers adjusted.
3727         (displaced_step_in_progress_any_inferior): Adjust.
3728         (displaced_step_in_progress_thread): Take a thread pointer instead
3729         of a ptid_t.  All callers adjusted.
3730         (displaced_step_in_progress, add_displaced_stepping_state): Take
3731         an inferior pointer instead of a pid.  All callers adjusted.
3732         (get_displaced_step_closure_by_addr): Adjust.
3733         (remove_displaced_stepping_state): Take an inferior pointer
3734         instead of a pid.  All callers adjusted.
3735         (displaced_step_prepare_throw, displaced_step_prepare)
3736         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3737         All callers adjusted.
3738         (start_step_over): Adjust.
3739         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3740         displaced step queue.
3741         (do_target_resume): Adjust.
3742         (fetch_inferior_event): Use inferior_thread.
3743         (context_switch, get_inferior_stop_soon): Take an
3744         execution_control_state pointer instead of a ptid_t.  All callers
3745         adjusted.
3746         (switch_to_thread_cleanup): Delete.
3747         (stop_all_threads): Use scoped_restore_current_thread.
3748         * inline-frame.c: Include "gdbthread.h".
3749         (inline_state) <inline_state>: Take a thread pointer instead of a
3750         ptid_t.  All callers adjusted.
3751         <ptid>: Delete, replaced by ...
3752         <thread>: ... this new field.
3753         (find_inline_frame_state): Take a thread pointer instead of a
3754         ptid_t.  All callers adjusted.
3755         (skip_inline_frames, step_into_inline_frame)
3756         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3757         pointer instead of a ptid_t.  All callers adjusted.
3758         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3759         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3760         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3761         pointers directly.
3762         * linux-nat.c (get_detach_signal): Likewise.
3763         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3764         (thread_db_notice_clone): Adjust.
3765         (thread_db_find_new_threads_silently)
3766         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3767         a thread pointer instead of a ptid_t.  All callers adjusted.
3768         * mi/mi-cmd-var.c: Include "inferior.h".
3769         (mi_cmd_var_update_iter): Update to use thread pointers.
3770         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3771         inferior directly.
3772         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3773         out to ...
3774         (mi_output_running): ... this new function.
3775         (mi_on_resume_1): Adjust to use it.
3776         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3777         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3778         directly.
3779         (interrupt_thread_callback): : Adjust to use thread and inferior
3780         pointers.
3781         * proc-service.c: Include "gdbthread.h".
3782         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3783         * progspace-and-thread.c: Include "inferior.h".
3784         * progspace.c: Include "inferior.h".
3785         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3786         hold a reference to an inferior_object.
3787         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3788         inferior_thread.
3789         * python/py-inferior.c (struct inferior_object): Give the type a
3790         tag name instead of a typedef.
3791         (python_on_normal_stop): No need to check if the current thread is
3792         listed.
3793         (inferior_to_inferior_object): Change return type to
3794         inferior_object.  All callers adjusted.
3795         (find_thread_object): Delete, bits factored out to ...
3796         (thread_to_thread_object): ... this new function.
3797         * python/py-infthread.c (create_thread_object): Use
3798         inferior_to_inferior_object.
3799         (thpy_is_stopped): Use thread pointer directly.
3800         (gdbpy_selected_thread): Use inferior_thread.
3801         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3802         field, replaced with ...
3803         <thread>: ... this new field.  All users adjusted.
3804         (btpy_insn_or_gap_new): Drop const.
3805         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3806         callers adjusted.
3807         * python/py-record.c: Include "gdbthread.h".
3808         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3809         a ptid_t.  All callers adjusted.
3810         (gdbpy_current_recording): Use inferior_thread.
3811         * python/py-record.h (recpy_record_object) <ptid>: Delete
3812         field, replaced with ...
3813         <thread>: ... this new field.  All users adjusted.
3814         (recpy_element_object) <ptid>: Delete
3815         field, replaced with ...
3816         <thread>: ... this new field.  All users adjusted.
3817         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3818         a ptid_t.  All callers adjusted.
3819         * python/py-threadevent.c: Include "gdbthread.h".
3820         (get_event_thread): Use thread_to_thread_object.
3821         * python/python-internal.h (struct inferior_object): Forward
3822         declare.
3823         (find_thread_object, find_inferior_object): Delete declarations.
3824         (thread_to_thread_object, inferior_to_inferior_object): New
3825         declarations.
3826         * record-btrace.c: Include "inferior.h".
3827         (require_btrace_thread): Use inferior_thread.
3828         (record_btrace_frame_sniffer)
3829         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3830         (get_thread_current_frame): Use scoped_restore_current_thread and
3831         switch_to_thread.
3832         (get_thread_current_frame): Use thread pointer directly.
3833         (record_btrace_replay_at_breakpoint): Use thread's inferior
3834         pointer directly.
3835         * record-full.c: Include "inferior.h".
3836         * regcache.c: Include "gdbthread.h".
3837         (get_thread_arch_regcache): Use the inferior's address space
3838         directly.
3839         (get_thread_regcache, registers_changed_thread): New.
3840         * regcache.h (get_thread_regcache(thread_info *thread)): New
3841         overload.
3842         (registers_changed_thread): New.
3843         (remote_target) <remote_detach_1>: Swap order of parameters.
3844         (remote_add_thread): <remote_add_thread>: Return the new thread.
3845         (get_remote_thread_info(ptid_t)): New overload.
3846         (remote_target::remote_notice_new_inferior): Use thread pointers
3847         directly.
3848         (remote_target::process_initial_stop_replies): Use
3849         thread_info::set_running.
3850         (remote_target::remote_detach_1, remote_target::detach)
3851         (extended_remote_target::detach): Adjust.
3852         * stack.c (frame_show_address): Use inferior_thread.
3853         * target-debug.h (target_debug_print_thread_info_pp): New.
3854         * target-delegates.c: Regenerate.
3855         * target.c (default_thread_address_space): Delete.
3856         (memory_xfer_partial_1): Use current_inferior.
3857         (target_detach): Use current_inferior.
3858         (target_thread_address_space): Delete.
3859         (generic_mourn_inferior): Use current_inferior.
3860         * target.h (struct target_ops) <thread_address_space>: Delete.
3861         (target_thread_address_space): Delete.
3862         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
3863         pointers directly.
3864         (delete_thread_1, delete_thread, delete_thread_silent): Take a
3865         thread pointer instead of a ptid_t.  Adjust all callers.
3866         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3867         (first_thread_of_process): Delete, replaced by ...
3868         (first_thread_of_inferior): ... this new function.  All callers
3869         adjusted.
3870         (any_thread_of_process): Rename to ...
3871         (any_thread_of_inferior): ... this, and take an inferior pointer.
3872         (any_live_thread_of_process): Rename to ...
3873         (any_live_thread_of_inferior): ... this, and take an inferior
3874         pointer.
3875         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3876         (value_in_thread_stack_temporaries)
3877         (get_last_thread_stack_temporary): Take a thread pointer instead
3878         of a ptid_t.  Adjust all callers.
3879         (thread_info::set_running): New.
3880         (validate_registers_access): Use inferior_thread.
3881         (can_access_registers_ptid): Rename to ...
3882         (can_access_registers_thread): ... this, and take a thread
3883         pointer.
3884         (print_thread_info_1): Adjust to compare thread pointers instead
3885         of ptids.
3886         (switch_to_no_thread, switch_to_thread): Make extern.
3887         (scoped_restore_current_thread::~scoped_restore_current_thread):
3888         Use m_thread pointer directly.
3889         (scoped_restore_current_thread::scoped_restore_current_thread):
3890         Use inferior_thread.
3891         (thread_command): Use thread pointer directly.
3892         (thread_num_make_value_helper): Use inferior_thread.
3893         * top.c (execute_command): Use inferior_thread.
3894         * tui/tui-interp.c: Include "inferior.h".
3895         * varobj.c (varobj_create): Use inferior_thread.
3896         (value_of_root_1): Use find_thread_global_id instead of
3897         global_thread_id_to_ptid.
3898
3899 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
3900
3901         * regcache.c (readable_regcache::read_part): Avoid memcpy when
3902         possible.
3903         (regcache::write_part): Likewise.
3904         (readable_regcache::cooked_read_part): Update comment.
3905         (readable_regcache::cooked_write_part): Likewise.
3906         * regcache.h: (readable_regcache::read_part): Likewise.
3907         (regcache::write_part): Likewise.
3908
3909 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
3910             Dirk Schubert  <dirk.schubert@arm.com>
3911
3912         * aarch64-linux-nat.c (post_attach): New.
3913         (aarch64_linux_nat_target::post_attach): Override post_attach to
3914         record the number of hardware debug registers.
3915
3916 2018-06-20  Tom Tromey  <tom@tromey.com>
3917
3918         * python/py-param.c (add_setshow_generic): Make parameters const.
3919         (parmpy_init): Update.
3920
3921 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3922
3923         * regcache.h (regcache_cooked_read_ftype): Rename to...
3924         (register_read_ftype): ...this, change type to function_view.
3925         (class reg_buffer) <save>: Remove src parameter.
3926         (readonly_detached_regcache) <readonly_detached_regcache>: Make
3927         parameter non-const in first overload.  Remove src parameter in
3928         second overload.
3929         * regcache.c (do_cooked_read): Remove.
3930         (readonly_detached_regcache::readonly_detached_regcache): Make
3931         parameter non-const, adjust call to other constructor.
3932         (reg_buffer::save): Remove src parameter.
3933         * frame.c (do_frame_register_read): Remove.
3934         (frame_save_as_regcache): Use lambda function.
3935         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3936         parameter to ppu2spu_data *.
3937         (ppu2spu_sniffer): Use lambda function.
3938
3939 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3940
3941         * record-full.c (record_full_target::insert_breakpoint): Remove
3942         "struct" keyword, add const.
3943
3944 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
3945
3946         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3947         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3948         * configure.ac: Remove AC_PREREQ, add missing quoting.
3949         * gnulib/configure.ac: Modernize usage of
3950         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
3951         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3952         (AUTOMAKE_VERSION): Bump to 1.15.1.
3953         * configure: Re-generate.
3954         * config.in: Re-generate.
3955         * aclocal.m4: Re-generate.
3956         * gnulib/aclocal.m4: Re-generate.
3957         * gnulib/config.in: Re-generate.
3958         * gnulib/configure: Re-generate.
3959         * gnulib/import/Makefile.in: Re-generate.
3960
3961 2018-06-19  Pedro Alves  <palves@redhat.com>
3962
3963         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3964         (lookup_minimal_symbol_by_pc_section): ... here with
3965         gdb_assert_not_reached added.
3966
3967 2018-06-19  Pedro Alves  <palves@redhat.com>
3968
3969         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3970         parameter with a block parameter.  Compare location's block symbol
3971         with the frame's block instead of addresses.
3972         (skip_inline_frames): Pass the current block instead of the
3973         frame's address.  Break out as soon as we determine the frame
3974         should not be skipped.
3975
3976 2018-06-18  Tom Tromey  <tom@tromey.com>
3977
3978         * solib-aix.c (solib_aix_get_section_offsets): Return
3979         unique_xmalloc_ptr.
3980         (solib_aix_solib_create_inferior_hook): Update.
3981
3982 2018-06-18  Tom Tromey  <tom@tromey.com>
3983
3984         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3985
3986 2018-06-18  Tom Tromey  <tom@tromey.com>
3987
3988         * solib-frv.c (frv_relocate_main_executable): Use
3989         unique_xmalloc_ptr.
3990         * solib-dsbt.c (dsbt_relocate_main_executable): Use
3991         unique_xmalloc_ptr.
3992
3993 2018-06-18  Tom Tromey  <tom@tromey.com>
3994
3995         * objfiles.h (inhibit_section_map_updates): Update.
3996         (resume_section_map_updates, resume_section_map_updates_cleanup):
3997         Remove.
3998         * solib-svr4.c (svr4_handle_solib_event): Update.
3999         * objfiles.c (inhibit_section_map_updates): Return
4000         scoped_restore_tmpl<int>.
4001         (resume_section_map_updates, resume_section_map_updates_cleanup):
4002         Remove.
4003
4004 2018-06-18  Tom Tromey  <tom@tromey.com>
4005
4006         * valprint.h (read_string): Update.
4007         * valprint.c (read_string): Change type of "buffer".
4008         (val_print_string): Update.
4009         * python/py-value.c (valpy_string): Update.
4010         * language.h (struct language_defn) <la_get_string>: Change
4011         type of "buffer".
4012         (default_get_string, c_get_string): Update.
4013         * language.c (default_get_string): Change type of "buffer".
4014         * guile/scm-value.c (gdbscm_value_to_string): Update.
4015         * c-lang.c (c_get_string): Change type of "buffer".
4016
4017 2018-06-18  Tom Tromey  <tom@tromey.com>
4018
4019         * ser-mingw.c (struct pipe_state_destroyer): New.
4020         (pipe_state_up): New typedef.
4021         (cleanup_pipe_state): Remove.
4022         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4023
4024 2018-06-18  Tom Tromey  <tom@tromey.com>
4025
4026         * rust-lang.h (rust_yyerror): Don't declare.
4027         * rust-lang.c (rust_language_defn): Update.
4028         * rust-exp.y (yyerror): Now static.
4029         * parse.c (parse_exp_in_context_1): Update.
4030         * p-lang.h (p_yyerror): Don't declare.
4031         * p-lang.c (p_language_defn): Update.
4032         * p-exp.y (yyerror): Now static.
4033         * opencl-lang.c (opencl_language_defn): Update.
4034         * objc-lang.c (objc_language_defn): Update.
4035         * m2-lang.h (m2_yyerror): Don't declare.
4036         * m2-lang.c (m2_language_defn): Update.
4037         * m2-exp.y (yyerror): Now static.
4038         * language.h (struct language_defn) <la_error>: Remove.
4039         * language.c (unk_lang_error): Remove.
4040         (unknown_language_defn, auto_language_defn): Remove.
4041         * go-lang.h (go_yyerror): Don't declare.
4042         * go-lang.c (go_language_defn): Update.
4043         * go-exp.y (yyerror): Now static.
4044         * f-lang.h (f_yyerror): Don't declare.
4045         * f-lang.c (f_language_defn): Update.
4046         * f-exp.y (yyerror): Now static.
4047         * d-lang.h (d_yyerror): Don't declare.
4048         * d-lang.c (d_language_defn): Update.
4049         * d-exp.y (yyerror): Now static.
4050         * c-lang.h (c_yyerror): Don't declare.
4051         * c-lang.c (c_language_defn, cplus_language_defn)
4052         (asm_language_defn, minimal_language_defn): Update.
4053         * c-exp.y (yyerror): Now static.
4054         * ada-lang.h (ada_yyerror): Don't declare.
4055         * ada-lang.c (ada_language_defn): Update.
4056         * ada-exp.y (yyerror): Now static.
4057
4058 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4059
4060         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4061         (store_sveregs_to_thread): Likewise.
4062         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4063         (aarch64_linux_store_inferior_registers): Likewise.
4064         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4065         function.
4066         (aarch64_sve_regs_copy_to_regcache): Likewise.
4067         (aarch64_sve_regs_copy_from_regcache): Likewise.
4068         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4069         declaration.
4070         (aarch64_sve_regs_copy_to_regcache): Likewise.
4071         (aarch64_sve_regs_copy_from_regcache): Likewise.
4072         (sve_context): Structure from Linux headers.
4073         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4074         (SVE_SIG_ZREG_SIZE): Likewise.
4075         (SVE_SIG_PREG_SIZE): Likewise.
4076         (SVE_SIG_FFR_SIZE): Likewise.
4077         (SVE_SIG_REGS_OFFSET): Likewise.
4078         (SVE_SIG_ZREGS_OFFSET): Likewise.
4079         (SVE_SIG_ZREG_OFFSET): Likewise.
4080         (SVE_SIG_ZREGS_SIZE): Likewise.
4081         (SVE_SIG_PREGS_OFFSET): Likewise.
4082         (SVE_SIG_PREG_OFFSET): Likewise.
4083         (SVE_SIG_PREGS_SIZE): Likewise.
4084         (SVE_SIG_FFR_OFFSET): Likewise.
4085         (SVE_SIG_REGS_SIZE): Likewise.
4086         (SVE_SIG_CONTEXT_SIZE): Likewise.
4087         (SVE_PT_REGS_MASK): Likewise.
4088         (SVE_PT_REGS_FPSIMD): Likewise.
4089         (SVE_PT_REGS_SVE): Likewise.
4090         (SVE_PT_VL_INHERIT): Likewise.
4091         (SVE_PT_VL_ONEXEC): Likewise.
4092         (SVE_PT_REGS_OFFSET): Likewise.
4093         (SVE_PT_FPSIMD_OFFSET): Likewise.
4094         (SVE_PT_FPSIMD_SIZE): Likewise.
4095         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4096         (SVE_PT_SVE_PREG_SIZE): Likewise.
4097         (SVE_PT_SVE_FFR_SIZE): Likewise.
4098         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4099         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4100         (__SVE_SIG_TO_PT): Likewise.
4101         (SVE_PT_SVE_OFFSET): Likewise.
4102         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4103         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4104         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4105         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4106         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4107         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4108         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4109         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4110         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4111         (SVE_PT_SVE_SIZE): Likewise.
4112         (SVE_PT_SIZE): Likewise.
4113         (HAS_SVE_STATE): New define.
4114
4115 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4116
4117         * nat/aarch64-sve-linux-sigcontext.h: New file.
4118         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4119         new files.
4120         (SVE_VQ_MIN): Likewise.
4121         (SVE_VQ_MAX): Likewise.
4122         (SVE_VL_MIN): Likewise.
4123         (SVE_VL_MAX): Likewise.
4124         (SVE_NUM_ZREGS): Likewise.
4125         (SVE_NUM_PREGS): Likewise.
4126         (sve_vl_valid): Likewise.
4127         (struct user_sve_header): Likewise.
4128
4129 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4130             Richard Bunt <Richard.Bunt@arm.com>
4131
4132         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4133         was requested by GDB.
4134
4135 2018-06-15  Tom de Vries  <tdevries@suse.de>
4136
4137         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4138
4139 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4140
4141         * gnulib/update-gnulib.sh: Print expected versions of
4142         autoconf/aclocal.
4143
4144 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4145
4146         * arch-utils.c (default_type_align): Use type_length_units.
4147         * gdbtypes.c (type_align): Use type_length_units.
4148
4149 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4150
4151         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4152         of 'define' command.
4153
4154 2018-06-14  Tom de Vries  <tdevries@suse.de>
4155
4156         PR cli/22573
4157         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4158         get_no_prettyformat_print_options.
4159
4160 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4161
4162         * sparc-nat.h: Include target.h.
4163         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4164         <fetch_registers>: Remove this argument in function call.
4165         <store_registers>: Remove this argument in function call, remove
4166         extra semicolon.
4167         <low_forget_process>: Call sparc64_forget_process instead of
4168         sparc_forget_process.
4169
4170 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4171
4172         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4173         (procfs_target::make_corefile_notes): Adjust to new
4174         target_read_alloc return type.
4175
4176 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4177             Stephen Roberts  <stephen.roberts@arm.com>
4178
4179         PR gdb/22882
4180         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4181         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4182         Move should_notify_stop local into more inner scope.
4183
4184 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4185             Stephen Roberts  <stephen.roberts@arm.com>
4186
4187         PR gdb/22882
4188         * infrun.c (resume_1): Add call to mark_async_event_handler.
4189
4190 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4191
4192         * infrun.c (do_target_wait): Change old version of $pc printed.
4193
4194 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4195
4196         * dwarf2read.c (read_index_from_section): Rename to...
4197         (read_gdb_index_from_section): ... this, update all callers.
4198         (dwarf2_read_index): Rename to...
4199         (dwarf2_read_gdb_index): ... this, update all callers.
4200
4201 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4202
4203         * gdb/hppa-linux-nat.c
4204         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4205         hppa_linux_nat_target::fetch_registers.
4206
4207 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4208
4209         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4210         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4211         (AARCH64_DWARF_SVE_FFR): Likewise.
4212         (AARCH64_DWARF_SVE_P0): Likewise.
4213         (AARCH64_DWARF_SVE_Z0): Likewise.
4214
4215 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4216
4217         * common/common-regcache.h (raw_compare): New function.
4218         * regcache.c (regcache::raw_compare): Likewise.
4219         * regcache.h (regcache::raw_compare): New declaration.
4220
4221 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4222
4223         * common/common-regcache.h (reg_buffer_common): New structure.
4224         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4225         (reg_buffer::raw_supply): Likewise.
4226         (reg_buffer::raw_supply_integer): Likewise.
4227         (reg_buffer::raw_supply_zeroed): Likewise.
4228         (reg_buffer::raw_collect): Likewise.
4229         (reg_buffer::raw_collect_integer): Likewise.
4230         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4231         (reg_buffer::raw_supply): Likewise.
4232         (reg_buffer::raw_supply_integer): Likewise.
4233         (reg_buffer::raw_supply_zeroed): Likewise.
4234         (reg_buffer::raw_collect): Likewise.
4235         (reg_buffer::raw_collect_integer): Likewise.
4236
4237 2018-06-10  Tom Tromey  <tom@tromey.com>
4238
4239         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4240         (class remote_state) <stop_reply_queue>: Now std::vector.
4241         (remote_state::~remote_state)
4242         (remote_target::stop_reply_queue_length): Update.
4243         (struct queue_iter_param, remove_child_of_pending_fork)
4244         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4245         (check_pending_event_prevents_wildcard_vcont_callback)
4246         (remove_stop_reply_for_inferior)
4247         (remove_stop_reply_of_remote_state)
4248         (remote_notif_remove_once_on_match)
4249         (stop_reply_match_ptid_and_ws)
4250         (remote_kill_child_of_pending_fork): Remove.
4251         (remote_target::remove_new_fork_children)
4252         (remote_target::check_pending_events_prevent_wildcard_vcont)
4253         (remote_target::discard_pending_stop_replies)
4254         (remote_target::discard_pending_stop_replies_in_queue)
4255         (remote_target::remote_notif_remove_queued_reply)
4256         (remote_target::queued_stop_reply)
4257         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4258         (remote_target::wait, remote_target::kill_new_fork_children)
4259         (remote_target::async): Update.
4260
4261 2018-06-10  Tom Tromey  <tom@tromey.com>
4262
4263         * record-full.c (record_full_arch_list_cleanups): Remove.
4264         (record_full_message): Use try/catch.
4265         (record_full_wait_cleanups): Remove.
4266         (record_full_wait_1): Use try/catch.
4267         (record_full_restore): Likewise.
4268
4269 2018-06-10  Tom Tromey  <tom@tromey.com>
4270
4271         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4272         declare VEC.  Add constructor.
4273         <in_target_beneath>: Now bool.
4274         (record_full_breakpoints): Now a std::vector, static.
4275         (record_full_sync_record_breakpoints)
4276         (record_full_init_record_breakpoints)
4277         (record_full_target::insert_breakpoint)
4278         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4279
4280 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4281
4282         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4283         * serial.c (serial_interface_lookup): Remove struct keyword.
4284
4285 2018-06-10  Tom Tromey  <tom@tromey.com>
4286
4287         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4288         method.
4289         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4290         a method.
4291         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4292         method.
4293         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4294         "beneath" as a method.
4295         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4296         Use "beneath" as a method.
4297
4298 2018-06-10  Tom Tromey  <tom@tromey.com>
4299
4300         * tracefile.c (struct trace_file_writer_deleter): New.
4301         <operator()>: Rename from trace_file_writer_xfree.
4302         (trace_file_writer_up): New typedef.
4303         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4304
4305 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4306
4307         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4308         <m_registers, m_register_status>: Change type to
4309         std::unique_ptr.
4310         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4311         XCNEWVEC.
4312
4313 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4314
4315         * common/common-regcache.h (enum register_status): Add
4316         underlying type "signed char".
4317         * regcache.h (reg_buffer) <m_register_status>: Change type to
4318         register_status *.
4319         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4320         register_status instead of signed char.
4321         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4322         (reg_buffer::get_register_status): Remove cast.
4323         (readable_regcache::raw_read): Remove cast.
4324         (readable_regcache::cooked_read): Remove cast.
4325
4326 2018-06-09  Tom Tromey  <tom@tromey.com>
4327
4328         * source.c (reverse_search_command, forward_search_command): Use
4329         scoped_fd.
4330
4331 2018-06-09  Tom Tromey  <tom@tromey.com>
4332
4333         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4334         (serial_ops_list): Now static, std::vector.
4335         (serial_interface_lookup, serial_add_interface): Update.
4336
4337 2018-06-09  Tom Tromey  <tom@tromey.com>
4338
4339         * dwarf2read.c (process_cu_includes): Update.
4340         (process_full_comp_unit): Update.
4341         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4342         std::vector.
4343
4344 2018-06-08  Paul Koning  <paul_koning@dell.com>
4345
4346         PR gdb/23252
4347
4348         * python/python.c (do_start_initialization):
4349         Avoid call to internal Python API.
4350         (init__gdb_module): New function.
4351
4352 2018-06-08  Gary Benson <gbenson@redhat.com>
4353
4354         * linux-thread-db.c (valprint.h): New include.
4355         (struct check_thread_db_info): New structure.
4356         (check_thread_db_on_load, tdb_testinfo): New static globals.
4357         (check_thread_db, check_thread_db_callback): New functions.
4358         (try_thread_db_load_1): Run integrity checks if requested.
4359         (maintenance_check_libthread_db): New function.
4360         (_initialize_thread_db): Register "maint check libthread-db"
4361         and "maint set/show check-libthread-db".
4362         * NEWS: Mention the above new commands.
4363
4364 2018-06-08  Tom Tromey  <tom@tromey.com>
4365
4366         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4367         now a method.
4368
4369 2018-06-08  Tom Tromey  <tom@tromey.com>
4370
4371         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4372
4373 2018-06-08  Tom Tromey  <tom@tromey.com>
4374
4375         * common/btrace-common.h (struct btrace_data): Add constructor,
4376         destructor, move assignment operator.
4377         <empty, clear, fini>: New methods.
4378         <format>: Initialize.
4379         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4380         (btrace_data_empty): Don't declare.
4381         * common/btrace-common.c (btrace_data_init): Remove.
4382         (btrace_data::fini): Rename from btrace_data_fini.
4383         (btrace_data::empty): Rename from btrace_data_empty.
4384         (btrace_data::clear): Rename from btrace_data_clear.  Return
4385         bool.
4386         * btrace.h (make_cleanup_btrace_data): Don't declare.
4387         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4388         (parse_xml_btrace): Update.
4389         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4390         (maint_btrace_clear_packet_history_cmd): Update.
4391
4392 2018-06-07  Pedro Alves  <palves@redhat.com>
4393
4394         * target.h (target_ops) <beneath>: Now a method.  All references
4395         updated.
4396         (class target_stack): New.
4397         * target.c (g_target_stack): New.
4398         (g_current_top_target): Delete.
4399         (current_top_target): Get the top target out of g_target_stack.
4400         (target_stack::push, target_stack::unpush): New.
4401         (push_target, unpush_target): Reimplement.
4402         (target_is_pushed): Reimplement in terms of g_target_stack.
4403         (target_ops::beneath, target_stack::find_beneath): New.
4404
4405 2018-06-07  Pedro Alves  <palves@redhat.com>
4406
4407         * target.h (find_target_beneath): Delete declaration.
4408         * target.c (find_target_beneath): Delete definition.
4409         * aix-thread.c: All callers of find_target_beneath adjusted to
4410         call target_ops::beneath instead.
4411         * bsd-uthread.c: Likewise.
4412         * linux-thread-db.c: Likewise.
4413         * ravenscar-thread.c: Likewise.
4414         * sol-thread.c: Likewise.
4415         * spu-multiarch.c: Likewise.
4416
4417 2018-06-07  Pedro Alves  <palves@redhat.com>
4418
4419         * target.h (target_ops) <beneath>: Now a method.  All references
4420         updated.
4421         (target_ops) <m_beneath>: New.
4422         * target.c (target_ops::beneath): New.
4423         * corelow.c: Adjust all references to target_ops::beneath.
4424         * linux-thread-db.c: Likewise.
4425         * make-target-delegates: Likewise.
4426         * record-btrace.c: Likewise.
4427         * record-full.c: Likewise.
4428         * remote.c: Likewise.
4429         * target.c: Likewise.
4430         * target-delegates.c: Regenerate.
4431
4432 2018-06-07  Pedro Alves  <palves@redhat.com>
4433
4434         * target.h (target_stack): Delete.
4435         (current_top_target): Declare function.
4436         * target.c (target_stack): Delete.
4437         (g_current_top_target): New.
4438         (current_top_target): New function.
4439         * auxv.c: Use current_top_target instead of target_stack
4440         throughout.
4441         * avr-tdep.c: Likewise.
4442         * breakpoint.c: Likewise.
4443         * corefile.c: Likewise.
4444         * elfread.c: Likewise.
4445         * eval.c: Likewise.
4446         * exceptions.c: Likewise.
4447         * frame.c: Likewise.
4448         * gdbarch-selftests.c: Likewise.
4449         * gnu-v3-abi.c: Likewise.
4450         * ia64-tdep.c: Likewise.
4451         * ia64-vms-tdep.c: Likewise.
4452         * infcall.c: Likewise.
4453         * infcmd.c: Likewise.
4454         * infrun.c: Likewise.
4455         * linespec.c: Likewise.
4456         * linux-tdep.c: Likewise.
4457         * minsyms.c: Likewise.
4458         * ppc-linux-nat.c: Likewise.
4459         * ppc-linux-tdep.c: Likewise.
4460         * procfs.c: Likewise.
4461         * regcache.c: Likewise.
4462         * remote.c: Likewise.
4463         * rs6000-tdep.c: Likewise.
4464         * s390-linux-nat.c: Likewise.
4465         * s390-tdep.c: Likewise.
4466         * solib-aix.c: Likewise.
4467         * solib-darwin.c: Likewise.
4468         * solib-dsbt.c: Likewise.
4469         * solib-spu.c: Likewise.
4470         * solib-svr4.c: Likewise.
4471         * solib-target.c: Likewise.
4472         * sparc-tdep.c: Likewise.
4473         * sparc64-tdep.c: Likewise.
4474         * spu-tdep.c: Likewise.
4475         * symfile.c: Likewise.
4476         * symtab.c: Likewise.
4477         * target-descriptions.c: Likewise.
4478         * target-memory.c: Likewise.
4479         * target.c: Likewise.
4480         * target.h: Likewise.
4481         * tracefile-tfile.c: Likewise.
4482         * tracepoint.c: Likewise.
4483         * valops.c: Likewise.
4484         * valprint.c: Likewise.
4485         * value.c: Likewise.
4486         * windows-tdep.c: Likewise.
4487         * mi/mi-main.c: Likewise.
4488
4489 2018-06-07  Tom Tromey  <tom@tromey.com>
4490
4491         * valprint.h (build_address_symbolic): Declare.
4492         * printcmd.c (print_address_symbolic): Update.
4493         (build_address_symbolic): Change "name" and "filename" to
4494         std::string.
4495         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4496         Update.
4497         * defs.h (build_address_symbolic): Remove declaration.
4498
4499 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4500
4501         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4502         (aarch64_vnv_type): Add function.
4503         (aarch64_pseudo_register_name): Add V regs for SVE.
4504         (aarch64_pseudo_register_type): Likewise.
4505         (aarch64_pseudo_register_reggroup_p): Likewise.
4506         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4507         (aarch64_pseudo_read_value): Add V regs for SVE.
4508         (aarch64_pseudo_write_2): Use V0 offset for SVE
4509         (aarch64_pseudo_write): Add V regs for SVE.
4510         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4511
4512 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4513
4514         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4515         (sve_vl_from_vq): Likewise.
4516
4517 2018-06-05  Tom Tromey  <tom@tromey.com>
4518
4519         * cli/cli-cmds.c (show_version): Update.
4520         * top.c (print_gdb_version): Add "interactive" parameter.
4521         Update.
4522         * main.c (captured_main_1): Update.
4523         * top.h (print_gdb_version): Add "interactive" parameter and a
4524         comment.
4525
4526 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4527
4528         * common/enum-flags.h: Add trailing semicolon to example in
4529         comment.
4530
4531 2018-06-05  Tom Tromey  <tom@tromey.com>
4532
4533         PR cli/12326:
4534         * NEWS: Add entry about pager.
4535         * utils.c (pagination_disabled_for_command): New global.
4536         (prompt_for_continue): Allow "c" response to prompt.
4537         (reinitialize_more_filter): Clear
4538         pagination_disabled_for_command.
4539         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4540
4541 2018-06-04  Tom Tromey  <tom@tromey.com>
4542
4543         * ada-lang.h (ada_lookup_symbol_list): Update.
4544         * ada-lang.c (resolve_subexp): Update.
4545         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4546         parameter.
4547         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4548         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4549         results parameter to std::vector.
4550         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4551         Update.
4552         * ada-exp.y (block_lookup): Update.
4553         (select_possible_type_sym): Change type of syms.  Remove nsyms
4554         parameter.
4555         (write_var_or_type, write_name_assoc): Update.
4556
4557 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4558
4559         * windows-nat.c (windows_nat_target::xfer_partial): Return
4560         TARGET_XFER_E_IO if we need to delegate to the target beneath
4561         but BENEATH is NULL.
4562
4563 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4564
4565         * Makefile.in (config.status): Add configure.nat as a
4566         dependency.
4567
4568 2018-06-04  Tom Tromey  <tom@tromey.com>
4569
4570         * cp-name-parser.y (cpname_state): Add method declarations.
4571         (HANDLE_QUAL): Update.
4572         (cpname_state::d_grab, cpname_state::fill_comp)
4573         (cpname_state::make_operator, cpname_state::make_dtor)
4574         (cpname_state::make_builtin_type, cpname_state::make_name)
4575         (cpname_state::d_qualify, cpname_state::d_int_type)
4576         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4577         (%union): Move earlier.
4578
4579 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4580
4581         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4582
4583 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4584
4585         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4586         (aarch64_pseudo_write_1): Likewise.
4587         (aarch64_pseudo_read_value): Use helper.
4588         (aarch64_pseudo_write): Likewise.
4589
4590 2018-06-04  Pedro Alves  <palves@redhat.com>
4591
4592         * darwin-nat.c (darwin_ops): Delete.
4593         (darwin_attach_pid): Use get_native_target.
4594
4595 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4596
4597         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4598         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4599
4600 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4601
4602         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4603         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4604         (aarch64_gdbarch_init): Check for SVE.
4605         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4606
4607 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4608
4609         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4610         * aarch64-tdep.h (aarch64_read_description): Likewise.
4611         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4612         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4613         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4614         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4615         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4616
4617 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4618
4619         * value.c (value_fetch_lazy_bitfield): New.
4620         (value_fetch_lazy_memory): New.
4621         (value_fetch_lazy_register): New.
4622         (value_fetch_lazy): Factor out to smaller functions.
4623
4624 2018-06-01  Tom Tromey  <tom@tromey.com>
4625
4626         * cp-name-parser.y (backslashable, represented): Now const.
4627
4628 2018-06-01  Tom Tromey  <tom@tromey.com>
4629
4630         * cp-name-parser.y: Include parser-defs.h.
4631         (parser_fprintf): Remove declaration.
4632
4633 2018-06-01  Tom Tromey  <tom@tromey.com>
4634
4635         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4636         %parse-param.
4637         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4638         (global_result): Remove globals.
4639         (struct cpname_state): New.
4640         (yyparse): Don't declare.
4641         (yylex, yyerror): Move declarations after %union.
4642         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4643         (make_name): Add state parameter.
4644         Update all callers.
4645         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4646         parameter.
4647         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4648         Update.
4649         (yylex): Add lvalp, state parameters.
4650         (yyerror): Add state parameter.
4651         (cp_demangled_name_to_comp): Update.
4652
4653 2018-06-01  Tom Tromey  <tom@tromey.com>
4654
4655         * cp-name-parser.y (parser_fprintf): Declare.
4656         (GDB_YY_REMAP_PREFIX): Define.
4657         Include yy-remap.h.  Don't redefine yy* identifiers.
4658
4659 2018-06-01  Tom Tromey  <tom@tromey.com>
4660
4661         * python/py-type.c (typy_legacy_template_argument): Update.
4662         * cp-support.h (cp_demangled_name_to_comp): Update.
4663         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4664         parameter to be a "std::string *".
4665         (main): Update.
4666
4667 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4668
4669         * ada-lex.l: Include "diagnostics.h" instead of
4670         "common/diagnostics.h".
4671         * unittests/environ-selftests.c: Likewise.
4672         * common/diagnostics.h: Moved to ../include.
4673
4674 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4675
4676         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4677         to language_mode_manual while calling breakpoint_re_set_one.
4678
4679 2018-06-01  Tom Tromey  <tom@tromey.com>
4680
4681         * valops.c (value_cast_structs, destructor_name_p): Update.
4682         * symtab.c (gdb_mangle_name): Update.
4683         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4684         Update.
4685         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4686         (pascal_object_print_value_fields, pascal_object_print_value):
4687         Update.
4688         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4689         * linespec.c (find_methods): Update.
4690         * gdbtypes.h (type_name_no_tag): Remove.
4691         (type_name_or_error): Rename from type_name_no_tag_or_error.
4692         * gdbtypes.c (type_name_no_tag): Remove.
4693         (type_name_or_error): Rename from type_name_no_tag_or_error.
4694         (lookup_struct_elt_type, check_typedef): Update.
4695         * expprint.c (print_subexp_standard): Update.
4696         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4697         * d-namespace.c (d_lookup_nested_symbol): Update.
4698         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4699         (cp_print_class_member): Update.
4700         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4701         * completer.c (add_struct_fields): Update.
4702         * c-typeprint.c (cp_type_print_derivation_info)
4703         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4704         Update.
4705         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4706         (ada_prefer_type, ada_is_exception_sym): Update.
4707
4708 2018-06-01  Tom Tromey  <tom@tromey.com>
4709
4710         * valops.c (enum_constant_from_type, value_namespace_elt)
4711         (value_maybe_namespace_elt): Update.
4712         * valarith.c (find_size_for_pointer_math): Update.
4713         * target-descriptions.c (make_gdb_type): Update.
4714         * symmisc.c (print_symbol): Update.
4715         * stabsread.c (define_symbol, read_type)
4716         (complain_about_struct_wipeout, add_undefined_type)
4717         (cleanup_undefined_types_1): Update.
4718         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4719         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4720         (rust_internal_print_type, rust_composite_type)
4721         (rust_evaluate_funcall, rust_evaluate_subexp)
4722         (rust_inclusive_range_type_p): Update.
4723         * python/py-type.c (typy_get_tag): Update.
4724         * p-typeprint.c (pascal_type_print_base): Update.
4725         * mdebugread.c (parse_symbol, parse_type): Update.
4726         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4727         Update.
4728         * guile/scm-type.c (gdbscm_type_tag): Update.
4729         * go-lang.c (sixg_string_p): Update.
4730         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4731         Update.
4732         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4733         (TYPE_TAG_NAME): Remove.
4734         * gdbtypes.c (type_name_no_tag): Simplify.
4735         (check_typedef, check_types_equal, recursive_dump_type)
4736         (copy_type_recursive, arch_composite_type): Update.
4737         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4738         in summary mode when needed.
4739         * eval.c (evaluate_funcall): Update.
4740         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4741         (process_structure_scope, read_enumeration_type)
4742         (read_namespace_type, read_module_type, determine_prefix): Update.
4743         * cp-support.c (inspect_type): Update.
4744         * coffread.c (process_coff_symbol, decode_base_type): Update.
4745         * c-varobj.c (c_is_path_expr_parent): Update.
4746         * c-typeprint.c (c_type_print_base_struct_union): Update.
4747         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4748         summary when using C language.
4749         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4750         (gen_maybe_namespace_elt): Update.
4751         * ada-lang.c (ada_type_name): Simplify.
4752         (empty_record, ada_template_to_fixed_record_type_1)
4753         (template_to_static_fixed_type)
4754         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4755
4756 2018-06-01  Tom Tromey  <tom@tromey.com>
4757
4758         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4759         c_print_type.
4760         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4761         (c_print_type): Update.
4762         (c_print_type): New overload.
4763         (c_type_print_varspec_prefix, c_type_print_args)
4764         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4765         (c_type_print_base_struct_union, c_type_print_base_1)
4766         (cp_type_print_method_args): Add "language" parameter.
4767         (c_type_print_base): Update.
4768         * c-lang.h (c_print_type): Add new overload.
4769
4770 2018-06-01  Tom Tromey  <tom@tromey.com>
4771
4772         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4773         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4774
4775 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4776
4777         * aarch64-tdep.c (aarch64_sve_register_names): New const
4778         var.
4779         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4780         (AARCH64_SVE_Z_REGS_NUM): New define.
4781         (AARCH64_SVE_P_REGS_NUM): Likewise.
4782         (AARCH64_SVE_NUM_REGS): Likewise.
4783
4784 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4785
4786         * nat/linux-ptrace.h [__alpha__]
4787         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4788         definitions.
4789
4790 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4791
4792         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4793         the endianness selected.
4794         * NEWS: Document `set endian auto' mode operation update.
4795
4796 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4797
4798         * Makefile.in: Add new header.
4799         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4800         (sve_vl_from_vg): Likewise.
4801         (sve_vq_from_vl): Likewise.
4802         (sve_vl_from_vq): Likewise.
4803         (sve_vq_from_vg): Likewise.
4804         (sve_vg_from_vq): Likewise.
4805         * configure.nat: Add new c file.
4806         * nat/aarch64-sve-linux-ptrace.c: New file.
4807         * nat/aarch64-sve-linux-ptrace.h: New file.
4808
4809 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4810
4811         * aarch64-linux-nat.c (aarch64_linux_read_description):
4812         Add parmeter zero.
4813         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4814         Likewise.
4815         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4816         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4817         (aarch64_gdbarch_init): Add parmeter zero.
4818         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4819         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4820         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4821         parmeter.
4822         * doc/gdb.texinfo: Describe SVE feature
4823         * features/aarch64-sve.c: New file.
4824
4825 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4826
4827         PR gdb/23210
4828         * gdbarch.sh (significant_addr_bit): Default to zero when
4829         not set by target architecture.
4830         * gdbarch.c: Re-generated.
4831         * utils.c (address_significant): Update.
4832
4833 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4834
4835         * stack.c (func_command): Remove trailing newline in call to error.
4836
4837 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4838
4839         * regcache.h (regcache_raw_collect): Remove, update callers to
4840         use regcache::raw_collect.
4841         * regcache.c (regcache_raw_collect): Remove.
4842
4843 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4844
4845         * regcache.h (regcache_raw_supply): Remove, update callers to
4846         use detached_regcache::raw_supply.
4847         * regcache.c (regcache_raw_supply): Remove.
4848
4849 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4850
4851         * regcache.h (regcache_cooked_write_part): Remove, update
4852         callers to use regcache::cooked_write_part.
4853         * regcache.c (regcache_cooked_write_part): Remove.
4854
4855 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4856
4857         * regcache.h (regcache_cooked_read_part): Remove, update callers
4858         to use readable_regcache::cooked_read_part.
4859         * regcache.c (regcache_cooked_read_part): Remove.
4860
4861 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4862
4863         * regcache.h (regcache_cooked_read_value): Remove, update
4864         callers to use readable_regcache::cooked_read_value.
4865         * regcache.c (regcache_cooked_read_value): Remove.
4866
4867 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4868
4869         * regcache.h (regcache_cooked_write): Remove, update callers to
4870         use regcache::cooked_write.
4871         * regcache.c (regcache_cooked_write): Remove.
4872
4873 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4874
4875         * regcache.h (regcache_invalidate): Remove, update callers to
4876         use detached_regcache::invalidate instead.
4877         * regcache.c (regcache_invalidate): Remove.
4878
4879 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4880
4881         * regcache.h (regcache_raw_write_part): Remove, update callers
4882         to use regcache::raw_write_part instead.
4883         * regcache.c (regcache_raw_write_part): Remove.
4884
4885 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4886
4887         * regcache.h (regcache_raw_read_part): Remove, update callers to
4888         use readable_regcache::raw_read_part instead.
4889         * regcache.c (regcache_raw_read_part): Remove.
4890
4891 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4892
4893         * regcache.h (regcache_cooked_read): Remove, update callers to
4894         use readable_regcache::cooked_read instead.
4895         * regcache.c (regcache_cooked_read): Remove.
4896
4897 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4898
4899         * regcache.h (regcache_raw_write): Remove, update callers to use
4900         regcache::raw_write instead.
4901         * regcache.c (regcache_raw_write): Remove.
4902
4903 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4904
4905         * regcache.h (regcache_raw_read): Remove, update callers to use
4906         readable_regcache::raw_read instead.
4907         * regcache.c (regcache_raw_read): Remove.
4908
4909 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4910
4911         * regcache.h (regcache_raw_update): Remove, update callers to
4912         use readable_regcache::raw_update instead.
4913         * regcache.c (regcache_raw_update): Remove.
4914
4915 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4916
4917         * regcache.h (regcache_register_status): Remove, update callers
4918         to use reg_buffer::get_register_status directly instead.
4919         * regcache.c (regcache_register_status): Remove.
4920
4921 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4922
4923         * regcache.h (regcache_get_ptid): Remove, update all callers to
4924         call regcache::ptid instead.
4925         * regcache.c (regcache_get_ptid): Remove.
4926
4927 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4928
4929         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4930
4931 2018-05-30  Pedro Alves  <palves@redhat.com>
4932
4933         * common/common-exceptions.h (exception_rethrow): Use
4934         ATTRIBUTE_NORETURN.
4935
4936 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
4937
4938         * breakpoint.c (print_solib_event, check_status_catch_solib):
4939         Remove struct keyword in range-based for loops.
4940         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4941         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4942         Likewise.
4943         * linespec.c (find_superclass_methods, search_minsyms_for_name):
4944         Likewise.
4945         * symfile.c (addr_info_make_relative): Likewise.
4946         * thread.c (value_in_thread_stack_temporaries): Likewise.
4947
4948 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
4949
4950         PR gdb/16841
4951         * valops.c (value_struct_elt_for_reference): Call check_typedef on
4952         aggregate type to get its real type before accessing it.
4953
4954 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
4955
4956         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4957         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4958         * coff-pe-read.c (add_pe_forwarded_sym): Replace
4959         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4960         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4961         * jit.c (jit_breakpoint_re_set_internal): Likewise.
4962         * printcmd.c (info_address_command): Likewise.
4963
4964 2018-05-29  Tom Tromey  <tom@tromey.com>
4965
4966         * windows-nat.c (handle_exception): Update fall-through comment.
4967
4968 2018-05-29  Tom Tromey  <tom@tromey.com>
4969
4970         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
4971         (struct program_space) <added_solibs>: Now a std::vector.
4972         * breakpoint.c (print_solib_event): Update.
4973         (check_status_catch_solib): Update.
4974         * progspace.c (clear_program_space_solib_cache): Update.
4975         * solib.c (update_solib_list): Update.
4976
4977 2018-05-29  Tom Tromey  <tom@tromey.com>
4978
4979         * python/py-type.c (typy_richcompare): Update.
4980         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4981         * gdbtypes.h (types_deeply_equal): Return bool.
4982         (types_equal): Likewise.
4983         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
4984         declare VEC.
4985         (check_types_equal): Change worklist to std::vector.  Return
4986         bool.
4987         (struct type_equality_entry): Add constructor.
4988         (compare_maybe_null_strings): Return bool.
4989         (check_types_worklist): Return bool.  Change worklist to
4990         std::vector.
4991         (types_deeply_equal): Use std::vector.
4992         (types_equal): Return bool.
4993         (compare_maybe_null_strings): Simplify.
4994
4995 2018-05-29  Tom Tromey  <tom@tromey.com>
4996
4997         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
4998
4999 2018-05-29  Tom Tromey  <tom@tromey.com>
5000
5001         * objc-lang.h: Don't include cp-support.h.
5002         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5003         declare VEC.
5004
5005 2018-05-27  Tom Tromey  <tom@tromey.com>
5006
5007         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5008
5009 2018-05-25  Tom Tromey  <tom@tromey.com>
5010
5011         * value.c (value::location): Initialize.
5012
5013 2018-05-25  Tom Tromey  <tom@tromey.com>
5014
5015         * dbxread.c (init_bincl_list): Remove.
5016         (bincl_list): Now a std::vector.
5017         (bincls_allocated, next_bincl): Remove.
5018         (free_bincl_list, do_free_bincl_list_cleanup)
5019         (make_cleanup_free_bincl_list): Remove.
5020         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5021         unique_xmalloc_ptr.
5022         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5023         (struct header_file_location): Add constructor.
5024         (add_bincl_to_list): Remove.
5025
5026 2018-05-25  Tom Tromey  <tom@tromey.com>
5027
5028         * tui/tui.c (tui_enable): Update.
5029         * mi/mi-interp.c (mi_interp::init): Update.
5030         * interps.h (class interp) <name>: New method.
5031         <m_name>: Rename from name.
5032         (~scoped_restore_interp): Update.
5033         * interps.c (interp::interp): Update.
5034         (interp_add, interp_set, interp_lookup_existing)
5035         (current_interp_named_p): Update.
5036
5037 2018-05-25  Tom Tromey  <tom@tromey.com>
5038
5039         * interps.c (interp_name): Remove.
5040         * mi/mi-interp.c (mi_interp::init): Update.
5041         * interps.h (interp_name): Remove.
5042         (~scoped_restore_interp): Update.
5043         * tui/tui.c (tui_enable): Update.
5044
5045 2018-05-25  Tom Tromey  <tom@tromey.com>
5046
5047         * utils.c (fputs_maybe_filtered): Update.
5048         * linespec.c (decode_line_full): Update.
5049         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5050         (mi_print_breakpoint_for_event, mi_solib_loaded)
5051         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5052         (mi_user_selected_context_changed): Update.
5053         * mi/mi-main.c (mi_execute_command): Update.
5054         * cli/cli-script.c (execute_control_command): Update.
5055         * python/python.c (execute_gdb_command): Update.
5056         * solib.c (info_sharedlibrary_command): Update.
5057         * interps.c (interp_ui_out): Remove.
5058         * interps.h (interp_ui_out): Remove.
5059
5060 2018-05-25  Tom Tromey  <tom@tromey.com>
5061
5062         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5063         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5064         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5065
5066 2018-05-25  Tom Tromey  <tom@tromey.com>
5067
5068         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5069         * interps.c (interp_exec): Use scoped_restore.
5070
5071 2018-05-25  Tom Tromey  <tom@tromey.com>
5072
5073         * remote.c (remote_target::remote_file_get): Use
5074         gdb::byte_vector.
5075         (remote_target::remote_file_put): Likewise.
5076
5077 2018-05-25  Tom Tromey  <tom@tromey.com>
5078
5079         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5080         a std::string.
5081         (get_pe_section_index, add_pe_exported_sym): Update.
5082         (read_pe_exported_syms): Use gdb::def_vector.
5083
5084 2018-05-25  Tom Tromey  <tom@tromey.com>
5085
5086         * frame.c (remove_prev_frame): Remove.
5087         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5088
5089 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5090
5091         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5092         Remove prototypes.
5093         * mips-linux-nat.c (supply_fpregset): Always call
5094         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5095         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5096         `mips_fill_fpregset'.
5097         * mips-linux-tdep.c (mips_supply_fpregset)
5098         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5099         (mips_fill_fpregset_wrapper): Remove functions.
5100         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5101         (mips_linux_fpregset): Remove variable.
5102         (mips_linux_iterate_over_regset_sections): Use
5103         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5104         (mips_linux_o32_sigframe_init): Remove comment.
5105
5106 2018-05-25  Pedro Alves  <palves@redhat.com>
5107
5108         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5109         (struct readahead_cache, struct packet_reg, struct
5110         remote_arch_state, class remote_state): Move higher up in the
5111         file.
5112         (remote_target::m_remote_state): Now an object instead of a pointer.
5113         (remote_target::get_remote_state): Adjust.
5114
5115 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5116
5117         * stack.c (select_and_print_frame): Delete.
5118         (struct function_bounds): Move struct within function.
5119         (func_command): Most content moved into new function
5120         find_frame_for_function, use new function, print result, add
5121         function comment.
5122         (find_frame_for_function): New function, now returns a result.
5123
5124 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5125
5126         * stack.c (iterate_over_block_arg_vars): Fix comment.
5127         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5128
5129 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5130
5131         PR gdb/23203
5132         * frame.c
5133         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5134         Define.
5135         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5136         Define.
5137         * frame.h (class scoped_restore_selected_frame): New class.
5138         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5139         of any exception, use scoped_restore_selected_frame to restore the
5140         frame instead.
5141
5142 2018-05-24  Pedro Alves  <palves@redhat.com>
5143
5144         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5145         override.
5146
5147 2018-05-23  Tom Tromey  <tom@tromey.com>
5148
5149         * complaints.c (struct complaints): Remove.
5150         (symfile_complaint_book): Remove.
5151         (series): New global.
5152         (complaint_internal): Update.
5153         (clear_complaints): Update.
5154
5155 2018-05-23  Tom Tromey  <tom@tromey.com>
5156
5157         * complaints.c (counters): New global.
5158         (struct complain): Remove.
5159         (struct complaints) <root>: Remove.
5160         (complaint_sentinel): Remove.
5161         (symfile_complaint_book): Update.
5162         (find_complaint) Remove.
5163         (complaint_internal, clear_complaints): Update.
5164
5165 2018-05-23  Tom Tromey  <tom@tromey.com>
5166
5167         * complaints.c (struct complain) <file, line>: Remove.
5168         (find_complaint): Remove file, line parameters.
5169         (complaint_internal): Update.
5170
5171 2018-05-23  Tom Tromey  <tom@tromey.com>
5172
5173         * complaints.c (vcomplaint): Remove.
5174         (complaint_internal) Merge in contents of vcomplaint.
5175
5176 2018-05-23  Tom Tromey  <tom@tromey.com>
5177
5178         * complaints.c (struct complaints) <explanation>: Remove.
5179         (symfile_explanations): Remove.
5180         (symfile_complaint_book): Update.
5181         (vcomplaint): Update.
5182         (struct explanation): Remove.
5183
5184 2018-05-23  Tom Tromey  <tom@tromey.com>
5185
5186         * complaints.c (symfile_complaints): Remove.
5187         (complaint_internal): Remove "complaints" parameter.
5188         (clear_complaints, vcomplaint): Remove "c" parameter.
5189         (get_complaints): Remove.
5190         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5191         (dwarf2_debug_line_missing_file_complaint)
5192         (dwarf2_debug_line_missing_end_sequence_complaint)
5193         (dwarf2_complex_location_expr_complaint)
5194         (dwarf2_const_value_length_mismatch_complaint)
5195         (dwarf2_section_buffer_overflow_complaint)
5196         (dwarf2_macro_malformed_definition_complaint)
5197         (dwarf2_invalid_attrib_class_complaint)
5198         (create_addrmap_from_index, dw2_symtab_iter_next)
5199         (dw2_expand_marked_cus)
5200         (dw2_debug_names_iterator::find_vec_in_debug_names)
5201         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5202         (create_debug_type_hash_table, init_cutu_and_read_dies)
5203         (partial_die_parent_scope, add_partial_enumeration)
5204         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5205         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5206         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5207         (create_cus_hash_table, create_dwp_hash_table)
5208         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5209         (dwarf2_rnglists_process, dwarf2_ranges_process)
5210         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5211         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5212         (handle_struct_member_die, process_structure_scope)
5213         (read_array_type, read_common_block, read_module_type)
5214         (read_tag_pointer_type, read_typedef, read_base_type)
5215         (read_subrange_type, load_partial_dies, partial_die_info::read)
5216         (partial_die_info::read, partial_die_info::read)
5217         (partial_die_info::read, read_checked_initial_length_and_offset)
5218         (dwarf2_string_attr, read_formatted_entries)
5219         (dwarf_decode_line_header)
5220         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5221         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5222         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5223         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5224         (get_signatured_type, get_DW_AT_signature_type)
5225         (decode_locdesc, file_file_name, consume_improper_spaces)
5226         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5227         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5228         (dwarf2_symbol_mark_computed, set_die_type)
5229         (read_attribute_value): Update.
5230         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5231         Update.
5232         * dbxread.c (unknown_symtype_complaint)
5233         (lbrac_mismatch_complaint, repeated_header_complaint)
5234         (set_namestring, function_outside_compilation_unit_complaint)
5235         (read_dbx_symtab, process_one_symbol): Update.
5236         * gdbtypes.c (stub_noname_complaint): Update.
5237         * windows-nat.c (handle_unload_dll): Update.
5238         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5239         (decode_base_type): Update.
5240         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5241         (eb_complaint, record_include_begin, record_include_end)
5242         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5243         (process_xcoff_symbol, read_symbol)
5244         (function_outside_compilation_unit_complaint)
5245         (scan_xcoff_symtab): Update.
5246         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5247         * buildsym.c (finish_block_internal, make_blockvector)
5248         (end_symtab_get_static_block, augment_type_symtab): Update.
5249         * dtrace-probe.c (dtrace_process_dof)
5250         (dtrace_static_probe_ops::get_probes): Update.
5251         * complaints.h (struct complaint): Don't declare.
5252         (symfile_complaints): Remove.
5253         (complaint_internal): Remove "complaints" parameter.
5254         (complaint): Likewise.
5255         (clear_complaints): Likewise.
5256         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5257         (reread_symbols): Update.
5258         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5259         (dwarf2_frame_cache, decode_frame_entry): Update.
5260         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5261         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5262         (info_selectors_command): Update.
5263         * macrotab.c (macro_include, check_for_redefinition)
5264         (macro_undef): Update.
5265         * objfiles.c (filter_overlapping_sections): Update.
5266         * stabsread.c (invalid_cpp_abbrev_complaint)
5267         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5268         (define_symbol, error_type, read_type, rs6000_builtin_type)
5269         (stabs_method_name_from_physname, read_member_functions)
5270         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5271         (attach_fields_to_type, complain_about_struct_wipeout)
5272         (read_range_type, read_args, common_block_start)
5273         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5274         Update.
5275         * mdebugread.c (index_complaint, unknown_ext_complaint)
5276         (basic_type_complaint, bad_tag_guess_complaint)
5277         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5278         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5279         (parse_procedure, parse_lines)
5280         (function_outside_compilation_unit_complaint)
5281         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5282         (bad_tag_guess_complaint, reg_value_complaint): Update.
5283         * cp-support.c (demangled_name_complaint): Update.
5284         * macroscope.c (sal_macro_scope): Update.
5285         * dwarf-index-write.c (class debug_names): Update.
5286
5287 2018-05-23  Tom Tromey  <tom@tromey.com>
5288
5289         * complaints.c (clear_complaints): Remove "noisy" parameter.
5290         * complaints.h (clear_complaints): Update.
5291         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5292         (reread_symbols): Update.
5293
5294 2018-05-23  Tom Tromey  <tom@tromey.com>
5295
5296         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5297         SUBSEQUENT_MESSAGE.
5298         (vcomplaint, clear_complaints): Update.
5299         (symfile_explanations): Remove some messages.
5300
5301 2018-05-23  Tom Tromey  <tom@tromey.com>
5302
5303         * complaints.c (internal_complaint): Remove.
5304         * complaints.h (internal_complaint): Remove.
5305
5306 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5307
5308         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5309
5310 2018-05-22  Pedro Alves  <palves@redhat.com>
5311
5312         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5313         (remote_fileio_badfd, remote_fileio_return_errno)
5314         (remote_fileio_return_success, remote_fileio_func_open)
5315         (remote_fileio_func_open, remote_fileio_func_close)
5316         (remote_fileio_func_read, remote_fileio_func_write)
5317         (remote_fileio_func_lseek, remote_fileio_func_rename)
5318         (remote_fileio_func_unlink, remote_fileio_func_stat)
5319         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5320         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5321         remote_target parameter.
5322         (remote_fio_func_map) <func>: Add remote_target parameter.
5323         (do_remote_fileio_request, remote_fileio_request):
5324         * remote-fileio.h (remote_fileio_request):
5325         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5326         remote_target parameter.
5327         (remote_notif_process, handle_notification): Adjust to pass down
5328         the remote.
5329         (remote_notif_state_allocate): Add remote_target parameter.  Save
5330         it.
5331         * remote-notif.h (struct remote_target): Forward declare.
5332         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5333         remote_target parameter.
5334         (struct remote_notif_state) <remote>: New field.
5335         (remote_notif_ack, remote_notif_parse): Add remote_target
5336         parameter.
5337         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5338         remote_target parameter.
5339         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5340         (threads_listing_context, rmt_thread_action, protocol_feature)
5341         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5342         (packet_result, struct threads_listing_context, remote_state):
5343         Move definitions and declarations higher up.
5344         (remote_target) <~remote_target>: Declare.
5345         (remote_download_command_source, remote_file_put, remote_file_get)
5346         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5347         (remote_hostio_pread_vFile, remote_hostio_send_command)
5348         (remote_hostio_set_filesystem, remote_hostio_open)
5349         (remote_hostio_close, remote_hostio_unlink, remote_state)
5350         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5351         (get_memory_write_packet_size, get_memory_read_packet_size)
5352         (append_pending_thread_resumptions, remote_detach_1)
5353         (append_resumption, remote_resume_with_vcont)
5354         (add_current_inferior_and_thread, wait_ns, wait_as)
5355         (process_stop_reply, remote_notice_new_inferior)
5356         (process_initial_stop_replies, remote_add_thread)
5357         (btrace_sync_conf, remote_btrace_maybe_reopen)
5358         (remove_new_fork_children, kill_new_fork_children)
5359         (discard_pending_stop_replies, stop_reply_queue_length)
5360         (check_pending_events_prevent_wildcard_vcont)
5361         (discard_pending_stop_replies_in_queue, stop_reply)
5362         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5363         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5364         (remote_interrupt_as, remote_interrupt_ns)
5365         (remote_get_noisy_reply, remote_query_attached)
5366         (remote_add_inferior, remote_current_thread, get_current_thread)
5367         (set_thread, set_general_thread, set_continue_thread)
5368         (set_general_process, write_ptid)
5369         (remote_unpack_thread_info_response, remote_get_threadinfo)
5370         (parse_threadlist_response, remote_get_threadlist)
5371         (remote_threadlist_iterator, remote_get_threads_with_ql)
5372         (remote_get_threads_with_qxfer)
5373         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5374         (get_offsets, remote_check_symbols, remote_supported_packet)
5375         (remote_query_supported, remote_packet_size)
5376         (remote_serial_quit_handler, remote_detach_pid)
5377         (remote_vcont_probe, remote_resume_with_hc)
5378         (send_interrupt_sequence, interrupt_query)
5379         (remote_notif_get_pending_events, fetch_register_using_p)
5380         (send_g_packet, process_g_packet, fetch_registers_using_g)
5381         (store_register_using_P, store_registers_using_G)
5382         (set_remote_traceframe, check_binary_download)
5383         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5384         (remote_xfer_live_readonly_partial, remote_read_bytes)
5385         (remote_send_printf, remote_flash_write, readchar)
5386         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5387         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5388         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5389         (extended_remote_disable_randomization, extended_remote_run)
5390         (send_environment_packet, extended_remote_environment_support)
5391         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5392         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5393         (packet_command): Now methods of ...
5394         (remote_target): ... this class.
5395         (m_remote_state) <remote_target>: New field.
5396         (struct remote_state) <stop_reply_queue,
5397         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5398         fields.
5399         (remote_state::remote_state): Allocate stop_reply_queue.
5400         (remote_state): Delete global.
5401         (get_remote_state_raw): Delete.
5402         (remote_target::get_remote_state): Allocate m_remote_state on
5403         demand.
5404         (get_current_remote_target): New.
5405         (remote_ops, extended_remote_ops): Delete.
5406         (wait_forever_enabled_p, remote_async_inferior_event_token):
5407         Delete, moved to struct remote_state.
5408         (remote_target::close): Delete self.  Destruction bits split to
5409         ...
5410         (remote_target::~remote_target): ... this.
5411         (show_memory_packet_size): Adjust to use
5412         get_current_remote_target.
5413         (struct protocol_feature) <func>: Add remote_target parameter.
5414         All callers adjusted.
5415         (curr_quit_handler_target): New.
5416         (remote_serial_quit_handler): Reimplement.
5417         (remote_target::open_1): Adjust to use get_current_remote_target.
5418         Heap-allocate remote_target/extended_remote_target instances.
5419         (vcont_builder::vcont_builder): Add remote_target parameter, and
5420         save it in m_remote.  All callers adjusted.
5421         (vcont_builder::m_remote): New field.
5422         (vcont_builder::restart, vcont_builder::flush)
5423         (vcont_builder::push_action): Use it.
5424         (remote_target::commit_resume): Use it.
5425         (struct queue_iter_param) <remote>: New field.
5426         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5427         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5428         (check_pending_event_prevents_wildcard_vcont_callback)
5429         (remote_target::check_pending_events_prevent_wildcard_vcont)
5430         (remote_target::discard_pending_stop_replies)
5431         (remote_target::discard_pending_stop_replies_in_queue)
5432         (remote_target::remote_notif_remove_queued_reply): Fill in
5433         'remote' field.
5434         (remote_notif_get_pending_events): New.
5435         (remote_target::readchar, remote_target::remote_serial_write):
5436         Save/restore curr_quit_handler_target.
5437         (putpkt): New.
5438         (kill_new_fork_children): Fill in 'remote' field.
5439         (packet_command): Use get_current_remote_target, defer to
5440         remote_target method of same name.
5441         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5442         parameter, and save it in m_remote.  All callers adjusted.
5443         (scoped_remote_fd::release): Use m_remote.
5444         (scoped_remote_fd::m_remote): New field.
5445         (remote_file_put, remote_file_get, remote_file_delete): Use
5446         get_current_remote_target, defer to remote_target method of same
5447         name.
5448         (remote_btrace_reset): Add remote_state paremeter.  Update all
5449         callers.
5450         (remote_async_inferior_event_handler). Pass down 'data'.
5451         (remote_new_objfile): Use get_current_remote_target.
5452         (remote_target::vcont_r_supported): New.
5453         (set_range_stepping): Use get_current_remote_target and
5454         remote_target::vcont_r_supported.
5455         (_initialize_remote): Don't allocate 'remote_state' and
5456         'stop_reply_queue' globals.
5457         * remote.h (struct remote_target): Forward declare.
5458         (getpkt, putpkt, remote_notif_get_pending_events): Add
5459         'remote_target' parameter.
5460
5461 2018-05-22  Pedro Alves  <palves@redhat.com>
5462
5463         * remote.c (vcont_builder): Now a class.  Make all data members
5464         private.
5465         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5466         Declare methods.
5467         (vcont_builder_restart): Rename to ...
5468         (vcont_builder::restart): ... this.
5469         (vcont_builder_flush): Rename to ...
5470         (vcont_builder::flush): ... this.
5471         (vcont_builder_push_action): Rename to ...
5472         (vcont_builder::push_action): ... this.
5473         (remote_target::commit_resume): Adjust.
5474
5475 2018-05-22  Pedro Alves  <palves@redhat.com>
5476
5477         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5478         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5479         (get_fixed_memory_packet_size): New.
5480         (get_memory_packet_size): Use it.
5481         (set_memory_packet_size): Don't override the config size with
5482         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5483         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5484         Don't refer to get_memory_packet_size if not connected to a remote
5485         target.  Show "(default)" if configured size is 0.
5486
5487 2018-05-22  Pedro Alves  <palves@redhat.com>
5488
5489         * remote.c (remote_target::mourn_inferior): Move
5490         discard_pending_stop_replies call here from ...
5491         (_initialize_remote): ... here.
5492
5493 2018-05-22  Pedro Alves  <palves@redhat.com>
5494
5495         * remote.c (compare_section_command): Remove set_general_process
5496         call.
5497
5498 2018-05-22  Pedro Alves  <palves@redhat.com>
5499
5500         * remote.c (struct packet_reg, struct remote_arch_state):
5501         Move higher up in the file.
5502         (remote_state) <m_arch_states>: Store remote_arch_state values
5503         instead of remote_arch_state pointers.
5504         (remote_state::get_remote_arch_state): Adjust.
5505
5506 2018-05-22  Pedro Alves  <palves@redhat.com>
5507
5508         * remote.c: Include <unordered_map>.
5509         (remote_state): Now a class.
5510         (remote_state) <get_remote_arch_state>: Declare method.
5511         <get_remote_arch_state>: New field.
5512         (remote_arch_state) <remote_arch_state>: Declare ctor.
5513         <regs>: Now a unique_ptr.
5514         (remote_gdbarch_data_handle): Delete.
5515         (get_remote_arch_state): Delete.
5516         (remote_state::get_remote_arch_state): New.
5517         (get_remote_state): Adjust to call remote_state's
5518         get_remote_arch_state method.
5519         (init_remote_state): Delete, bits factored out to ...
5520         (remote_arch_state::remote_arch_state): ... this new method.
5521         (get_remote_packet_size, get_memory_packet_size)
5522         (process_g_packet, remote_target::fetch_registers)
5523         (remote_target::prepare_to_store, store_registers_using_G)
5524         (remote_target::store_registers, remote_target::get_trace_status):
5525         Adjust to call remote_state's method.
5526         (_initialize_remote): Remove reference to
5527         remote_gdbarch_data_handle.
5528
5529 2018-05-22  Pedro Alves  <palves@redhat.com>
5530
5531         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5532         pread>: New method declarations.
5533         (remote_target::open_1): Adjust.
5534         (readahead_cache_invalidate): Rename to ...
5535         (readahead_cache::invalidate): ... this, and adjust to be a class
5536         method.
5537         (readahead_cache_invalidate_fd): Rename to ...
5538         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5539         class method.
5540         (remote_hostio_pwrite): Adjust.
5541         (remote_hostio_pread_from_cache): Rename to ...
5542         (readahead_cache::pread): ... this, and adjust to be a class
5543         method.
5544         (remote_hostio_close): Adjust.
5545
5546 2018-05-22  Pedro Alves  <palves@redhat.com>
5547
5548         * remote.c (remote_hostio_close_cleanup): Delete.
5549         (class scoped_remote_fd): New.
5550         (remote_file_put, remote_file_get): Use it.
5551
5552 2018-05-22  Pedro Alves  <palves@redhat.com>
5553
5554         (struct vCont_action_support): Use bool and initialize all fields.
5555         (struct readahead_cache): Initialize all fields.
5556         (remote_state): Use bool and initialize all fields.
5557         (remote_state::remote_state, remote_state::~remote_state): New.
5558         (new_remote_state): Delete.
5559         (_initialize_remote): Use new to allocate remote_state.
5560
5561 2018-05-22  Pedro Alves  <palves@redhat.com>
5562             張俊芝  <zjz@zjz.name>
5563
5564         PR gdb/22973
5565         * c-exp.y: Include "c-support.h".
5566         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5567         of tolower.  Use c_ident_is_alpha to scan names.
5568         * c-lang.c: Include "c-support.h".
5569         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5570         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5571         * c-support.h: New file, with bits factored out from ...
5572         * cp-name-parser.y: ... this file.
5573         Include "c-support.h".
5574         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5575         c-support.h and renamed.
5576         (symbol_end, yylex): Adjust.
5577
5578 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5579
5580         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5581         parameter type to CORE_ADDR.
5582         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5583         parameter type in declaration to CORE_ADDR.
5584         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5585         target_auxv_search to get AT_HWCAP and use the result to get the
5586         target description.
5587         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5588         to CORE_ADDR. Remove the cast of the return value to unsigned
5589         long. Fix error predicate of target_auxv_search.
5590         (ppc_linux_nat_target::read_description): Change the type of the
5591         hwcap variable to CORE_ADDR.
5592
5593 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5594
5595         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5596         if the size of fpscr is larger than 32 bits.
5597
5598 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5599
5600         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5601         (ppc32_linux_vsxregmap): New global.
5602         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5603         regcache_supply_regset, and regcache_collect_regset.
5604         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5605         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5606         (fetch_vsx_register, store_vsx_register): Remove.
5607         (fetch_vsx_registers): Add regno parameter. Get regset using
5608         ppc_linux_vsxregset. Use regset to supply registers.
5609         (store_vsx_registers): Add regno parameter. Get regset using
5610         ppc_linux_vsxregset. Use regset to collect registers.
5611         (fetch_register): Call fetch_vsx_registers instead of
5612         fetch_vsx_register.
5613         (store_register): Call store_vsx_registers instead of
5614         store_vsx_register.
5615         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5616         new regno parameter.
5617         (store_ppc_registers): Call store_vsx_registers with -1 for the
5618         new regno parameter.
5619         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5620         (ppc_collect_vsxregset): Remove.
5621
5622 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5623
5624         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5625         offset fields.
5626         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5627         for vector register offset fields.
5628         (ppc64_fbsd_reg_offsets): Likewise.
5629         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5630         to vector register offset fields.
5631         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5632         to vector register offset fields.
5633         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5634         vector register offset fields.
5635         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5636         initializers for vector register offset fields.
5637         (rs6000_aix64_reg_offsets): Likewise.
5638         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5639         (ppc_supply_vrregset): Remove.
5640         (ppc_collect_vrregset): Remove.
5641         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5642         (ppc_linux_vrregset) : New function.
5643         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5644         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5645         (ppc32_linux_vrregset): Remove.
5646         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5647         and use result instead of ppc32_linux_vrregset.
5648         (ppc32_linux_reg_offsets): Remove initializers for vector register
5649         offset fields.
5650         (ppc64_linux_reg_offsets): Likewise.
5651         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5652         * ppc-linux-nat.c: Include regset.h.
5653         (gdb_vrregset_t): Adjust comment to account for little-endian
5654         mode.
5655         (supply_vrregset, fill_vrregset): Remove.
5656         (fetch_altivec_register, store_altivec_register): Remove.
5657         (fetch_altivec_registers): Add regno parameter. Get regset using
5658         ppc_linux_vrregset. Use regset to supply registers.
5659         (store_altivec_registers): Add regno parameter. Get regset using
5660         ppc_linux_vrregset. Use regset to collect registers.
5661         (fetch_register): Call fetch_altivec_registers instead of
5662         fetch_altivec_register.
5663         (store_register): Call store_altivec_registers instead of
5664         store_altivec_register.
5665         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5666         the new regno parameter.
5667         (store_ppc_registers): Call store_altivec_registers with -1 for
5668         the new regno parameter.
5669
5670 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5671
5672         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5673         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5674         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5675         (gdb_vrregset_t): Change array type size to
5676         PPC_LINUX_SIZEOF_VRREGSET.
5677         (gdb_vsxregset_t): Change array type size to
5678         PPC_LINUX_SIZEOF_VSXREGSET.
5679         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5680         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5681         PPC_LINUX_SIZEOF_VSXREGSET.
5682
5683 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5684
5685         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5686         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5687         nat/ppc-linux.c.
5688         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5689         ppc_linux_target_wordsize with tid.
5690         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5691         wordsize with tid.
5692         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5693         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5694         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5695         tid parameter. Remove static specifier.
5696         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5697         (ppc_linux_target_wordsize): New declaration.
5698
5699 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5700
5701         * arch/ppc-linux-common.c: New file.
5702         * arch/ppc-linux-common.h: New file.
5703         * arch/ppc-linux-tdesc.h: New file.
5704         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5705         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5706         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5707         arch/ppc-linux-tdesc.h.
5708         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5709         arch/ppc-linux-tdesc.h.
5710         (ppc_linux_nat_target::read_description): Remove target
5711         description matching code. Fill a ppc_linux_features struct and
5712         call ppc_linux_match_description with it. Move comment about ISA
5713         2.05 to ppc-linux-common.c.
5714         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5715         arch/ppc-linux-tdesc.h.
5716         (ppc_linux_core_read_description): Remove target description
5717         matching code. Fill a ppc_linux_features struct and call
5718         ppc_linux_match_description with it.
5719         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5720         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5721         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5722         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5723         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5724         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5725         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5726         (tdesc_powerpc_e500l): Remove.
5727
5728 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5729
5730         * ada-lang.c (catch_assert_command): Pass empty string instead
5731         of NULL for excep_string argument.
5732
5733 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5734
5735         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5736         the width of the requested register exceeds the width of the
5737         `ptrace' data type.
5738
5739 2018-05-21  Tom Tromey  <tom@tromey.com>
5740
5741         * printcmd.c (output_command): Remove.
5742         (output_command_const): Rename to output_command.
5743         * valprint.h (output_command): Rename from output_command_const.
5744         * tracepoint.c (trace_dump_actions): Call output_command.
5745
5746 2018-05-21  Tom Tromey  <tom@tromey.com>
5747
5748         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5749         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5750         * ada-lang.h (create_ada_exception_catchpoint): Update.
5751         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5752         std::string.
5753         (create_excep_cond_exprs, ~ada_catchpoint)
5754         (should_stop_exception, print_one_exception)
5755         (print_mention_exception, print_recreate_exception): Update.
5756         (ada_get_next_arg): Remove.
5757         (catch_ada_exception_command_split): Use std::string.  Change type
5758         of "excep_string", "cond_string".
5759         (catch_ada_exception_command): Update.
5760         (create_ada_exception_catchpoint): Change type of excep_string.
5761         (ada_exception_sal): Remove excep_string parameter.
5762         (~ada_catchpoint): Remove.
5763
5764 2018-05-21  Tom Tromey  <tom@tromey.com>
5765
5766         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5767         cleanup.
5768
5769 2018-05-21  Tom Tromey  <tom@tromey.com>
5770
5771         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5772         Return unique_xmalloc_ptr.
5773         (print_it_exception): Update.
5774
5775 2018-05-21  Tom Tromey  <tom@tromey.com>
5776
5777         * tracepoint.c (trace_dump_actions): Use std::string.
5778
5779 2018-05-21  Tom Tromey  <tom@tromey.com>
5780
5781         * symfile.c (reread_symbols): Use std::string for original_name.
5782
5783 2018-05-21  Tom Tromey  <tom@tromey.com>
5784
5785         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5786         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5787         constructor.
5788
5789 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5790
5791         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5792         instance to...
5793         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5794         * objfiles.c (get_objfile_bfd_data): Allocate
5795         objfile_per_bfd_storage with obstack_new when allocating on
5796         obstack.
5797
5798 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5799
5800         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5801         OBSTACK_ZALLOC.
5802         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5803         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5804         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5805         (add_pending): Likewise.
5806         (parse_symbol): Likewise.
5807         (parse_partial_symbols): Likewise.
5808         (psymtab_to_symtab_1): Likewise.
5809         (new_psymtab): Likewise.
5810         (elfmdebug_build_psymtabs): Likewise.
5811         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5812         * objfiles.c (get_objfile_bfd_data): Likewise.
5813         (objfile_register_static_link): Likewise.
5814         * psymtab.c (allocate_psymtab): Likewise.
5815         * stabsread.c (read_member_functions): Likewise.
5816         * xcoffread.c (xcoff_end_psymtab): Likewise.
5817
5818 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5819
5820         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5821         compiler supports std::is_trivially_constructible.
5822         * common/poison.h: Include obstack.h.
5823         (IsMallocable): Define to is_trivially_constructible if the
5824         compiler supports it, define to true_type otherwise.
5825         (xobnew): New.
5826         (XOBNEW): Redefine.
5827         (xobnewvec): New.
5828         (XOBNEWVEC): Redefine.
5829         * gdb_obstack.h (obstack_zalloc): New.
5830         (OBSTACK_ZALLOC): Redefine.
5831         (obstack_calloc): New.
5832         (OBSTACK_CALLOC): Redefine.
5833         (obstack_new): New.
5834         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5835         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5836         gdbarch.c.
5837         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5838         obstack_calloc/obstack_zalloc.
5839         (gdbarch_obstack_zalloc): Remove.
5840         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5841
5842 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5843
5844         * stack.c (backtrace_command_1): Remove useless variable int i.
5845
5846 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5847
5848         * stack.c (print_frame_info): Fix comment.
5849
5850 2018-05-18  Tom Tromey  <tom@tromey.com>
5851
5852         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5853         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5854         (~dwarf2_per_objfile): Update
5855         (dwarf2_get_dwz_file): Use new.
5856         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5857         unique_ptr.
5858
5859 2018-05-18  Tom Tromey  <tom@tromey.com>
5860
5861         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5862         unique_ptr.
5863         * dwarf2read.c (struct dwp_file): Add constructor and
5864         initializers.
5865         (open_and_init_dwp_file): Return a unique_ptr.
5866         (dwarf2_per_objfile, create_dwp_hash_table)
5867         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5868         (lookup_dwo_unit_in_dwp): Update.
5869         (open_and_init_dwp_file, get_dwp_file): Update.
5870
5871 2018-05-18  Tom Tromey  <tom@tromey.com>
5872
5873         * dwarf2read.c (dwarf2_per_objfile): Update.
5874         (struct mapped_index): Add initializers.
5875         (dwarf2_read_index): Use new.
5876         (dw2_symtab_iter_init): Update.
5877         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5878         unique_ptr.
5879
5880 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5881
5882         * dwarf2read.c (mapped_index) <total_size>: Remove.
5883
5884 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5885
5886         * unittests/format_pieces-selftests.c (test_format_specifier):
5887         Add ARI comments.
5888
5889 2018-05-18  Tom Tromey  <tom@tromey.com>
5890
5891         * c-typeprint.c (maybe_print_hole): New function.
5892         (c_print_type_struct_field_offset): Update.
5893         (c_type_print_base_struct_union): Call maybe_print_hole.
5894
5895 2018-05-17  Keith Seitz  <keiths@redhat.com>
5896
5897         * breakpoint.c (build_bpstat_chain): New function, moved from
5898         bpstat_stop_status.
5899         (bpstat_stop_status): Add optional parameter, `stop_chain'.
5900         If no stop chain is passed, call build_bpstat_chain to build it.
5901         * breakpoint.h (build_bpstat_chain): Declare.
5902         (bpstat_stop_status): Move documentation here from breakpoint.c.
5903         * infrun.c (handle_signal_stop): Before eliding inlined frames,
5904         build the stop chain and pass it to skip_inline_frames.
5905         Pass this stop chain to bpstat_stop_status.
5906         * inline-frame.c: Include breakpoint.h.
5907         (stopped_by_user_bp_inline_frame): New function.
5908         (skip_inline_frames): Add parameter `stop_chain'.
5909         Move documention to inline-frame.h.
5910         If non-NULL, use stopped_by_user_bp_inline_frame to determine
5911         whether the frame should be elided.
5912         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5913         Add moved documentation and update for new parameter.
5914
5915 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5916
5917         PR cli/14975
5918         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5919         unittests/format_pieces-selftests.c.
5920         * common/format.h (format_piece) <operator==>: New.
5921         (format_pieces) <operator[]>: Remove.
5922         * common/format.c (format_pieces::format_pieces): Handle \e.
5923         * unittests/format_pieces-selftests.c: New.
5924
5925 2018-05-17  Tom Tromey  <tom@tromey.com>
5926
5927         PR symtab/23010:
5928         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5929         (dw2_instantiate_symtab): Add skip_partial parameter.
5930         (dw2_find_last_source_symtab, dw2_map_expand_apply)
5931         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5932         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5933         (dw2_expand_symtabs_matching_one)
5934         (dw2_find_pc_sect_compunit_symtab)
5935         (dw2_debug_names_lookup_symbol)
5936         (dw2_debug_names_expand_symtabs_for_function): Update.
5937         (init_cutu_and_read_dies): Add skip_partial parameter.
5938         (process_psymtab_comp_unit, build_type_psymtabs_1)
5939         (process_skeletonless_type_unit, load_partial_comp_unit)
5940         (psymtab_to_symtab_1): Update.
5941         (load_full_comp_unit): Add skip_partial parameter.
5942         (process_imported_unit_die, dwarf2_read_addr_index)
5943         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5944         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5945         (read_signatured_type): Update.
5946
5947 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5948
5949         * value.c (release_value): Remove unused variable.
5950         (record_latest_value): Likewise.
5951         (access_value_history): Likewise.
5952         (preserve_values): Likewise.
5953
5954 2018-05-17  Tom Tromey  <tom@tromey.com>
5955
5956         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5957         Initialize.
5958
5959 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
5960
5961         PR gdb/22286
5962         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5963         Also handle registers whose width is not a multiple of
5964         PTRACE_TYPE_RET.
5965         (linux_nat_trad_target::store_register): Likewise.
5966
5967 2018-05-16  Tom Tromey  <tom@tromey.com>
5968
5969         * gdbcore.h (core_bfd): Redefine.
5970         * corelow.c (core_target::close): Update.
5971         (core_target_open): Update.
5972         * progspace.h (struct program_space) <cbfd>: Now a
5973         gdb_bfd_ref_ptr.
5974
5975 2018-05-16  Tom Tromey  <tom@tromey.com>
5976
5977         PR cli/19551:
5978         * symfile-add-flags.h (enum symfile_add_flags)
5979         <SYMFILE_NOT_FILENAME>: New constant.
5980         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
5981         objfile name from BFD.
5982         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5983         * minidebug.c (find_separate_debug_file_in_section): Put
5984         ".gnu_debugdata" into BFD's file name.
5985
5986 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
5987
5988         * regcache.c (regcache_read_ftype, regcache_write_ftype):
5989         Remove.
5990
5991 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
5992
5993         PR binutils/21446
5994         * aarch64-tdep.c (aarch64_analyze_prologue,
5995         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5996         Indicate not interested in errors.
5997
5998 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5999
6000         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6001         Supply the MIPS_ZERO_REGNUM register.
6002
6003 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6004
6005         * mips-tdep.c (mask_address_var): Make variable static.
6006
6007 2018-05-14  Tom Tromey  <tom@tromey.com>
6008
6009         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6010
6011 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6012
6013         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6014         FXSAVE_ADDR for the mxcsr register.
6015
6016 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6017
6018         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6019
6020 2018-05-11  Pedro Alves  <palves@redhat.com>
6021
6022         * corelow.c (core_target) <core_target>: No longer inline.
6023         Initialize m_core_gdbarch, m_core_vec and build the section table
6024         here.
6025         <~core_target>: New.
6026         <core_gdbarch, get_core_register_section>: New methods.
6027         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6028         factored out from ...
6029         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6030         (core_ops): Delete.
6031         (sniff_core_bfd): Add gdbarch parameter.
6032         (core_close): Delete, merged into ...
6033         (core_target::close): ... here.  Delete self.
6034         (core_close_cleanup): Delete.
6035         (core_target_open): Allocate a core_target on the heap.  Use a
6036         unique_ptr instead of a cleanup.  Bits moved into the core_target
6037         ctor.  Adjust to use core_target methods instead of globals.
6038         (get_core_register_section): Rename to ...
6039         (core_target::get_core_register_section): ... this and adjust.
6040         (struct get_core_registers_cb_data): New.
6041         (get_core_registers_cb): Use it.  Use bool.
6042         (core_target::fetch_registers, core_target::files_info)
6043         (core_target::xfer_partial, core_target::read_description)
6044         (core_target::pid_to, core_target::thread_name): Adjust to
6045         reference class fields instead of globals.
6046         * target.h (struct target_ops_deleter, target_ops_up): New.
6047
6048 2018-05-11  Pedro Alves  <palves@redhat.com>
6049
6050         * corefile.c (core_file_command): Move to corelow.c.
6051         * corelow.c (the_core_target): Delete.
6052         (core_file_command): Moved from corefile.c.  Check exec_bfd
6053         instead of the_core_target.  Use target_detach instead of calling
6054         into the_core_target directly.
6055         (maybe_say_no_core_file_now): New.
6056         (core_target::detach): Use it.
6057         (_initialize_corelow): Remove references to the_core_target.
6058         * gdbcore.h (the_core_target): Delete.
6059
6060 2018-05-11  Tom Tromey  <tromey@redhat.com>
6061             Pedro Alves  <palves@redhat.com>
6062
6063         * corefile.c (core_bfd): Remove.
6064         * gdbcore.h (core_bfd): Now a macro.
6065         * progspace.h (struct program_space) <cbfd>: New field.
6066
6067 2018-05-11  Tom Tromey  <tom@tromey.com>
6068
6069         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6070         gdb::def_vector.
6071
6072 2018-05-10  Tom Tromey  <tom@tromey.com>
6073
6074         * configure: Rebuild.
6075         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6076
6077 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6078
6079         PR server/23158:
6080         * regformats/regdat.sh: Adjust script, following the addition
6081         of the new expedite_regs parameter to init_target_desc.
6082
6083 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6084     
6085         PR gdb/23127
6086         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6087         set_gdbarch_significant_addr_bit.
6088         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6089         set_gdbarch_significant_addr_bit.
6090         * utils.c (address_significant): Update to sign extend addr.
6091
6092 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6093
6094         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6095         (xtensa_linux_init_abi): Limit tdep->num_regs by
6096         tdep->num_nopriv_regs.
6097         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6098         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6099         not initialized.
6100
6101 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6102
6103         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6104
6105 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6106
6107         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6108         (I387_MXCSR_INIT_VAL): New constant.
6109         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6110         buffer if it was supplied by the inferior.
6111         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6112         (i387_xsave_get_clear_bv): New function.
6113         (i387_supply_xsave): Only read x87 control registers from the
6114         xsave buffer if the feature is enabled, and the state will have
6115         been written, otherwise, provide a suitable default.
6116         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6117         including x87 control registers.  Update control registers if they
6118         have changed from the default value, and mark features as enabled
6119         as required.
6120         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6121
6122 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6123
6124         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6125
6126 2018-05-07  Tom Tromey  <tom@tromey.com>
6127
6128         * configure: Rebuild.
6129         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6130
6131 2018-05-07  Tom Tromey  <tom@tromey.com>
6132
6133         PR tdep/20362:
6134         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6135         bit.  Use correct value for VDIV.
6136
6137 2018-05-04  Tom Tromey  <tom@tromey.com>
6138
6139         * configure: Rebuild.
6140         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6141
6142 2018-05-04  Tom Tromey  <tom@tromey.com>
6143
6144         * linux-record.c (record_linux_system_call) <case
6145         RECORD_SYS_RECVFROM>: Add "break".
6146
6147 2018-05-04  Tom Tromey  <tom@tromey.com>
6148
6149         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6150         Add missing "break".
6151         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6152         Add missing "break".
6153
6154 2018-05-04  Tom Tromey  <tom@tromey.com>
6155
6156         * rs6000-tdep.c (ppc_process_record_op4)
6157         (ppc_process_record_op63): Add fall-through comment.
6158
6159 2018-05-04  Tom Tromey  <tom@tromey.com>
6160
6161         * i386-tdep.c (i386_process_record): Add fall-through comment.
6162
6163 2018-05-04  Tom Tromey  <tom@tromey.com>
6164
6165         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6166         comment.
6167
6168 2018-05-04  Tom Tromey  <tom@tromey.com>
6169
6170         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6171         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6172         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6173         comment.
6174         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6175         comment.
6176         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6177         comment.
6178
6179 2018-05-04  Tom Tromey  <tom@tromey.com>
6180
6181         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6182
6183 2018-05-04  Tom Tromey  <tom@tromey.com>
6184
6185         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6186         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6187         * symfile.c (section_is_mapped): Fix fall-through comment.
6188         * stabsread.c (define_symbol, read_member_functions): Fix
6189         fall-through comment.
6190         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6191         comment.
6192         * remote.c (remote_wait_as): Fix fall-through comment.
6193         * p-exp.y (yylex): Fix fall-through comment.
6194         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6195         comment.
6196         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6197         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6198         * jv-exp.y (yylex): Fix fall-through comment.
6199         * go-exp.y (lex_one_token): Fix fall-through comment.
6200         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6201         fall-through comment.
6202         * f-exp.y (yylex): Fix fall-through comment.
6203         * dwarf2read.c (process_die): Fix fall-through comments.
6204         * dbxread.c (process_one_symbol): Fix fall-through comment.
6205         * d-exp.y (lex_one_token): Fix fall-through comment.
6206         * cp-name-parser.y (yylex): Fix fall-through comment.
6207         * coffread.c (coff_symtab_read): Fix fall-through comment.
6208         * c-exp.y (lex_one_token): Fix fall-through comment.
6209         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6210         comment.
6211         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6212         comment.
6213
6214 2018-05-04  Tom Tromey  <tom@tromey.com>
6215
6216         PR python/22730:
6217         * NEWS: Mention gdb.execute change.
6218         * gdbcmd.h (execute_control_command): Don't declare.
6219         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6220         execute_control_commands, execute_control_commands_to_string.
6221         * cli/cli-script.h (execute_control_commands)
6222         (execute_control_commands_to_string): Declare.
6223         (execute_control_command): Add from_tty parameter.
6224         * cli/cli-script.c (execute_control_commands)
6225         (execute_control_commands_to_string): New functions.
6226         (execute_user_command): Use execute_control_commands.
6227         (execute_control_command_1): Add "from_tty" parameter.  Update.
6228         (execute_control_command): Likewise.
6229
6230 2018-05-04  Tom Tromey  <tom@tromey.com>
6231
6232         PR python/22731:
6233         * NEWS: Mention that breakpoint commands are writable.
6234         * python/py-breakpoint.c (bppy_set_commands): New function.
6235         (breakpoint_object_getset) <"commands">: Use it.
6236
6237 2018-05-04  Tom Tromey  <tom@tromey.com>
6238
6239         * tracepoint.c (actions_command): Update.
6240         * mi/mi-cmd-break.c (mi_command_line_array)
6241         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6242         (mi_read_next_line): Remove.
6243         (mi_cmd_break_commands): Update.
6244         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6245         function_view.
6246         * cli/cli-script.c (get_command_line): Update.
6247         (process_next_line): Use function_view.  Constify.
6248         (recurse_read_control_structure, read_command_lines)
6249         (read_command_lines_1): Change argument types to function_view.
6250         (do_define_command, document_command): Update.
6251         * breakpoint.h (check_tracepoint_command): Don't declare.
6252         * breakpoint.c (check_tracepoint_command): Remove.
6253         (commands_command_1, create_tracepoint_from_upload): Update.
6254
6255 2018-05-04  Tom Tromey  <tom@tromey.com>
6256
6257         PR gdb/11750:
6258         * cli/cli-script.h (enum command_control_type) <define_control>:
6259         New constant.
6260         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6261         (build_command_line, execute_control_command_1)
6262         (process_next_line): Likewise.
6263         (do_define_command): New function, extracted from define_command.
6264         (define_command): Use it.
6265
6266 2018-05-04  Tom Tromey  <tom@tromey.com>
6267
6268         * tracepoint.c (actions_command): Update.
6269         * cli/cli-script.h (read_command_lines): Update.
6270         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6271         (MAX_TMPBUF): Remove define.
6272         (define_command): Use string_printf.
6273         (document_command): Likewise.
6274         * breakpoint.c (commands_command_1): Update.
6275
6276 2018-05-04  Tom Tromey  <tom@tromey.com>
6277
6278         * top.c (execute_command): Update.
6279         * cli/cli-script.h (print_command_lines): Now varargs.
6280         * cli/cli-script.c (print_command_lines): Now varargs.
6281         (execute_control_command_1) <case while_control, case if_control>:
6282         Update.
6283
6284 2018-05-04  Tom Tromey  <tom@tromey.com>
6285
6286         * tracepoint.c (all_tracepoint_actions): Rename from
6287         all_tracepoint_actions_and_cleanup.  Change return type.
6288         (actions_command, encode_actions_1, encode_actions)
6289         (trace_dump_actions, tdump_command): Update.
6290         * remote.c (remote_download_command_source): Update.
6291         * python/python.c (gdbpy_eval_from_control_command)
6292         (python_command, python_interactive_command): Update.
6293         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6294         * guile/guile.c (guile_command)
6295         (gdbscm_eval_from_control_command, guile_command): Update.
6296         * compile/compile.c (compile_code_command)
6297         (compile_print_command, compile_to_object): Update.
6298         * cli/cli-script.h (struct command_lines_deleter): New.
6299         (counted_command_line): New typedef.
6300         (struct command_line): Add constructor, destructor.
6301         <body_list>: Remove.
6302         <body_list_0, body_list_1>: New members.
6303         (command_line_up): Remove typedef.
6304         (read_command_lines, read_command_lines_1, get_command_line):
6305         Update.
6306         (copy_command_lines): Don't declare.
6307         * cli/cli-script.c (build_command_line): Use "new".
6308         (get_command_line): Return counted_command_line.
6309         (print_command_lines, execute_user_command)
6310         (execute_control_command_1, while_command, if_command): Update.
6311         (realloc_body_list): Remove.
6312         (process_next_line, recurse_read_control_structure): Update.
6313         (read_command_lines, read_command_lines_1): Return counted_command_line.
6314         (free_command_lines): Use "delete".
6315         (copy_command_lines): Remove.
6316         (define_command, document_command, show_user_1): Update.
6317         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6318         a counted_command_line.
6319         * breakpoint.h (counted_command_line): Remove typedef.
6320         (breakpoint_set_commands): Update.
6321         * breakpoint.c (check_no_tracepoint_commands)
6322         (validate_commands_for_breakpoint): Update.
6323         (breakpoint_set_commands): Change commands to be a
6324         counted_command_line.
6325         (commands_command_1, update_dprintf_command_list)
6326         (create_tracepoint_from_upload): Update.
6327
6328 2018-05-04  Tom Tromey  <tom@tromey.com>
6329
6330         * cli/cli-decode.h (cmd_list_element): New constructor.
6331         (~cmd_list_element): New destructor.
6332         (struct cmd_list_element): Add initializers.
6333         * cli/cli-decode.c (do_add_cmd): Use "new".
6334         (delete_cmd): Use "delete".
6335
6336 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6337             Pedro Alves <palves@redhat.com>
6338
6339         PR breakpoints/19806 and support for PR external/20207.
6340         * NEWS: Mention Aarch64 watchpoint improvements.
6341         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6342         watchpoints and PR external/20207 watchpoints.
6343         * nat/aarch64-linux-hw-point.c
6344         (kernel_supports_any_contiguous_range): New.
6345         (aarch64_watchpoint_offset): New.
6346         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6347         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6348         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6349         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6350         next_addr_orig_p.  Support PR external/20207 watchpoints.
6351         (aarch64_downgrade_regs): New.
6352         (aarch64_dr_state_insert_one_point): New parameters offset and
6353         addr_orig.
6354         (aarch64_dr_state_remove_one_point): Likewise.
6355         (aarch64_handle_breakpoint): Update caller.
6356         (aarch64_handle_aligned_watchpoint): Likewise.
6357         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6358         aligned_offset.
6359         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6360         aarch64_downgrade_regs.
6361         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6362         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6363         (DR_CONTROL_MASK): ... this.
6364         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6365         (unsigned int aarch64_watchpoint_offset): New prototype.
6366         (aarch64_linux_set_debug_regs): Remove const from state.
6367         * utils.c (align_up, align_down): Move to ...
6368         * common/common-utils.c (align_up, align_down): ... here.
6369         * utils.h (align_up, align_down): Move to ...
6370         * common/common-utils.h (align_up, align_down): ... here.
6371
6372 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6373
6374         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6375         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6376         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6377         Re-implement to match the ABI as summarized in GCC's
6378         gcc/config/sparc/sparc.c.  All callers updated.
6379         (sparc32_store_arguments): Remove assertion.
6380
6381 2018-05-04  Tom Tromey  <tom@tromey.com>
6382
6383         * printcmd.c: Don't include tui.h.
6384         (decode_format): Use skip_spaces.
6385
6386 2018-05-04  Tom Tromey  <tom@tromey.com>
6387
6388         PR gdb/22619:
6389         * printcmd.c (last_count): New global.
6390         (x_command): Use saved count when repeating.
6391
6392 2018-05-04  Tom Tromey  <tom@tromey.com>
6393
6394         * nto-procfs.c (do_closedir_cleanup): Remove.
6395         (procfs_pidlist): Use gdb_dir_up.
6396         * procfs.c (do_closedir_cleanup): Remove.
6397         (proc_update_threads): Use gdb_dir_up.
6398         * common/filestuff.h (struct gdb_dir_deleter): New.
6399         (gdb_dir_up): New typedef.
6400
6401 2018-05-04  Tom Tromey  <tom@tromey.com>
6402
6403         * ada-lang.c (print_mention_exception): Use std::string.
6404
6405 2018-05-04  Tom Tromey  <tom@tromey.com>
6406
6407         * ada-lang.c (create_excep_cond_exprs): Update.
6408         (ada_exception_catchpoint_cond_string): Use std::string.
6409
6410 2018-05-04  Tom Tromey  <tom@tromey.com>
6411
6412         * ada-lang.c (xget_renaming_scope): Return std::string.
6413         (old_renaming_is_invisible): Update.
6414
6415 2018-05-04  Tom Tromey  <tom@tromey.com>
6416
6417         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6418         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6419
6420 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6421
6422         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6423
6424 2018-05-04  Tom Tromey  <tom@tromey.com>
6425
6426         * remote.c (remote_query_supported_append): Change type.
6427         (remote_check_symbols): Update.
6428
6429 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6430
6431         PR gdb/11420
6432         * configure.ac: Prepend libpython.
6433         * python/python-config.py: Likewise.
6434         * configure: Regenerate.
6435
6436 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6437
6438         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6439
6440 2018-05-03  Pedro Alves  <palves@redhat.com>
6441
6442         * s390-linux-nat.c
6443         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6444         override.  Write 'true' instead of '1'.
6445         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6446         declaration.
6447
6448 2018-05-02  Pedro Alves  <palves@redhat.com>
6449
6450         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6451         add_inf_child_target.
6452         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6453         add_inf_child_target.
6454         * aix-thread.c (aix_thread_target_info): New.
6455         (aix_thread_target) <shortname, longname, doc>: Delete.
6456         <info>: New.
6457         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6458         add_inf_child_target.
6459         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6460         add_inf_child_target.
6461         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6462         add_inf_child_target.
6463         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6464         add_inf_child_target.
6465         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6466         add_inf_child_target.
6467         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6468         add_inf_child_target.
6469         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6470         add_inf_child_target.
6471         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6472         add_inf_child_target.
6473         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6474         add_inf_child_target.
6475         * bfd-target.c (target_bfd_target_info): New.
6476         (target_bfd) <shortname, longname, doc>: Delete.
6477         <info>: New.
6478         * bsd-kvm.c (bsd_kvm_target_info): New.
6479         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6480         <info>: New.
6481         (bsd_kvm_target::open): Rename to ...
6482         (bsd_kvm_target_open): ... this.  Adjust.
6483         * bsd-uthread.c (bsd_uthread_target_info): New.
6484         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6485         <info>: New.
6486         * corefile.c (core_file_command): Adjust.
6487         * corelow.c (core_target_info): New.
6488         (core_target) <shortname, longname, doc>: Delete.
6489         <info>: New.
6490         (core_target::open): Rename to ...
6491         (core_target_open): ... this.  Adjust.
6492         * ctf.c (ctf_target_info): New.
6493         (ctf_target) <shortname, longname, doc>: Delete.
6494         <info>: New.
6495         (ctf_target::open): Rename to ...
6496         (ctf_target_open): ... this.
6497         (_initialize_ctf): Adjust.
6498         * exec.c (exec_target_info): New.
6499         (exec_target) <shortname, longname, doc>: Delete.
6500         <info>: New.
6501         (exec_target::open): Rename to ...
6502         (exec_target_open): ... this.
6503         * gdbcore.h (core_target_open): Declare.
6504         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6505         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6506         add_inf_child_target.
6507         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6508         add_inf_child_target.
6509         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6510         add_inf_child_target.
6511         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6512         add_inf_child_target.
6513         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6514         add_inf_child_target.
6515         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6516         add_inf_child_target.
6517         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6518         add_inf_child_target.
6519         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6520         add_inf_child_target.
6521         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6522         add_inf_child_target.
6523         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6524         add_inf_child_target.
6525         * inf-child.c (inf_child_target_info): New.
6526         (inf_child_target::info): New.
6527         (inf_child_open_target): Remove 'target' parameter.  Use
6528         get_native_target instead.
6529         (inf_child_target::open): Delete.
6530         (add_inf_child_target): New.
6531         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6532         Delete.
6533         <info>: New.
6534         (add_inf_child_target): Declare.
6535         (inf_child_open_target): Declare.
6536         * linux-thread-db.c (thread_db_target_info): New.
6537         (thread_db_target) <shortname, longname, doc>: Delete.
6538         <info>: New.
6539         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6540         add_inf_child_target.
6541         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6542         add_inf_child_target.
6543         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6544         add_inf_child_target.
6545         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6546         add_inf_child_target.
6547         * make-target-delegates (print_class): Adjust.
6548         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6549         add_inf_child_target.
6550         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6551         add_inf_child_target.
6552         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6553         add_inf_child_target.
6554         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6555         add_inf_child_target.
6556         * nto-procfs.c (nto_native_target_info): New.
6557         (nto_procfs_target_native) <shortname, longname, doc>:
6558         Delete.
6559         <info>: New.
6560         (nto_procfs_target_info): New.
6561         (nto_procfs_target_procfs) <shortname, longname, doc>:
6562         Delete.
6563         <info>: New.
6564         (init_procfs_targets): Adjust.
6565         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6566         add_inf_child_target.
6567         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6568         add_inf_child_target.
6569         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6570         add_inf_child_target.
6571         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6572         add_inf_child_target.
6573         * ravenscar-thread.c (ravenscar_target_info): New.
6574         (ravenscar_thread_target) <shortname, longname, doc>:
6575         Delete.
6576         <info>: New.
6577         * record-btrace.c (record_btrace_target_info):
6578         (record_btrace_target) <shortname, longname, doc>: Delete.
6579         <info>: New.
6580         (record_btrace_target::open): Rename to ...
6581         (record_btrace_target_open): ... this.  Adjust.
6582         * record-full.c (record_longname, record_doc): New.
6583         (record_full_base_target) <shortname, longname, doc>: Delete.
6584         <info>: New.
6585         (record_full_target_info): New.
6586         (record_full_target): <shortname>: Delete.
6587         <info>: New.
6588         (record_full_core_open_1, record_full_open_1): Update comments.
6589         (record_full_base_target::open): Rename to ...
6590         (record_full_open): ... this.
6591         (cmd_record_full_restore): Update.
6592         (_initialize_record_full): Update.
6593         * remote-sim.c (remote_sim_target_info): New.
6594         (gdbsim_target) <shortname, longname, doc>: Delete.
6595         <info>: New.
6596         (gdbsim_target::open): Rename to ...
6597         (gdbsim_target_open): ... this.
6598         (_initialize_remote_sim): Adjust.
6599         * remote.c (remote_doc): New.
6600         (remote_target_info): New.
6601         (remote_target) <shortname, longname, doc>: Delete.
6602         <info>: New.
6603         (extended_remote_target_info): New.
6604         (extended_remote_target) <shortname, longname, doc>: Delete.
6605         <info>: New.
6606         (remote_target::open_1): Make static.  Adjust.
6607         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6608         * s390-linux-nat.c (_initialize_s390_nat): Use
6609         add_inf_child_target.
6610         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6611         add_inf_child_target.
6612         * sol-thread.c (thread_db_target_info): New.
6613         (sol_thread_target) <shortname, longname, doc>: Delete.
6614         <info>: New.
6615         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6616         add_inf_child_target.
6617         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6618         add_inf_child_target.
6619         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6620         add_inf_child_target.
6621         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6622         add_inf_child_target.
6623         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6624         add_inf_child_target.
6625         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6626         add_inf_child_target.
6627         * spu-linux-nat.c (_initialize_spu_nat): Use
6628         add_inf_child_target.
6629         * spu-multiarch.c (spu_multiarch_target_info): New.
6630         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6631         <info>: New.
6632         * target-delegates.c: Regenerate.
6633         * target.c: Include <unordered_map>.
6634         (target_ops_p): Delete.
6635         (DEF_VEC_P(target_ops_p)): Delete.
6636         (target_factories): New.
6637         (test_target_info): New.
6638         (test_target_ops::info): New.
6639         (open_target): Adjust to use target_factories.
6640         (add_target_with_completer): Rename to ...
6641         (add_target): ... this.  Change prototype.  Register target_info
6642         and open callback in target_factories.  Register target_info in
6643         command context instead of target_ops.
6644         (add_target): Delete old implementation.
6645         (add_deprecated_target_alias): Change prototype.  Adjust.
6646         (the_native_target): New.
6647         (set_native_target, get_native_target): New.
6648         (find_default_run_target): Use the_native_target.
6649         (find_attach_target, find_run_target): Simplify.
6650         (target_ops::open): Delete.
6651         (dummy_target_info): New.
6652         (dummy_target::shortname, dummy_target::longname)
6653         (dummy_target::doc): Delete.
6654         (dummy_target::info): New.
6655         (debug_target::shortname, debug_target::longname)
6656         (debug_target::doc): Delete.
6657         (debug_target::info): New.
6658         * target.h (struct target_info): New.
6659         (target_ops::~target_ops): Add comment.
6660         (target_ops::info): New.
6661         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6662         longer virtual.  Implement in terms of target_info.
6663         (set_native_target, get_native_target): Declare.
6664         (target_open_ftype): New.
6665         (add_target, add_target_with_completer)
6666         (add_deprecated_target_alias): Change prototype.
6667         (test_target) <shortname, longname, doc>: Delete.
6668         <info>: New.
6669         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6670         add_inf_child_target.
6671         * tracefile-tfile.c (tfile_target_info): New.
6672         (tfile_target) <shortname, longname, doc>: Delete.
6673         <info>: New.
6674         (tfile_target::open): Rename to ...
6675         (tfile_target_open): ... this.
6676         (_initialize_tracefile_tfile): Adjust.
6677         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6678         add_inf_child_target.
6679         * windows-nat.c (_initialize_windows_nat): Use
6680         add_inf_child_target.
6681         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6682         add_inf_child_target.
6683
6684 2018-05-02  Pedro Alves  <palves@redhat.com>
6685
6686         * linux-nat.h (linux_nat_target) <low_new_thread,
6687         low_delete_thread, low_new_fork, low_forget_process,
6688         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6689         New virtual methods.
6690         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6691         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6692         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6693         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6694         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6695         Delete.
6696         * linux-fork.c (delete_fork): Adjust to call low method.
6697         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6698         (linux_nat_new_fork, linux_nat_forget_process_hook)
6699         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6700         (linux_nat_status_is_event):
6701         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6702         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6703         to call low method.
6704         (sigtrap_is_event): Rename to ...
6705         (linux_nat_target::low_status_is_event): ... this.
6706         (linux_nat_set_status_is_event): Delete.
6707         (save_stop_reason, linux_nat_wait_1)
6708         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6709         low methods.
6710         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6711         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6712         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6713         (linux_nat_set_prepare_to_resume): Delete.
6714         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6715         low virtual methods.
6716         * amd64-linux-nat.c: Likewise.
6717         * arm-linux-nat.c: Likewise.
6718         * i386-linux-nat.c: Likewise.
6719         * ia64-linux-nat.c: Likewise.
6720         * mips-linux-nat.c: Likewise.
6721         * ppc-linux-nat.c: Likewise.
6722         * s390-linux-nat.c: Likewise.
6723         * sparc64-linux-nat.c: Likewise.
6724         * x86-linux-nat.c: Likewise.
6725         * x86-linux-nat.h: Include "nat/x86-linux.h".
6726         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6727         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6728         Override methods.
6729
6730 2018-05-02  Pedro Alves  <palves@redhat.com>
6731
6732         * target.h (target_ops)
6733         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6734         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6735         stopped_by_watchpoint, have_continuable_watchpoint,
6736         stopped_data_address, watchpoint_addr_within_range,
6737         can_accel_watchpoint_condition, can_run, thread_alive,
6738         has_all_memory, has_memory, has_stack, has_registers,
6739         has_execution, can_async_p, is_async_p, supports_non_stop,
6740         always_non_stop_p, can_execute_reverse, supports_multi_process,
6741         supports_enable_disable_tracepoint,
6742         supports_disable_randomization, supports_string_tracing,
6743         supports_evaluation_of_breakpoint_conditions,
6744         can_run_breakpoint_commands, filesystem_is_local,
6745         can_download_tracepoint, get_trace_state_variable_value,
6746         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6747         record_is_replaying, record_will_replay,
6748         augmented_libraries_svr4_read>: Adjust to return bool.
6749         * aarch64-linux-nat.c: All implementations adjusted.
6750         * aix-thread.c: All implementations adjusted.
6751         * arm-linux-nat.c: All implementations adjusted.
6752         * breakpoint.c: All implementations adjusted.
6753         * bsd-kvm.c: All implementations adjusted.
6754         * bsd-uthread.c: All implementations adjusted.
6755         * corelow.c: All implementations adjusted.
6756         * ctf.c: All implementations adjusted.
6757         * darwin-nat.c: All implementations adjusted.
6758         * darwin-nat.h: All implementations adjusted.
6759         * exec.c: All implementations adjusted.
6760         * fbsd-nat.c: All implementations adjusted.
6761         * fbsd-nat.h: All implementations adjusted.
6762         * gnu-nat.c: All implementations adjusted.
6763         * gnu-nat.h: All implementations adjusted.
6764         * go32-nat.c: All implementations adjusted.
6765         * ia64-linux-nat.c: All implementations adjusted.
6766         * inf-child.c: All implementations adjusted.
6767         * inf-child.h: All implementations adjusted.
6768         * inf-ptrace.c: All implementations adjusted.
6769         * inf-ptrace.h: All implementations adjusted.
6770         * linux-nat.c: All implementations adjusted.
6771         * linux-nat.h: All implementations adjusted.
6772         * mips-linux-nat.c: All implementations adjusted.
6773         * nto-procfs.c: All implementations adjusted.
6774         * ppc-linux-nat.c: All implementations adjusted.
6775         * procfs.c: All implementations adjusted.
6776         * ravenscar-thread.c: All implementations adjusted.
6777         * record-btrace.c: All implementations adjusted.
6778         * record-full.c: All implementations adjusted.
6779         * remote-sim.c: All implementations adjusted.
6780         * remote.c: All implementations adjusted.
6781         * s390-linux-nat.c: All implementations adjusted.
6782         * sol-thread.c: All implementations adjusted.
6783         * spu-multiarch.c: All implementations adjusted.
6784         * target-delegates.c: All implementations adjusted.
6785         * target.c: All implementations adjusted.
6786         * target.h: All implementations adjusted.
6787         * tracefile-tfile.c: All implementations adjusted.
6788         * tracefile.c: All implementations adjusted.
6789         * tracefile.h: All implementations adjusted.
6790         * windows-nat.c: All implementations adjusted.
6791         * x86-linux-nat.h: All implementations adjusted.
6792         * x86-nat.h: All implementations adjusted.
6793
6794 2018-05-02  Pedro Alves  <palves@redhat.com>
6795
6796         * make-target-delegates (scan_target_h): Don't trim lines here.
6797         Replace sequences of tabs and/or whitespace with a single
6798         whitespace.
6799         (top level, parsing methods): Trim each line before processing it
6800         here.
6801
6802 2018-05-02  Pedro Alves  <palves@redhat.com>
6803             John Baldwin  <jhb@freebsd.org>
6804
6805         * target.h (enum strata) <debug_stratum>: New.
6806         (struct target_ops) <all delegation methods>: Replace by C++
6807         virtual methods, and drop "to_" prefix.  All references updated
6808         throughout.
6809         <to_shortname, to_longname, to_doc, to_data,
6810         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6811         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6812         virtual methods.  All references updated throughout.
6813         <can_attach, supports_terminal_ours, can_create_inferior,
6814         get_thread_control_capabilities, attach_no_wait>: New
6815         virtual methods.
6816         <insert_breakpoint, remove_breakpoint>: Now
6817         TARGET_DEFAULT_NORETURN methods.
6818         <info_proc>: Now returns bool.
6819         <to_magic>: Delete.
6820         (OPS_MAGIC): Delete.
6821         (current_target): Delete.  All references replaced by references
6822         to ...
6823         (target_stack): ... this.  New.
6824         (target_shortname, target_longname): Adjust.
6825         (target_can_run): Now a function declaration.
6826         (default_child_has_all_memory, default_child_has_memory)
6827         (default_child_has_stack, default_child_has_registers)
6828         (default_child_has_execution): Remove target_ops parameter.
6829         (complete_target_initialization): Delete.
6830         (memory_breakpoint_target): New template class.
6831         (test_target_ops): Refactor as a C++ class with virtual methods.
6832         * make-target-delegates (NAME_PART): Tighten.
6833         (POINTER_PART, CP_SYMBOL): New.
6834         (SIMPLE_RETURN_PART): Reimplement.
6835         (VEC_RETURN_PART): Expect less.
6836         (RETURN_PART, VIRTUAL_PART): New.
6837         (METHOD): Adjust to C++ virtual methods.
6838         (scan_target_h): Remove reference to C99.
6839         (dname): Output "target_ops::" prefix.
6840         (write_function_header): Adjust to output a C++ class method.
6841         (write_declaration): New.
6842         (write_delegator): Adjust to output a C++ class method.
6843         (tdname): Output "dummy_target::" prefix.
6844         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6845         method.
6846         (tdefault_names, debug_names): Delete.
6847         (return_types, tdefaults, styles, argtypes_array): New.
6848         (top level): All methods are delegators.
6849         (print_class): New.
6850         (top level): Print dummy_target and debug_target classes.
6851         * target-delegates.c: Regenerate.
6852         * target-debug.h (target_debug_print_enum_info_proc_what)
6853         (target_debug_print_thread_control_capabilities)
6854         (target_debug_print_thread_info_p): New.
6855         * target.c (dummy_target): Delete.
6856         (the_dummy_target, the_debug_target): New.
6857         (target_stack): Now extern.
6858         (set_targetdebug): Push/unpush debug target.
6859         (default_child_has_all_memory, default_child_has_memory)
6860         (default_child_has_stack, default_child_has_registers)
6861         (default_child_has_execution): Remove target_ops parameter.
6862         (complete_target_initialization): Delete.
6863         (add_target_with_completer): No longer call
6864         complete_target_initialization.
6865         (target_supports_terminal_ours): Use regular delegation.
6866         (update_current_target): Delete.
6867         (push_target): No longer check magic number.  Don't call
6868         update_current_target.
6869         (unpush_target): Don't call update_current_target.
6870         (target_is_pushed): No longer check magic number.
6871         (target_require_runnable): Skip for all stratums over
6872         process_stratum.
6873         (target_ops::info_proc): New.
6874         (target_info_proc): Use find_target_at and
6875         find_default_run_target.
6876         (target_supports_disable_randomization): Use regular delegation.
6877         (target_get_osdata): Use find_target_at.
6878         (target_ops::open, target_ops::close, target_ops::can_attach)
6879         (target_ops::attach, target_ops::can_create_inferior)
6880         (target_ops::create_inferior, target_ops::can_run)
6881         (target_can_run): New.
6882         (default_fileio_target): Use regular delegation.
6883         (target_ops::fileio_open, target_ops::fileio_pwrite)
6884         (target_ops::fileio_pread, target_ops::fileio_fstat)
6885         (target_ops::fileio_close, target_ops::fileio_unlink)
6886         (target_ops::fileio_readlink): New.
6887         (target_fileio_open_1, target_fileio_unlink)
6888         (target_fileio_readlink): Always call the target method.  Handle
6889         FILEIO_ENOSYS.
6890         (return_zero, return_zero_has_execution): Delete.
6891         (init_dummy_target): Delete.
6892         (dummy_target::dummy_target, dummy_target::shortname)
6893         (dummy_target::longname, dummy_target::doc)
6894         (debug_target::debug_target, debug_target::shortname)
6895         (debug_target::longname, debug_target::doc): New.
6896         (target_supports_delete_record): Use regular delegation.
6897         (setup_target_debug): Delete.
6898         (maintenance_print_target_stack): Skip debug_stratum.
6899         (initialize_targets): Instantiate the_dummy_target and
6900         the_debug_target.
6901         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
6902         use target_stack.
6903         (target_auxv_search, fprint_target_auxv): Adjust.
6904         (info_auxv_command): Adjust to use target_stack.
6905         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6906         * exceptions.c (print_flush): Handle a NULL target_stack.
6907         * regcache.c (target_ops_no_register): Refactor as class with
6908         virtual methods.
6909
6910         * exec.c (exec_target): New class.
6911         (exec_ops): Now an exec_target.
6912         (exec_open, exec_close_1, exec_get_section_table)
6913         (exec_xfer_partial, exec_files_info, exec_has_memory)
6914         (exec_make_note_section): Refactor as exec_target methods.
6915         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6916         Delete.
6917         (exec_target::find_memory_regions): New.
6918         (_initialize_exec): Don't call init_exec_ops.
6919         * gdbcore.h (exec_file_clear): Delete.
6920
6921         * corefile.c (core_target): Delete.
6922         (core_file_command): Adjust.
6923         * corelow.c (core_target): New class.
6924         (the_core_target): New.
6925         (core_close): Remove target_ops parameter.
6926         (core_close_cleanup): Adjust.
6927         (core_target::close): New.
6928         (core_open, core_detach, get_core_registers, core_files_info)
6929         (core_xfer_partial, core_thread_alive, core_read_description)
6930         (core_pid_to_str, core_thread_name, core_has_memory)
6931         (core_has_stack, core_has_registers, core_info_proc): Rework as
6932         core_target methods.
6933         (ignore, core_remove_breakpoint, init_core_ops): Delete.
6934         (_initialize_corelow): Initialize the_core_target.
6935         * gdbcore.h (core_target): Delete.
6936         (the_core_target): New.
6937
6938         * ctf.c: (ctf_target): New class.
6939         (ctf_ops): Now a ctf_target.
6940         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6941         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6942         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6943         methods.
6944         (init_ctf_ops): Delete.
6945         (_initialize_ctf): Don't call it.
6946         * tracefile-tfile.c (tfile_target): New class.
6947         (tfile_ops): Now a tfile_target.
6948         (tfile_open, tfile_close, tfile_files_info)
6949         (tfile_get_tracepoint_status, tfile_trace_find)
6950         (tfile_fetch_registers, tfile_xfer_partial)
6951         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6952         Refactor as tfile_target methods.
6953         (tfile_xfer_partial_features): Remove target_ops parameter.
6954         (init_tfile_ops): Delete.
6955         (_initialize_tracefile_tfile): Don't call it.
6956         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6957         (tracefile_has_stack, tracefile_has_registers)
6958         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6959         tracefile_target methods.
6960         (init_tracefile_ops): Delete.
6961         (tracefile_target::tracefile_target): New.
6962         * tracefile.h: Include "target.h".
6963         (tracefile_target): New class.
6964         (init_tracefile_ops): Delete.
6965
6966         * spu-multiarch.c (spu_multiarch_target): New class.
6967         (spu_ops): Now a spu_multiarch_target.
6968         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6969         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6970         (spu_search_memory, spu_mourn_inferior): Refactor as
6971         spu_multiarch_target methods.
6972         (init_spu_ops): Delete.
6973         (_initialize_spu_multiarch): Remove references to init_spu_ops,
6974         complete_target_initialization.
6975
6976         * ravenscar-thread.c (ravenscar_thread_target): New class.
6977         (ravenscar_ops): Now a ravenscar_thread_target.
6978         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6979         (ravenscar_thread_alive, ravenscar_pid_to_str)
6980         (ravenscar_fetch_registers, ravenscar_store_registers)
6981         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6982         (ravenscar_stopped_by_hw_breakpoint)
6983         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6984         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6985         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6986         methods.
6987         (init_ravenscar_thread_ops): Delete.
6988         (_initialize_ravenscar): Remove references to
6989         init_ravenscar_thread_ops and complete_target_initialization.
6990
6991         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6992         (bsd_uthread_target): New class.
6993         (bsd_uthread_ops): Now a bsd_uthread_target.
6994         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6995         (bsd_uthread_close, bsd_uthread_mourn_inferior)
6996         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6997         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6998         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6999         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7000         (bsd_uthread_target): Delete function.
7001         (_initialize_bsd_uthread): Remove reference to
7002         complete_target_initialization.
7003
7004         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7005         (target_bfd): ... this new class.
7006         (target_bfd_xfer_partial, target_bfd_get_section_table)
7007         (target_bfd_close): Refactor as target_bfd methods.
7008         (target_bfd::~target_bfd): New.
7009         (target_bfd_reopen): Adjust.
7010         (target_bfd::close): New.
7011
7012         * record-btrace.c (record_btrace_target): New class.
7013         (record_btrace_ops): Now a record_btrace_target.
7014         (record_btrace_open, record_btrace_stop_recording)
7015         (record_btrace_disconnect, record_btrace_close)
7016         (record_btrace_async, record_btrace_info)
7017         (record_btrace_insn_history, record_btrace_insn_history_range)
7018         (record_btrace_insn_history_from, record_btrace_call_history)
7019         (record_btrace_call_history_range)
7020         (record_btrace_call_history_from, record_btrace_record_method)
7021         (record_btrace_is_replaying, record_btrace_will_replay)
7022         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7023         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7024         (record_btrace_store_registers, record_btrace_prepare_to_store)
7025         (record_btrace_to_get_unwinder)
7026         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7027         (record_btrace_commit_resume, record_btrace_wait)
7028         (record_btrace_stop, record_btrace_can_execute_reverse)
7029         (record_btrace_stopped_by_sw_breakpoint)
7030         (record_btrace_supports_stopped_by_sw_breakpoint)
7031         (record_btrace_stopped_by_hw_breakpoint)
7032         (record_btrace_supports_stopped_by_hw_breakpoint)
7033         (record_btrace_update_thread_list, record_btrace_thread_alive)
7034         (record_btrace_goto_begin, record_btrace_goto_end)
7035         (record_btrace_goto, record_btrace_stop_replaying_all)
7036         (record_btrace_execution_direction)
7037         (record_btrace_prepare_to_generate_core)
7038         (record_btrace_done_generating_core): Refactor as
7039         record_btrace_target methods.
7040         (init_record_btrace_ops): Delete.
7041         (_initialize_record_btrace): Remove reference to
7042         init_record_btrace_ops.
7043         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7044         the execution_direction global.
7045         (record_full_base_target, record_full_target)
7046         (record_full_core_target): New classes.
7047         (record_full_ops): Now a record_full_target.
7048         (record_full_core_ops): Now a record_full_core_target.
7049         (record_full_target::detach, record_full_target::disconnect)
7050         (record_full_core_target::disconnect)
7051         (record_full_target::mourn_inferior, record_full_target::kill):
7052         New.
7053         (record_full_open, record_full_close, record_full_async): Refactor
7054         as methods of the record_full_base_target class.
7055         (record_full_resume, record_full_commit_resume): Refactor
7056         as methods of the record_full_target class.
7057         (record_full_wait, record_full_stopped_by_watchpoint)
7058         (record_full_stopped_data_address)
7059         (record_full_stopped_by_sw_breakpoint)
7060         (record_full_supports_stopped_by_sw_breakpoint)
7061         (record_full_stopped_by_hw_breakpoint)
7062         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7063         methods of the record_full_base_target class.
7064         (record_full_store_registers, record_full_xfer_partial)
7065         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7066         Refactor as methods of the record_full_target class.
7067         (record_full_can_execute_reverse, record_full_get_bookmark)
7068         (record_full_goto_bookmark, record_full_execution_direction)
7069         (record_full_record_method, record_full_info, record_full_delete)
7070         (record_full_is_replaying, record_full_will_replay)
7071         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7072         (record_full_stop_replaying): Refactor as methods of the
7073         record_full_base_target class.
7074         (record_full_core_resume, record_full_core_kill)
7075         (record_full_core_fetch_registers)
7076         (record_full_core_prepare_to_store)
7077         (record_full_core_store_registers, record_full_core_xfer_partial)
7078         (record_full_core_insert_breakpoint)
7079         (record_full_core_remove_breakpoint)
7080         (record_full_core_has_execution): Refactor
7081         as methods of the record_full_core_target class.
7082         (record_full_base_target::supports_delete_record): New.
7083         (init_record_full_ops): Delete.
7084         (init_record_full_core_ops): Delete.
7085         (record_full_save): Refactor as method of the
7086         record_full_base_target class.
7087         (_initialize_record_full): Remove references to
7088         init_record_full_ops and init_record_full_core_ops.
7089
7090         * remote.c (remote_target, extended_remote_target): New classes.
7091         (remote_ops): Now a remote_target.
7092         (extended_remote_ops): Now an extended_remote_target.
7093         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7094         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7095         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7096         (remote_pass_signals, remote_set_syscall_catchpoint)
7097         (remote_program_signals, )
7098         (remote_thread_always_alive): Remove target_ops parameter.
7099         (remote_thread_alive, remote_thread_name)
7100         (remote_update_thread_list, remote_threads_extra_info)
7101         (remote_static_tracepoint_marker_at)
7102         (remote_static_tracepoint_markers_by_strid)
7103         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7104         (remote_open): Refactor as methods of remote_target.
7105         (extended_remote_open, extended_remote_detach)
7106         (extended_remote_attach, extended_remote_post_attach):
7107         (extended_remote_supports_disable_randomization)
7108         (extended_remote_create_inferior): : Refactor as method of
7109         extended_remote_target.
7110         (remote_set_permissions, remote_open_1, remote_detach)
7111         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7112         (remote_resume, remote_commit_resume, remote_stop)
7113         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7114         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7115         (remote_prepare_to_store, remote_store_registers)
7116         (remote_flash_erase, remote_flash_done, remote_files_info)
7117         (remote_kill, remote_mourn, remote_insert_breakpoint)
7118         (remote_remove_breakpoint, remote_insert_watchpoint)
7119         (remote_watchpoint_addr_within_range)
7120         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7121         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7122         (remote_supports_stopped_by_sw_breakpoint)
7123         (remote_stopped_by_hw_breakpoint)
7124         (remote_supports_stopped_by_hw_breakpoint)
7125         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7126         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7127         (remote_verify_memory): Refactor as methods of remote_target.
7128         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7129         parameter.
7130         (remote_xfer_partial, remote_get_memory_xfer_limit)
7131         (remote_search_memory, remote_rcmd, remote_memory_map)
7132         (remote_pid_to_str, remote_get_thread_local_address)
7133         (remote_get_tib_address, remote_read_description): Refactor as
7134         methods of remote_target.
7135         (remote_target::fileio_open, remote_target::fileio_pwrite)
7136         (remote_target::fileio_pread, remote_target::fileio_close): New.
7137         (remote_hostio_readlink, remote_hostio_fstat)
7138         (remote_filesystem_is_local, remote_can_execute_reverse)
7139         (remote_supports_non_stop, remote_supports_disable_randomization)
7140         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7141         (remote_supports_enable_disable_tracepoint)
7142         (remote_supports_string_tracing)
7143         (remote_can_run_breakpoint_commands, remote_trace_init)
7144         (remote_download_tracepoint, remote_can_download_tracepoint)
7145         (remote_download_trace_state_variable, remote_enable_tracepoint)
7146         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7147         (remote_trace_start, remote_get_trace_status)
7148         (remote_get_tracepoint_status, remote_trace_stop)
7149         (remote_trace_find, remote_get_trace_state_variable_value)
7150         (remote_save_trace_data, remote_get_raw_trace_data)
7151         (remote_set_disconnected_tracing, remote_core_of_thread)
7152         (remote_set_circular_trace_buffer, remote_traceframe_info)
7153         (remote_get_min_fast_tracepoint_insn_len)
7154         (remote_set_trace_buffer_size, remote_set_trace_notes)
7155         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7156         (remote_disable_btrace, remote_teardown_btrace)
7157         (remote_read_btrace, remote_btrace_conf)
7158         (remote_augmented_libraries_svr4_read, remote_load)
7159         (remote_pid_to_exec_file, remote_can_do_single_step)
7160         (remote_execution_direction, remote_thread_handle_to_thread_info):
7161         Refactor as methods of remote_target.
7162         (init_remote_ops, init_extended_remote_ops): Delete.
7163         (remote_can_async_p, remote_is_async_p, remote_async)
7164         (remote_thread_events, remote_upload_tracepoints)
7165         (remote_upload_trace_state_variables): Refactor as methods of
7166         remote_target.
7167         (_initialize_remote): Remove references to init_remote_ops and
7168         init_extended_remote_ops.
7169
7170         * remote-sim.c (gdbsim_target): New class.
7171         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7172         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7173         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7174         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7175         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7176         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7177         Refactor as methods of gdbsim_target.
7178         (gdbsim_ops): Now a gdbsim_target.
7179         (init_gdbsim_ops): Delete.
7180         (gdbsim_cntrl_c): Adjust.
7181         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7182
7183         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7184         (the_amd64_linux_nat_target): New.
7185         (amd64_linux_fetch_inferior_registers)
7186         (amd64_linux_store_inferior_registers): Refactor as methods of
7187         amd64_linux_nat_target.
7188         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7189         * i386-linux-nat.c: Don't include "linux-nat.h".
7190         (i386_linux_nat_target): New class.
7191         (the_i386_linux_nat_target): New.
7192         (i386_linux_fetch_inferior_registers)
7193         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7194         as methods of i386_linux_nat_target.
7195         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7196         * inf-child.c (inf_child_ops): Delete.
7197         (inf_child_fetch_inferior_registers)
7198         (inf_child_store_inferior_registers): Delete.
7199         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7200         methods of inf_child_target.
7201         (inf_child_target::supports_terminal_ours)
7202         (inf_child_target::terminal_init)
7203         (inf_child_target::terminal_inferior)
7204         (inf_child_target::terminal_ours_for_output)
7205         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7206         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7207         New.
7208         (inf_child_open, inf_child_disconnect, inf_child_close)
7209         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7210         (inf_child_post_startup_inferior, inf_child_can_run)
7211         (inf_child_pid_to_exec_file): Refactor as methods of
7212         inf_child_target.
7213         (inf_child_follow_fork): Delete.
7214         (inf_child_target::can_create_inferior)
7215         (inf_child_target::can_attach): New.
7216         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7217         (inf_child_target::has_stack, inf_child_target::has_registers)
7218         (inf_child_target::has_execution): New.
7219         (inf_child_fileio_open, inf_child_fileio_pwrite)
7220         (inf_child_fileio_pread, inf_child_fileio_fstat)
7221         (inf_child_fileio_close, inf_child_fileio_unlink)
7222         (inf_child_fileio_readlink, inf_child_use_agent)
7223         (inf_child_can_use_agent): Refactor as methods of
7224         inf_child_target.
7225         (return_zero, inf_child_target): Delete.
7226         (inf_child_target::inf_child_target): New.
7227         * inf-child.h: Include "target.h".
7228         (inf_child_target): Delete function prototype.
7229         (inf_child_target): New class.
7230         (inf_child_open_target, inf_child_mourn_inferior)
7231         (inf_child_maybe_unpush_target): Delete.
7232         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7233         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7234         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7235         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7236         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7237         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7238         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7239         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7240         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7241         methods of inf_ptrace_target.
7242         (inf_ptrace_target): Delete function.
7243         * inf-ptrace.h: Include "inf-child.h".
7244         (inf_ptrace_target): Delete function declaration.
7245         (inf_ptrace_target): New class.
7246         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7247         * linux-nat.c (linux_target): New.
7248         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7249         (linux_nat_target::~linux_nat_target): New.
7250         (linux_child_post_attach, linux_child_post_startup_inferior)
7251         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7252         (linux_child_remove_fork_catchpoint)
7253         (linux_child_insert_vfork_catchpoint)
7254         (linux_child_remove_vfork_catchpoint)
7255         (linux_child_insert_exec_catchpoint)
7256         (linux_child_remove_exec_catchpoint)
7257         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7258         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7259         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7260         (linux_nat_stopped_data_address)
7261         (linux_nat_stopped_by_sw_breakpoint)
7262         (linux_nat_supports_stopped_by_sw_breakpoint)
7263         (linux_nat_stopped_by_hw_breakpoint)
7264         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7265         (linux_nat_kill, linux_nat_mourn_inferior)
7266         (linux_nat_xfer_partial, linux_nat_thread_alive)
7267         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7268         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7269         (linux_child_static_tracepoint_markers_by_strid)
7270         (linux_nat_is_async_p, linux_nat_can_async_p)
7271         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7272         (linux_nat_supports_multi_process)
7273         (linux_nat_supports_disable_randomization, linux_nat_async)
7274         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7275         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7276         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7277         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7278         methods of linux_nat_target.
7279         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7280         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7281         parameter.
7282         (check_stopped_by_watchpoint): Adjust.
7283         (linux_xfer_partial): Delete.
7284         (linux_target_install_ops, linux_target, linux_nat_add_target):
7285         Delete.
7286         (linux_nat_target::linux_nat_target): New.
7287         * linux-nat.h: Include "inf-ptrace.h".
7288         (linux_nat_target): New.
7289         (linux_target, linux_target_install_ops, linux_nat_add_target):
7290         Delete function declarations.
7291         (linux_target): Declare global.
7292         * linux-thread-db.c (thread_db_target): New.
7293         (thread_db_target::thread_db_target): New.
7294         (thread_db_ops): Delete.
7295         (the_thread_db_target): New.
7296         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7297         (thread_db_update_thread_list, thread_db_pid_to_str)
7298         (thread_db_extra_thread_info)
7299         (thread_db_thread_handle_to_thread_info)
7300         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7301         (thread_db_resume): Refactor as methods of thread_db_target.
7302         (init_thread_db_ops): Delete.
7303         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7304         * x86-linux-nat.c: Don't include "linux-nat.h".
7305         (super_post_startup_inferior): Delete.
7306         (x86_linux_nat_target::~x86_linux_nat_target): New.
7307         (x86_linux_child_post_startup_inferior)
7308         (x86_linux_read_description, x86_linux_enable_btrace)
7309         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7310         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7311         methods of x86_linux_nat_target.
7312         (x86_linux_create_target): Delete.  Bits folded ...
7313         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7314         pointer.
7315         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7316         (x86_linux_nat_target): New class.
7317         (x86_linux_create_target): Delete.
7318         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7319         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7320         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7321         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7322         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7323         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7324         make extern.
7325         (x86_use_watchpoints): Delete.
7326         * x86-nat.h: Include "breakpoint.h" and "target.h".
7327         (x86_use_watchpoints): Delete.
7328         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7329         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7330         (x86_insert_watchpoint, x86_remove_watchpoint)
7331         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7332         (x86_stopped_by_hw_breakpoint): New declarations.
7333         (x86_nat_target): New template class.
7334
7335         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7336         (the_ppc_linux_nat_target): New.
7337         (ppc_linux_fetch_inferior_registers)
7338         (ppc_linux_can_use_hw_breakpoint)
7339         (ppc_linux_region_ok_for_hw_watchpoint)
7340         (ppc_linux_ranged_break_num_registers)
7341         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7342         (ppc_linux_insert_mask_watchpoint)
7343         (ppc_linux_remove_mask_watchpoint)
7344         (ppc_linux_can_accel_watchpoint_condition)
7345         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7346         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7347         (ppc_linux_watchpoint_addr_within_range)
7348         (ppc_linux_masked_watch_num_registers)
7349         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7350         (ppc_linux_read_description): Refactor as methods of
7351         ppc_linux_nat_target.
7352         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7353
7354         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7355         (procfs_target): New class.
7356         (the_procfs_target): New.
7357         (procfs_target): Delete function.
7358         (procfs_auxv_parse, procfs_attach, procfs_detach)
7359         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7360         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7361         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7362         (procfs_create_inferior, procfs_update_thread_list)
7363         (procfs_thread_alive, procfs_pid_to_str)
7364         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7365         (procfs_stopped_data_address, procfs_insert_watchpoint)
7366         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7367         (proc_find_memory_regions, procfs_info_proc)
7368         (procfs_make_note_section): Refactor as methods of procfs_target.
7369         (_initialize_procfs): Adjust.
7370         * sol-thread.c (sol_thread_target): New class.
7371         (sol_thread_ops): Now a sol_thread_target.
7372         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7373         (sol_thread_fetch_registers, sol_thread_store_registers)
7374         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7375         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7376         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7377         (init_sol_thread_ops): Delete.
7378         (_initialize_sol_thread): Adjust.  Remove references to
7379         init_sol_thread_ops and complete_target_initialization.
7380
7381         * windows-nat.c (windows_nat_target): New class.
7382         (windows_fetch_inferior_registers)
7383         (windows_store_inferior_registers, windows_resume, windows_wait)
7384         (windows_attach, windows_detach, windows_pid_to_exec_file)
7385         (windows_files_info, windows_create_inferior)
7386         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7387         (windows_close, windows_pid_to_str, windows_xfer_partial)
7388         (windows_get_tib_address, windows_get_ada_task_ptid)
7389         (windows_thread_name, windows_thread_alive): Refactor as
7390         windows_nat_target methods.
7391         (do_initial_windows_stuff): Adjust.
7392         (windows_target): Delete function.
7393         (_initialize_windows_nat): Adjust.
7394
7395         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7396         (darwin_mourn_inferior, darwin_kill_inferior)
7397         (darwin_create_inferior, darwin_attach, darwin_detach)
7398         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7399         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7400         (darwin_supports_multi_process): Refactor as darwin_nat_target
7401         methods.
7402         (darwin_resume_to, darwin_files_info): Delete.
7403         (_initialize_darwin_inferior): Rename to ...
7404         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7405         * darwin-nat.h: Include "inf-child.h".
7406         (darwin_nat_target): New class.
7407         (darwin_complete_target): Delete.
7408         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7409         (darwin_target): New.
7410         (i386_darwin_fetch_inferior_registers)
7411         (i386_darwin_store_inferior_registers): Refactor as methods of
7412         darwin_nat_target.
7413         (darwin_complete_target): Delete, with ...
7414         (_initialize_i386_darwin_nat): ... bits factored out here.
7415
7416         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7417         (the_alpha_linux_nat_target): New.
7418         (alpha_linux_register_u_offset): Refactor as
7419         alpha_linux_nat_target method.
7420         (_initialize_alpha_linux_nat): Adjust.
7421         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7422         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7423         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7424         methods of linux_nat_trad_target.
7425         (linux_trad_target): Delete.
7426         * linux-nat-trad.h (linux_trad_target): Delete function.
7427         (linux_nat_trad_target): New class.
7428         * mips-linux-nat.c (mips_linux_nat_target): New class.
7429         (super_fetch_registers, super_store_registers, super_close):
7430         Delete.
7431         (the_mips_linux_nat_target): New.
7432         (mips64_linux_regsets_fetch_registers)
7433         (mips64_linux_regsets_store_registers)
7434         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7435         (mips_linux_register_u_offset, mips_linux_read_description)
7436         (mips_linux_can_use_hw_breakpoint)
7437         (mips_linux_stopped_by_watchpoint)
7438         (mips_linux_stopped_data_address)
7439         (mips_linux_region_ok_for_hw_watchpoint)
7440         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7441         (mips_linux_close): Refactor as methods of mips_linux_nat.
7442         (_initialize_mips_linux_nat): Adjust to C++ification.
7443
7444         * aix-thread.c (aix_thread_target): New class.
7445         (aix_thread_ops): Now an aix_thread_target.
7446         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7447         (aix_thread_fetch_registers, aix_thread_store_registers)
7448         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7449         (aix_thread_thread_alive, aix_thread_pid_to_str)
7450         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7451         Refactor as methods of aix_thread_target.
7452         (init_aix_thread_ops): Delete.
7453         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7454         and complete_target_initialization.
7455         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7456         (rs6000_nat_target): New class.
7457         (the_rs6000_nat_target): New.
7458         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7459         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7460         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7461         (super_create_inferior): Delete.
7462         (_initialize_rs6000_nat): Adjust to C++ification.
7463
7464         * arm-linux-nat.c (arm_linux_nat_target): New class.
7465         (the_arm_linux_nat_target): New.
7466         (arm_linux_fetch_inferior_registers)
7467         (arm_linux_store_inferior_registers, arm_linux_read_description)
7468         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7469         (arm_linux_remove_hw_breakpoint)
7470         (arm_linux_region_ok_for_hw_watchpoint)
7471         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7472         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7473         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7474         arm_linux_nat_target.
7475         (_initialize_arm_linux_nat): Adjust to C++ification.
7476
7477         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7478         (the_aarch64_linux_nat_target): New.
7479         (aarch64_linux_fetch_inferior_registers)
7480         (aarch64_linux_store_inferior_registers)
7481         (aarch64_linux_child_post_startup_inferior)
7482         (aarch64_linux_read_description)
7483         (aarch64_linux_can_use_hw_breakpoint)
7484         (aarch64_linux_insert_hw_breakpoint)
7485         (aarch64_linux_remove_hw_breakpoint)
7486         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7487         (aarch64_linux_region_ok_for_hw_watchpoint)
7488         (aarch64_linux_stopped_data_address)
7489         (aarch64_linux_stopped_by_watchpoint)
7490         (aarch64_linux_watchpoint_addr_within_range)
7491         (aarch64_linux_can_do_single_step): Refactor as methods of
7492         aarch64_linux_nat_target.
7493         (super_post_startup_inferior): Delete.
7494         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7495
7496         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7497         (the_hppa_linux_nat_target): New.
7498         (hppa_linux_fetch_inferior_registers)
7499         (hppa_linux_store_inferior_registers): Refactor as methods of
7500         hppa_linux_nat_target.
7501         (_initialize_hppa_linux_nat): Adjust to C++ification.
7502
7503         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7504         (the_ia64_linux_nat_target): New.
7505         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7506         (ia64_linux_stopped_data_address)
7507         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7508         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7509         ia64_linux_nat_target methods.
7510         (super_xfer_partial): Delete.
7511         (_initialize_ia64_linux_nat): Adjust to C++ification.
7512
7513         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7514         (the_m32r_linux_nat_target): New.
7515         (m32r_linux_fetch_inferior_registers)
7516         (m32r_linux_store_inferior_registers): Refactor as
7517         m32r_linux_nat_target methods.
7518         (_initialize_m32r_linux_nat): Adjust to C++ification.
7519
7520         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7521         (the_m68k_linux_nat_target): New.
7522         (m68k_linux_fetch_inferior_registers)
7523         (m68k_linux_store_inferior_registers): Refactor as
7524         m68k_linux_nat_target methods.
7525         (_initialize_m68k_linux_nat): Adjust to C++ification.
7526
7527         * s390-linux-nat.c (s390_linux_nat_target): New class.
7528         (the_s390_linux_nat_target): New.
7529         (s390_linux_fetch_inferior_registers)
7530         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7531         (s390_insert_watchpoint, s390_remove_watchpoint)
7532         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7533         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7534         (s390_auxv_parse, s390_read_description): Refactor as methods of
7535         s390_linux_nat_target.
7536         (_initialize_s390_nat): Adjust to C++ification.
7537
7538         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7539         (the_sparc_linux_nat_target): New.
7540         (_initialize_sparc_linux_nat): Adjust to C++ification.
7541         * sparc-nat.c (sparc_fetch_inferior_registers)
7542         (sparc_store_inferior_registers): Remove target_ops parameter.
7543         * sparc-nat.h (sparc_fetch_inferior_registers)
7544         (sparc_store_inferior_registers): Remove target_ops parameter.
7545         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7546         (the_sparc64_linux_nat_target): New.
7547         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7548
7549         * spu-linux-nat.c (spu_linux_nat_target): New class.
7550         (the_spu_linux_nat_target): New.
7551         (spu_child_post_startup_inferior, spu_child_post_attach)
7552         (spu_child_wait, spu_fetch_inferior_registers)
7553         (spu_store_inferior_registers, spu_xfer_partial)
7554         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7555         methods.
7556         (_initialize_spu_nat): Adjust to C++ification.
7557
7558         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7559         (the_tilegx_linux_nat_target): New.
7560         (fetch_inferior_registers, store_inferior_registers):
7561         Refactor as methods.
7562         (_initialize_tile_linux_nat): Adjust to C++ification.
7563
7564         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7565         (the_xtensa_linux_nat_target): New.
7566         (xtensa_linux_fetch_inferior_registers)
7567         (xtensa_linux_store_inferior_registers): Refactor as
7568         xtensa_linux_nat_target methods.
7569         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7570
7571         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7572         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7573         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7574         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7575         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7576         (fbsd_stopped_by_sw_breakpoint)
7577         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7578         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7579         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7580         (fbsd_post_startup_inferior, fbsd_post_attach)
7581         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7582         (fbsd_set_syscall_catchpoint)
7583         (super_xfer_partial, super_resume, super_wait)
7584         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7585         (fbsd_handle_debug_trap): Remove target_ops parameter.
7586         (fbsd_nat_add_target): Delete.
7587         * fbsd-nat.h: Include "inf-ptrace.h".
7588         (fbsd_nat_add_target): Delete.
7589         (USE_SIGTRAP_SIGINFO): Define.
7590         (fbsd_nat_target): New class.
7591
7592         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7593         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7594         (amd64bsd_target): Delete.
7595         * amd64-bsd-nat.h: New file.
7596         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7597         "x86-bsd-nat.h".
7598         (amd64_fbsd_nat_target): New class.
7599         (the_amd64_fbsd_nat_target): New.
7600         (amd64fbsd_read_description): Refactor as method of
7601         amd64_fbsd_nat_target.
7602         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7603         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7604         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7605         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7606         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7607         (i386bsd_target): Delete.
7608         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7609         (i386bsd_fetch_inferior_registers)
7610         (i386bsd_store_inferior_registers): Declare.
7611         (i386_bsd_nat_target): New class.
7612         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7613         (the_i386_fbsd_nat_target): New.
7614         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7615         i386_fbsd_nat_target methods.
7616         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7617         (_initialize_i386fbsd_nat): Adjust to C++ification.
7618         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7619         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7620         (_initialize_x86_bsd_nat): Adjust to C++ification.
7621         * x86-bsd-nat.h: Include "x86-nat.h".
7622         (x86bsd_target): Delete declaration.
7623         (x86bsd_nat_target): New class.
7624
7625         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7626         (the_aarch64_fbsd_nat_target): New.
7627         (aarch64_fbsd_fetch_inferior_registers)
7628         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7629         aarch64_fbsd_nat_target.
7630         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7631         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7632         (the_alpha_bsd_nat_target): New.
7633         (alphabsd_fetch_inferior_registers)
7634         (alphabsd_store_inferior_registers): Refactor as
7635         alpha_bsd_nat_target methods.
7636         (_initialize_alphabsd_nat): Refactor as methods of
7637         alpha_bsd_nat_target.
7638         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7639         (the_amd64_nbsd_nat_target): New.
7640         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7641         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7642         (the_amd64_obsd_nat_target): New.
7643         (_initialize_amd64obsd_nat): Adjust to C++ification.
7644         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7645         (the_arm_fbsd_nat_target): New.
7646         (arm_fbsd_fetch_inferior_registers)
7647         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7648         (_initialize_arm_fbsd_nat): Refactor as methods of
7649         arm_fbsd_nat_target.
7650         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7651         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7652         (the_arm_netbsd_nat_target): New.
7653         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7654         arm_netbsd_nat_target.
7655         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7656         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7657         (the_hppa_nbsd_nat_target): New.
7658         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7659         hppa_nbsd_nat_target methods.
7660         (_initialize_hppanbsd_nat): Adjust to C++ification.
7661         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7662         (the_hppa_obsd_nat_target): New.
7663         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7664         methods of hppa_obsd_nat_target.
7665         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7666         add_target.
7667         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7668         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7669         add_target.
7670         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7671         (_initialize_i386obsd_nat): Use add_target.
7672         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7673         (the_m68k_bsd_nat_target): New.
7674         (m68kbsd_fetch_inferior_registers)
7675         (m68kbsd_store_inferior_registers): Refactor as methods of
7676         m68k_bsd_nat_target.
7677         (_initialize_m68kbsd_nat): Adjust to C++ification.
7678         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7679         (the_mips_fbsd_nat_target): New.
7680         (mips_fbsd_fetch_inferior_registers)
7681         (mips_fbsd_store_inferior_registers): Refactor as methods of
7682         mips_fbsd_nat_target.
7683         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7684         add_target.
7685         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7686         (the_mips_nbsd_nat_target): New.
7687         (mipsnbsd_fetch_inferior_registers)
7688         (mipsnbsd_store_inferior_registers): Refactor as methods of
7689         mips_nbsd_nat_target.
7690         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7691         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7692         (the_mips64_obsd_nat_target): New.
7693         (mips64obsd_fetch_inferior_registers)
7694         (mips64obsd_store_inferior_registers): Refactor as methods of
7695         mips64_obsd_nat_target.
7696         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7697         add_target.
7698         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7699         nbsd_nat_target.
7700         * nbsd-nat.h: Include "inf-ptrace.h".
7701         (nbsd_nat_target): New class.
7702         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7703         (obsd_wait): Refactor as methods of obsd_nat_target.
7704         (obsd_add_target): Delete.
7705         * obsd-nat.h: Include "inf-ptrace.h".
7706         (obsd_nat_target): New class.
7707         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7708         (the_ppc_fbsd_nat_target): New.
7709         (ppcfbsd_fetch_inferior_registers)
7710         (ppcfbsd_store_inferior_registers): Refactor as methods of
7711         ppc_fbsd_nat_target.
7712         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7713         add_target.
7714         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7715         (the_ppc_nbsd_nat_target): New.
7716         (ppcnbsd_fetch_inferior_registers)
7717         (ppcnbsd_store_inferior_registers): Refactor as methods of
7718         ppc_nbsd_nat_target.
7719         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7720         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7721         (the_ppc_obsd_nat_target): New.
7722         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7723         methods of ppc_obsd_nat_target.
7724         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7725         add_target.
7726         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7727         (the_sh_nbsd_nat_target): New.
7728         (shnbsd_fetch_inferior_registers)
7729         (shnbsd_store_inferior_registers): Refactor as methods of
7730         sh_nbsd_nat_target.
7731         (_initialize_shnbsd_nat): Adjust to C++ification.
7732         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7733         (inf_ptrace_xfer_partial): Delete.
7734         (sparc_xfer_partial, sparc_target): Delete.
7735         * sparc-nat.h (sparc_fetch_inferior_registers)
7736         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7737         (sparc_target): Delete function declaration.
7738         (sparc_target): New template class.
7739         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7740         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7741         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7742         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7743         add_target.
7744         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7745         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7746         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7747         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7748         add_target.
7749         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7750         (the_vax_bsd_nat_target): New.
7751         (vaxbsd_fetch_inferior_registers)
7752         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7753         methods.
7754         (_initialize_vaxbsd_nat): Adjust to C++ification.
7755
7756         * bsd-kvm.c (bsd_kvm_target): New class.
7757         (bsd_kvm_ops): Now a bsd_kvm_target.
7758         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7759         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7760         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7761         bsd_kvm_target.
7762         (bsd_kvm_return_one): Delete.
7763         (bsd_kvm_add_target): Adjust to C++ification.
7764
7765         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7766         (nto_procfs_target_procfs): New classes.
7767         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7768         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7769         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7770         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7771         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7772         (procfs_remove_hw_breakpoint, procfs_resume)
7773         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7774         (procfs_kill_inferior, procfs_store_registers)
7775         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7776         as methods of nto_procfs_target.
7777         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7778         (nto_native_ops): Delete.
7779         (procfs_open, procfs_native_open): Delete.
7780         (nto_native_ops): Now an nto_procfs_target_native.
7781         (init_procfs_targets): Adjust to C++ification.
7782         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7783         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7784         Refactor as methods of nto_procfs_target.
7785
7786         * go32-nat.c (go32_nat_target): New class.
7787         (the_go32_nat_target): New.
7788         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7789         (go32_store_registers, go32_xfer_partial, go32_files_info)
7790         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7791         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7792         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7793         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7794         (go32_target): Delete.
7795         (_initialize_go32_nat): Adjust to C++ification.
7796
7797         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7798         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7799         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7800         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7801         gnu_nat_target.
7802         (gnu_target): Delete.
7803         * gnu-nat.h (gnu_target): Delete.
7804         (gnu_nat_target): New class.
7805         * i386-gnu-nat.c (gnu_base_target): New.
7806         (i386_gnu_nat_target): New class.
7807         (the_i386_gnu_nat_target): New.
7808         (_initialize_i386gnu_nat): Adjust to C++ification.
7809
7810 2018-05-02  Pedro Alves  <palves@redhat.com>
7811
7812         * bfd-target.c (target_bfd_xclose): Rename to ...
7813         (target_bfd_close): ... this.
7814         (target_bfd_reopen): Adjust.
7815         * target.c (target_close): Remove references to to_xclose.
7816         * target.h (target_ops::to_xclose): Delete.
7817         (target_ops::to_close): Update comments.
7818
7819 2018-05-02  Pedro Alves  <palves@redhat.com>
7820
7821         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7822         "linux-nat.h".
7823         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7824         * inf-ptrace.c (inf_ptrace_register_u_offset)
7825         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7826         (inf_ptrace_store_register, inf_ptrace_store_registers)
7827         (inf_ptrace_trad_target): Move to ...
7828         * linux-nat-trad.c: ... this new file.
7829         * linux-nat-trad.h: New file.
7830         * linux-nat.c (linux_target_install_ops): Make extern.
7831         (linux_trad_target): Delete.
7832         * linux-nat.h (linux_trad_target): Delete declaration.
7833         (linux_target_install_ops): Declare.
7834         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7835         "linux-nat.h".
7836
7837 2018-05-02  Pedro Alves  <palves@redhat.com>
7838
7839         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7840         procfs_target/add_target here.
7841         * procfs.c (procfs_target): Make static.
7842         (_initialize_procfs): Call add_target here.
7843         * procfs.h (struct target_ops): Remove forward declaration.
7844         (procfs_target): Remove declaration.
7845         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7846
7847 2018-05-02  Pedro Alves  <palves@redhat.com>
7848
7849         * procfs.c (procfs_stopped_by_watchpoint)
7850         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7851         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7852         Forward declare.
7853         (procfs_use_watchpoints): Delete, move contents...
7854         (procfs_target): ... here.
7855         * procfs.h (procfs_use_watchpoints): Delete declaration.
7856         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7857         procfs_use_watchpoints.
7858         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7859         procfs_use_watchpoints.
7860
7861 2018-05-02  Tom Tromey  <tom@tromey.com>
7862
7863         PR python/20084:
7864         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7865         and var_zuinteger_unlimited.
7866         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7867         and PARAM_ZUINTEGER_UNLIMITED.
7868         (set_parameter_value): Handle var_zuinteger and
7869         var_zuinteger_unlimited.
7870         (add_setshow_generic): Likewise.
7871         (parmpy_init): Likewise.
7872
7873 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
7874
7875         PR rust/23124
7876         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7877         pointer is not null before dereferencing it.
7878
7879 2018-04-30  Tom Tromey  <tom@tromey.com>
7880
7881         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7882         is_mi_like_p.
7883
7884 2018-04-30  Tom Tromey  <tom@tromey.com>
7885
7886         * breakpoint.c (mention): Remove use of is_mi_like_p.
7887         (print_mention_ranged_breakpoint): Likewise.
7888         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7889         of is_mi_like_p.
7890
7891 2018-04-30  Tom Tromey  <tom@tromey.com>
7892
7893         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7894
7895 2018-04-30  Tom Tromey  <tom@tromey.com>
7896
7897         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7898         (info_spu_event_command): Remove some uses of is_mi_like_p.
7899
7900 2018-04-30  Tom Tromey  <tom@tromey.com>
7901
7902         * python/py-framefilter.c (py_print_single_arg)
7903         (enumerate_locals, py_print_args, py_print_frame): Remove some
7904         uses of is_mi_like_p.
7905
7906 2018-04-30  Tom Tromey  <tom@tromey.com>
7907
7908         * ui-out.c: Update.
7909         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7910         * ui-out.h (ui_out::is_mi_like_p): Now const.
7911         (ui_out::do_is_mi_like_p): Now const.
7912         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7913
7914 2018-04-30  Tom Tromey  <tom@tromey.com>
7915
7916         * varobj.c (varobj_set_visualizer): Use new_reference.
7917         * python/python.c (gdbpy_decode_line): Use new_reference.
7918         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7919         new_reference.
7920
7921 2018-04-30  Tom Tromey  <tom@tromey.com>
7922
7923         * varobj.c (install_new_value): Use new_reference.
7924         * value.h (value_incref): Return void.  Swap intro comment with
7925         value_decref.
7926         * value.c (set_value_parent): Use new_reference.
7927         (value_incref): Return void.  Update intro comment.
7928         (release_value): Use new_reference.
7929         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7930
7931 2018-04-30  Tom Tromey  <tom@tromey.com>
7932
7933         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7934         * gdb_bfd.h (new_bfd_ref): Remove.
7935         (gdb_bfd_open): Update comment.
7936         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7937         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7938         (gdb_bfd_fdopenr): Use new_reference.
7939         * exec.c (exec_file_attach): Use new_reference.
7940
7941 2018-04-30  Tom Tromey  <tom@tromey.com>
7942
7943         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7944         method.
7945
7946 2018-04-30  Tom Tromey  <tom@tromey.com>
7947
7948         * jit.c (jit_read_code_entry): Use type_align.
7949         * i386-tdep.c (i386_gdbarch_init): Don't call
7950         set_gdbarch_long_long_align_bit.
7951         * gdbarch.sh: Remove long_long_align_bit.
7952         * gdbarch.c, gdbarch.h: Rebuild.
7953         * arc-tdep.c (arc_type_align): New function.
7954         (arc_gdbarch_init): Use arc_type_align.  Don't call
7955         set_gdbarch_long_long_align_bit.
7956
7957 2018-04-30  Tom Tromey  <tom@tromey.com>
7958
7959         * rust-lang.c (rust_type_alignment): Remove.
7960         (rust_composite_type): Use type_align.
7961
7962 2018-04-30  Tom Tromey  <tom@tromey.com>
7963
7964         * NEWS: Mention Type.align.
7965         * python/py-type.c (typy_get_alignof): New function.
7966         (type_object_getset): Add "alignof".
7967
7968 2018-04-30  Tom Tromey  <tom@tromey.com>
7969
7970         PR exp/17095:
7971         * NEWS: Update.
7972         * std-operator.def (UNOP_ALIGNOF): New operator.
7973         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7974         New.
7975         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7976         * c-lang.c (c_op_print_tab): Add alignof.
7977         * c-exp.y (ALIGNOF): New token.
7978         (exp): Add "ALIGNOF" production.
7979         (ident_tokens): Add _Alignof and alignof.
7980
7981 2018-04-30  Tom Tromey  <tom@tromey.com>
7982
7983         * i386-tdep.c (i386_type_align): New function.
7984         (i386_gdbarch_init): Update.
7985         * gdbarch.sh (type_align): New method.
7986         * gdbarch.c, gdbarch.h: Rebuild.
7987         * arch-utils.h (default_type_align): Declare.
7988         * arch-utils.c (default_type_align): New function.
7989         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7990         (struct type) <align_log2>: New field.
7991         <instance_flags>: Now a bitfield.
7992         (TYPE_RAW_ALIGN): New macro.
7993         (type_align, type_raw_align, set_type_align): Declare.
7994         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7995         functions.
7996         * dwarf2read.c (quirk_rust_enum): Set type alignment.
7997         (get_alignment, maybe_set_alignment): New functions.
7998         (read_structure_type, read_enumeration_type, read_array_type)
7999         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8000         (read_subrange_type, read_base_type): Set type alignment.
8001
8002 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8003
8004         * dwarf2read.c (read_index_from_section): Use bool.
8005
8006 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8007
8008         PR gdb/22950
8009         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8010         with #ifdef.
8011
8012 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8013
8014         PR build/22873
8015         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8016         last step, and do it atomically.
8017
8018 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8019
8020         * compile/compile-c-types.c (convert_int, convert_float):
8021         Update for C FE v1.
8022
8023 2018-04-27  Tom Tromey  <tom@tromey.com>
8024
8025         PR rust/22545:
8026         * rust-lang.c (rust_inclusive_range_type_p): New function.
8027         (rust_range): Handle inclusive ranges.
8028         (rust_compute_range): Likewise.
8029         * rust-exp.y (struct rust_op) <inclusive>: New field.
8030         (DOTDOTEQ): New constant.
8031         (range_expr): Add "..=" productions.
8032         (operator_tokens): Add "..=" token.
8033         (ast_range): Add "inclusive" parameter.
8034         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8035         ranges.
8036         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8037         bounds values.
8038         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8039         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8040         Update comments.
8041         * expprint.c (print_subexp_standard): Handle new bounds values.
8042         (dump_subexp_body_standard): Likewise.
8043
8044 2018-04-27  Tom Tromey  <tom@tromey.com>
8045
8046         * configure: Rebuild.
8047         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8048         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8049         "OVERRIDE".
8050         (class symbol_needs_eval_context): Likewise.
8051         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8052         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8053         "virtual".
8054         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8055         "override".
8056         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8057         * aarch64-tdep.c (instruction_reader::read): Use "override".
8058         (instruction_reader_test::read): Likewise.
8059         * arm-tdep.c (instruction_reader::read): Use "override".
8060         (instruction_reader_thumb::read): Likewise.
8061
8062 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8063
8064         PR remote/9665
8065         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8066         instead of remote_send.
8067         (remote_send): Remove.
8068
8069 2018-04-26  Pedro Alves  <palves@redhat.com>
8070
8071         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8072         find_function_start_sal instead of find_pc_line.
8073
8074 2018-04-26  Pedro Alves  <palves@redhat.com>
8075
8076         * breakpoint.c (set_breakpoint_location_function): Handle
8077         mst_data_gnu_ifunc.
8078         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8079         * elfread.c (elf_symtab_read): Give data symbols with
8080         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8081         (elf_rel_plt_read): Update comment.
8082         * linespec.c (convert_linespec_to_sals): Handle
8083         mst_data_gnu_ifunc.
8084         (minsym_found): Handle mst_data_gnu_ifunc.
8085         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8086         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8087         * parse.c (find_minsym_type_and_address): Handle
8088         mst_data_gnu_ifunc.
8089         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8090         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8091         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8092         comment.
8093         <mst_data_gnu_ifunc>: New enumerator.
8094
8095 2018-04-26  Pedro Alves  <palves@redhat.com>
8096
8097         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8098         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8099         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8100         Handle it.
8101         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8102         (lookup_minimal_symbol_by_pc): Adjust.
8103         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8104         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8105         * minsyms.h (lookup_msym_prefer): New enum.
8106         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8107         parameter by a lookup_msym_prefer parameter.
8108
8109 2018-04-26  Pedro Alves  <palves@redhat.com>
8110
8111         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8112         ends in "@plt" instead of looking at the symbol's section.
8113
8114 2018-04-26  Pedro Alves  <palves@redhat.com>
8115
8116         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8117         all references.
8118         (find_pc_partial_function_gnu_ifunc): Rename to ...
8119         (find_pc_partial_function): ... this, and remove references to
8120         'is_gnu_ifunc_p'.
8121         (find_pc_partial_function): Delete old implementation.
8122         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8123
8124 2018-04-26  Pedro Alves  <palves@redhat.com>
8125
8126         * linespec.c (struct bound_minimal_symbol_search_key): New.
8127         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8128         skip first line if we found a GNU ifunc minimal symbol by name.
8129         (compare_msymbols): Change parameters to work with a destructured
8130         lhs minsym.
8131         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8132         functions.
8133
8134 2018-04-26  Pedro Alves  <palves@redhat.com>
8135
8136         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8137         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8138         address/name.
8139         (add_location_to_breakpoint): Store the minsym and the objfile in
8140         the breakpoint location.
8141         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8142         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8143         Record the minsym in the sal.
8144         * symtab.h (symtab_and_line) <msymbol>: New field.
8145
8146 2018-04-26  Pedro Alves  <palves@redhat.com>
8147
8148         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8149         unless we actually resolved the ifunc.
8150
8151 2018-04-26  Pedro Alves  <palves@redhat.com>
8152
8153         * c-exp.y (variable production): Prefer ifunc minsyms over
8154         regular function symbols.
8155         * symtab.c (find_gnu_ifunc): New function.
8156         * minsyms.h (lookup_msym_prefer): New enum.
8157         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8158         parameter by a lookup_msym_prefer parameter.
8159         * symtab.h (find_gnu_ifunc): New declaration.
8160
8161 2018-04-26  Pedro Alves  <palves@redhat.com>
8162
8163         * blockframe.c (find_gnu_ifunc_target_type): New function.
8164         (find_function_type): New.
8165         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8166         return a value with a memory address.
8167         (eval_call): For calls to GNU ifunc functions, try to find the
8168         type of the target function from the type that the resolver
8169         returns.
8170         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8171         symbols.
8172         * infcall.c (find_function_return_type): Delete.
8173         (find_function_addr): Add 'function_type' parameter.  For calls to
8174         GNU ifunc functions, try to find the type of the target function
8175         from the type that the resolver returns, and return it via
8176         FUNCTION_TYPE.
8177         (call_function_by_hand_dummy): Adjust to use the function type
8178         returned by find_function_addr.
8179         (find_function_addr): Add 'function_type' parameter and move
8180         description here.
8181         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8182         declarations.
8183
8184 2018-04-26  Pedro Alves  <palves@redhat.com>
8185
8186         * c-exp.y (variable production): Skip finding an alias for ifunc
8187         symbols.
8188
8189 2018-04-26  Pedro Alves  <palves@redhat.com>
8190
8191         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8192
8193 2018-04-25  Pedro Alves  <palves@redhat.com>
8194
8195         * infcmd.c (kill_command): Print the pid as string, not the whole
8196         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8197         message.
8198         * remote.c (remote_detach_1): Print the pid as string, not the
8199         whole thread's ptid.
8200
8201 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8202             Sergio Durigan Junior  <sergiodj@redhat.com>
8203             Pedro Alves  <palves@redhat.com>
8204
8205         * infcmd.c (kill_command): Print message when inferior has
8206         been killed.
8207         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8208         '1'.
8209         (add_inferior): Improve message printed when
8210         'print_inferior_events' is on.
8211         (exit_inferior): Remove message printed when
8212         'print_inferior_events' is on.
8213         (detach_inferior): Improve message printed when
8214         'print_inferior_events' is on.
8215         (initialize_inferiors): Use 'add_inferior_silent' to set
8216         'current_inferior_'.
8217         * inferior.h (print_inferior_events): Declare here as
8218         'extern'.
8219         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8220         '[Detaching...]' messages when 'print_inferior_events' is on.
8221         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8222         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8223         'Detaching after fork from child...', replace it by '... from
8224         parent...'.
8225         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8226         prefix/suffix when printing 'Detaching...' messages.  Print
8227         them when 'print_inferior_events' is on.
8228         * remote.c (remote_detach_1): Print message when detaching
8229         from inferior and '!is_fork_parent'.
8230
8231 2018-04-24  Tom Tromey  <tom@tromey.com>
8232
8233         * cli-out.h: Reindent.
8234
8235 2018-04-24  Tom Tromey  <tom@tromey.com>
8236
8237         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8238         (cli_ui_out::do_field_string): Use fputs_filtered.
8239         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8240
8241 2018-04-23  Tom Tromey  <tom@tromey.com>
8242
8243         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8244         gdb::unique_xmalloc_ptr.
8245
8246 2018-04-23  Tom Tromey  <tom@tromey.com>
8247
8248         * configure: Rebuild.
8249
8250 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8251
8252         PR gdb/23095
8253         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8254         prepare_for_testing.  Set normal_bp to r_debug_state if target
8255         is bsd.
8256
8257 2018-04-21  Pedro Alves  <palves@redhat.com>
8258             Rajendra SY  <rajendra.sy@gmail.com>
8259
8260         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8261         * remote.c (extended_remote_attach): In all-stop mode, mark the
8262         thread as executing.
8263
8264 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8265
8266         * thread.c (thread_apply_all_command): Fix comment.
8267         (thread_command): Fix comment.
8268
8269 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8270
8271         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8272         parameter.
8273         * features/aarch64-core.c (create_feature_aarch64_core):
8274         Regenerate.
8275         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8276         Likewise.
8277         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8278         Likewise.
8279         * features/i386/32bit-avx512.c
8280         (create_feature_i386_32bit_avx512): Likewise.
8281         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8282         Likewise.
8283         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8284         Likewise.
8285         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8286         Likewise.
8287         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8288         Likewise.
8289         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8290         Likewise.
8291         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8292         Likewise.
8293         * features/i386/64bit-avx512.c
8294         (create_feature_i386_64bit_avx512): Likewise.
8295         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8296         Likewise.
8297         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8298         Likewise.
8299         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8300         Likewise.
8301         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8302         Likewise.
8303         * features/i386/64bit-segments.c
8304         (create_feature_i386_64bit_segments): Likewise.
8305         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8306         Likewise.
8307         * features/i386/x32-core.c
8308         (create_feature_i386_x32_core): Likewise.
8309         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8310         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8311         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8312         * target-descriptions.c: In generated code, don't pass xml
8313         filename.
8314
8315 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8316
8317         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8318         (print_xml_feature::visit_post): Likewise.
8319         (print_xml_feature::visit): Likewise.
8320         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8321         (print_xml_feature): Add new class.
8322         * regformats/regdat.sh: Null xmltarget on feature targets.
8323         * target-descriptions.c (struct target_desc): Add xmltarget.
8324         (maintenance_check_tdesc_xml_convert): Add unittest function.
8325         (tdesc_get_features_xml): Add function to get xml.
8326         (maintenance_check_xml_descriptions): Test xml generation.
8327         * xml-tdesc.c (string_read_description_xml): Add function.
8328         * xml-tdesc.h (string_read_description_xml): Add declaration.
8329
8330 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8331
8332         * features/Makefile: Add feature marker to targets with new style
8333         target descriptions.
8334         * regformats/aarch64.dat: Regenerate.
8335         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8336         * regformats/i386/amd64-avx-linux.dat: Likewise.
8337         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8338         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8339         * regformats/i386/amd64-linux.dat: Likewise.
8340         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8341         * regformats/i386/amd64.dat: Likewise.
8342         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8343         * regformats/i386/i386-avx-linux.dat: Likewise.
8344         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8345         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8346         * regformats/i386/i386-linux.dat: Likewise.
8347         * regformats/i386/i386-mmx-linux.dat: Likewise.
8348         * regformats/i386/i386-mpx-linux.dat: Likewise.
8349         * regformats/i386/i386.dat: Likewise.
8350         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8351         * regformats/i386/x32-avx-linux.dat: Likewise.
8352         * regformats/i386/x32-linux.dat: Likewise.
8353         * regformats/tic6x-c62x-linux.dat: Likewise.
8354         * regformats/tic6x-c64x-linux.dat: Likewise.
8355         * regformats/tic6x-c64xp-linux.dat: Likewise.
8356         * regformats/regdat.sh: Parse feature marker.
8357
8358 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8359
8360         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8361         (tdesc_osabi_name): Likewise.
8362         * target-descriptions.c (tdesc_architecture_name): Add new
8363         function.
8364         (tdesc_osabi_name): Likewise.
8365
8366 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8367
8368         * common/tdesc.c (tdesc_predefined_type): Move to here.
8369         (tdesc_named_type): Likewise.
8370         (tdesc_create_vector): Likewise.
8371         (tdesc_create_struct): Likewise.
8372         (tdesc_set_struct_size): Likewise.
8373         (tdesc_create_union): Likewise.
8374         (tdesc_create_flags): Likewise.
8375         (tdesc_create_enum): Likewise.
8376         (tdesc_add_field): Likewise.
8377         (tdesc_add_typed_bitfield): Likewise.
8378         (tdesc_add_bitfield): Likewise.
8379         (tdesc_add_flag): Likewise.
8380         (tdesc_add_enum_value): Likewise.
8381         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8382         (struct tdesc_type_vector): Likewise.
8383         (struct tdesc_type_field): Likewise.
8384         (struct tdesc_type_with_fields): Likewise.
8385         (tdesc_create_enum): Add declaration.
8386         (tdesc_add_typed_bitfield): Likewise.
8387         (tdesc_add_enum_value): Likewise.
8388         * target-descriptions.c (tdesc_type_field): Move from here.
8389         (tdesc_type_builtin): Likewise.
8390         (tdesc_type_vector): Likewise.
8391         (tdesc_type_with_fields): Likewise.
8392         (tdesc_predefined_types): Likewise.
8393         (tdesc_named_type): Likewise.
8394         (tdesc_create_vector): Likewise.
8395         (tdesc_create_struct): Likewise.
8396         (tdesc_set_struct_size): Likewise.
8397         (tdesc_create_union): Likewise.
8398         (tdesc_create_flags): Likewise.
8399         (tdesc_create_enum): Likewise.
8400         (tdesc_add_field): Likewise.
8401         (tdesc_add_typed_bitfield): Likewise.
8402         (tdesc_add_bitfield): Likewise.
8403         (tdesc_add_flag): Likewise.
8404         (tdesc_add_enum_value): Likewise.
8405         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8406         (tdesc_add_typed_bitfield): Likewise.
8407         (tdesc_add_enum_value): Likewise.
8408
8409 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8410
8411         * common/tdesc.c (tdesc_feature::accept): Move to here.
8412         (tdesc_feature::operator==): Likewise.
8413         (tdesc_create_reg): Likewise.
8414         * common/tdesc.h (tdesc_type_kind): Likewise.
8415         (struct tdesc_type): Likewise.
8416         (struct tdesc_feature): Likewise.
8417         * regformats/regdat.sh: Create a feature.
8418         * target-descriptions.c (tdesc_type_kind): Move from here.
8419         (tdesc_type): Likewise.
8420         (tdesc_type_up): Likewise.
8421         (tdesc_feature): Likewise.
8422         (tdesc_create_reg): Likewise.
8423
8424 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8425
8426         * Makefile.in: Add arch/tdesc.c
8427         * common/tdesc.c: New file.
8428         * common/tdesc.h (tdesc_element_visitor): Move to here.
8429         (tdesc_element): Likewise.
8430         (tdesc_reg): Likewise.
8431         (tdesc_reg_up): Likewise.
8432         * regformats/regdef.h (reg): Add offset to constructors.
8433         * target-descriptions.c (tdesc_element_visitor): Move from here.
8434         (tdesc_element): Likewise.
8435         (tdesc_reg): Likewise.
8436         (tdesc_reg_up): Likewise.
8437
8438 2018-04-17  Tom Tromey  <tom@tromey.com>
8439
8440         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8441         discriminant field.
8442
8443 2018-04-17  Tom Tromey  <tom@tromey.com>
8444
8445         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8446
8447 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8448
8449         * symtab.c (print_symbol_info): Skip printing filename and line
8450         number when `last' is NULL.
8451         (symtab_symbol_info): Use empty string instead of NULL for first
8452         invocation of print_symbol_info.
8453         (rbreak_command): Pass NULL to `last' parameter of
8454         print_symbol_info.
8455
8456 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8457
8458         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8459         instead of nullptr.
8460
8461 2018-04-16  Pedro Alves  <palves@redhat.com>
8462
8463         * MAINTAINERS (sh): Remove.
8464         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8465         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8466         (ALLDEPFILES): Remove sh64-tdep.c.
8467         * NEWS: Mentions that support for SH-5/SH64 is removed.
8468         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8469         (sh*-*-openbsd*): Ditto.
8470         (sh64-*-elf*): Remove.
8471         (sh*): Remove.
8472         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8473         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8474         * sh-tdep.c: No longer include "sh64-tdep.h".
8475         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8476         * sh64-tdep.c, sh64-tdep.h: Remove files.
8477
8478 2018-04-16  Pedro Alves  <palves@redhat.com>
8479
8480         * MAINTAINERS: Remove m88k.
8481         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8482         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8483         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8484         * NEWS: Mention that support for m88k was removed.
8485         * configure.host (m88*-*-*): Remove support.
8486         * configure.nat (m88k-*-*): Remove support.
8487         * configure.tgt (m88*-*-openbsd*): Remove.
8488         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8489
8490 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8491
8492         * configure.tgt (x86_tobjs): New variable.
8493         (amd64_tobjs, i386_tobjs): Use it.
8494
8495 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8496
8497         * symtab.c (print_symbol_info): Precede the symbol definition by
8498         the line number when available.
8499         * NEWS: Advertise this enhancement.
8500
8501 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8502
8503         * NEWS (New options): announce set/show record btrace cpu.
8504         * btrace.c: Include record-btrace.h.
8505         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8506         the vendor is unknown.
8507         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8508         Maybe overwrite the btrace configuration's cpu.
8509         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8510         (btrace_fetch): Add cpu parameter.  Update callers.
8511         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8512         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8513         errata workarounds if the vendor is unknown.
8514         * python/py-record-btrace.c: Include record-btrace.h.
8515         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8516         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8517         * record-btrace.c (record_btrace_cpu_state_kind): New.
8518         (record_btrace_cpu): New.
8519         (set_record_btrace_cpu_cmdlist): New.
8520         (record_btrace_get_cpu): New.
8521         (require_btrace_thread, record_btrace_info)
8522         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8523         (cmd_set_record_btrace_cpu_none): New.
8524         (cmd_set_record_btrace_cpu_auto): New.
8525         (cmd_set_record_btrace_cpu): New.
8526         (cmd_show_record_btrace_cpu): New.
8527         (_initialize_record_btrace): Initialize set/show record btrace cpu
8528         commands.
8529         * record-btrace.h (record_btrace_get_cpu): New.
8530
8531 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8532
8533         * record.c (set_record_command): Fix typo in message.
8534
8535 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8536
8537         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8538
8539 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8540
8541         * infrun.c (process_event_stop_test): Call
8542         gdbarch_in_indirect_branch_thunk.
8543         * gdbarch.sh (in_indirect_branch_thunk): New.
8544         * gdbarch.c: Regenerated.
8545         * gdbarch.h: Regenerated.
8546         * x86-tdep.h: New.
8547         * x86-tdep.c: New.
8548         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8549         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8550         (ALLDEPFILES): Add x86-tdep.c.
8551         * arch-utils.h (default_in_indirect_branch_thunk): New.
8552         * arch-utils.c (default_in_indirect_branch_thunk): New.
8553         * i386-tdep: Include x86-tdep.h.
8554         (i386_in_indirect_branch_thunk): New.
8555         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8556         function.
8557         * amd64-tdep: Include x86-tdep.h.
8558         (amd64_in_indirect_branch_thunk): New.
8559         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8560
8561 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8562
8563         PR gdb/23053
8564         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8565         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8566         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8567         regression.
8568
8569 2018-04-12  Tom Tromey  <tom@tromey.com>
8570
8571         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8572         (rust_evaluate_subexp): Likewise.
8573
8574 2018-04-12  Pedro Alves  <palves@redhat.com>
8575
8576         * procfs.c (procfs_detach): Make forward declaration's prototype
8577         match definition's protototype.
8578         (proc_get_LDT_entry): Remove stale do_cleanups call.
8579
8580 2018-04-12  Pedro Alves  <palves@redhat.com>
8581
8582         * target.h (target_ops::to_has_exited): Delete.
8583         (target_has_exited): Delete.
8584         * target-delegates.c: Regenerate.
8585
8586 2018-04-11  Pedro Alves  <palves@redhat.com>
8587
8588         * target.c (fileio_fh_t::t): Add comment.
8589         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8590         (target_fileio_close): Handle a NULL target.
8591         (invalidate_fileio_fh): New.
8592         (target_close): Call it.
8593         * remote.c (remote_hostio_send_command): No longer check whether
8594         remote_desc is open.
8595
8596 2018-04-11  Pedro Alves  <palves@redhat.com>
8597
8598         * target.c (fileio_fh_t): Make it a named struct instead of a
8599         typedef.
8600         (fileio_fh_t::is_closed): New method.
8601         (DEF_VEC_O (fileio_fh_t)): Remove.
8602         (fileio_fhandles): Now a std::vector.
8603         (is_closed_fileio_fh): Delete.
8604         (acquire_fileio_fd): Adjust.  Rename parameters.
8605         (release_fileio_fd): Adjust.
8606         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8607         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8608         (target_fileio_close): Adjust.
8609
8610 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8611
8612         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8613         index.
8614
8615 2018-04-10  Pedro Alves  <palves@redhat.com>
8616
8617         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8618         (scoped_finish_thread_state): New class.
8619         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8620         cleanup.
8621         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8622         (fetch_inferior_event, normal_stop): Likewise.
8623         * thread.c (finish_thread_state_cleanup): Delete.
8624
8625 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8626             Pedro Alves  <palves@redhat.com>
8627
8628         * value.c: Include "selftest.h" and "common/array-view.h".
8629         (struct range) <operator ==>: New.
8630         (test_ranges_contain): New.
8631         (check_ranges_vector): New.
8632         (test_insert_into_bit_range_vector): New.
8633         (_initialize_values): Register selftests.
8634         * common/array-view.h (operator==, operator!=): New.
8635
8636 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8637
8638         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8639         an iterator.
8640         * inline-frame.c: Include <algorithm>.
8641         (struct inline_state): Add constructor.
8642         (inline_state_s): Remove.
8643         (DEF_VEC_O(inline_state_s)): Remove.
8644         (inline_states): Change type to std::vector.
8645         (find_inline_frame_state): Adjust to std::vector.
8646         (allocate_inline_frame_state): Remove.
8647         (clear_inline_frame_state): Adjust to std::vector.
8648         (skip_inline_frames): Adjust to std::vector.
8649
8650 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8651
8652         * tracepoint.h (struct trace_state_variable): Add constructor.
8653         <name>: Change type to std::string.
8654         * tracepoint.c (tsv_s): Remove.
8655         (DEF_VEC_O(tsv_s)): Remove.
8656         (tvariables): Change to std::vector.
8657         (create_trace_state_variable): Adjust to std::vector.
8658         (find_trace_state_variable): Likewise.
8659         (find_trace_state_variable_by_number): Likewise.
8660         (delete_trace_state_variable): Likewise.
8661         (trace_variable_command): Adjust to std::string.
8662         (delete_trace_variable_command): Likewise.
8663         (tvariables_info_1): Adjust to std::vector.
8664         (save_trace_state_variables): Likewise.
8665         (start_tracing): Likewise.
8666         (merge_uploaded_trace_state_variables): Adjust to std::vector
8667         and std::string.
8668         * target.h (struct target_ops)
8669         <to_download_trace_state_variable>: Pass reference to
8670         trace_state_variable.
8671         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8672         * target-delegates.c: Re-generate.
8673         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8674         (mi_tsv_deleted): Likewise.
8675         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8676         * remote.c (remote_download_trace_state_variable): Change
8677         pointer to reference and adjust.
8678         * make-target-delegates (parse_argtypes): Handle references.
8679         (write_function_header): Likewise.
8680         (munge_type): Likewise.
8681
8682 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8683
8684         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8685         string_view-selftests.c.
8686         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8687         testsuite.
8688         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8689         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8690         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8691         * unittests/basic_string_view/element_access/char/1.cc:
8692         Likewise.
8693         * unittests/basic_string_view/element_access/char/empty.cc:
8694         Likewise.
8695         * unittests/basic_string_view/element_access/char/front_back.cc:
8696         Likewise.
8697         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8698         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8699         Likewise.
8700         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8701         Likewise.
8702         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8703         Likewise.
8704         * unittests/basic_string_view/operations/compare/char/1.cc:
8705         Likewise.
8706         * unittests/basic_string_view/operations/compare/char/13650.cc:
8707         Likewise.
8708         * unittests/basic_string_view/operations/copy/char/1.cc:
8709         Likewise.
8710         * unittests/basic_string_view/operations/data/char/1.cc:
8711         Likewise.
8712         * unittests/basic_string_view/operations/find/char/1.cc:
8713         Likewise.
8714         * unittests/basic_string_view/operations/find/char/2.cc:
8715         Likewise.
8716         * unittests/basic_string_view/operations/find/char/3.cc:
8717         Likewise.
8718         * unittests/basic_string_view/operations/find/char/4.cc:
8719         Likewise.
8720         * unittests/basic_string_view/operations/rfind/char/1.cc:
8721         Likewise.
8722         * unittests/basic_string_view/operations/rfind/char/2.cc:
8723         Likewise.
8724         * unittests/basic_string_view/operations/rfind/char/3.cc:
8725         Likewise.
8726         * unittests/basic_string_view/operations/substr/char/1.cc:
8727         Likewise.
8728         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8729         * unittests/string_view-selftests.c: New file.
8730
8731 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8732
8733         * unittests/basic_string_view/capacity/1.cc: New file.
8734         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8735         * unittests/basic_string_view/cons/char/1.cc: New file.
8736         * unittests/basic_string_view/cons/char/2.cc: New file.
8737         * unittests/basic_string_view/cons/char/3.cc: New file.
8738         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8739         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8740         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8741         * unittests/basic_string_view/element_access/char/1.cc: New file.
8742         * unittests/basic_string_view/element_access/char/2.cc: New file.
8743         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8744         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8745         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8746         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8747         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8748         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8749         * unittests/basic_string_view/include.cc: New file.
8750         * unittests/basic_string_view/inserters/char/1.cc: New file.
8751         * unittests/basic_string_view/inserters/char/2.cc: New file.
8752         * unittests/basic_string_view/inserters/char/3.cc: New file.
8753         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8754         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8755         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8756         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8757         * unittests/basic_string_view/literals/types.cc: New file.
8758         * unittests/basic_string_view/literals/values.cc: New file.
8759         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8760         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8761         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8762         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8763         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8764         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8765         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8766         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8767         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8768         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8769         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8770         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8771         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8772         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8773         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8774         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8775         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8776         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8777         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8778         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8779         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8780         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8781         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8782         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8783         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8784         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8785         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8786         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8787         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8788         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8789         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8790         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8791         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8792         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8793         * unittests/basic_string_view/operators/char/2.cc: New file.
8794         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8795         * unittests/basic_string_view/range_access/char/1.cc: New file.
8796         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8797         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8798         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8799         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8800         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8801         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8802         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8803         * unittests/basic_string_view/typedefs.cc: New file.
8804         * unittests/basic_string_view/types/1.cc: New file.
8805
8806 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8807
8808         * common/gdb_string_view.h: Remove libstdc++ implementation
8809         details, adjust to gdb reality.
8810         * common/gdb_string_view.tcc: Likewise.
8811         * cli/cli-script.c (struct string_view): Remove.
8812         (user_args) <m_args>: Change element type to gdb::string_view.
8813         (user_args::insert_args): Adjust.
8814
8815 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8816
8817         * common/gdb_string_view.h: New file.
8818         * common/gdb_string_view.tcc: New file.
8819
8820 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8821
8822         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8823         * configure: Re-generate.
8824
8825 2018-04-09  Pedro Alves  <palves@redhat.com>
8826
8827         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8828         (set_target_gdbarch): Call
8829         gdb::observers::architecture_changed.notify instead of
8830         observer_notify_architecture_changed.
8831
8832 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8833
8834         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8835         (do_restore_current_traceframe_cleanup): Remove.
8836         (restore_current_traceframe_cleanup_dtor): Remove.
8837         (make_cleanup_restore_current_traceframe): Remove.
8838         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8839         New.
8840         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8841         * infrun.c (fetch_inferior_event): Use
8842         scoped_restore_current_traceframe.
8843
8844 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8845
8846         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8847         Remove.
8848         <n_allocated_type_units>: Remove.
8849         <all_type_units>: Change to std::vector.
8850         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8851         to std::vector change.
8852         (dwarf2_per_objfile::get_cutu): Likewise.
8853         (dwarf2_per_objfile::get_tu): Likewise.
8854         (create_signatured_type_table_from_index): Likewise.
8855         (create_signatured_type_table_from_debug_names): Likewise.
8856         (dw2_symtab_iter_next): Likewise.
8857         (dw2_print_stats): Likewise.
8858         (dw2_expand_all_symtabs): Likewise.
8859         (dw2_expand_marked_cus): Likewise.
8860         (dw2_debug_names_iterator::next): Likewise.
8861         (dwarf2_initialize_objfile): Likewise.
8862         (add_signatured_type_cu_to_table): Likewise.
8863         (create_all_type_units): Likewise.
8864         (add_type_unit): Likewise.
8865         (struct tu_abbrev_offset): Add constructor.
8866         (build_type_psymtabs_1): Adjust to std::vector change.
8867         (print_tu_stats): Likewise.
8868         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8869         (write_debug_names): Likewise.
8870
8871 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8872
8873         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8874         Make an std::vector.
8875         <n_comp_units>: Remove.
8876         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8877         to std::vector change.
8878         (dwarf2_per_objfile::get_cutu): Likewise.
8879         (dwarf2_per_objfile::get_cu): Likewise.
8880         (create_cus_from_index): Likewise.
8881         (create_addrmap_from_index): Likewise.
8882         (create_addrmap_from_aranges): Likewise.
8883         (dwarf2_read_index): Likewise.
8884         (dw2_find_last_source_symtab): Likewise.
8885         (dw2_map_symtabs_matching_filename): Likewise.
8886         (dw2_symtab_iter_next): Likewise.
8887         (dw2_print_stats): Likewise.
8888         (dw2_expand_all_symtabs): Likewise.
8889         (dw2_expand_symtabs_with_fullname): Likewise.
8890         (dw2_expand_marked_cus): Likewise.
8891         (dw2_map_symbol_filenames): Likewise.
8892         (create_cus_from_debug_names): Likewise.
8893         (dwarf2_read_debug_names): Likewise.
8894         (dw2_debug_names_iterator::next): Likewise.
8895         (dwarf2_initialize_objfile): Likewise.
8896         (set_partial_user): Likewise.
8897         (dwarf2_build_psymtabs_hard): Likewise.
8898         (read_comp_units_from_section): Remove arguments, adjust to
8899         std::vector change.
8900         (create_all_comp_units): Adjust to std::vector and
8901         read_comp_units_from_section changes.
8902         (dwarf2_find_containing_comp_unit): Adjust to std::vector
8903         change.
8904         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8905         (psyms_seen_size): Likewise.
8906         (write_gdbindex): Likewise.
8907         (write_debug_names): Likewise.
8908
8909 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8910
8911         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8912         with dwarf2_per_objfile.
8913         (create_cus_from_index): Likewise.
8914         (create_signatured_type_table_from_index): Likewise.
8915         (dwarf2_read_index): Likewise.
8916         (dwarf2_initialize_objfile): Likewise.
8917         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
8918         per_cu rather than get_dwarf2_per_objfile.
8919
8920 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8921
8922         * dwarf2read.h (struct signatured_type): Forward declare.
8923         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8924         New methods.
8925         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8926         (dw2_get_cutu): ...this.
8927         (dwarf2_per_objfile::get_cu): Rename from...
8928         (dw2_get_cu): ...this.
8929         (dwarf2_per_objfile::get_tu): New.
8930         (create_addrmap_from_index): Adjust.
8931         (create_addrmap_from_aranges): Adjust.
8932         (dw2_find_last_source_symtab): Adjust.
8933         (dw2_map_symtabs_matching_filename): Adjust.
8934         (dw2_symtab_iter_next): Adjust.
8935         (dw2_print_stats): Adjust.
8936         (dw2_expand_all_symtabs): Adjust.
8937         (dw2_expand_symtabs_with_fullname): Adjust.
8938         (dw2_expand_marked_cus): Adjust.
8939         (dw_expand_symtabs_matching_file_matcher): Adjust.
8940         (dw2_map_symbol_filenames): Adjust.
8941         (dw2_debug_names_iterator::next): Adjust.
8942         (dwarf2_initialize_objfile): Adjust.
8943         (set_partial_user): Adjust.
8944         (dwarf2_build_psymtabs_hard): Adjust.
8945
8946 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8947
8948         * dwarf2read.c (create_signatured_type_table_from_debug_names):
8949         Remove unused variables.
8950         (dw2_map_symtabs_matching_filename): Likewise.
8951         (dwarf2_record_block_ranges): Likewise.
8952         (dwarf2_read_addr_index): Likewise.
8953         (follow_die_offset): Likewise.
8954
8955 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8956
8957         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8958         to symbol_file_add_main.
8959
8960 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8961
8962         PR mi/22299
8963         * mi/mi-console.c (do_fputc_async_safe): New.
8964         (mi_console_file::write_async_safe): New.
8965         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8966         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8967         New.
8968         * ui-file.c (ui_file::putstrn): Adjust call to
8969         fputstrn_unfiltered.
8970         * utils.c (printchar): Replace do_fputs and do_fprintf
8971         parameters by do_fputc.
8972         (fputstr_filtered): Adjust call to printchar.
8973         (fputstr_unfiltered): Likewise.
8974         (fputstrn_filtered): Likewise.
8975         (fputstrn_unfiltered): Add do_fputc parameter, pass to
8976         printchar.
8977         * utils.h (do_fputc_ftype): New typedef.
8978         (fputstrn_unfiltered): Add do_fputc parameter.
8979
8980 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8981
8982         * regformats/i386/i386-avx.dat: Remove.
8983
8984 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8985
8986         PR gdb/22979
8987         * amd64-tdep.c (amd64_none_init_abi): New function.
8988         (amd64_x32_none_init_abi): New function.
8989         (_initialize_amd64_tdep): Register handlers for x86-64 and
8990         x64_32 with GDB_OSABI_NONE.
8991         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8992         GDB_OSABI_NONE osabi.
8993
8994 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8995
8996         PR gdb/22980
8997         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8998         GDB_OSABI_NONE.
8999         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9000         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9001
9002 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9003
9004         * common/byte-vector.h (char_vector): New type.
9005         * target.h (target_read_alloc): Return
9006         gdb::optional<byte_vector>.
9007         (target_read_stralloc): Return gdb::optional<char_vector>.
9008         (target_get_osdata): Return gdb::optional<char_vector>.
9009         * target.c (target_read_alloc_1): Templatize.  Replacement
9010         manual memory management with vector.
9011         (target_read_alloc): Change return type, adjust.
9012         (target_read_stralloc): Change return type, adjust.
9013         (target_get_osdata): Change return type, adjust.
9014         * auxv.c (struct auxv_info) <length>: Remove.
9015         <data>: Change type to gdb::optional<byte_vector>.
9016         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9017         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9018         (target_auxv_search): Adjust.
9019         (fprint_target_auxv): Adjust.
9020         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9021         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9022         (linux_make_corefile_notes): Adjust.
9023         * osdata.c (get_osdata): Adjust.
9024         * remote.c (remote_get_threads_with_qxfer): Adjust.
9025         (remote_memory_map): Adjust.
9026         (remote_traceframe_info): Adjust.
9027         (btrace_read_config): Adjust.
9028         (remote_read_btrace): Adjust.
9029         (remote_pid_to_exec_file): Adjust.
9030         * solib-aix.c (solib_aix_get_library_list): Adjust.
9031         * solib-dsbt.c (decode_loadmap): Don't free buf.
9032         (dsbt_get_initial_loadmaps): Adjust.
9033         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9034         * solib-target.c (solib_target_current_sos): Adjust.
9035         * tracepoint.c (sdata_make_value): Adjust.
9036         * xml-support.c (xinclude_start_include): Adjust.
9037         (xml_fetch_content_from_file): Adjust.
9038         * xml-support.h (xml_fetch_another): Change return type.
9039         (xml_fetch_content_from_file): Change return type.
9040         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9041         * xml-tdesc.c (file_read_description_xml): Adjust.
9042         (fetch_available_features_from_target): Change return type.
9043         (target_fetch_description_xml): Adjust.
9044         (target_read_description_xml): Adjust.
9045
9046 2018-04-06  Tom Tromey  <tom@tromey.com>
9047
9048         * value.c (~value): Update.
9049         (struct value) <contents>: Now unique_xmalloc_ptr.
9050         (value_contents_bits_eq, allocate_value_contents)
9051         (value_contents_raw, value_contents_all_raw)
9052         (value_contents_for_printing, value_contents_for_printing_const)
9053         (set_value_enclosing_type): Update.
9054
9055 2018-04-06  Tom Tromey  <tom@tromey.com>
9056
9057         * value.c (range_s): Remove typedef, VEC.
9058         (struct range): Add operator<.
9059         (range_lessthan): Remove.
9060         (ranges_contain): Change type.
9061         (~value): Update.
9062         (struct value) <unavailable, optimized_out>: Now std::vector.
9063         (value_entirely_available)
9064         (value_entirely_covered_by_range_vector)
9065         (value_entirely_unavailable, value_entirely_optimized_out):
9066         Update.
9067         (insert_into_bit_range_vector): Change argument type.
9068         (find_first_range_overlap): Likewise.
9069         (struct ranges_and_idx, value_contents_bits_eq)
9070         (require_not_optimized_out, require_available): Update.
9071         (ranges_copy_adjusted): Change argument types.
9072         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9073
9074 2018-04-06  Tom Tromey  <tom@tromey.com>
9075
9076         * value.c (~value): Update.
9077         (struct value) <parent>: Now a value_ref_ptr.
9078         (value_parent, set_value_parent, value_address, value_copy):
9079         Update.
9080
9081 2018-04-06  Tom Tromey  <tom@tromey.com>
9082
9083         * value.c (struct value): Add constructor, destructor, and member
9084         initializers.
9085         (allocate_value_lazy, value_decref): Update.
9086
9087 2018-04-06  Tom Tromey  <tom@tromey.com>
9088
9089         * value.c (struct value) <released, next>: Remove.
9090         (all_values): Now a std::vector.
9091         (allocate_value_lazy): Update.
9092         (value_next): Remove.
9093         (value_mark, value_free_to_mark, release_value)
9094         (value_release_to_mark): Update.
9095
9096 2018-04-06  Tom Tromey  <tom@tromey.com>
9097
9098         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9099         (free_value_chain): Remove.
9100         * value.c (free_value_chain): Remove.
9101         (value_release_to_mark): Return a std::vector.
9102         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9103         std::vector.
9104         (check_condition): Update.
9105         * eval.c (fetch_subexp_value): Change "val_chain" to a
9106         std::vector.
9107         * breakpoint.c (update_watchpoint): Update.
9108         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9109
9110 2018-04-06  Tom Tromey  <tom@tromey.com>
9111
9112         * value.h (free_all_values): Remove.
9113         * value.c (free_all_values): Remove.
9114
9115 2018-04-06  Tom Tromey  <tom@tromey.com>
9116
9117         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9118         (value_history_chain, value_history_count): Remove.
9119         (value_history): New global.
9120         (record_latest_value, access_value_history, show_values)
9121         (preserve_values): Update.
9122
9123 2018-04-06  Tom Tromey  <tom@tromey.com>
9124
9125         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9126         * varobj.c (varobj_set_display_format, varobj_set_value)
9127         (install_default_visualizer, construct_visualizer)
9128         (install_new_value, ~varobj, varobj_get_value_type)
9129         (my_value_of_variable, varobj_editable_p): Update.
9130         * c-varobj.c (c_describe_child, c_value_of_variable)
9131         (cplus_number_of_children, cplus_describe_child): Update.
9132         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9133         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9134         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9135
9136 2018-04-06  Tom Tromey  <tom@tromey.com>
9137
9138         * printcmd.c (last_examine_address): Change type to
9139         value_ref_ptr.
9140         (do_examine, x_command): Update.
9141
9142 2018-04-06  Tom Tromey  <tom@tromey.com>
9143
9144         * value.c (release_value): Update.
9145         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9146         (struct bpstats) <val>: Now a value_ref_ptr.
9147         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9148         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9149         (~watchpoint, print_it_watchpoint, watch_command_1)
9150         (invalidate_bp_value_on_memory_change): Update.
9151
9152 2018-04-06  Tom Tromey  <tom@tromey.com>
9153
9154         * varobj.c (varobj_clear_saved_item)
9155         (update_dynamic_varobj_children, install_new_value, ~varobj):
9156         Update.
9157         * value.h (value_incref): Move declaration earlier.
9158         (value_decref): Rename from value_free.
9159         (struct value_ref_policy): New.
9160         (value_ref_ptr): New typedef.
9161         (struct value_deleter): Remove.
9162         (gdb_value_up): Remove typedef.
9163         (release_value): Change return type.
9164         (release_value_or_incref): Remove.
9165         * value.c (set_value_parent): Update.
9166         (value_incref): Change return type.
9167         (value_decref): Rename from value_free.
9168         (value_free_to_mark, free_all_values, free_value_chain): Update.
9169         (release_value): Return value_ref_ptr.
9170         (release_value_or_incref): Remove.
9171         (record_latest_value, set_internalvar, clear_internalvar):
9172         Update.
9173         * stack.c (info_frame_command): Don't call value_free.
9174         * python/py-value.c (valpy_dealloc, valpy_new)
9175         (value_to_value_object): Update.
9176         * printcmd.c (do_examine): Update.
9177         * opencl-lang.c (lval_func_free_closure): Update.
9178         * mi/mi-main.c (register_changed_p): Don't call value_free.
9179         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9180         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9181         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9182         value_free.
9183         * guile/scm-value.c (vlscm_free_value_smob)
9184         (vlscm_scm_from_value): Update.
9185         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9186         (frame_unwind_register_unsigned, get_frame_register_bytes)
9187         (put_frame_register_bytes): Don't call value_free.
9188         * findvar.c (address_from_register): Don't call value_free.
9189         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9190         * dwarf2loc.c (entry_data_value_free_closure)
9191         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9192         (dwarf2_evaluate_loc_desc_full): Update.
9193         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9194         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9195         (~watchpoint, watch_command_1)
9196         (invalidate_bp_value_on_memory_change): Update.
9197         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9198
9199 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9200
9201         PR gdb/23022
9202         * warning.m4: Add -Wno-error=deprecated-register.
9203         * configure: Re-generate.
9204
9205 2018-04-05  Tom Tromey  <tom@tromey.com>
9206
9207         * linespec.h: Remove include of "vec.h".
9208
9209 2018-04-05  Tom Tromey  <tom@tromey.com>
9210
9211         * linespec.c (typep): Remove typedef.
9212         (find_methods, find_superclass_methods): Take a std::vector.
9213         (find_method): Use std::vector.
9214
9215 2018-04-05  Tom Tromey  <tom@tromey.com>
9216
9217         * utils.c (compare_strings): Remove.
9218         * utils.h (compare_strings): Remove.
9219         * objc-lang.h (find_imps): Update.
9220         * objc-lang.c (find_methods): Take a std::vector.
9221         (uniquify_strings, find_imps): Likewise.
9222         * linespec.c (find_methods): Take a std::vector.
9223         (decode_objc): Use std::vector.
9224         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9225         a std::vector.
9226         (find_method, find_function_symbols): Use std::vector.
9227
9228 2018-04-05  Tom Tromey  <tom@tromey.com>
9229
9230         * completer.c (completion_tracker::completion_tracker): Remove
9231         cast.
9232         (completion_tracker::discard_completions): Likewise.
9233         * breakpoint.c (ambiguous_names_p): Remove cast.
9234         * ada-lang.c (_initialize_ada_language): Remove cast.
9235         * utils.h (streq): Update.
9236         (streq_hash): Add new declaration.
9237         * utils.c (streq): Return bool.
9238         (streq_hash): New function.
9239
9240 2018-04-05  Tom Tromey  <tom@tromey.com>
9241
9242         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9243         Remove a string copy.
9244
9245 2018-04-05  Tom Tromey  <tom@tromey.com>
9246
9247         * linespec.c (filter_results): Use std::vector.
9248         (decode_line_2, decode_line_full): Update.
9249
9250 2018-04-05  Tom Tromey  <tom@tromey.com>
9251
9252         * linespec.c (canonical_to_fullform): Return std::string.
9253         (filter_results): Update.
9254         (struct decode_line_2_item): Add constructor.
9255         <fullform, displayform>: Now std::string.
9256         (decode_line_2_compare_items): Now a std::sort comparator.
9257         (decode_line_2): Update.
9258
9259 2018-04-05  Tom Tromey  <tom@tromey.com>
9260
9261         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9262         (unexpected_linespec_error): Update.
9263         (linespec_parse_basic, parse_linespec): Update.
9264
9265 2018-04-05  Tom Tromey  <tom@tromey.com>
9266
9267         * linespec.c (linespec_parse_basic): Reindent.
9268
9269 2018-04-05  Tom Tromey  <tom@tromey.com>
9270
9271         * minsyms.h (iterate_over_minimal_symbols): Update.
9272         * minsyms.c (iterate_over_minimal_symbols): Take a
9273         gdb::function_view.
9274         * linespec.c (struct collect_minsyms): Remove.
9275         (compare_msyms): Now a std::sort comparator.
9276         (add_minsym): Add parameters.
9277         (search_minsyms_for_name): Update.  Use std::vector.
9278
9279 2018-04-03  Tom Tromey  <tom@tromey.com>
9280
9281         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9282         gdb::byte_vector.
9283
9284 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9285
9286         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9287
9288 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9289
9290         PR gdb/16959
9291         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9292         printing static type.
9293
9294 2018-04-01  Tom Tromey  <tom@tromey.com>
9295
9296         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9297         (rs6000_xfer_shared_libraries): Update.
9298
9299 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9300
9301         * common/gdb_vecs.h (char_ptr): Remove.
9302         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9303
9304 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9305
9306         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9307         with std::vector.
9308         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9309
9310 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9311
9312         * tracepoint.h (struct uploaded_tp): Initialize fields.
9313         <actions, step_actions, cmd_strings>: Change type to
9314         std::vector<char *>.
9315         * tracepoint.c (get_uploaded_tp): Allocate with new.
9316         (free_uploaded_tps): Free with delete.
9317         (parse_tracepoint_definition): Adjust to std::vector change.
9318         * breakpoint.c (read_uploaded_action): Likewise.
9319         (create_tracepoint_from_upload): Likewise.
9320         * ctf.c (ctf_write_uploaded_tp): Likewise.
9321         (SET_ARRAY_FIELD): Likewise.
9322         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9323
9324 2018-03-30  Tom Tromey  <tom@tromey.com>
9325
9326         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9327         std::unique_ptr.
9328         (svr4_keep_data_in_core): Update.
9329         (svr4_read_so_list): Update.
9330
9331 2018-03-30  Tom Tromey  <tom@tromey.com>
9332
9333         * windows-nat.c (handle_output_debug_string, handle_exception):
9334         Update.
9335         * target.h (target_read_string): Update.
9336         * target.c (target_read_string): Change "string" to
9337         unique_xmalloc_ptr.
9338         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9339         Update.
9340         * solib-frv.c (frv_current_sos): Update.
9341         * solib-dsbt.c (dsbt_current_sos): Update.
9342         * solib-darwin.c (darwin_current_sos): Update.
9343         * linux-thread-db.c (inferior_has_bug): Update.
9344         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9345         Update.  Remove alloca.
9346         * ada-lang.c (ada_main_name): Update.
9347
9348 2018-03-30  Tom Tromey  <tom@tromey.com>
9349
9350         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9351         (struct dwo_file_deleter): New.
9352         (dwo_file_up): New typedef.
9353         (open_and_init_dwo_file): Use dwo_file_up.
9354         (free_dwo_file_cleanup): Remove.
9355
9356 2018-03-30  Tom Tromey  <tom@tromey.com>
9357
9358         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9359         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9360
9361 2018-03-30  Tom Tromey  <tom@tromey.com>
9362
9363         * dwarf2read.c (class free_cached_comp_units): New class.
9364         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9365         (free_cached_comp_units): Remove function.
9366
9367 2018-03-30  Tom Tromey  <tom@tromey.com>
9368
9369         * utils.h (make_cleanup_unpush_target): Remove.
9370         * inf-ptrace.c (struct target_unpusher): New.
9371         (target_unpush_up) New typedef.
9372         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9373         target_unpush_up.
9374         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9375
9376 2018-03-27  Tom Tromey  <tom@tromey.com>
9377
9378         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9379
9380 2018-03-27  Pedro Alves  <palves@redhat.com>
9381             Tom Tromey  <tom@tromey.com>
9382
9383         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9384         destructor.  Now a class.
9385         (gdb_readline_wrapper_cleanup): Remove function.
9386         (gdb_readline_wrapper): Remove cleanups.
9387
9388 2018-03-27  Tom Tromey  <tom@tromey.com>
9389
9390         * typeprint.h (struct type_print_options) <local_typedefs,
9391         global_typedefs>: Remove "struct" keyword.
9392         (class typedef_hash_table): New class.
9393         (recursively_update_typedef_hash, add_template_parameters)
9394         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9395         (find_typedef_in_hash): Don't declare.
9396         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9397         (typedef_hash_table::recursively_update): Rename from
9398         recursively_update_typedef_hash.  Now a member.
9399         (typedef_hash_table::add_template_parameters): Rename from
9400         add_template_parameters.  Now a member.
9401         (typedef_hash_table::typedef_hash_table): Now a constructor;
9402         rename from create_typedef_hash.
9403         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9404         rename from free_typedef_hash.
9405         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9406         (do_free_global_table): Remove.
9407         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9408         from copy_type_recursive.
9409         (create_global_typedef_table): Remove.
9410         (typedef_hash_table::find_global_typedef): Now a member of
9411         typedef_hash_table.
9412         (typedef_hash_table::find_typedef): Rename from
9413         find_typedef_in_hash; now a member.
9414         (whatis_exp): Update.
9415         * extension.h (struct ext_lang_type_printers): Add constructor and
9416         destructor.
9417         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9418         declare.
9419         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9420         Now a constructor; rename from start_ext_lang_type_printers.
9421         (ext_lang_type_printers): Now a destructor; rename from
9422         free_ext_lang_type_printers.
9423         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9424         Update.
9425         (c_type_print_base_struct_union): Update.  Remove cleanups.
9426
9427 2018-03-27  Tom Tromey  <tom@tromey.com>
9428
9429         * dwarf-index-write.c: Include <cmath>.
9430
9431 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9432
9433         * NEWS: Add entry describing new "set|show varsize-limit" command.
9434         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9435         command.
9436         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9437         "set variable".
9438
9439 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9440
9441         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9442         dwarf-index-write.c
9443         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9444         * dwarf-index-common.c: New file.
9445         * dwarf-index-common.h: New file.
9446         * dwarf-index-write.c: New file.
9447         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9448         (struct dwarf2_section_info): Move from here.
9449         (dwarf2_section_info_def): Likewise.
9450         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9451         (offset_type): Likewise.
9452         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9453         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9454         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9455         (byte_swap): Likewise.
9456         (MAYBE_SWAP): Likewise.
9457         (dwarf2_per_cu_ptr): Likewise.
9458         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9459         (struct tu_stats): Likewise.
9460         (struct dwarf2_per_objfile): Likewise.
9461         (struct dwarf2_per_cu_data): Likewise.
9462         (struct signatured_type): Likewise.
9463         (sig_type_ptr): Likewise.
9464         (DEF_VEC_P (sig_type_ptr)): Likewise.
9465         (INDEX4_SUFFIX): Likewise.
9466         (INDEX5_SUFFIX): Likewise.
9467         (DEBUG_STR_SUFFIX): Likewise.
9468         (dwarf2_read_section): Make non-static.
9469         (mapped_index_string_hash): Move from here.
9470         (dwarf5_djb_hash): Likewise.
9471         (file_write): Likewise.
9472         (class data_buf): Likewise.
9473         (struct symtab_index_entry): Likewise.
9474         (struct mapped_symtab): Likewise.
9475         (find_slot): Likewise.
9476         (hash_expand): Likewise.
9477         (add_index_entry): Likewise.
9478         (uniquify_cu_indices): Likewise.
9479         (class c_str_view): Likewise.
9480         (class c_str_view_hasher): Likewise.
9481         (class vector_hasher): Likewise.
9482         (write_hash_table): Likewise.
9483         (psym_index_map): Likewise.
9484         (struct addrmap_index_data): Likewise.
9485         (add_address_entry): Likewise.
9486         (add_address_entry_worker): Likewise.
9487         (write_address_map): Likewise.
9488         (symbol_kind): Likewise.
9489         (write_psymbols): Likewise.
9490         (struct signatured_type_index_data): Likewise.
9491         (write_one_signatured_type): Likewise.
9492         (recursively_count_psymbols): Likewise.
9493         (recursively_write_psymbols): Likewise.
9494         (class debug_names): Likewise.
9495         (check_dwarf64_offsets): Likewise.
9496         (psyms_seen_size): Likewise.
9497         (write_gdbindex): Likewise.
9498         (write_debug_names): Likewise.
9499         (assert_file_size): Likewise.
9500         (write_psymtabs_to_index): Likewise.
9501         (save_gdb_index_command): Likewise.
9502         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9503         command.
9504         * dwarf2read.h: New file.
9505
9506 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9507
9508         PR gdb/22670
9509         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9510         symbol name if the CU's language stores symbol names in linkage
9511         format.
9512         * language.h (struct language_defn)
9513         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9514         all instances of this struct.
9515
9516 2018-03-26  Tom Tromey  <tom@tromey.com>
9517
9518         * stack.c (backtrace_command_1): Remove verbose code.
9519
9520 2018-03-26  Tom Tromey  <tom@tromey.com>
9521
9522         * python/py-framefilter.c (py_print_type): Don't catch
9523         exceptions.  Return void.
9524         (py_print_value): Likewise.
9525         (py_print_single_arg): Likewise.
9526         (enumerate_args): Don't catch exceptions.
9527         (py_print_args): Likewise.
9528         (py_print_frame): Likewise.
9529         (gdbpy_apply_frame_filter): Catch exceptions here.
9530
9531 2018-03-26  Tom Tromey  <tom@tromey.com>
9532
9533         * stack.c (_initialize_stack): Remove trailing newlines from help
9534         text.  Add "Usage" line to "backtrace" help.
9535
9536 2018-03-26  Tom Tromey  <tom@tromey.com>
9537
9538         PR python/16486:
9539         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9540
9541 2018-03-26  Tom Tromey  <tom@tromey.com>
9542
9543         * python/py-framefilter.c (py_print_single_arg): Return
9544         EXT_LANG_BT_ERROR from catch.
9545
9546 2018-03-26  Tom Tromey  <tom@tromey.com>
9547
9548         PR backtrace/15584:
9549         * stack.c (backtrace_command_1): Move some code into no-filters
9550         "if".
9551
9552 2018-03-26  Tom Tromey  <tom@tromey.com>
9553
9554         * python/py-framefilter.c (throw_quit_or_print_exception): New
9555         function.
9556         (gdbpy_apply_frame_filter): Use it.
9557
9558 2018-03-26  Tom Tromey  <tom@tromey.com>
9559
9560         PR cli/17716:
9561         * python/py-framefilter.c (py_print_type, py_print_value)
9562         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9563         RETURN_MASK_ERROR.
9564
9565 2018-03-26  Tom Tromey  <tom@tromey.com>
9566
9567         * python/py-framefilter.c (enumerate_args): Use
9568         gdb::unique_xmalloc_ptr.
9569
9570 2018-03-26  Tom Tromey  <tom@tromey.com>
9571
9572         * python/py-framefilter.c (py_print_frame): Return
9573         EXT_LANG_BT_OK.
9574         (gdbpy_apply_frame_filter): Update comment.
9575         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9576         Remove.
9577         <EXT_LANG_BT_NO_FILTERS>: Change value.
9578
9579 2018-03-26  Tom Tromey  <tom@tromey.com>
9580
9581         PR backtrace/15582:
9582         * stack.c (backtrace_command): Parse "hide" argument.
9583         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9584         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9585         constant.
9586
9587 2018-03-26  Tom Tromey  <tom@tromey.com>
9588
9589         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9590         add "flags".
9591         (backtrace_command): Remove "fulltrace", add "flags".
9592
9593 2018-03-26  Tom Tromey  <tom@tromey.com>
9594
9595         * stack.c (backtrace_command): Rewrite command line parsing.
9596
9597 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9598
9599         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9600
9601 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9602
9603         * filename-seen-cache.h: Add include guard.
9604
9605 2018-03-26  Keith Seitz  <keiths@redhat.com>
9606
9607         * symfile.c (place_section): Remove "struct" from section_addr_info
9608         in comment.
9609         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9610         "struct" keyword from section_addr_info.
9611
9612 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9613
9614         * regformats/regdef.h (reg): Add constructors.
9615
9616 2018-03-25  Pedro Alves  <palves@redhat.com>
9617
9618         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9619         if then/else bodies in var_func_name extraction.
9620
9621 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9622
9623         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9624         lookup_minimal_symbol() to find symbol entry.
9625         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9626
9627 2018-03-23  Keith Seitz  <keiths@redhat.com>
9628
9629         PR c++/22968
9630         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9631         nested type definitions for C++, too.
9632
9633 2018-03-23  Tom Tromey  <tom@tromey.com>
9634
9635         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9636         a typedef.
9637         (macho_register_oso): Remove.
9638         (macho_symtab_read): Take a std::vector.
9639         (oso_el_compare_name): Now a std::sort comparator.
9640         (macho_symfile_read_all_oso): Take a std::vector.
9641         (macho_symfile_read): Use std::vector.  Remove cleanups.
9642
9643 2018-03-22  Tom Tromey  <tom@tromey.com>
9644
9645         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9646         (record_full_goto_bookmark): Use std::string.
9647
9648 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9649
9650         PR tdep/18295
9651         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9652         a single mask.
9653
9654 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9655
9656         * rs6000-tdep.c (store_insn_p): New function.
9657         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9658         and cr_reg to their unshifted values. Use store_insn_p to
9659         match LR saves using either R1 or fdata->alloca_reg. Use
9660         store_insn_p to match CR saves. Set alloca_reg_offset
9661         when alloca_reg and framep are set. Remove lr_reg shift
9662         when assigning to fdata->lr_register.
9663
9664 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9665
9666         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9667         command line args instead of emitting a warning.
9668
9669 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9670
9671         * tracepoint.h (struct static_tracepoint_marker): Initialize
9672         fields, define default constructor, move constructor and move
9673         assignment, disable the rest.
9674         <str_id, extra>: Make std::string.
9675         (release_static_tracepoint_marker): Remove.
9676         (free_current_marker): Remove.
9677         * tracepoint.c (free_current_marker): Remove.
9678         (parse_static_tracepoint_marker_definition): Adjust to
9679         std::string, use new hex2str overload.
9680         (release_static_tracepoint_marker): Remove.
9681         (print_one_static_tracepoint_marker): Get marker by reference
9682         and adjust to std::string.
9683         (info_static_tracepoint_markers_command): Adjust to std::vector
9684         changes
9685         * target.h (static_tracepoint_marker_p): Remove typedef.
9686         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9687         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9688         bool.
9689         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9690         * target-debug.h
9691         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9692         (target_debug_print_std_vector_static_tracepoint_marker): New.
9693         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9694         to...
9695         (target_debug_print_static_tracepoint_marker_p): ... this.
9696         * target-delegates.c: Re-generate.
9697         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9698         Make std::string.
9699         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9700         (decode_static_tracepoint_spec): Adjust to std::vector.
9701         (tracepoint_print_one_detail): Adjust to std::string.
9702         (strace_marker_decode_location): Adjust to std::string.
9703         (update_static_tracepoint): Adjust to std::string, remove call
9704         to release_static_tracepoint_marker.
9705         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9706         Adjust to std::vector.
9707         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9708         (remote_static_tracepoint_markers_by_strid): Adjust to
9709         std::vector.
9710         * common/rsp-low.h (hex2str): New overload with explicit count
9711         of bytes.
9712         * common/rsp-low.c (hex2str): New overload with explicit count
9713         of bytes.
9714         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9715         (_initialize_rsp_low_selftests): Add test_hex2str test.
9716         * unittests/tracepoint-selftests.c
9717         (test_parse_static_tracepoint_marker_definition): Adjust to
9718         std::string.
9719
9720 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9721
9722         * tracepoint.c (parse_static_tracepoint_marker_definition):
9723         Consider case where the definition is followed by more
9724         definitions.
9725         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9726         tracepoint-selftests.c.
9727         * unittests/tracepoint-selftests.c: New.
9728
9729 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9730
9731         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9732         Carvalho.
9733
9734 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9735
9736         * symtab.c (find_pc_sect_line): fixed indentation.
9737
9738 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9739
9740         * symtab.c (find_pc_sect_line): now uses binary search.
9741
9742 2018-03-19  Tom Tromey  <tom@tromey.com>
9743
9744         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9745         "IDENT" production.
9746
9747 2018-03-19  Pedro Alves  <palves@redhat.com>
9748             Tom Tromey  <tom@tromey.com>
9749
9750         * unittests/observable-selftests.c: New file.
9751         * common/observable.h: New file.
9752         * observable.h: New file.
9753         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9754         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9755         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9756         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9757         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9758         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9759         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9760         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9761         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9762         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9763         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9764         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9765         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9766         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9767         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9768         tui/tui-interp.c, valops.c: Update all users.
9769         * tui/tui-hooks.c (tui_bp_created_observer)
9770         (tui_bp_deleted_observer, tui_bp_modified_observer)
9771         (tui_inferior_exit_observer, tui_before_prompt_observer)
9772         (tui_normal_stop_observer, tui_register_changed_observer):
9773         Remove.
9774         (tui_observers_token): New global.
9775         (attach_or_detach, tui_attach_detach_observers): New functions.
9776         (tui_install_hooks, tui_remove_hooks): Use
9777         tui_attach_detach_observers.
9778         * record-btrace.c (record_btrace_thread_observer): Remove.
9779         (record_btrace_thread_observer_token): New global.
9780         * observer.sh: Remove.
9781         * observer.c: Rename to observable.c.
9782         * observable.c (namespace gdb_observers): Define new objects.
9783         (observer_debug): Move into gdb_observers namespace.
9784         (struct observer, struct observer_list, xalloc_observer_list_node)
9785         (xfree_observer_list_node, generic_observer_attach)
9786         (generic_observer_detach, generic_observer_notify): Remove.
9787         (_initialize_observer): Update.
9788         Don't include observer.inc.
9789         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9790         (clean mostlyclean): Likewise.
9791         (observer.h, observer.inc): Remove targets.
9792         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9793         (COMMON_SFILES): Use observable.c, not observer.c.
9794         * .gitignore: Remove observer.h.
9795
9796 2018-03-18  Tom Tromey  <tom@tromey.com>
9797
9798         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9799         gdb::def_vector.
9800         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9801
9802 2018-03-17  Tom Tromey  <tom@tromey.com>
9803
9804         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9805
9806 2018-03-17  Tom Tromey  <tom@tromey.com>
9807
9808         * target.c (class scoped_target_fd): New.
9809         (target_fileio_close_cleanup): Remove.
9810         (target_fileio_read_alloc_1): Use scoped_target_fd.
9811
9812 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9813
9814         * silent-rules.mk: New.
9815         * Makefile.in: Include silent-rules.mk
9816         (srcdir, VPATH, top_srcdir): Move up.
9817         (COMPILE): Add ECHO_CXX.
9818         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9819         (init.c): Add ECHO_INIT_C.
9820         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9821         (version.c): Add ECHO_GEN.
9822         (printcmd.o): Add ECHO_CXX.
9823         (target-float.o): Add ECHO_CXX.
9824         (ada-exp.o): Add ECHO_CXX.
9825         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9826         (insight$(EXEEXT)): Add ECHO_CXXLD.
9827         * gnulib/configure.ac: Add AM_SILENT_RULES.
9828         * gnulib/aclocal.m4: Re-generate.
9829         * gnulib/configure: Re-generate.
9830         * gnulib/import/Makefile.in: Re-generate.
9831
9832 2018-03-16  Tom Tromey  <tom@tromey.com>
9833
9834         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9835         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9836         * utils.c (do_free_section_addr_info)
9837         (make_cleanup_free_section_addr_info): Remove.
9838         * symfile.h (struct other_sections): Add constructor.
9839         (struct section_addr_info): Remove.
9840         (section_addr_info): New typedef.
9841         (struct sym_fns) <sym_offsets>: Change type of parameter.
9842         (build_section_addr_info_from_objfile)
9843         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9844         (default_symfile_offsets, symbol_file_add)
9845         (symbol_file_add_from_bfd)
9846         (build_section_addr_info_from_section_table): Update.
9847         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9848         * symfile.c (alloc_section_addr_info): Remove.
9849         (build_section_addr_info_from_section_table): Change return type.
9850         Update.
9851         (build_section_addr_info_from_bfd)
9852         (build_section_addr_info_from_objfile): Likewise.
9853         (free_section_addr_info): Remove.
9854         (relative_addr_info_to_section_offsets): Change type of "addrs".
9855         (addrs_section_compar): Now a std::sort comparator.
9856         (addrs_section_sort): Change return type.
9857         (addr_info_make_relative): Change type of "addrs".  Update.
9858         (default_symfile_offsets, syms_from_objfile_1)
9859         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9860         (symbol_file_add_separate): Update.
9861         (symbol_file_add): Change type of "addrs".  Update.
9862         (add_symbol_file_command): Update.  Remove cleanups.
9863         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
9864         cleanups.
9865         * symfile-debug.c (debug_sym_offsets): Change type of "info".
9866         * solib.c (solib_read_symbols): Update.
9867         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
9868         * machoread.c (macho_symfile_offsets): Update.
9869         * jit.c (jit_bfd_try_read_symtab): Update.
9870
9871 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
9872
9873         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9874         unittests/utils-selftests.c.
9875         * unittests/utils-selftests.c: New file.
9876
9877 2018-03-14  Tom Tromey  <tom@tromey.com>
9878
9879         PR cli/14977:
9880         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9881         for NULL.
9882
9883 2018-03-14  Tom Tromey  <tom@tromey.com>
9884
9885         PR cli/19918:
9886         * printcmd.c (printf_pointer): Allow "-" in format.
9887
9888 2018-03-14  Tom Tromey  <tom@tromey.com>
9889
9890         * printcmd.c (_initialize_printcmd): Add usage to printf.
9891
9892 2018-03-14  Yao Qi  <qiyao@sourceware.org>
9893
9894         * MAINTAINERS: Update my email address.
9895
9896 2018-03-13  Tom Tromey  <tom@tromey.com>
9897
9898         * machoread.c (macho_check_dsym): Change filenamep to a
9899         std::string*.
9900         (macho_symfile_read): Update.
9901         * symfile.c (load_command): Use std::string.
9902
9903 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9904
9905         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9906         to error message string.
9907         (riscv_register_name): Use xsnprintf instead of sprintf.
9908         (riscv_insn::fetch_instruction): Use gdb_assert instead of
9909         internal_error.
9910         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9911         error.
9912         (riscv_push_dummy_call): Likewise.
9913
9914 2018-03-12  Tom Tromey  <tom@tromey.com>
9915
9916         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9917         Use gdb::byte_vector.
9918         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9919
9920 2018-03-12  Yao Qi  <yao.qi@linaro.org>
9921
9922         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9923         parameter type to readable_regcache.
9924         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9925         the declaration.
9926
9927 2018-03-11  Tom Tromey  <tom@tromey.com>
9928
9929         * dwarf2read.c (struct nextfield): Add initializers.
9930         (struct nextfnfield): Remove.
9931         (struct fnfieldlist): Add initializers.  Remove "length" and
9932         "head", use std::vector.
9933         (struct decl_field_list): Remove.
9934         (struct field_info): Add initializers.
9935         <fields, baseclasses>: Now std::vector.
9936         <nbaseclasses, nfnfields, typedef_field_list_count,
9937         nested_types_list_count>: Remove.
9938         (dwarf2_add_field, dwarf2_add_type_defn)
9939         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9940         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9941         (process_structure_scope): Update.
9942
9943 2018-03-11  Tom Tromey  <tom@tromey.com>
9944
9945         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9946         for use by std::sort.
9947         (build_type_psymtabs_1): Use std::vector.
9948
9949 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
9950
9951         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9952         and LIBMPFR in the printed configuration.
9953
9954 2018-03-08  Tom Tromey  <tom@tromey.com>
9955
9956         * source.c (get_filename_and_charpos): Use scoped_fd.
9957         * nto-procfs.c (procfs_open_1): Use scoped_fd.
9958         (procfs_pidlist): Likewise.
9959         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9960         (iterate_over_mappings): Likewise.
9961
9962 2018-03-08  Tom Tromey  <tom@tromey.com>
9963
9964         * infcall.c (struct call_return_meta_info)
9965         <stack_temporaries_enabled>: Remove.
9966         (get_call_return_value, call_function_by_hand_dummy): Update.
9967         * thread.c (disable_thread_stack_temporaries): Remove.
9968         (enable_thread_stack_temporaries): Remove.
9969         (thread_stack_temporaries_enabled_p): Return bool.
9970         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9971         (get_last_thread_stack_temporary): Update.
9972         * eval.c (evaluate_subexp): Update.
9973         * gdbthread.h (class enable_thread_stack_temporaries): Now a
9974         class, not a function.
9975         (value_ptr, value_vec): Remove typedefs.
9976         (class thread_info) <stack_temporaries_enabled>: Now bool.
9977         <stack_temporaries>: Now a std::vector.
9978         (thread_stack_temporaries_enabled_p)
9979         (value_in_thread_stack_temporaries): Return bool.
9980
9981 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
9982
9983         * remote.c (putpkt_binary): Fix omitted bytes reporting.
9984         (getpkt_or_notif_sane_1): Likewise.
9985
9986 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9987
9988         * build-id.c (build_id_to_debug_bfd): Use std::string.
9989
9990 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9991
9992         * build-id.c (find_separate_debug_file_by_buildid): Return
9993         std::string.
9994         * build-id.h (find_separate_debug_file_by_buildid): Return
9995         std::string.
9996         * coffread.c (coff_symfile_read): Adjust to std::string.
9997         * elfread.c (elf_symfile_read): Adjust to std::string.
9998         * symfile.c (separate_debug_file_exists): Change parameter to
9999         std::string.
10000         (find_separate_debug_file): Return std::string.
10001         (find_separate_debug_file_by_debuglink): Return std::string.
10002         * symfile.h (find_separate_debug_file_by_debuglink): Return
10003         std::string.
10004
10005 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10006
10007         * common/xml-utils.c (xml_escape_text): Move code to...
10008         (xml_escape_text_append): ... this new function.
10009         * common/xml-utils.h (xml_escape_text_append): New declaration.
10010         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10011         New function.
10012         (_initialize_xml_utils): register test_xml_escape_text_append as
10013         a selftest.
10014
10015 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10016
10017         * defs.h: Remove MAX_REGISTER_SIZE.
10018         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10019         asserts.
10020         * python/py-unwind.c (pyuw_sniffer): Likewise.
10021
10022 2018-03-07  Tom Tromey  <tom@tromey.com>
10023
10024         * linux-tdep.c (linux_info_proc): Update.
10025         * target.h (struct target_ops) <to_fileio_readlink>: Return
10026         optional<string>.
10027         (target_fileio_readlink): Return optional<string>.
10028         * remote.c (remote_hostio_readlink): Return optional<string>.
10029         * inf-child.c (inf_child_fileio_readlink): Return
10030         optional<string>.
10031         * target.c (target_fileio_readlink): Return optional<string>.
10032
10033 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10034
10035         * regcache.c (cooked_read_test): Add riscv to the list of
10036         architectures that have a save_reggroup.
10037
10038 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10039
10040         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10041         value is not a dynamic class object.
10042
10043 2018-03-06  Tom Tromey  <tom@tromey.com>
10044
10045         * rust-exp.y: Formatting fixes.
10046
10047 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10048
10049         * riscv-tdep.c (riscv_register_name): Remove target description
10050         support.
10051         (riscv_gdbarch_init): Remove target description check.
10052
10053 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10054
10055         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10056         comment.
10057         * riscv-tdep.h: Likewise.
10058
10059 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10060
10061         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10062         (riscv_pseudo_register_write): Delete.
10063         (riscv_gdbarch_init): Remove all use of pseudo registers.
10064
10065 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10066
10067         * record-btrace.c (btrace_print_lines): Replace cleanup
10068         parameter with RAII equivalents.
10069         (btrace_insn_history): Replace cleanup with RAII equivalents.
10070         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10071         make_cleanup_ui_out_tuple_begin_end): Remove.
10072         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10073         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10074         make_cleanup_ui_out_list_begin_end): Remove.
10075
10076 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10077
10078         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10079         parameter types to std::vector.  Use bool.
10080         (record_btrace_wait): Replace VEC(tp_t) with
10081         std::vector<thread_info *>.
10082         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10083
10084 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10085
10086         * record-btrace.c (record_btrace_disable_callback): Remove.
10087         (struct scoped_btrace_disable): New.
10088         (record_btrace_open): Use scoped_btrace_disable.
10089
10090 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10091
10092         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10093         reading values from registers.
10094
10095 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10096
10097         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10098         where appropriate.
10099
10100 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10101
10102         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10103         change parameter type.  Use GDB's print functions, and use
10104         core_addr_to_string where appropriate.
10105         (riscv_push_dummy_call): Use core_addr_to_string where
10106         appropriate, update call to riscv_print_arg_location, and reindent
10107         a few lines.
10108         (riscv_return_value): Update call to riscv_print_arg_location.
10109
10110 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10111             Tim Newsome <tim@sifive.com>
10112             Albert Ou <a0u@eecs.berkeley.edu>
10113             Darius Rad <darius@bluespec.com>
10114
10115         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10116         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10117         (ALLDEPFILES): Add riscv-tdep.c
10118         * configure.tgt: Add riscv support.
10119         * riscv-tdep.c: New file.
10120         * riscv-tdep.h: New file.
10121         * NEWS: Mention new target.
10122         * MAINTAINERS: Add entry for riscv.
10123
10124 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10125
10126         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10127         fields within aggregates.
10128
10129 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10130
10131         * record-btrace.c (btrace_print_lines): Change type of flags to
10132         gdb_disassembly_flags.
10133
10134 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10135
10136         * fbsd-nat.c: Include "inf-ptrace.h".
10137         (USE_SIGTRAP_SIGINFO): Conditionally define.
10138         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10139         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10140         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10141         function.
10142         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10143         Likewise.
10144         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10145         Likewise.
10146         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10147         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10148         "supports_stopped_by_hw_breakpoint" target methods.
10149
10150 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10151
10152         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10153         * fbsd-nat.c (debug_fbsd_nat): New variable.
10154         (show_fbsd_nat_debug): New function.
10155         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10156         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10157
10158 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10159
10160         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10161         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10162         prototype.
10163         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10164         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10165         method.
10166
10167 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10168
10169         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10170         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10171
10172 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10173
10174         * charset.c (struct charset_vector): New.
10175         (charsets): Change type to charset_vector.
10176         (find_charset_names): Adjust.
10177         (add_one): Adjust.
10178         (_initialize_charset): Adjust.
10179
10180 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10181
10182         * progspace.h (struct program_space) <deleted_solibs>: Change
10183         type to std::vector<std::string>.
10184         * progspace.c (clear_program_space_solib_cache): Adjust.
10185         * breakpoint.c (print_solib_event): Adjust.
10186         (check_status_catch_solib): Adjust.
10187         * solib.c (update_solib_list): Adjust.
10188         * ui-out.h (class ui_out) <field_string>: New overload.
10189         * ui-out.c (ui_out::field_string): New overload.
10190
10191 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10192
10193         * progspace.h (struct program_space): Add constructor and
10194         destructor, initialize fields.
10195         (add_program_space): Remove.
10196         * progspace.c (add_program_space): Rename to...
10197         (program_space::program_space): ... this.
10198         (release_program_space): Rename to...
10199         (program_space::~program_space): ... this.
10200         (delete_program_space): Use delete to delete program_space.
10201         (initialize_progspace): Use new to allocate program_space.
10202         * inferior.c (add_inferior_with_spaces): Likewise.
10203         (clone_inferior_command): Likewise.
10204         * infrun.c (follow_fork_inferior): Likewise.
10205         (handle_vfork_child_exec_or_exit): Likewise.
10206
10207 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10208
10209         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10210         (delim_string_to_char_ptr_vec): Return std::vector of
10211         gdb::unique_xmalloc_ptr.
10212         (dirnames_to_char_ptr_vec_append): Take std::vector of
10213         gdb::unique_xmalloc_ptr.
10214         (dirnames_to_char_ptr_vec): Return std::vector of
10215         gdb::unique_xmalloc_ptr.
10216         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10217         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10218         (delim_string_to_char_ptr_vec): Return an std::vector of
10219         gdb::unique_xmalloc_ptr, adjust the code.
10220         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10221         gdb::unique_xmalloc_ptr, adjust the code.
10222         (dirnames_to_char_ptr_vec): Return an std::vector of
10223         gdb::unique_xmalloc_ptr, adjust the code.
10224         * auto-load.c (auto_load_safe_path_vec): Change type to
10225         std::vector of gdb::unique_xmalloc_ptr.
10226         (auto_load_expand_dir_vars): Return an std::vector of
10227         gdb::unique_xmalloc_ptr, adjust the code.
10228         (auto_load_safe_path_vec_update): Adjust.
10229         (filename_is_in_auto_load_safe_path_vec): Adjust.
10230         (auto_load_objfile_script_1): Adjust.
10231         * build-id.c (build_id_to_debug_bfd): Adjust.
10232         * linux-thread-db.c (thread_db_load_search): Adjust.
10233         * source.c (add_path): Adjust.
10234         (openp): Adjust.
10235         * symfile.c (find_separate_debug_file): Adjust.
10236         * utils.c (do_free_char_ptr_vec): Remove.
10237         (make_cleanup_free_char_ptr_vec): Remove.
10238
10239 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10240
10241         PR gdb/22907
10242         * common/pathstuff.c: Conditionally include "<windows.h>".
10243
10244 2018-03-01  Georg Sauthoff  <mail@georg.so>
10245
10246         PR gdb/22888
10247         * gcore.in: Quote variables and switch interpreter to bash.
10248
10249 2018-03-01  Tom Tromey  <tom@tromey.com>
10250
10251         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10252         assertion.  Add assertion for discriminant_index.
10253         (quirk_rust_enum): Use correct base type name in univariant case.
10254
10255 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10256
10257         * record.c (get_call_history_modifiers): Return a
10258         record_print_flags.
10259         (cmd_record_call_history): Adjust.
10260         * record-btrace.c (record_btrace_call_history): Adjust.
10261         (record_btrace_call_history_range): Adjust.
10262         (record_btrace_call_history_from): Adjust.
10263         * target-debug.h (target_debug_print_record_print_flags): New.
10264         * target-delegates.c: Re-generate.
10265         * target.c (target_call_history): Change flags type.
10266         (target_call_history_from): Likewise.
10267         (target_call_history_range): Likewise.
10268         * target.h (struct target_ops) <target_call_history>: Likewise.
10269         (target_call_history_from): Likewise.
10270         (target_call_history_range): Likewise.
10271
10272 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10273             Simon Marchi  <simon.marchi@polymtl.ca>
10274
10275         * common/common-utils.c: Include "sys/stat.h".
10276         (is_regular_file): Move here from "source.c"; change return
10277         type to "bool".
10278         * common/common-utils.h (is_regular_file): New prototype.
10279         * common/pathstuff.c (contains_dir_separator): New function.
10280         * common/pathstuff.h (contains_dir_separator): New prototype.
10281         * source.c: Don't include "sys/stat.h".
10282         (is_regular_file): Move to "common/common-utils.c".
10283
10284 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10285
10286         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10287         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10288         * auto-load.c: Include "common/pathstuff.h".
10289         * common/common-def.h (current_directory): Move here.
10290         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10291         function.
10292         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10293         prototype.
10294         * common/pathstuff.c: New file.
10295         * common/pathstuff.h: New file.
10296         * compile/compile.c: Include "common/pathstuff.h".
10297         * defs.h (current_directory): Move to "common/common-defs.h".
10298         * dwarf2read.c: Include "common/pathstuff.h".
10299         * exec.c: Likewise.
10300         * guile/scm-safe-call.c: Likewise.
10301         * linux-thread-db.c: Likewise.
10302         * main.c: Likewise.
10303         * nto-tdep.c: Likewise.
10304         * objfiles.c: Likewise.
10305         * source.c: Likewise.
10306         * symtab.c: Likewise.
10307         * utils.c: Include "common/pathstuff.h".
10308         (gdb_realpath): Move to "common/pathstuff.c".
10309         (gdb_realpath_keepfile): Likewise.
10310         (gdb_abspath): Likewise.
10311         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10312         (gdb_realpath_keepfile): Likewise.
10313         (gdb_abspath): Likewise.
10314
10315 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10316
10317         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10318         wildcard process pid for super_resume for kernels with a
10319         specific bug.
10320
10321 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10322
10323         * compile/compile.c (get_args): Add additional comments
10324         explaining function.
10325
10326 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10327             Tom Tromey  <tom@tromey.com>
10328
10329         * target.h (memory_write_request_s): Remove typedef.  Don't define
10330         VEC.
10331         (target_write_memory_blocks): Change argument to std::vector.
10332         (struct memory_write_request): Add constructor.
10333         * target-memory.c (compare_block_starting_address): Return bool.
10334         Change argument types.
10335         (claim_memory): Change arguments to use std::vector.
10336         (split_regular_and_flash_blocks, blocks_to_erase)
10337         (compute_garbled_blocks): Likewise.
10338         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10339         (target_write_memory_blocks): Change argument to std::vector.
10340         * symfile.c (struct load_section_data): Add constructor and
10341         destructor.  Use std::vector for "requests".
10342         (struct load_progress_data): Add initializers.
10343         (load_section_callback): Update.  Use "new".
10344         (clear_memory_write_data): Remove.
10345         (generic_load): Update.
10346
10347 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10348
10349         * arch/aarch64.h: Use common/tdesc.h.
10350
10351 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10352
10353         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10354         architecture with a 64-bit ABI.
10355
10356 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10357
10358         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10359         ahead of target description loading.
10360
10361 2018-02-26  Tom Tromey  <tom@tromey.com>
10362
10363         * stack.c (backtrace_command_1): Update.
10364         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10365         of "flags".
10366         * python/py-framefilter.c (py_print_frame)
10367         (gdbpy_apply_frame_filter): Change type of "flags".
10368         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10369         of "flags".
10370         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10371         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10372         * extension.h (enum frame_filter_flag): Rename from
10373         frame_filter_flags.
10374         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10375         (apply_ext_lang_frame_filter): Change type of "flags".
10376         * extension.c (apply_ext_lang_frame_filter): Change type of
10377         "flags".
10378         * extension-priv.h (struct extension_language_ops)
10379         <apply_frame_filter>: Change type of "flags".
10380
10381 2018-02-26  Tom Tromey  <tom@tromey.com>
10382
10383         PR python/16497:
10384         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10385         off-by-one in py_end computation.
10386         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10387         PRINT_MORE_FRAMES.
10388         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10389         constant.
10390
10391 2018-02-26  Tom Tromey  <tom@tromey.com>
10392
10393         * dwarf2read.c (struct variant_field): New.
10394         (struct nextfield) <variant>: New field.
10395         (dwarf2_add_field): Handle DW_TAG_variant_part.
10396         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10397         discriminated union.
10398         (read_structure_type): Handle DW_TAG_variant_part.
10399         (handle_struct_member_die): New function, extracted from
10400         process_structure_scope.  Handle DW_TAG_variant.
10401         (process_structure_scope): Handle discriminated unions.  Call
10402         handle_struct_member_die.
10403
10404 2018-02-26  Tom Tromey  <tom@tromey.com>
10405
10406         * rust-lang.h (rust_last_path_segment): Declare.
10407         * rust-lang.c (rust_last_path_segment): Now public.  Change
10408         contract.
10409         (struct disr_info): Remove.
10410         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10411         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10412         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10413         (rust_enum_p, rust_enum_variant): New function.
10414         (rust_underscore_fields): Remove "offset" parameter.
10415         (rust_print_enum): New function.
10416         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10417         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10418         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10419         enums.
10420         (rust_internal_print_type): New function, from rust_print_type.
10421         Remove enum code.
10422         (rust_print_type): Call rust_internal_print_type.
10423         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10424         Update enum handling.
10425         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10426         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10427         (rust_union_quirks): New functions.
10428         (process_full_comp_unit, process_full_type_unit): Call
10429         rust_union_quirks.
10430         (process_structure_scope): Update rust_unions if necessary.
10431
10432 2018-02-26  Tom Tromey  <tom@tromey.com>
10433
10434         * value.h (value_union_variant): Declare.
10435         * valops.c (value_union_variant): New function.
10436         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10437         (struct discriminant_info): New.
10438         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10439         enumerator.
10440         (struct main_type) <flag_discriminated_union>: New field.
10441
10442 2018-02-26  Tom Tromey  <tom@tromey.com>
10443
10444         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10445         unittests/unpack-selftests.c.
10446         * unittests/unpack-selftests.c: New file.
10447         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10448
10449 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10450
10451         * dwarf2read.c (struct partial_die_info) <read>: New method.
10452         (read_partial_die): Remove the declaration.
10453         (load_partial_dies): Update.
10454         (partial_die_info::partial_die_info):
10455         (read_partial_die): Change it to partial_die_info::read.
10456
10457 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10458
10459         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10460         (fixup_partial_die): Remove declaration.
10461         (scan_partial_symbols): Update.
10462         (partial_die_parent_scope): Likewise.
10463         (partial_die_full_name): Likewise.
10464         (fixup_partial_die): Change it to partial_die_info::fixup.
10465
10466 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10467
10468         * dwarf2read.c (read_partial_die): Update the declaration.
10469         (load_partial_dies): Caller update.
10470         (read_partial_die): Remove one argument abbrev_len.
10471
10472 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10473
10474         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10475         assignment operator.
10476         (load_partial_dies): Use ctor and copy ctor.
10477         (read_partial_die): Update.
10478         (dwarf2_cu::find_partial_die): Use ctor.
10479
10480 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10481
10482         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10483         (find_partial_die_in_comp_unit): Change it to
10484         dwarf2_cu::find_partial_die.
10485         (find_partial_die): Update.
10486
10487 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10488
10489         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10490         is NULL.
10491
10492 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10493
10494         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10495
10496 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10497
10498         * arch/amd64.h: Use common/tdesc.h.
10499         * arch/i386.c: Likewise.
10500         * arch/i386.h: Likewise.
10501         * arch/tic6x.c: Likewise.
10502         * arch/tdesc.h: Move file from here...
10503         * common/tdesc.h: ...to here.
10504         * features/aarch64-core.c: Regenerate.
10505         * features/aarch64-fpu.c: Regenerate.
10506         * features/i386/32bit-avx.c: Regenerate.
10507         * features/i386/32bit-avx512.c: Regenerate.
10508         * features/i386/32bit-core.c: Regenerate.
10509         * features/i386/32bit-linux.c: Regenerate.
10510         * features/i386/32bit-mpx.c: Regenerate.
10511         * features/i386/32bit-pkeys.c: Regenerate.
10512         * features/i386/32bit-sse.c: Regenerate.
10513         * features/i386/64bit-avx.c: Regenerate.
10514         * features/i386/64bit-avx512.c: Regenerate.
10515         * features/i386/64bit-core.c: Regenerate.
10516         * features/i386/64bit-linux.c: Regenerate.
10517         * features/i386/64bit-mpx.c: Regenerate.
10518         * features/i386/64bit-pkeys.c: Regenerate.
10519         * features/i386/64bit-segments.c: Regenerate.
10520         * features/i386/64bit-sse.c: Regenerate.
10521         * features/i386/x32-core.c: Regenerate.
10522         * features/tic6x-c6xp.c: Regenerate.
10523         * features/tic6x-core.c: Regenerate.
10524         * features/tic6x-gp.c: Regenerate.
10525         * target-descriptions.c: Use common/tdesc.h.
10526         * target-descriptions.h: Likewise.
10527
10528 2018-02-24  Tom Tromey  <tom@tromey.com>
10529
10530         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10531         (try_thread_db_load_from_dir, thread_db_load_search): Use
10532         std::string.
10533         (info_auto_load_libthread_db_compare): Return bool.  Change
10534         argument types.
10535         (info_auto_load_libthread_db): Use std::vector, std::string.
10536         Remove cleanups.
10537
10538 2018-02-24  Tom Tromey  <tom@tromey.com>
10539
10540         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10541         std::string.
10542         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10543         std::string*.
10544         * gdbarch.c: Rebuild.
10545         * gdbarch.h: Rebuild.
10546         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10547         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10548         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10549         std::string*.
10550
10551 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10552
10553         * gdbtypes.h (sect_offset): Change type to uint64_t.
10554         (sect_offset_str): New function.
10555         * dwarf2read.c (create_addrmap_from_aranges): Use
10556         sect_offset_str.
10557         (error_check_comp_unit_head): Likewise.
10558         (create_debug_type_hash_table): Likewise.
10559         (read_cutu_die_from_dwo): Likewise.
10560         (init_cutu_and_read_dies): Likewise.
10561         (init_cutu_and_read_dies_no_follow): Likewise.
10562         (process_psymtab_comp_unit_reader): Likewise.
10563         (partial_die_parent_scope): Likewise.
10564         (peek_die_abbrev): Likewise.
10565         (process_queue): Likewise.
10566         (dwarf2_physname): Likewise.
10567         (read_namespace_alias): Likewise.
10568         (read_import_statement): Likewise.
10569         (create_dwo_cu_reader): Likewise.
10570         (create_cus_hash_table): Likewise.
10571         (lookup_dwo_cutu): Likewise.
10572         (inherit_abstract_dies): Likewise.
10573         (read_func_scope): Likewise.
10574         (read_call_site_scope): Likewise.
10575         (dwarf2_add_member_fn): Likewise.
10576         (read_common_block): Likewise.
10577         (read_module_type): Likewise.
10578         (read_typedef): Likewise.
10579         (read_subrange_type): Likewise.
10580         (load_partial_dies): Likewise.
10581         (read_partial_die): Likewise.
10582         (find_partial_die): Likewise.
10583         (read_str_index): Likewise.
10584         (dwarf2_string_attr): Likewise.
10585         (build_error_marker_type): Likewise.
10586         (lookup_die_type): Likewise.
10587         (dump_die_shallow): Likewise.
10588         (follow_die_ref): Likewise.
10589         (dwarf2_fetch_die_loc_sect_off): Likewise.
10590         (dwarf2_fetch_constant_bytes): Likewise.
10591         (follow_die_sig): Likewise.
10592         (get_signatured_type): Likewise.
10593         (get_DW_AT_signature_type): Likewise.
10594         (dwarf2_find_containing_comp_unit): Likewise.
10595         (set_die_type): Likewise.
10596
10597 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10598
10599         * arch/aarch64.c: Include "common-defs.h".
10600         * arch/amd64.c: Likewise.
10601         * arch/i386.c: Likewise.
10602
10603 2018-02-21  Tom Tromey  <tom@tromey.com>
10604
10605         * value.h: (extract_field_op): Update.
10606         * eval.c (extract_field_op): Return a const char *.
10607         * expression.h (parse_expression_for_completion): Update.
10608         * completer.c (complete_expression): Update.
10609         (add_struct_fields): Make fieldname const.
10610         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10611         (mark_completion_tag, parse_exp_in_context_1): Update.
10612         (parse_expression_for_completion): Change "name" to
10613         unique_xmalloc_ptr*.
10614
10615 2018-02-21  Tom Tromey  <tom@tromey.com>
10616
10617         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10618
10619 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10620
10621         * avr-tdep.c (avr_read_pc): Change parameter type to
10622         readable_regcache.
10623         * gdbarch.sh (read_pc): Likewise.
10624         * gdbarch.c: Re-generated.
10625         * gdbarch.h: Re-generated.
10626         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10627         readable_regcache.
10628         * ia64-tdep.c (ia64_read_pc): Likewise.
10629         * mips-tdep.c (mips_read_pc): Likewise.
10630         * spu-tdep.c (spu_read_pc): Likewise.
10631
10632 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10633
10634         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10635         * regcache-dump.c: New file.
10636         * regcache.c: Move register_dump to regcache-dump.c.
10637         (maintenance_print_registers): Likewise.
10638         (maintenance_print_raw_registers): Likewise.
10639         (maintenance_print_cooked_registers): Likewise.
10640         (maintenance_print_register_groups): Likewise.
10641         (maintenance_print_remote_registers): Likewise.
10642         (_initialize_regcache): Likewise.
10643         * regcache.h (register_dump): Moved from regcache.c.
10644
10645 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10646
10647         * regcache.c (regcache::regcache): Update.
10648         (regcache::invalidate): Move it to detached_regcache::invalidate.
10649         (get_thread_arch_aspace_regcache): Update.
10650         (regcache::raw_update): Update.
10651         (regcache::cooked_read): Remove some code.
10652         (regcache::cooked_read_value): Likewise.
10653         (regcache::raw_write): Remove assert on m_readonly_p.
10654         (regcache::raw_supply_integer): Move it to
10655         detached_regcache::raw_supply_integer.
10656         (regcache::raw_supply_zeroed): Likewise.
10657         * regcache.h (detached_regcache) <raw_supply_integer>: New
10658         declaration.
10659         <raw_supply_zeroed, invalidate>: Likewise.
10660         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10661         <invalidate>: Likewise.
10662         <m_readonly_p>: Removed.
10663
10664 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10665
10666         * infcmd.c (get_return_value): Let stop_regs point to
10667         get_current_regcache.
10668         * regcache.c (regcache::regcache): Remove.
10669         (register_dump_reg_buffer): New class.
10670         (regcache_print): Adjust.
10671         * regcache.h (regcache): Remove constructors.
10672
10673 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10674
10675         * regcache.c (class register_dump): New class.
10676         (register_dump_regcache, register_dump_none): New class.
10677         (register_dump_remote, register_dump_groups): New class.
10678         (regcache_print): Update.
10679         * regcache.h (regcache_dump_what): Move it to regcache.c.
10680         (regcache) <dump>: Remove.
10681
10682 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10683
10684         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10685          reg_buffer_rw *.
10686         (jit_unwind_reg_set_impl): Call raw_supply.
10687         (jit_frame_sniffer): Use reg_buffer_rw.
10688         * record-full.c (record_full_core_regbuf): Change its type.
10689         (record_full_core_open_1): Use reg_buffer_rw.
10690         (record_full_close): Likewise.
10691         (record_full_core_fetch_registers): Use regcache->raw_supply.
10692         (record_full_core_store_registers): Likewise.
10693         * regcache.c (regcache::get_register_status): Move it to
10694         reg_buffer.
10695         (regcache_raw_set_cached_value): Remove.
10696         (regcache::raw_set_cached_value): Remove.
10697         (regcache::raw_write): Call raw_supply.
10698         (regcache::raw_supply): Move it to reg_buffer_rw.
10699         * regcache.h (regcache_raw_set_cached_value): Remove.
10700         (reg_buffer_rw): New class.
10701
10702 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10703
10704         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10705         readonly_detached_regcache.
10706         (dummy_frame_prev_register): Use regcache->cooked_read.
10707         * frame.c (frame_save_as_regcache): Change return type.
10708         (frame_pop): Update.
10709         * frame.h (frame_save_as_regcache): Update declaration.
10710         * inferior.h (get_infcall_suspend_state_regcache): Update
10711         declaration.
10712         * infrun.c (infcall_suspend_state) <registers>: use
10713         readonly_detached_regcache.
10714         (save_infcall_suspend_state): Don't use regcache_dup.
10715         (get_infcall_suspend_state_regcache): Change return type.
10716         * linux-fork.c (struct fork_info) <savedregs>: Change to
10717         readonly_detached_regcache.
10718         <pc>: New field.
10719         (fork_save_infrun_state): Don't use regcache_dup.
10720         (info_checkpoints_command): Adjust.
10721         * mi/mi-main.c (register_changed_p): Update declaration.
10722         (mi_cmd_data_list_changed_registers): Use
10723         readonly_detached_regcache.
10724         (register_changed_p): Change parameter type to
10725         readonly_detached_regcache.
10726         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10727         readonly_detached_regcache.
10728         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10729         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10730         New.
10731         (regcache::save): Move it to reg_buffer.
10732         (regcache::restore): Change parameter type.
10733         (regcache_dup): Remove.
10734         * regcache.h (reg_buffer) <save>: New method.
10735         (readonly_detached_regcache): New class.
10736         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10737         readonly_detached_regcache.
10738         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10739
10740 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10741
10742         * frame.c (frame_save_as_regcache): Use regcache method save.
10743         (frame_pop): Use regcache method restore.
10744         * infrun.c (restore_infcall_suspend_state): Likewise.
10745         * linux-fork.c (fork_load_infrun_state): Likewise.
10746         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10747         save.
10748         * regcache.c (regcache_save): Remove.
10749         (regcache::restore): More asserts.
10750         (regcache_cpy): Remove.
10751         * regcache.h (regcache_save): Remove the declaration.
10752         (regcache::restore): Move from private to public.
10753         Remove the friend declaration of regcache_cpy.
10754         (regcache_cpy): Remove declaration.
10755
10756 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10757
10758         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10759         parameter type to 'readable_regcache *'.
10760         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10761         * arm-tdep.c (arm_neon_quad_read): Likewise.
10762         (arm_pseudo_read): Likewise.
10763         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10764         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10765         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10766         * gdbarch.c: Re-generated.
10767         * gdbarch.h: Re-generated.
10768         * gdbarch.sh (pseudo_register_read): Change parameter type to
10769         'readable_regcache *'.
10770         (pseudo_register_read_value): Likewise.
10771         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10772         (h8300_pseudo_register_read): Likewise.
10773         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10774         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10775         (i386_pseudo_register_read_into_value): Likewise.
10776         (i386_pseudo_register_read_value): Likewise.
10777         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10778         declaration.
10779         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10780         * m32c-tdep.c (m32c_raw_read): Likewise.
10781         (m32c_read_flg): Likewise.
10782         (m32c_banked_register): Likewise.
10783         (m32c_banked_read): Likewise.
10784         (m32c_sb_read): Likewise.
10785         (m32c_part_read): Likewise.
10786         (m32c_cat_read): Likewise.
10787         (m32c_r3r2r1r0_read): Likewise.
10788         (m32c_pseudo_register_read): Likewise.
10789         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10790         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10791         (mep_pseudo_cr64_read): Likewise.
10792         (mep_pseudo_register_read): Likewise.
10793         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10794         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10795         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10796         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10797         (regcache::cooked_read): Likewise.
10798         (regcache::cooked_read_value): Likewise.
10799         (regcache_cooked_read_signed):
10800         (regcache::cooked_read): Likewise.
10801         * regcache.h (readable_regcache): New class.
10802         (regcache): Inherit readable_regcache.  Move some methods to
10803         readable_regcache.
10804         * rl78-tdep.c (rl78_pseudo_register_read): Change
10805         parameter type to 'readable_regcache *'.
10806         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10807         (e500_pseudo_register_read): Change parameter type to
10808         'readable_regcache *'.
10809         (dfp_pseudo_register_read): Likewise.
10810         (vsx_pseudo_register_read): Likewise.
10811         (efpr_pseudo_register_read): Likewise.
10812         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10813         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10814         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10815         (sh64_pseudo_register_read): Likewise.
10816         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10817         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10818         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10819         (spu_pseudo_register_read): Likewise.
10820         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10821         (xtensa_pseudo_register_read): Likewise.
10822
10823 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10824
10825         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10826         (regcache::arch): Move it to reg_buffer::arch.
10827         (regcache::register_buffer): Likewise.
10828         (regcache::assert_regnum): Likewise.
10829         (regcache::num_raw_registers): Likewise.
10830         * regcache.h (reg_buffer): New class.
10831         (regcache): Inherit reg_buffer.
10832
10833 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10834
10835         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10836         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10837
10838 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
10839
10840         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10841
10842 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
10843
10844         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10845         (SFILES): Remove common/*.c files.
10846         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10847         * common/common.host: Add common reference.
10848         * configure.ac: Likewise.
10849         * configure: Regenerate.
10850
10851 2018-02-16  Yao Qi  <yao.qi@linaro.org>
10852
10853         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10854         (block_initialize_namespace): Use new.
10855         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10856         (dwarf2_free_objfile): Use delete.
10857         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10858         (copy_type_recursive): Use new.
10859         * gdb_obstack.h (allocate_on_obstack): New.
10860
10861 2018-02-15  Yao Qi  <yao.qi@linaro.org>
10862
10863         PR gdb/22849
10864         * inferior.c (exit_inferior_1): Reset inf->control.
10865
10866 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
10867
10868         * ada-lang.c (ada_to_fixed_value_create): Delete advance
10869         declaration.
10870
10871 2018-02-14  Pedro Alves  <palves@redhat.com>
10872
10873         * frame-unwind.c (frame_unwind_try_unwinder): Always call
10874         frame_cleanup_after_sniffer on exception.
10875
10876 2018-02-14  Tom Tromey  <tom@tromey.com>
10877
10878         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10879         const.
10880         (solib_bfd_open): Make pathname const.
10881         * solib.c (solib_bfd_open): Make pathname const.
10882         * solib-spu.c (spu_bfd_fopen): Make name const.
10883         (spu_bfd_open): Make pathname const.
10884         * solib-darwin.c (darwin_bfd_open): Make pathname const.
10885         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10886
10887 2018-02-14  Tom Tromey  <tom@tromey.com>
10888
10889         * symfile.c (symfile_bfd_open): Update.
10890         * source.h (openp, source_full_path_of, find_and_open_source):
10891         Change argument type to unique_xmalloc_ptr.
10892         * source.c (openp): Take a unique_xmalloc_ptr.
10893         (source_full_path_of, find_and_open_source): Likewise.
10894         (open_source_file, symtab_to_fullname): Update.
10895         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10896         unique_xmalloc_ptr.
10897         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10898         (exec_file_find): Update.
10899         * psymtab.c (psymtab_to_fullname): Update.
10900         * nto-tdep.h (nto_find_and_open_solib): Update.
10901         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10902         unique_xmalloc_ptr.
10903         * exec.c (exec_file_attach): Update.
10904         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10905         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10906
10907 2018-02-14  Tom Tromey  <tom@tromey.com>
10908
10909         * solib.c: Include source.h.
10910         * nto-tdep.c: Include source.h.
10911         * mi/mi-cmd-env.c: Include source.h.
10912         * infcmd.c: Include source.h.
10913         * exec.c: Include source.h.
10914         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10915         (add_path, directory_switch, source_path, init_source_path): Move
10916         declarations...
10917         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10918         (add_path, directory_switch, source_path, init_source_path):
10919         ...here.
10920
10921 2018-02-14  Tom Tromey  <tom@tromey.com>
10922
10923         * solist.h (exec_file_find, solib_find): Return
10924         unique_xmalloc_ptr.
10925         (solib_bfd_fopen): Take a const char *.
10926         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10927         (exec_file_find, solib_find): Likewise.
10928         (solib_bfd_fopen): Do not take ownership of "pathname".
10929         (solib_bfd_open): Use unique_xmalloc_ptr.
10930         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10931         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10932         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10933         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10934
10935 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
10936
10937         * ada-lang.c (name_match_type_from_name): Remove reference to
10938         ada_name_for_lookup in function's documentation.
10939         * ada-lang.h (ada_name_for_lookup): Delete declaration.
10940
10941 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10942
10943         * defs.h (enum openp_flags): New enum.
10944         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10945         Move to enum openp_flags.
10946         (openp_flags): New enum flags.
10947         (openp): Change parameter type to openp_flags.
10948         * source.c (openp): Change parameter type to openp_flags.
10949         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10950         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10951
10952 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10953
10954         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10955         per-command.
10956
10957 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10958
10959         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10960         into...
10961         (class dwarf2_queue_guard): ...the destructor of this new class.
10962         (dw2_do_instantiate_symtab): Create instance of the new class
10963         dwarf2_queue_guard, remove cleanup.
10964
10965 2018-02-09  Tom Tromey  <tom@tromey.com>
10966
10967         * source.c (find_source_lines): Don't reference past the end of
10968         the vector.
10969
10970 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10971
10972         * remote.c (remote_btrace_maybe_reopen): Change error message.
10973         * btrace.c (btrace_enable): Likewise.
10974         (parse_xml_btrace): Likewise.
10975         (parse_xml_btrace_conf): Likewise.
10976
10977 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10978
10979         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10980         (linux_enable_pt, linux_enable_bts): Call
10981         diagnose_perf_event_open_fail.
10982
10983 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10984
10985         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10986         Remove parameter and change return type.  Update callers.  Move it.
10987         (linux_enable_bts, linux_enable_pt): Improve error message.
10988         (linux_enable_pt): Remove zero buffer size check.
10989         (linux_enable_btrace): Improve error messages.  Remove NULL return
10990         check.
10991
10992 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10993
10994         * btrace.c (btrace_enable): Remove target_supports_btrace call.
10995         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10996         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10997         (linux_supports_pt, linux_supports_btrace): Remove.
10998         (linux_enable_bts): Call cpu_supports_bts.
10999         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11000         * remote.c (remote_supports_btrace): Remove.
11001         (init_remote_ops): Remove remote_supports_btrace.
11002         * target-delegates.c: Regenerated.
11003         * target.c (target_supports_btrace): Remove.
11004         * target.h (target_ops) <to_supports_btrace>: Remove
11005         (target_supports_btrace): Remove.
11006         * x86-linux-nat.c (x86_linux_create_target): Remove
11007         linux_supports_btrace.
11008
11009 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11010
11011         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11012         btrace failed.
11013         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11014         exception and use message in own exception.
11015
11016 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11017
11018         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11019         (perf_event_pt_event_type): Use gdb_file_up.
11020         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11021         scoped_fd, and scoped_mmap.
11022
11023 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11024
11025         * common/scoped_mmap.h: New.
11026         * unittests/scoped_mmap-selftest.c: New.
11027         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11028         unittests/scoped_mmap-selftest.c.
11029
11030 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11031
11032         * common/scoped_fd.h: New.
11033         * unittests/scoped_fd-selftest.c: New.
11034         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11035         unittests/scoped_fd-selftest.c.
11036
11037 2018-02-09  Tom Tromey  <tom@tromey.com>
11038
11039         * auto-load.c (auto_load_section_scripts): Use
11040         gdb::unique_xmalloc_ptr.
11041
11042 2018-02-09  Tom Tromey  <tom@tromey.com>
11043
11044         * auto-load.c (execute_script_contents): Use std::string.
11045
11046 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11047
11048         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11049         Python function, rather than a new command.
11050
11051 2018-02-08  Tom Tromey  <tom@tromey.com>
11052
11053         * solib.c (solib_find_1): Use std::string.
11054         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11055
11056 2018-02-08  Tom Tromey  <tom@tromey.com>
11057
11058         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11059
11060 2018-02-08  Tom Tromey  <tom@tromey.com>
11061
11062         * source.c (find_source_lines): Use gdb::def_vector.
11063
11064 2018-02-08  Tom Tromey  <tom@tromey.com>
11065
11066         * macrocmd.c (struct temporary_macro_definition): New.
11067         (macro_define_command): Use temporary_macro_definition.  Remove
11068         cleanups.
11069         (free_macro_definition_ptr): Remove.
11070
11071 2018-02-08  Tom Tromey  <tom@tromey.com>
11072
11073         * macroexp.c (maybe_expand): Use std::string.
11074
11075 2018-02-08  Tom Tromey  <tom@tromey.com>
11076
11077         * macroexp.c (struct macro_buffer): Add initializers for some
11078         members.
11079         (init_buffer, init_shared_buffer, free_buffer)
11080         (free_buffer_return_text): Remove.
11081         (macro_buffer): New constructors.
11082         (~macro_buffer): New destructor.
11083         (macro_buffer::set_shared): New method.
11084         (macro_buffer::resize_buffer, macro_buffer::appendc)
11085         (macro_buffer::appendmem): Now methods, not free functions.
11086         (set_token, append_tokens_without_splicing, stringify)
11087         (macro_stringify): Update.
11088         (gather_arguments): Change return type.  Remove argc_p argument,
11089         add args_ptr argument.  Use std::vector.
11090         (substitute_args): Remove argc argument.  Accept std::vector.
11091         (expand): Update.  Use std::vector.
11092         (scan, macro_expand, macro_expand_next): Update.
11093
11094 2018-02-08  Tom Tromey  <tom@tromey.com>
11095
11096         * symtab.c (default_collect_symbol_completion_matches_break_on):
11097         Use unique_xmalloc_ptr.
11098         * macroscope.h: (sal_macro_scope, user_macro_scope)
11099         (default_macro_scope): Return unique_xmalloc_ptr.
11100         * macroscope.c (sal_macro_scope, user_macro_scope)
11101         (default_macro_scope): Return unique_xmalloc_ptr.
11102         * macroexp.h (macro_expand, macro_expand_once): Return
11103         unique_xmalloc_ptr.
11104         * macroexp.c (macro_expand, macro_expand_once): Return
11105         unique_xmalloc_ptr.
11106         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11107         (info_macro_command, info_macros_command): Use
11108         unique_xmalloc_ptr.
11109         * compile/compile-c-support.c (write_macro_definitions): Use
11110         unique_xmalloc_ptr.
11111         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11112
11113 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11114
11115         * value.c (value_static_field): Assign field type instead of
11116         containing type when returning an optimized out value.
11117
11118 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11119
11120         * ft32-tdep.c (ft32_read_pc): Remove.
11121         (ft32_write_pc): Remove.
11122         (ft32_gdbarch_init): Update.
11123         * m32r-tdep.c (m32r_read_pc): Remove.
11124         (m32r_gdbarch_init): Update.
11125         * mep-tdep.c (mep_read_pc): Remove.
11126         (mep_gdbarch_init): Update.
11127         * microblaze-tdep.c (microblaze_write_pc): Remove.
11128         (microblaze_gdbarch_init): Update.
11129         * mn10300-tdep.c (mn10300_read_pc): Remove.
11130         (mn10300_write_pc): Remove.
11131         (mn10300_gdbarch_init): Update.
11132         * moxie-tdep.c (moxie_read_pc): Remove.
11133         (moxie_write_pc): Remove.
11134         (moxie_gdbarch_init): Update.
11135
11136 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11137
11138         * expprint.c (print_subexp_standard): Handle
11139         OP_F77_UNDETERMINED_ARGLIST.
11140         (dump_subexp_body_standard): Likewise.
11141
11142 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11143
11144         * target-descriptions.c (tdesc_element_visitor) Add empty
11145         implementations.
11146         (tdesc_type): Move make_gdb_type from here.
11147         (tdesc_type_builtin): Likewise.
11148         (tdesc_type_vector): Likewise.
11149         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11150         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11151         (make_gdb_type_union): Likewise.
11152         (make_gdb_type_flags): Likewise.
11153         (make_gdb_type_enum): Likewise.
11154         (make_gdb_type): New function.
11155         (tdesc_register_type): Use static make_gdb_type.
11156
11157 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11158
11159         * infcmd.c (default_print_one_register_info): Align natural-format
11160         column values consistently one under another.
11161         (pad_to_column): New function.
11162
11163 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11164
11165         * dwarf2read.c (dwarf2_physname): Move commment.
11166
11167 2018-02-01  Leszek Swirski  <leszeks@google.com>
11168
11169         * varobj.c (varobj_formatted_print_options): Allow recursive
11170         pretty printing if pretty printing is enabled.
11171
11172 2018-02-01  Leszek Swirski  <leszeks@google.com>
11173
11174         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11175         names after a structop as a filename.
11176
11177 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11178
11179         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11180         (arm_record_coproc_data_proc): Likewise.
11181
11182 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11183
11184         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11185
11186 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11187
11188         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11189         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11190
11191 2018-01-31  Pedro Alves  <palves@redhat.com>
11192
11193         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11194         * inflow.c (child_terminal_save_inferior): Wrap reference to
11195         tcgetpgrp in HAVE_TERMIOS_H.
11196         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11197         _WIN32.
11198         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11199         always iterate over all inferiors.
11200         (gdbsim_cntrl_c): Adjust.
11201         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11202
11203 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11204
11205         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11206         index type is objfile-owned if the element type is as well.
11207
11208 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11209
11210         GDB 8.1 released.
11211
11212 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11213
11214         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11215         "features/s390x-linux64.c".
11216         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11217         s390_linux32 and s390x_linux64.
11218         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11219         default tdesc.
11220         * s390-tdep.c: Include "features/s390-linux32.c" and
11221         "features/s390x-linux64.c".
11222         (s390_tdesc_valid): Add check for tdesc_has_registers.
11223         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11224         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11225         tdesc_s390x_linux64.
11226         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11227         tdesc_s390x_linux64 to...
11228         * s390-tdep.h: ...here.
11229
11230 2018-01-30  Pedro Alves  <palves@redhat.com>
11231
11232         PR gdb/13211
11233         * config.in, configure: Regenerate.
11234         * configure.ac: Check for getpgid.
11235         * go32-nat.c (go32_pass_ctrlc): New.
11236         (go32_target): Install it.
11237         * inf-child.c (inf_child_target): Install
11238         child_terminal_save_inferior, child_pass_ctrlc and
11239         child_interrupt.
11240         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11241         (inf_ptrace_target): No longer install it.
11242         * infcmd.c (interrupt_target_1): Adjust.
11243         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11244         (child_interrupt): Declare.
11245         (inferior::terminal_state): New.
11246         * inflow.c (struct terminal_info): Update comments.
11247         (inferior_process_group): Delete.
11248         (terminal_is_ours): Delete.
11249         (gdb_tty_state): New.
11250         (child_terminal_init): Adjust.
11251         (is_gdb_terminal, sharing_input_terminal_1)
11252         (sharing_input_terminal): New functions.
11253         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11254         Set the process's actual process group in the foreground if
11255         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11256         mark terminal as the inferior's if not sharing GDB's terminal.
11257         Don't check attach_flag.
11258         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11259         pass down a target_terminal_state.
11260         (child_terminal_save_inferior): New, factored out from ...
11261         (child_terminal_ours_1): ... this.  Handle
11262         target_terminal_state::is_ours_for_output.
11263         (child_interrupt, child_pass_ctrlc): New.
11264         (inflow_inferior_exit): Clear the inferior's terminal_state.
11265         (copy_terminal_info): Copy the inferior's terminal state.
11266         (_initialize_inflow): Remove reference to terminal_is_ours.
11267         * inflow.h (inferior_process_group): Delete.
11268         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11269         * procfs.c (procfs_target): Don't install procfs_interrupt.
11270         (procfs_interrupt): Delete.
11271         * remote.c (remote_serial_quit_handler): Adjust.
11272         (remote_interrupt): Remove ptid parameter.  Adjust.
11273         * target-delegates.c: Regenerate.
11274         * target.c: Include "terminal.h".
11275         (target_terminal::terminal_state): Rename to ...
11276         (target_terminal::m_terminal_state): ... this.
11277         (target_terminal::init): Adjust.
11278         (target_terminal::inferior): Adjust to per-inferior
11279         terminal_state.
11280         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11281         (target_terminal::ours, target_terminal::ours_for_output): Use
11282         target_terminal_is_ours_kind.
11283         (target_interrupt): Remove ptid parameter.  Adjust.
11284         (default_target_pass_ctrlc): Adjust.
11285         * target.h (target_ops::to_terminal_save_inferior): New field.
11286         (target_ops::to_interrupt): Remove ptid_t parameter.
11287         (target_interrupt): Remove ptid_t parameter.  Update comment.
11288         (target_pass_ctrlc): Update comment.
11289         * target/target.h (target_terminal_state): New scoped enum,
11290         factored out of ...
11291         (target_terminal::terminal_state): ... here.
11292         (target_terminal::inferior): Update comments.
11293         (target_terminal::restore_inferior): New.
11294         (target_terminal::is_inferior, target_terminal::is_ours)
11295         (target_terminal::is_ours_for_output): Adjust.
11296         (target_terminal::scoped_restore_terminal_state): Adjust to
11297         rename, and call restore_inferior() instead of inferior().
11298         (target_terminal::scoped_restore_terminal_state::m_state): Change
11299         type.
11300         (target_terminal::terminal_state): Rename to ...
11301         (target_terminal::m_terminal_state): ... this and change type.
11302
11303 2018-01-30  Pedro Alves  <palves@redhat.com>
11304
11305         * linux-nat.c (wait_for_signal): New function.
11306         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11307         directly.
11308         (async_terminal_is_ours)
11309         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11310         (linux_nat_add_target): Don't override
11311         to_terminal_inferior/to_terminal_ours.
11312
11313 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11314
11315         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11316
11317 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11318
11319         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11320         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11321         dwarf2_per_objfile_free here.
11322         (dwarf2_per_objfile_free): Remove.
11323         (_initialize_dwarf2_read): Don't register
11324         dwarf2_per_objfile_free as a registry cleanup.
11325
11326 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11327
11328         Avoid compilation errors in MinGW native builds
11329
11330         The error is triggered by including python-internal.h, and the
11331         error message is:
11332
11333              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11334                       from build-gnulib/import/math.h:27,
11335                       from d:/usr/Python26/include/pyport.h:235,
11336                       from d:/usr/Python26/include/Python.h:58,
11337                       from python/python-internal.h:94,
11338                       from python/py-arch.c:24:
11339              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11340         using ::hypot;
11341                 ^~~~~
11342
11343         This happens because Python headers define 'hypot' to expand t
11344         '_hypot' in the Windows builds.
11345         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11346         'hypoth'.  This avoids a compilation error.
11347
11348 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11349
11350         * MAINTAINERS (Write After Approval): Fix ordering.
11351
11352 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11353
11354         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11355
11356 2018-01-26  Alan Modra  <amodra@gmail.com>
11357
11358         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11359         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11360         Remove nop.  Make const.  Comment.
11361         (powerpc32_plt_stub_so_2): New.
11362         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11363         Correct count.  Update uses.
11364         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11365         Move common code reading PLT entry word.  Correct
11366         powerpc32_plt_stub PLT address calculation.
11367         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11368         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11369         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11370         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11371         (ppc64_standard_linkage8): Likewise.
11372         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11373         Correct insns description.
11374         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11375
11376 2018-01-24  Pedro Alves  <palves@redhat.com>
11377
11378         GCC PR libstdc++/83906
11379         * gdbtypes.c (operator==(const dynamic_prop &,
11380         const dynamic_prop &)): New.
11381         (operator==(const range_bounds &, const range_bounds &)): New.
11382         (check_types_equal): Use them instead of memcmp.
11383         * gdbtypes.h (operator==(const dynamic_prop &,
11384         const dynamic_prop &)): Declare.
11385         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11386         (operator==(const range_bounds &, const range_bounds &)): Declare.
11387         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11388
11389 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11390
11391         * s390-linux-tdep.c (s390_record_address_mask)
11392         (s390_record_calc_disp_common, s390_record_calc_disp)
11393         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11394         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11395         (s390_process_record): Move to s390-tdep.c.
11396         (s390_linux_init_abi_any): Adjust.
11397         * s390-tdep.c (s390_record_address_mask)
11398         (s390_record_calc_disp_common, s390_record_calc_disp)
11399         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11400         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11401         (s390_process_record): Moved from s390-linux-tdep.c
11402         (s390_gdbarch_init): Adjust.
11403
11404 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11405
11406         * s390-linux-nat.c (s390-tdep.h): New include.
11407         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11408         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11409         (ALLDEPFILES): Add s390-tdep.c.
11410         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11411         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11412         * s390-tdep.h: ...this.  New file.
11413         * s390-linux-tdep.c (s390-tdep.h): New include.
11414         (_initialize_s390_tdep): Rename to...
11415         (_initialize_s390_linux_tdep): ...this and adjust.
11416         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11417         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11418         s390-tdep.h.
11419         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11420         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11421         (s390_is_partial_instruction, s390_software_single_step)
11422         (is_non_branch_ril, s390_displaced_step_copy_insn)
11423         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11424         (s390_prologue_data, s390_addr, s390_store, s390_load)
11425         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11426         (s390_register_call_saved, s390_guess_tracepoint_registers)
11427         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11428         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11429         (s390_pseudo_register_name, s390_pseudo_register_type)
11430         (s390_pseudo_register_read, s390_pseudo_register_write)
11431         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11432         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11433         (s390_addr_bits_remove, s390_address_class_type_flags)
11434         (s390_address_class_type_flags_to_name)
11435         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11436         (s390_function_arg_float, s390_function_arg_vector)
11437         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11438         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11439         (s390_frame_align, s390_register_return_value, s390_return_value)
11440         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11441         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11442         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11443         (s390_trad_frame_prev_register, s390_unwind_cache)
11444         (s390_prologue_frame_unwind_cache)
11445         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11446         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11447         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11448         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11449         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11450         (s390_frame_base_address, s390_local_base_address)
11451         (s390_frame_base, s390_gcc_target_options)
11452         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11453         (s390_validate_reg_range, s390_tdesc_valid)
11454         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11455         * s390-tdep.c: ...this.  New file.
11456
11457 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11458
11459         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11460         (s390_process_record, s390_gdbarch_tdep_alloc)
11461         (s390_linux_init_abi_any): Use/set new hook.
11462
11463 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11464
11465         * s390-linux-tdep.c (osabi.h): New include.
11466         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11467         (s390_linux_init_abi_any): New functions.
11468         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11469
11470 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11471
11472         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11473         tdesc_has_registers check
11474
11475 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11476
11477         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11478         (s390_validate_reg_range): New macro.
11479         (s390_gdbarch_init): Adjust.
11480
11481 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11482
11483         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11484         (s390_gdbarch_tdep_alloc): Adjust.
11485         (s390_gdbarch_init): Adjust.
11486
11487 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11488
11489         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11490         <have_tdb>: Change type to bool.
11491         (s390_gdbarch_tdep_alloc): Adjust.
11492         (s390_gdbarch_init): Adjust.
11493
11494 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11495
11496         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11497         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11498         (s390_gdbarch_tdep_alloc): New function.
11499         (s390_gdbarch_init): Allocate tdep at start and use its fields
11500         instead of separate variables.
11501
11502 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11503
11504         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11505         when looking for cached gdbarch and add comment for remaining.
11506
11507 2018-01-22  Pedro Alves  <palves@redhat.com>
11508             Sergio Durigan Junior  <sergiodj@redhat.com>
11509
11510         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11511         case.
11512
11513 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11514
11515         * MAINTAINERS: Update my company e-mail address.
11516
11517 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11518
11519         * regcache.c (cooked_write_test): New function.
11520         (_initialize_regcache): Register the test.
11521
11522 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11523
11524         * ia64-tdep.c (ia64_pseudo_register_read): Call
11525         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11526         * m32c-tdep.c (m32c_cat_read): Likewise.
11527         (m32c_r3r2r1r0_read): Likewise.
11528         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11529         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11530
11531 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11532
11533         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11534         method raw_read instead of regcache_raw_read.
11535         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11536         * arm-tdep.c (arm_neon_quad_read): Likewise.
11537         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11538         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11539         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11540         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11541         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11542         (i386_pseudo_register_read_into_value): Likewise.
11543         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11544         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11545         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11546         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11547         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11548         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11549         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11550         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11551         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11552
11553 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11554
11555         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11556         * configure.tgt: Remove target mt.
11557         * mt-tdep.c: Remove.
11558         * regcache.c (cooked_read_test): Remove the check for mt.
11559
11560 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11561
11562         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11563         instead of gdbarch_pseudo_register_read_value.
11564
11565 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11566
11567         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11568         language is Ada.
11569
11570 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11571
11572         * linespec.c (create_sals_line_offset): Remove code that preserved
11573         the symtab_and_line's line number.
11574
11575 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11576
11577         * varobj.c (varobj_create): Don't set valid_block when creating a
11578         floating varobj.
11579
11580 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11581
11582         * varobj.c (varobj_create): Remove out of date comment.
11583
11584 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11585
11586         PR mi/20395
11587         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11588         updating innermost block.
11589         * parse.c (innermost_block_tracker::update): Take extra type
11590         parameter, and check types match before updating innermost block.
11591         (write_dollar_variable): Update innermost block for registers.
11592         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11593         (innermost_block_tracker::innermost_block_tracker): Initialise
11594         m_types member.
11595         (innermost_block_tracker::reset): Take type parameter.
11596         (innermost_block_tracker::update): Take type parameter, and pass
11597         type through as needed.
11598         (innermost_block_tracker::m_types): New member.
11599         * varobj.c (varobj_create): Pass type when reseting innermost
11600         block.
11601
11602 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11603
11604         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11605         * ada-lang.c (resolve_subexp): Likewise.
11606         * breakpoint.c (set_breakpoint_condition) Likewise.
11607         (watch_command_1) Likewise.
11608         * c-exp.y (variable): Likewise.
11609         * d-exp.y (PrimaryExpression): Likewise.
11610         * f-exp.y (variable): Likewise.
11611         * go-exp.y (variable): Likewise.
11612         * m2-exp.y (variable): Likewise.
11613         * objfiles.c (objfile::~objfile): Likewise.
11614         * p-exp.y (variable): Likewise.
11615         * parse.c (innermost_block): Change type.
11616         * parser-defs.h (class innermost_block_tracker): New.
11617         (innermost_block): Change to innermost_block_tracker.
11618         * printcmd.c (display_command): Switch to innermost_block API.
11619         (do_one_display): Likewise.
11620         * rust-exp.y (do_one_display): Likewise.
11621         * symfile.c (clear_symtab_users): Likewise.
11622         * varobj.c (varobj_create): Switch to innermost_block API, replace
11623         use of innermost_block with block stored on varobj object.
11624
11625 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11626
11627         * expression.h (innermost_block): Remove declaration.
11628         * varobj.c: Add 'parser-defs.h' include.
11629
11630 2018-01-19  Tom Tromey  <tom@tromey.com>
11631
11632         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11633         symbols in the static and global blocks.
11634
11635 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11636
11637         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11638         gdb_ptrace.h, and move including gdb_wait.h ...
11639         * nat/linux-ptrace.h: ... to here.
11640
11641 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11642
11643         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11644         inf_ptrace_detach_success.
11645         (inf_ptrace_detach_success): Add inferior parameter, use it
11646         instead of inferior_ptid, pass it to detach_inferior.
11647         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11648         parameter.
11649         * inferior.c (detach_inferior): Add overload that takes an
11650         inferior object.
11651         * inferior.h (detach_inferior): Likewise.
11652         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11653         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11654         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11655
11656 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11657
11658         * target.h (struct target_ops) <to_detach>: Add inferior
11659         parameter.
11660         (target_detach): Likewise.
11661         * target.c (dispose_inferior): Pass inferior down.
11662         (target_detach): Pass inferior down.  Assert that it is equal to
11663         the current inferior.
11664         * aix-thread.c (aix_thread_detach): Pass inferior down.
11665         * corefile.c (core_file_command): Pass current_inferior() down.
11666         * corelow.c (core_detach): Add inferior parameter.
11667         * darwin-nat.c (darwin_detach): Likewise.
11668         * gnu-nat.c (gnu_detach): Likewise.
11669         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11670         * infcmd.c (detach_command): Pass current_inferior() down to
11671         target_detach.
11672         * infrun.c (follow_fork_inferior): Pass parent_inf to
11673         target_detach.
11674         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11675         target_detach.
11676         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11677         * linux-thread-db.c (thread_db_detach): Likewise.
11678         * nto-procfs.c (procfs_detach): Likewise.
11679         * procfs.c (procfs_detach): Likewise.
11680         * record.c (record_detach): Likewise.
11681         * record.h (struct inferior): Forward-declare.
11682         (record_detach): Add inferior parameter.
11683         * remote-sim.c (gdbsim_detach): Likewise.
11684         * remote.c (remote_detach_1): Likewise.
11685         (remote_detach): Likewise.
11686         (extended_remote_detach): Likewise.
11687         * sol-thread.c (sol_thread_detach): Likewise.
11688         * target-debug.h (target_debug_print_inferior_p): New macro.
11689         * target-delegates.c: Re-generate.
11690         * top.c (kill_or_detach): Pass inferior down to target_detach.
11691         * windows-nat.c (windows_detach): Add inferior parameter.
11692
11693 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11694
11695         * target.h (struct target_ops) <to_detach>: Remove args
11696         parameter.
11697         (target_detach): Likewise.
11698         * target.c (dispose_inferior): Adjust.
11699         (target_detach): Remove args parameter, adjust.
11700         * aix-thread.c (aix_thread_detach): Adjust.
11701         * corefile.c (core_file_command): Adjust.
11702         * corelow.c (core_detach): Adjust.
11703         * darwin-nat.c (darwin_detach): Adjust.
11704         * gnu-nat.c (gnu_detach): Adjust.
11705         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11706         * infcmd.c (detach_command): Adjust
11707         * infrun.c (follow_fork_inferior): Adjust.
11708         (handle_vfork_child_exec_or_exit): Adjust.
11709         * linux-fork.c (linux_fork_detach): Remove args parameter.
11710         * linux-fork.h (linux_fork_detach): Likewise.
11711         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11712         * linux-thread-db.c (thread_db_detach): Likewise.
11713         * nto-procfs.c (procfs_detach): Likewise.
11714         * procfs.c (procfs_detach): Likewise.
11715         (do_detach): Remove signo parameter.
11716         * record.c (record_detach): Remove args parameter.
11717         * record.h (record_detach): Likewise.
11718         * remote-sim.c (gdbsim_detach): Likewise.
11719         * remote.c (remote_detach_1): Likewise.
11720         (remote_detach): Likewise.
11721         (extended_remote_detach): Likewise.
11722         * sol-thread.c (sol_thread_detach): Likewise.
11723         * target-delegates.c: Re-generate.
11724         * top.c (struct qt_args) <args>: Remove field.
11725         (kill_or_detach): Don't pass args.
11726         (quit_force): Don't set args.
11727         * windows-nat.c (windows_detach): Remove args parameter.
11728
11729 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11730
11731         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11732         (arm_linux_init_abi): Install it.
11733
11734 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11735
11736         * osabi.c (gdb_osabi_names): Extend the regexp for
11737         arm-linux-gnueabihf.
11738
11739 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11740
11741         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11742         m_abbrevs.
11743         (abbrev_table::add_abbrev): Update.
11744         (abbrev_table::lookup_abbrev): Update.
11745
11746 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11747
11748         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11749
11750 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11751
11752         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11753         to "std::string".
11754
11755 2018-01-17  Tom Tromey  <tom@tromey.com>
11756
11757         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11758
11759 2018-01-17  Tom Tromey  <tom@tromey.com>
11760
11761         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11762         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11763         (create_array_type_with_stride): Update.
11764         * dwarf2read.c (set_die_type): Update.
11765
11766 2018-01-17  Tom Tromey  <tom@tromey.com>
11767
11768         * dwarf2read.c (delayed_method_info): Remove typedef.
11769         (dwarf2_cu::method_info): Now a std::vector.
11770         (add_to_method_list): Update.
11771         (free_delayed_list): Remove.
11772         (compute_delayed_physnames): Update.
11773         (process_full_comp_unit, process_full_type_unit): Clear the method
11774         list.  Remove cleanups.
11775         (psymtab_include_file_name): Add name_holder parameter.  Use
11776         unique_xmalloc_ptr.
11777         (dwarf_decode_lines): Update.
11778
11779 2018-01-17  Tom Tromey  <tom@tromey.com>
11780             Simon Marchi  <simon.marchi@ericsson.com>
11781
11782         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11783         (dwarf2_per_objfile::free_cached_comp_units)
11784         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11785         (init_cutu_and_read_dies_no_follow): Update.
11786         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11787         (dwarf2_cu::~dwarf2_cu): New.
11788         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11789         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11790
11791 2018-01-17  Tom Tromey  <tom@tromey.com>
11792             Simon Marchi  <simon.marchi@ericsson.com>
11793
11794         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11795         (struct die_reader_specs) <abbrev_table>: New member.
11796         (struct abbrev_table): Add constructor.
11797         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11798         <abbrev_obstack>: Now an auto_obstack.
11799         (abbrev_table_up): New typedef.
11800         (init_cu_die_reader): Add abbrev_table parameter.
11801         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11802         Add result_dwo_abbrev_table.
11803         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11804         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11805         Update.
11806         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11807         parameter.
11808         (skip_children): Update.
11809         (abbrev_table::alloc_abbrev): Rename from
11810         abbrev_table_alloc_abbrev.
11811         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11812         (abbrev_table::lookup_abbrev): Rename from
11813         abbrev_table_lookup_abbrev.
11814         (abbrev_table_read_table): Return abbrev_table_up.
11815         (abbrev_table_free, abbrev_table_free_cleanup)
11816         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11817         (load_partial_dies): Update.
11818
11819 2018-01-17  Tom Tromey  <tom@tromey.com>
11820
11821         * dwarf2read.c (dwarf2_compute_name): Update comment.
11822         (read_func_scope, read_variable): Update.
11823         (new_symbol): Remove.
11824         (new_symbol_full): Rename to new_symbol.
11825
11826 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11827
11828         PR gdb/16577
11829         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11830         a warning instead of throwing an error, set section size to 0 and return
11831         NULL.
11832         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11833
11834 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11835
11836         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11837         std::string.
11838         (linux_ptrace_attach_fail_reason_string): Likewise.
11839         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11840         Likewise.
11841         (linux_ptrace_attach_fail_reason_string): Likewise.
11842         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11843
11844 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11845
11846         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11847
11848 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
11849
11850         PR gdb/21559
11851         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11852         checking for fs_base/gs_base fields in struct user_regs_struct.
11853         * configure: Regenerate.
11854
11855 2018-01-17  Yao Qi  <yao.qi@linaro.org>
11856
11857         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11858         function.
11859         (aarch64_linux_init_abi): Install it to gdbarch hook
11860         gcc_target_options.
11861
11862 2018-01-15  Pedro Alves  <palves@redhat.com>
11863
11864         * common/signals-state-save-restore.c
11865         (save_original_signals_state): Fix typos.
11866
11867 2017-01-12  Tom Tromey  <tom@tromey.com>
11868             Sergio Durigan Junior  <sergiodj@redhat.com>
11869
11870         * Makefile.in (install-only): Install gdb-add-index.
11871
11872 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
11873
11874         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11875
11876 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11877
11878         * infrun.c (keep_going_pass_signal): Clear step-over info when
11879         insert_breakpoints fails.
11880
11881 2018-01-11  Pedro Alves  <palves@redhat.com>
11882
11883         PR gdb/22583
11884         * infrun.c (resume): Rename to ...
11885         (resume_1): ... this.
11886         (resume): Reimplement as wrapper around resume_1.
11887
11888 2018-01-11  Pedro Alves  <palves@redhat.com>
11889
11890         PR remote/22597
11891         * remote.c (remote_parse_stop_reply): Default to the last-set
11892         general thread instead of to 'magic_null_ptid'.
11893
11894 2018-01-10  Pedro Alves  <palves@redhat.com>
11895
11896         * language.h (language_get_symbol_name_matcher): Rename ...
11897         (get_symbol_name_matcher): ... this.
11898         * language.c (language_get_symbol_name_matcher): Ditto.
11899         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11900         callers adjusted.
11901
11902 2018-01-10  Pedro Alves  <palves@redhat.com>
11903
11904         PR gdb/22670
11905         * dwarf2read.c
11906         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11907         Adjust to use language_get_symbol_name_matcher instead of
11908         language_defn::la_get_symbol_name_matcher.
11909         * language.c (language_get_symbol_name_matcher): If in Ada mode
11910         and the lookup name is a verbatim match, return Ada's matcher.
11911         * language.h (language_get_symbol_name_matcher): Adjust comment.
11912         (ada_lookup_name_info::verbatim_p):: New method.
11913
11914 2018-01-10  Pedro Alves  <palves@redhat.com>
11915
11916         PR gdb/22670
11917         * ada-lang.c (ada_collect_symbol_completion_matches): If the
11918         minsym's language is language_auto or language_cplus, pass down
11919         language_ada instead.
11920         * symtab.c (compare_symbol_name): Don't frob symbol language here.
11921
11922 2018-01-10  Pedro Alves  <palves@redhat.com>
11923
11924         PR gdb/22670
11925         * minsyms.c (linkage_name_str): New function.
11926         (iterate_over_minimal_symbols): Use it.
11927
11928 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11929
11930         * NEWS: Document that 'info proc' now works on FreeBSD.
11931
11932 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11933
11934         * configure.ac: Check for kinfo_getfile in libutil.
11935         * configure: Regenerate.
11936         * config.in: Regenerate.
11937         * fbsd-nat.c: Include "fbsd-tdep.h".
11938         (fbsd_fetch_cmdline): New.
11939         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11940         rather than calling error.
11941         (fbsd_info_proc): New.
11942         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11943         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11944         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11945
11946 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11947
11948         * fbsd-nat.c (struct free_deleter): Remove.
11949         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11950
11951 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11952
11953         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11954         NULL for an empty pathname.
11955
11956 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11957
11958         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11959         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11960         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11961         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11962         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11963         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11964         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11965         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11966         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11967         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11968         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11969         (fbsd_core_fetch_timeval, fbsd_print_sigset)
11970         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11971         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
11972         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11973
11974 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
11975
11976         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11977         (gnu_xfer_auxv): New function.
11978         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11979         TARGET_OBJECT_AUXV.
11980
11981 2018-01-08  Yao Qi  <yao.qi@linaro.org>
11982             Simon Marchi  <simon.marchi@ericsson.com>
11983
11984         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11985         common/selftest.c.
11986         (COMMON_OBS): Remove selftest.o.
11987         * configure.ac: Append selftest-arch.c and common/selftest.c to
11988         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
11989         * configure: Re-generated.
11990         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11991         GDB_SELF_TEST.
11992         (maintenance_info_selftests): Likewise.
11993
11994 2018-01-08  Xavier Roirand  <roirand@adacore.com>
11995
11996         * ada-valprint.c (val_print_packed_array_elements): Use
11997         proper number of elements when printing an array indexed
11998         by an enumeration type.
11999
12000 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12001
12002         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12003         (dw2_get_file_names_reader): Adjust.
12004         (lookup_dwo_signatured_type): Adjust.
12005         (lookup_dwp_signatured_type): Adjust.
12006         (lookup_signatured_type): Adjust.
12007         (create_type_unit_group): Adjust.
12008         (get_type_unit_group): Adjust.
12009         (process_psymtab_comp_unit_reader): Adjust.
12010         (build_type_psymtabs_reader): Adjust.
12011         (scan_partial_symbols): Adjust.
12012         (add_partial_symbol): Adjust.
12013         (add_partial_subprogram): Adjust.
12014         (peek_die_abbrev): Adjust.
12015         (fixup_go_packaging): Adjust.
12016         (process_imported_unit_die): Adjust.
12017         (dwarf2_compute_name): Adjust.
12018         (dwarf2_physname): Adjust.
12019         (read_import_statement): Adjust.
12020         (handle_DW_AT_stmt_list): Adjust.
12021         (read_file_scope): Adjust.
12022         (read_func_scope): Adjust.
12023         (read_lexical_block_scope): Adjust.
12024         (read_call_site_scope): Adjust.
12025         (read_variable): Adjust.
12026         (dwarf2_rnglists_process): Adjust.
12027         (dwarf2_ranges_process): Adjust.
12028         (dwarf2_ranges_read): Adjust.
12029         (dwarf2_get_pc_bounds): Adjust.
12030         (dwarf2_record_block_ranges): Adjust.
12031         (dwarf2_add_field): Adjust.
12032         (dwarf2_add_member_fn): Adjust.
12033         (read_structure_type): Adjust.
12034         (process_structure_scope): Adjust.
12035         (read_enumeration_type): Adjust.
12036         (read_array_type): Adjust.
12037         (mark_common_block_symbol_computed): Adjust.
12038         (read_common_block): Adjust.
12039         (read_namespace_type): Adjust.
12040         (read_namespace): Adjust.
12041         (read_module_type): Adjust.
12042         (read_tag_pointer_type): Adjust.
12043         (read_tag_ptr_to_member_type): Adjust.
12044         (read_tag_string_type): Adjust.
12045         (read_subroutine_type): Adjust.
12046         (read_typedef): Adjust.
12047         (read_base_type): Adjust.
12048         (attr_to_dynamic_prop): Adjust.
12049         (read_subrange_type): Adjust.
12050         (read_unspecified_type): Adjust.
12051         (dwarf2_read_abbrevs): Adjust.
12052         (load_partial_dies): Adjust.
12053         (read_partial_die): Adjust.
12054         (find_partial_die): Adjust.
12055         (guess_partial_die_structure_name): Adjust.
12056         (fixup_partial_die): Adjust.
12057         (read_attribute_value): Adjust.
12058         (read_addr_index): Adjust.
12059         (read_addr_index_from_leb128): Adjust.
12060         (read_str_index): Adjust.
12061         (dwarf2_string_attr): Adjust.
12062         (get_debug_line_section): Adjust.
12063         (dwarf_decode_line_header): Adjust.
12064         (lnp_state_machine::check_line_address): Adjust.
12065         (dwarf_decode_lines_1): Adjust.
12066         (dwarf_decode_lines): Adjust.
12067         (dwarf2_start_symtab): Adjust.
12068         (var_decode_location): Adjust.
12069         (new_symbol_full): Adjust.
12070         (dwarf2_const_value_data): Adjust.
12071         (dwarf2_const_value_attr): Adjust.
12072         (dwarf2_const_value): Adjust.
12073         (die_type): Adjust.
12074         (die_containing_type): Adjust.
12075         (build_error_marker_type): Adjust.
12076         (lookup_die_type): Adjust.
12077         (guess_full_die_structure_name): Adjust.
12078         (anonymous_struct_prefix): Adjust.
12079         (determine_prefix): Adjust.
12080         (dwarf2_name): Adjust.
12081         (follow_die_ref_or_sig): Adjust.
12082         (follow_die_offset): Adjust.
12083         (follow_die_ref): Adjust.
12084         (follow_die_sig_1): Adjust.
12085         (follow_die_sig): Adjust.
12086         (get_signatured_type): Adjust.
12087         (get_DW_AT_signature_type): Adjust.
12088         (decode_locdesc): Adjust.
12089         (dwarf_decode_macros): Adjust.
12090         (cu_debug_loc_section): Adjust.
12091         (fill_in_loclist_baton): Adjust.
12092         (dwarf2_symbol_mark_computed): Adjust.
12093         (init_one_comp_unit): Don't assign
12094         dwarf2_cu::dwarf2_per_objfile.
12095         (set_die_type): Adjust.
12096
12097 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12098
12099         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12100         <dwarf2_per_objfile>: New field.
12101         (dwarf2_per_objfile): Remove global.
12102         (get_dwarf2_per_objfile): New function.
12103         (set_dwarf2_per_objfile): New function.
12104         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12105         dwarf2_per_objfile.
12106         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12107         (read_abbrev_offset): Likewise.
12108         (read_indirect_string): Likewise.
12109         (read_indirect_line_string): Likewise.
12110         (read_indirect_string_at_offset): Likewise.
12111         (read_indirect_string_from_dwz): Likewise.
12112         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12113         dwarf2_per_objfile.
12114         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12115         (create_all_comp_units): Change objfile parameter to
12116         dwarf2_per_objfile.
12117         (create_all_type_units): Likewise.
12118         (process_queue): Add dwarf2_per_objfile parameter.
12119         (read_and_check_comp_unit_head): Likewise.
12120         (lookup_dwo_unit_in_dwp): Likewise.
12121         (get_dwp_file): Likewise.
12122         (process_cu_includes): Likewise.
12123         (struct free_dwo_file_cleanup_data): New struct.
12124         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12125         set_dwarf2_per_objfile.
12126         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12127         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12128         context, adjust calls.
12129         (dw2_instantiate_symtab): Likewise.
12130         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12131         (dw2_get_cu): Likewise.
12132         (create_cu_from_index_list): Change objfile parameter to
12133         dwarf2_per_objfile.
12134         (create_cus_from_index_list): Get dwarf2_per_objfile from
12135         context, adjust calls.
12136         (create_cus_from_index): Likewise.
12137         (create_signatured_type_table_from_index): Change objfile
12138         parameter to dwarf2_per_objfile.
12139         (create_signatured_type_table_from_debug_names): Change objfile
12140         parameter to dwarf2_per_objfile.
12141         (create_addrmap_from_index): Likewise.
12142         (create_addrmap_from_aranges): Likewise.
12143         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12144         (dw2_setup): Remove.
12145         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12146         context.
12147         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12148         get_dwarf2_per_objfile.
12149         (dw2_forget_cached_source_info): Likewise.
12150         (dw2_map_symtabs_matching_filename): Likewise.
12151         (struct dw2_symtab_iterator) <index>: Remove.
12152         <dwarf2_per_objfile>: New field.
12153         (dw2_symtab_iter_init): Replace index parameter with
12154         dwarf2_per_objfile.
12155         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12156         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12157         (dw2_print_stats): Likewise.
12158         (dw2_dump): Likewise.
12159         (dw2_expand_symtabs_for_function): Likewise.
12160         (dw2_expand_all_symtabs): Likewise.
12161         (dw2_expand_symtabs_with_fullname): Likewise.
12162         (dw2_expand_marked_cus): Replace index and objfile parameters
12163         with dwarf2_per_objfile.
12164         (dw_expand_symtabs_matching_file_matcher): Add
12165         dwarf2_per_objfile parameter and adjust calls.
12166         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12167         adjust calls.
12168         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12169         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12170         adjust calls.
12171         (create_cus_from_debug_names_list): Replace objfile parameter
12172         with dwarf2_per_objfile and adjust calls.
12173         (create_cus_from_debug_names): Likewise.
12174         (dwarf2_read_debug_names): Likewise.
12175         (mapped_debug_names::namei_to_name): Adjust call.
12176         (dw2_debug_names_iterator::next): Likewise.
12177         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12178         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12179         (dw2_debug_names_dump): Likewise.
12180         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12181         (dw2_debug_names_expand_symtabs_matching): Likewise.
12182         (dwarf2_initialize_objfile): Likewise.
12183         (dwarf2_build_psymtabs): Likewise.
12184         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12185         this_cu.
12186         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12187         (read_and_check_comp_unit_head): Likewise.
12188         (read_abbrev_offset): Likewise.
12189         (create_debug_type_hash_table): Likewise.
12190         (create_debug_types_hash_table): Likewise.
12191         (create_all_type_units): Replace objfile parameter with
12192         dwarf2_per_objfile.
12193         (add_type_unit): Add dwarf2_per_objfile parameter.
12194         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12195         with dwarf2_per_objfile.
12196         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12197         (lookup_dwp_signatured_type): Likewise.
12198         (lookup_signatured_type): Likewise.
12199         (read_cutu_die_from_dwo): Likewise.
12200         (init_tu_and_read_dwo_dies): Likewise.
12201         (init_cutu_and_read_dies): Likewise.
12202         (init_cutu_and_read_dies_no_follow): Likewise.
12203         (allocate_type_unit_groups_table): Add objfile parameter.
12204         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12205         (get_type_unit_group): Likewise.
12206         (process_psymtab_comp_unit): Update call.
12207         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12208         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12209         (print_tu_stats): Likewise.
12210         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12211         in void* parameter.
12212         (build_type_psymtabs): Change objfile parameter to
12213         dwarf2_per_objfile.
12214         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12215         passed in void* parameter.
12216         (process_skeletonless_type_units): Change objfile parameter to
12217         dwarf2_per_objfile.
12218         (set_partial_user): Likewise.
12219         (dwarf2_build_psymtabs_hard): Likewise.
12220         (read_comp_units_from_section): Likewise.
12221         (create_all_comp_units): Likewise.
12222         (scan_partial_symbols): Update calls.
12223         (add_partial_symbol): Likewise.
12224         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12225         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12226         (process_queue): Add dwarf2_per_objfile parameter.
12227         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12228         (compute_compunit_symtab_includes): Likewise.
12229         (process_cu_includes): Add dwarf2_per_objfile parameter.
12230         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12231         (process_full_type_unit): Likewise.
12232         (process_imported_unit_die): Update call.
12233         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12234         (read_file_scope): Likewise.
12235         (allocate_dwo_file_hash_table): Add objfile parameter.
12236         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12237         (create_cus_hash_table): Likewise.
12238         (create_dwp_hash_table): Likewise.
12239         (create_dwo_unit_in_dwp_v1): Likewise.
12240         (create_dwp_v2_section): Likewise.
12241         (create_dwo_unit_in_dwp_v2): Likewise.
12242         (lookup_dwo_unit_in_dwp): Likewise.
12243         (try_open_dwop_file): Likewise.
12244         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12245         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12246         cleanup to include a reference to dwarf2_per_objfile.
12247         (open_dwp_file): Add dwarf2_per_objfile parameter.
12248         (open_and_init_dwp_file): Likewise.
12249         (get_dwp_file): Likewise.
12250         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12251         (queue_and_load_all_dwo_tus): Update call.
12252         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12253         data.
12254         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12255         (dwarf2_ranges_process): Likewise.
12256         (dwarf2_get_pc_bounds): Likewise.
12257         (mark_common_block_symbol_computed): Likewise.
12258         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12259         (dwarf2_read_abbrevs): Update call.
12260         (read_partial_die): Use dwarf2_per_objfile from cu.
12261         (find_partial_die): Likewise.
12262         (fixup_partial_die): Likewise.
12263         (read_attribute_value): Likewise.
12264         (read_indirect_string_at_offset_from): Add objfile parameter.
12265         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12266         parameter.
12267         (read_indirect_string_from_dwz): Add objfile parameter.
12268         (read_indirect_string): Add objfile parameter.
12269         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12270         (read_addr_index): Use dwarf2_per_objfile from cu.
12271         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12272         call dw2_setup.
12273         (read_str_index): Use dwarf2_per_objfile from cu.
12274         (get_debug_line_section): Likewise.
12275         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12276         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12277         (new_symbol_full): Use dwarf2_per_objfile from cu.
12278         (build_error_marker_type): Likewise.
12279         (lookup_die_type): Likewise.
12280         (determine_prefix): Likewise.
12281         (follow_die_offset): Likewise.
12282         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12283         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12284         (dwarf2_fetch_die_type_sect_off): Likewise.
12285         (dwarf2_get_die_type): Likewise.
12286         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12287         (get_signatured_type): Likewise.
12288         (get_DW_AT_signature_type): Likewise.
12289         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12290         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12291         (cu_debug_loc_section): Likewise.
12292         (fill_in_loclist_baton): Likewise.
12293         (dwarf2_symbol_mark_computed): Likewise.
12294         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12295         dwarf2_per_objfile.
12296         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12297         parameter.
12298         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12299         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12300         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12301         (set_die_type): Use dwarf2_free_objfile from cu.
12302         (get_die_type_at_offset): Likewise.
12303         (dwarf2_per_objfile_free): Don't assign global variable.
12304         (debug_names) <constructor>: Add dwarf2_per_objfile
12305         parameter, update m_debugstrlookup construction.
12306         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12307         parameter.
12308         <m_dwarf2_per_objfile>: New field.
12309         <lookup>: Use m_dwarf2_per_objfile.
12310         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12311         (psyms_seen_size): Likewise.
12312         (write_gdbindex): Replace objfile parameter with
12313         dwarf2_per_objfile.
12314         (write_debug_names): Likewise.
12315         (write_psymtabs_to_index): Likewise.
12316         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12317         calls.
12318
12319 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12320
12321         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12322         <dwarf2_per_objfile>: New field.
12323         (struct dwarf2_per_cu_data) <objfile>: Remove.
12324         <dwarf2_per_objfile>: New field.
12325         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12326         of objfile.
12327         (create_signatured_type_table_from_index): Likewise.
12328         (create_debug_type_hash_table): Likewise.
12329         (fill_in_sig_entry_from_dwo_entry): Likewise.
12330         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12331         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12332         objfile.
12333         (create_partial_symtab): Access objfile through
12334         dwarf2_per_objfile.
12335         (process_psymtab_comp_unit_reader): Likewise.
12336         (read_comp_units_from_section): Likewise.
12337         (scan_partial_symbols): Likewise.
12338         (add_partial_symbol): Likewise.
12339         (add_partial_subprogram): Likewise.
12340         (peek_die_abbrev): Likewise.
12341         (fixup_go_packaging): Likewise.
12342         (process_full_comp_unit): Likewise.
12343         (process_full_type_unit): Likewise.
12344         (process_imported_unit_die): Likewise.
12345         (dwarf2_compute_name): Likewise.
12346         (dwarf2_physname): Likewise.
12347         (read_import_statement): Likewise.
12348         (create_cus_hash_table): Assign dwarf2_physname instead of
12349         objfile.
12350         (read_func_scope): Access objfile through dwarf2_per_objfile.
12351         (read_lexical_block_scope): Likewise.
12352         (read_call_site_scope): Likewise.
12353         (read_variable): Likewise.
12354         (dwarf2_rnglists_process): Likewise.
12355         (dwarf2_ranges_process): Likewise.
12356         (dwarf2_ranges_read): Likewise.
12357         (dwarf2_record_block_ranges): Likewise.
12358         (dwarf2_add_field): Likewise.
12359         (dwarf2_add_member_fn): Likewise.
12360         (read_structure_type): Likewise.
12361         (process_structure_scope): Likewise.
12362         (read_enumeration_type): Likewise.
12363         (read_array_type): Likewise.
12364         (read_common_block): Likewise.
12365         (read_namespace_type): Likewise.
12366         (read_namespace): Likewise.
12367         (read_module_type): Likewise.
12368         (read_tag_pointer_type): Likewise.
12369         (read_tag_ptr_to_member_type): Likewise.
12370         (read_tag_string_type): Likewise.
12371         (read_subroutine_type): Likewise.
12372         (read_typedef): Likewise.
12373         (read_base_type): Likewise.
12374         (attr_to_dynamic_prop): Likewise.
12375         (read_subrange_type): Likewise.
12376         (read_unspecified_type): Likewise.
12377         (load_partial_dies): Likewise.
12378         (read_partial_die): Likewise.
12379         (find_partial_die): Likewise.
12380         (guess_partial_die_structure_name): Likewise.
12381         (fixup_partial_die): Likewise.
12382         (read_attribute_value): Likewise.
12383         (read_addr_index_from_leb128): Likewise.
12384         (dwarf2_read_addr_index): Likewise.
12385         (dwarf2_string_attr): Likewise.
12386         (lnp_state_machine::check_line_address): Likewise.
12387         (dwarf_decode_lines_1): Likewise.
12388         (dwarf_decode_lines): Likewise.
12389         (dwarf2_start_symtab): Likewise.
12390         (var_decode_location): Likewise.
12391         (new_symbol_full): Likewise.
12392         (dwarf2_const_value_data): Likewise.
12393         (dwarf2_const_value_attr): Likewise.
12394         (dwarf2_const_value): Likewise.
12395         (die_type): Likewise.
12396         (die_containing_type): Likewise.
12397         (lookup_die_type): Likewise.
12398         (guess_full_die_structure_name): Likewise.
12399         (anonymous_struct_prefix): Likewise.
12400         (dwarf2_name): Likewise.
12401         (follow_die_ref_or_sig): Likewise.
12402         (follow_die_offset): Likewise.
12403         (follow_die_ref): Likewise.
12404         (dwarf2_fetch_die_loc_sect_off): Likewise.
12405         (dwarf2_fetch_constant_bytes): Likewise.
12406         (dwarf2_fetch_die_type_sect_off): Likewise.
12407         (dwarf2_get_die_type): Likewise.
12408         (follow_die_sig): Likewise.
12409         (decode_locdesc): Likewise.
12410         (dwarf2_per_cu_objfile): Likewise.
12411         (dwarf2_per_cu_text_offset): Likewise.
12412         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12413         objfile.
12414         (set_die_type): Access objfile through
12415         dwarf2_per_objfile.
12416
12417 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12418
12419         * valprint.c (converted_character_d): Remove typedef.
12420         (DEF_VEC_O (converted_character_d)): Remove.
12421         (count_next_character): Use std::vector.
12422         (print_converted_chars_to_obstack): Likewise.
12423         (generic_printstr): Likewise.
12424
12425 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12426
12427         * xml-support.h (struct gdb_xml_value): Add constructor.
12428         <value>: Change type to unique_xmalloc_ptr.
12429         (gdb_xml_value_s): Remove typedef.
12430         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12431         (gdb_xml_element_start_handler): Change parameter type to
12432         std::vector.
12433         (xml_find_attribute): Likewise.
12434         * xml-support.c (xml_find_attribute): Change parameter type to
12435         std::vector and adjust.
12436         (gdb_xml_values_cleanup): Remove.
12437         (gdb_xml_parser::start_element): Adjust to std::vector.
12438         (xinclude_start_include): Change paraeter type to std::vector
12439         and adjust.
12440         * btrace.c (check_xml_btrace_version): Likewise.
12441         (parse_xml_btrace_block): Likewise.
12442         (parse_xml_btrace_pt_config_cpu): Likewise.
12443         (parse_xml_btrace_pt): Likewise.
12444         (parse_xml_btrace_conf_bts): Likewise.
12445         (parse_xml_btrace_conf_pt): Likewise.
12446         * memory-map.c (memory_map_start_memory): Likewise.
12447         (memory_map_start_property): Likewise.
12448         * osdata.c (osdata_start_osdata): Likewise.
12449         (osdata_start_item): Likewise.
12450         (osdata_start_column): Likewise.
12451         * remote.c (start_thread): Likewise.
12452         * solib-aix.c (library_list_start_library): Likewise.
12453         (library_list_start_list): Likewise.
12454         * solib-svr4.c (library_list_start_library): Likewise.
12455         (svr4_library_list_start_list): Likewise.
12456         * solib-target.c (library_list_start_segment): Likewise.
12457         (library_list_start_section): Likewise.
12458         (library_list_start_library): Likewise.
12459         (library_list_start_list): Likewise.
12460         * tracepoint.c (traceframe_info_start_memory): Likewise.
12461         (traceframe_info_start_tvar): Likewise.
12462         * xml-syscall.c (syscall_start_syscall): Likewise.
12463         * xml-tdesc.c (tdesc_start_target): Likewise.
12464         (tdesc_start_feature): Likewise.
12465         (tdesc_start_reg): Likewise.
12466         (tdesc_start_union): Likewise.
12467         (tdesc_start_struct): Likewise.
12468         (tdesc_start_flags): Likewise.
12469         (tdesc_start_enum): Likewise.
12470         (tdesc_start_field): Likewise.
12471         (tdesc_start_enum_value): Likewise.
12472         (tdesc_start_vector): Likewise.
12473
12474 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12475
12476         * extension.h (struct xmethod_worker) <clone>: Remove.
12477         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12478         Remove.
12479         (python_xmethod_worker::clone): Remove.
12480         * valops.c (find_overload_match): Use std::move instead of
12481         clone.
12482
12483 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12484
12485         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12486         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12487         <free_xmethod_worker_data>: Remove.
12488         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12489         <get_xmethod_arg_types>: Remove.
12490         <get_xmethod_result_type>: Remove.
12491         <invoke_xmethod>: Remove.
12492         * extension.c (new_xmethod_worker): Remove.
12493         (clone_xmethod_worker): Remove.
12494         (get_matching_xmethod_workers): Return void, pass std::vector by
12495         pointer.
12496         (get_xmethod_arg_types): Rename to...
12497         (xmethod_worker::get_arg_types): ... this, and adjust.
12498         (get_xmethod_result_type): Rename to...
12499         (xmethod_worker::get_result_type): ... this, and adjust.
12500         (invoke_xmethod): Remove.
12501         (free_xmethod_worker): Remove.
12502         (free_xmethod_worker_vec): Remove.
12503         * extension.h (enum ext_lang_rc): Move here from
12504         extension-priv.h.
12505         (struct xmethod_worker): Add constructor and destructor.
12506         <data>: Remove.
12507         <value>: Remove.
12508         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12509         virtual pure methods.
12510         <get_arg_types, get_result_type>: New methods.
12511         (xmethod_worker_ptr): Remove typedef.
12512         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12513         (xmethod_worker_vec): Remove typedef.
12514         (xmethod_worker_up): New typedef.
12515         (invoke_xmethod): Remove.
12516         (clone_xmethod_worker): Remove.
12517         (free_xmethod_worker): Remove.
12518         (free_xmethod_worker_vec): Remove.
12519         (get_xmethod_arg_types): Remove.
12520         (get_xmethod_result_type): Remove.
12521         * valops.c (find_method_list): Use std::vector, don't use
12522         intermediate vector.
12523         (value_find_oload_method_list): Use std::vector.
12524         (find_overload_match): Use std::vector.
12525         (find_oload_champ): Use std::vector.
12526         * value.c (value_free): Use operator delete.
12527         (value_of_xmethod): Rename to...
12528         (value_from_xmethod): ... this.  Don't assign
12529         xmethod_worker::value, take rvalue-reference.
12530         (result_type_of_xmethod): Adjust.
12531         (call_xmethod): Adjust.
12532         * value.h: Include extension.h.
12533         (struct xmethod_worker): Don't forward-declare.
12534         (value_of_xmethod): Rename to...
12535         (value_from_xmethod): ... this, take rvalue-reference.
12536         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12537         (struct python_xmethod_worker): ... this, add constructor and
12538         destructor.
12539         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12540         (gdbpy_free_xmethod_worker_data): Rename to...
12541         (python_xmethod_worker::~python_xmethod_worker): ... this and
12542         adjust.
12543         (gdbpy_clone_xmethod_worker_data): Rename to...
12544         (python_xmethod_worker::clone): ... this and adjust.
12545         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12546         temporary vector.
12547         (gdbpy_get_xmethod_arg_types): Rename to...
12548         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12549         (gdbpy_get_xmethod_result_type): Rename to...
12550         (python_xmethod_worker::do_get_result_type): ... this and
12551         adjust.
12552         (gdbpy_invoke_xmethod): Rename to...
12553         (python_xmethod_worker::invoke): ... this and adjust.
12554         (new_python_xmethod_worker): Rename to...
12555         (python_xmethod_worker::python_xmethod_worker): ... this and
12556         adjust.
12557         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12558         Remove.
12559         (gdbpy_free_xmethod_worker_data): Remove.
12560         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12561         (gdbpy_get_xmethod_arg_types): Remove.
12562         (gdbpy_get_xmethod_result_type): Remove.
12563         (gdbpy_invoke_xmethod): Remove.
12564         * python/python.c (python_extension_ops): Remove obsolete
12565         callbacks.
12566
12567 2018-01-05  Pedro Alves  <palves@redhat.com>
12568
12569         PR gdb/18653
12570         * common/signals-state-save-restore.c
12571         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12572         find a custom handler preinstalled, instead of internal erroring.
12573         But only warn if !quiet.
12574         * common/signals-state-save-restore.h
12575         (save_original_signals_state): New parameter 'quiet'.
12576         * main.c (captured_main_1): Move save_original_signals_state call
12577         after option handling, and pass QUIET.
12578
12579 2018-01-05  Pedro Alves  <palves@redhat.com>
12580
12581         * spu-tdep.c (spu_catch_start): Pass
12582         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12583
12584 2018-01-05  Pedro Alves  <palves@redhat.com>
12585
12586         PR gdb/22670
12587         * ada-lang.c (literal_symbol_name_matcher): New function.
12588         (ada_get_symbol_name_matcher): Use it for
12589         symbol_name_match_type::SEARCH_NAME.
12590         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12591         it down instead of assuming symbol_name_match_type::FULL.
12592         * block.h (block_lookup_symbol): New parameter 'match_type'.
12593         * c-valprint.c (print_unpacked_pointer): Use
12594         lookup_symbol_search_name instead of lookup_symbol.
12595         * compile/compile-object-load.c (get_out_value_type): Pass down
12596         symbol_name_match_type::SEARCH_NAME.
12597         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12598         symbol_name_match_type::FULL.
12599         * cp-support.c (cp_get_symbol_name_matcher): Handle
12600         symbol_name_match_type::SEARCH_NAME.
12601         * infrun.c (insert_exception_resume_breakpoint): Use
12602         lookup_symbol_search_name.
12603         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12604         * psymtab.c (maintenance_check_psymtabs): Use
12605         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12606         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12607         SYMBOL_SEARCH_NAME.
12608         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12609         if symbol_name_match_type::SEARCH_NAME.
12610         (lookup_symbol_in_language): Pass down
12611         symbol_name_match_type::FULL.
12612         (lookup_symbol_search_name): New.
12613         (lookup_language_this): Pass down
12614         symbol_name_match_type::SEARCH_NAME.
12615         (lookup_symbol_aux, lookup_local_symbol): New parameter
12616         'match_type'.  Pass it down.
12617         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12618         (lookup_symbol_search_name): New declaration.
12619         (lookup_symbol_in_block): New 'match_type' parameter.
12620
12621 2018-01-05  Pedro Alves  <palves@redhat.com>
12622
12623         PR gdb/22670
12624         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12625         ada_lookup_symbol.
12626         (ada_lookup_symbol): Reimplement in terms of
12627         ada_lookup_symbol_list, bits factored out from
12628         ada_lookup_encoded_symbol.
12629
12630 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12631
12632         * ada-exp.y (write_object_renaming): When subscripting an array
12633         using a symbol as the index, pass the block in call to
12634         ada_lookup_encoded_symbol when looking that symbol up.
12635
12636 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12637
12638         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12639         TYPE_INDEX_TYPE.
12640
12641 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12642
12643         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12644         the case where VALUE_LVAL (val0) is not lval_memory.
12645
12646 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12647
12648         * ada-valprint.c (print_optional_low_bound): Handle
12649         character-indexed array printing like boolean-indexed array
12650         printing.
12651
12652 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12653
12654         * NEWS: Create a new section for the next release branch.
12655         Rename the section of the current branch, now that it has
12656         been cut.
12657
12658 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12659
12660         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12661         * version.in: Bump version to 8.1.50.DATE-git.
12662
12663 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12664
12665         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12666         Add field.
12667         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12668         Add field.
12669         (default_exception_support_info) <catch_handlers_sym>: Add field.
12670         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12671         (ada_exception_name_addr_1): Add "catch handlers" handling.
12672         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12673         Update all callers.
12674         (create_excep_cond_exprs) <ex>: Add parameter.
12675         (re_set_exception): Update create_excep_cond_exprs call.
12676         (print_it_exception, print_one_exception, print_mention_exception)
12677         (print_recreate_exception): Add "catch handler" handling.
12678         (allocate_location_catch_handlers, re_set_catch_handlers)
12679         (check_status_catch_handlers, print_it_catch_handlers)
12680         (print_one_catch_handlers, print_mention_catch_handlers)
12681         (print_recreate_catch_handlers): New function.
12682         (catch_handlers_breakpoint_ops): New variable.
12683         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12684         Add parameter.  Add "catch handler" handling.
12685         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12686         Add "catch handler" handling.
12687         (ada_exception_catchpoint_cond_string): Add "catch handler"
12688         handling.
12689         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12690         call.
12691         (catch_ada_handlers_command): New function.
12692         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12693         operations structure.
12694         (_initialize_ada_language): Add "catch handlers" command entry.
12695         * NEWS: Document "catch handlers" feature.
12696
12697 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12698
12699         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12700         account when creating the array type of the slice.
12701         (ada_value_slice): Likewise.
12702
12703 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12704
12705         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12706         New enum value.
12707         (create_array_type_with_stride): Add byte_stride_prop parameter.
12708         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12709         New parameter.  Update all callers in this file.
12710         (array_type_has_dynamic_stride): New function.
12711         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12712         of arrays with dynamic byte strides.
12713         * dwarf2read.c (read_array_type): Add support for dynamic
12714         DW_AT_byte_stride attributes.
12715
12716 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12717
12718         * dwarf2read.c (read_unspecified_type): Treat
12719         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12720
12721 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12722
12723         Update copyright year range in all GDB files.
12724
12725 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12726
12727         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12728         and gdb/testsuite/gdb.base/step-line.c.
12729
12730 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12731
12732         * copyright.py (main): Dump the contents of
12733         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12734         even if BY_HAND is empty.
12735
12736 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12737
12738         * top.c (print_gdb_version): Update Copyright year in version
12739         message.
12740
12741 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12742
12743         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12744
12745 For older changes see ChangeLog-2017.
12746 \f
12747 Local Variables:
12748 mode: change-log
12749 left-margin: 8
12750 fill-column: 74
12751 version-control: never
12752 coding: utf-8
12753 End: